]> git.sur5r.net Git - u-boot/commitdiff
ppc4xx: use correct io accessors for esd's LCD code
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>
Fri, 28 Dec 2007 16:10:44 +0000 (17:10 +0100)
committerStefan Roese <sr@denx.de>
Fri, 28 Dec 2007 16:21:38 +0000 (17:21 +0100)
This patch fixes esd's LCD dectection code to work correctly with
newer gcc versions.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
board/esd/common/lcd.c

index 196171ce5aa9dab779def53adb4952fa47352765..71d5058e4046fd29dd7703fbdbaa41ab3721cf1c 100644 (file)
@@ -24,6 +24,7 @@
  * MA 02111-1307 USA
  */
 
+#include "asm/io.h"
 #include "lcd.h"
 
 
@@ -229,10 +230,10 @@ void lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
        /*
         * Detect epson
         */
-       lcd_reg[0] = 0x00;
-       lcd_reg[1] = 0x00;
+       out_8(&lcd_reg[0], 0x00);
+       out_8(&lcd_reg[1], 0x00);
 
-       if (lcd_reg[0] == 0x1c) {
+             if (in_8(&lcd_reg[0]) == 0x1c) {
                /*
                 * Big epson detected
                 */
@@ -241,7 +242,7 @@ void lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
                palette_value = 0x1e4;
                lcd_depth = 16;
                puts("LCD:   S1D13806");
-       } else if (lcd_reg[1] == 0x1c) {
+             } else if (in_8(&lcd_reg[1]) == 0x1c) {
                /*
                 * Big epson detected (with register swap bug)
                 */
@@ -250,7 +251,7 @@ void lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
                palette_value = 0x1e5;
                lcd_depth = 16;
                puts("LCD:   S1D13806S");
-       } else if (lcd_reg[0] == 0x18) {
+             } else if (in_8(&lcd_reg[0]) == 0x18) {
                /*
                 * Small epson detected (704)
                 */
@@ -259,7 +260,7 @@ void lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
                palette_value = 0x17;
                lcd_depth = 8;
                puts("LCD:   S1D13704");
-       } else if (lcd_reg[0x10000] == 0x24) {
+             } else if (in_8(&lcd_reg[0x10000]) == 0x24) {
                /*
                 * Small epson detected (705)
                 */
@@ -277,7 +278,7 @@ void lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
        /*
         * Setup lcd controller regs
         */
-       for (i = 0; i<reg_count; i++) {
+       for (i = 0; i < reg_count; i++) {
                s1dReg = regs[i].Index;
                if (reg_byte_swap) {
                        if ((s1dReg & 0x0001) == 0)