diff options
Diffstat (limited to 'firmware/drivers/lcd-ipod.c')
-rw-r--r-- | firmware/drivers/lcd-ipod.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index 154158c6ad..9aa7d01adb 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | /*** definitions ***/ | 32 | /*** definitions ***/ |
33 | #define IPOD_HW_REVISION (*((volatile unsigned long*)0x00002084)) | 33 | #define IPOD_HW_REVISION (*((volatile unsigned long*)0x00002084)) |
34 | #define IPOD_PP5020_RTC (*((volatile unsigned long*)0x60005010)) | ||
35 | 34 | ||
36 | #define IPOD_LCD_BASE 0x70008a0c | 35 | #define IPOD_LCD_BASE 0x70008a0c |
37 | #define IPOD_LCD_BUSY_MASK 0x80000000 | 36 | #define IPOD_LCD_BUSY_MASK 0x80000000 |
@@ -49,7 +48,7 @@ static int lcd_type = 1; /* 0 = "old" Color/Photo, 1 = "new" Color & Nano */ | |||
49 | /* check if number of useconds has past */ | 48 | /* check if number of useconds has past */ |
50 | static inline int timer_check(unsigned long clock_start, unsigned long usecs) | 49 | static inline int timer_check(unsigned long clock_start, unsigned long usecs) |
51 | { | 50 | { |
52 | if ( (IPOD_PP5020_RTC - clock_start) >= usecs ) { | 51 | if ( (USEC_TIMER - clock_start) >= usecs ) { |
53 | return 1; | 52 | return 1; |
54 | } else { | 53 | } else { |
55 | return 0; | 54 | return 0; |
@@ -59,7 +58,7 @@ static inline int timer_check(unsigned long clock_start, unsigned long usecs) | |||
59 | static void lcd_wait_write(void) | 58 | static void lcd_wait_write(void) |
60 | { | 59 | { |
61 | if ((inl(IPOD_LCD_BASE) & IPOD_LCD_BUSY_MASK) != 0) { | 60 | if ((inl(IPOD_LCD_BASE) & IPOD_LCD_BUSY_MASK) != 0) { |
62 | int start = IPOD_PP5020_RTC; | 61 | int start = USEC_TIMER; |
63 | 62 | ||
64 | do { | 63 | do { |
65 | if ((inl(IPOD_LCD_BASE) & IPOD_LCD_BUSY_MASK) == 0) break; | 64 | if ((inl(IPOD_LCD_BASE) & IPOD_LCD_BUSY_MASK) == 0) break; |