summaryrefslogtreecommitdiff
path: root/board/esd
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2007-12-28 17:10:44 +0100
committerStefan Roese <sr@denx.de>2007-12-28 17:21:38 +0100
commit77660c4b59055d621d2a8595bd4c18bb277268fc (patch)
tree4c30160471ca0f103457ec9490a018c6b982ebe5 /board/esd
parentb56bd0fcfc1c73db722e3462c8a9bf607ba7775e (diff)
downloadu-boot-imx-77660c4b59055d621d2a8595bd4c18bb277268fc.zip
u-boot-imx-77660c4b59055d621d2a8595bd4c18bb277268fc.tar.gz
u-boot-imx-77660c4b59055d621d2a8595bd4c18bb277268fc.tar.bz2
ppc4xx: use correct io accessors for esd's LCD code
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>
Diffstat (limited to 'board/esd')
-rw-r--r--board/esd/common/lcd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/board/esd/common/lcd.c b/board/esd/common/lcd.c
index 196171c..71d5058 100644
--- a/board/esd/common/lcd.c
+++ b/board/esd/common/lcd.c
@@ -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)