From: Matthias Fuchs Date: Wed, 2 Jan 2008 11:05:14 +0000 (+0100) Subject: ppc4xx: More cleanup for esd's LCD code X-Git-Tag: v1.3.2-rc1~102^2~49^2~35^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ac6b6f3d3f1b072d89268b2efe47e95e6659489;p=u-boot ppc4xx: More cleanup for esd's LCD code Signed-off-by: Matthias Fuchs --- diff --git a/board/esd/common/lcd.c b/board/esd/common/lcd.c index 4116838b28..ed50def484 100644 --- a/board/esd/common/lcd.c +++ b/board/esd/common/lcd.c @@ -37,41 +37,41 @@ int lcd_depth; unsigned char *glob_lcd_reg; unsigned char *glob_lcd_mem; -#ifdef CFG_LCD_ENDIAN +#if defined(CFG_LCD_ENDIAN) void lcd_setup(int lcd, int config) { if (lcd == 0) { /* * Set endianess and reset lcd controller 0 (small) */ - out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_LCD0_RST); /* set reset to low */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) & ~CFG_LCD0_RST); /* set reset to low */ udelay(10); /* wait 10us */ if (config == 1) - out32(GPIO0_OR, in32(GPIO0_OR) | CFG_LCD_ENDIAN); /* big-endian */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | CFG_LCD_ENDIAN); /* big-endian */ else - out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_LCD_ENDIAN); /* little-endian */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) & ~CFG_LCD_ENDIAN); /* little-endian */ udelay(10); /* wait 10us */ - out32(GPIO0_OR, in32(GPIO0_OR) | CFG_LCD0_RST); /* set reset to high */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | CFG_LCD0_RST); /* set reset to high */ } else { /* * Set endianess and reset lcd controller 1 (big) */ - out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_LCD1_RST); /* set reset to low */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) & ~CFG_LCD1_RST); /* set reset to low */ udelay(10); /* wait 10us */ if (config == 1) - out32(GPIO0_OR, in32(GPIO0_OR) | CFG_LCD_ENDIAN); /* big-endian */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | CFG_LCD_ENDIAN); /* big-endian */ else - out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_LCD_ENDIAN); /* little-endian */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) & ~CFG_LCD_ENDIAN); /* little-endian */ udelay(10); /* wait 10us */ - out32(GPIO0_OR, in32(GPIO0_OR) | CFG_LCD1_RST); /* set reset to high */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | CFG_LCD1_RST); /* set reset to high */ } /* * CFG_LCD_ENDIAN may also be FPGA_RESET, so set inactive */ - out32(GPIO0_OR, in32(GPIO0_OR) | CFG_LCD_ENDIAN); /* set reset high again */ + out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | CFG_LCD_ENDIAN); /* set reset high again */ } -#endif /* #ifdef CFG_LCD_ENDIAN */ +#endif /* CFG_LCD_ENDIAN */ void lcd_bmp(uchar *logo_bmp) @@ -93,7 +93,6 @@ void lcd_bmp(uchar *logo_bmp) * Check for bmp mark 'BM' */ if (*(ushort *)logo_bmp != 0x424d) { - /* * Decompress bmp image */ @@ -160,7 +159,7 @@ void lcd_bmp(uchar *logo_bmp) */ if ((colors <= 256) && (lcd_depth <= 8)) { ptr = (unsigned char *)(dst + 14 + 40); - for (i=0; i