summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)