WS cleanup: remove SPACE(s) followed by TAB
[platform/kernel/u-boot.git] / drivers / video / bus_vcxk.c
index 0138bca..3863662 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2005-2009
  * Jens Scharsig @ BuS Elektronik GmbH & Co. KG, <esw@bus-elektronik.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <bmp_layout.h>
+#include <log.h>
 #include <asm/io.h>
 
 vu_char  *vcxk_bws      = ((vu_char *) (CONFIG_SYS_VCXK_BASE));
@@ -20,7 +20,6 @@ vu_long  *vcxk_bws_long = ((vu_long *) (CONFIG_SYS_VCXK_BASE));
        #ifndef VCBITMASK
                #define VCBITMASK(bitno)        (0x0001 << (bitno % 16))
        #endif
-#ifndef CONFIG_AT91_LEGACY
 at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
 #define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
        do { \
@@ -37,20 +36,6 @@ at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
 #define VCXK_ACKNOWLEDGE       \
        (!(readl(&pio->CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT.pdsr) & \
                        CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
-#else
-       #define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
-               ((AT91PS_PIO) PORT)->PIO_PER = PIN; \
-               ((AT91PS_PIO) PORT)->DDR = PIN; \
-               ((AT91PS_PIO) PORT)->PIO_MDDR = PIN; \
-               if (!I0O1) ((AT91PS_PIO) PORT)->PIO_PPUER = PIN;
-
-       #define VCXK_SET_PIN(PORT, PIN) ((AT91PS_PIO) PORT)->PIO_SODR  = PIN;
-       #define VCXK_CLR_PIN(PORT, PIN) ((AT91PS_PIO) PORT)->PIO_CODR  = PIN;
-
-       #define VCXK_ACKNOWLEDGE        \
-               (!(((AT91PS_PIO) CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT)->\
-                       PIO_PDSR & CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
-#endif
 #elif defined(CONFIG_MCF52x2)
        #include <asm/m5282.h>
        #ifndef VCBITMASK
@@ -78,8 +63,8 @@ at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
 
 #ifndef CONFIG_SYS_VCXK_DOUBLEBUFFERED
        #define VCXK_BWS(x, data)               vcxk_bws[x] = data;
-       #define VCXK_BWS_WORD_SET(x, mask)      vcxk_bws_word[x] |= mask;
-       #define VCXK_BWS_WORD_CLEAR(x, mask)    vcxk_bws_word[x] &= ~mask;
+       #define VCXK_BWS_WORD_SET(x, mask)      vcxk_bws_word[x] |= mask;
+       #define VCXK_BWS_WORD_CLEAR(x, mask)    vcxk_bws_word[x] &= ~mask;
        #define VCXK_BWS_LONG(x, data)          vcxk_bws_long[x] = data;
 #else
        u_char double_bws[16384];
@@ -98,7 +83,7 @@ at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
 #endif
 
 #define VC4K16_Bright1 vcxk_bws_word[0x20004 / 2]
-#define VC4K16_Bright2         vcxk_bws_word[0x20006 / 2]
+#define VC4K16_Bright2 vcxk_bws_word[0x20006 / 2]
 #define VC2K_Bright    vcxk_bws[0x8000]
 #define VC8K_BrightH   vcxk_bws[0xC000]
 #define VC8K_BrightL   vcxk_bws[0xC001]
@@ -278,7 +263,7 @@ void vcxk_clear(void)
  * set the display brightness
  * PARAMETER
  * side        1       set front side brightness
- *             2       set back  side brightness
+ *             2       set back  side brightness
  *             3       set brightness for both sides
  * brightness 0..1000
  ***
@@ -291,7 +276,7 @@ void vcxk_setbrightness(unsigned int side, short brightness)
                        VC4K16_Bright1 = brightness + 23;
                if ((side == 0) || (side & 0x2))
                        VC4K16_Bright2 = brightness + 23;
-       } else  {
+       } else  {
                VC2K_Bright = (brightness >> 4) + 2;
                VC8K_BrightH = (brightness + 23) >> 8;
                VC8K_BrightL = (brightness + 23) & 0xFF;
@@ -373,7 +358,7 @@ void vcxk_draw_mono(unsigned char *dataptr, unsigned long linewidth,
 
 int vcxk_display_bitmap(ulong addr, int x, int y)
 {
-       bmp_image_t *bmp;
+       struct bmp_image *bmp;
        unsigned long width;
        unsigned long height;
        unsigned long bpp;
@@ -384,7 +369,7 @@ int vcxk_display_bitmap(ulong addr, int x, int y)
        unsigned long c_height;
        unsigned char *dataptr;
 
-       bmp = (bmp_image_t *) addr;
+       bmp = (struct bmp_image *)addr;
        if ((bmp->header.signature[0] == 'B') &&
            (bmp->header.signature[1] == 'M')) {
                width        = le32_to_cpu(bmp->header.width);