summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/crt0-pp.S2
-rw-r--r--firmware/target/arm/ipod/backlight-nano_video.c4
-rw-r--r--firmware/target/arm/ipod/lcd-color_nano.c10
-rw-r--r--firmware/target/arm/ipod/lcd-gray.c6
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/ata-e200.c6
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/lcd-e200.c8
6 files changed, 18 insertions, 18 deletions
diff --git a/firmware/target/arm/crt0-pp.S b/firmware/target/arm/crt0-pp.S
index 892275e411..e0d1034f74 100644
--- a/firmware/target/arm/crt0-pp.S
+++ b/firmware/target/arm/crt0-pp.S
@@ -205,7 +205,7 @@ cop_init:
205 orr r1, r1, #0x6 205 orr r1, r1, #0x6
206 str r1, [r0] 206 str r1, [r0]
207 207
208 ldr r0, =0x6000c000 208 ldr r0, =CACHE_CTRL
2091: 2091:
210 ldr r1, [r0] 210 ldr r1, [r0]
211 tst r1, #0x8000 211 tst r1, #0x8000
diff --git a/firmware/target/arm/ipod/backlight-nano_video.c b/firmware/target/arm/ipod/backlight-nano_video.c
index 5559709333..a5ef334d61 100644
--- a/firmware/target/arm/ipod/backlight-nano_video.c
+++ b/firmware/target/arm/ipod/backlight-nano_video.c
@@ -37,7 +37,7 @@ inline void __backlight_on(void)
37 outl(((0x100 | 1) << 3), 0x6000d824); 37 outl(((0x100 | 1) << 3), 0x6000d824);
38 38
39 /* set port L07 on */ 39 /* set port L07 on */
40 outl(((0x100 | 1) << 7), 0x6000d12c); 40 GPIOL_OUTPUT_VAL = ((0x100 | 1) << 7);
41} 41}
42 42
43inline void __backlight_off(void) 43inline void __backlight_off(void)
@@ -46,5 +46,5 @@ inline void __backlight_off(void)
46 outl(((0x100 | 0) << 3), 0x6000d824); 46 outl(((0x100 | 0) << 3), 0x6000d824);
47 47
48 /* set port L07 off */ 48 /* set port L07 off */
49 outl(((0x100 | 0) << 7), 0x6000d12c); 49 GPIOL_OUTPUT_VAL = ((0x100 | 0) << 7);
50} 50}
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c
index 7da878ef14..6a29cbe680 100644
--- a/firmware/target/arm/ipod/lcd-color_nano.c
+++ b/firmware/target/arm/ipod/lcd-color_nano.c
@@ -115,9 +115,9 @@ void lcd_init_device(void)
115 int gpio_a01, gpio_a04; 115 int gpio_a01, gpio_a04;
116 116
117 /* A01 */ 117 /* A01 */
118 gpio_a01 = (inl(0x6000D030) & 0x2) >> 1; 118 gpio_a01 = (GPIOA_INPUT_VAL & 0x2) >> 1;
119 /* A04 */ 119 /* A04 */
120 gpio_a04 = (inl(0x6000D030) & 0x10) >> 4; 120 gpio_a04 = (GPIOA_INPUT_VAL & 0x10) >> 4;
121 121
122 if (((gpio_a01 << 1) | gpio_a04) == 0 || ((gpio_a01 << 1) | gpio_a04) == 2) { 122 if (((gpio_a01 << 1) | gpio_a04) == 0 || ((gpio_a01 << 1) | gpio_a04) == 2) {
123 lcd_type = 0; 123 lcd_type = 0;
@@ -126,12 +126,12 @@ void lcd_init_device(void)
126 } 126 }
127 } 127 }
128 128
129 outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */ 129 GPIOB_ENABLE |= 0x4; /* B02 enable */
130 outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */ 130 GPIOB_ENABLE |= 0x8; /* B03 enable */
131 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */ 131 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */
132 outl(inl(0x70000080) | 0x2000000, 0x70000080); /* D01 =1 */ 132 outl(inl(0x70000080) | 0x2000000, 0x70000080); /* D01 =1 */
133 133
134 outl(inl(0x6000600c) | 0x20000, 0x6000600c); /* PWM enable */ 134 DEV_EN |= 0x20000; /* PWM enable */
135 135
136#elif CONFIG_LCD == LCD_IPODNANO 136#elif CONFIG_LCD == LCD_IPODNANO
137 /* iPodLinux doesn't appear have any LCD init code for the Nano */ 137 /* iPodLinux doesn't appear have any LCD init code for the Nano */
diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c
index 620c4355c3..1493751c3b 100644
--- a/firmware/target/arm/ipod/lcd-gray.c
+++ b/firmware/target/arm/ipod/lcd-gray.c
@@ -133,12 +133,12 @@ void lcd_init_device(void)
133 lcd_cmd_and_data(R_ENTRY_MODE, 0x0000); 133 lcd_cmd_and_data(R_ENTRY_MODE, 0x0000);
134 134
135#ifdef IPOD_4G 135#ifdef IPOD_4G
136 outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */ 136 GPIOB_ENABLE |= 0x4; /* B02 enable */
137 outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */ 137 GPIOB_ENABLE |= 0x8; /* B03 enable */
138 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */ 138 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */
139 outl(inl(0x70000080) | 0x2000000, 0x70000080); /* D01 =1 */ 139 outl(inl(0x70000080) | 0x2000000, 0x70000080); /* D01 =1 */
140 140
141 outl(inl(0x6000600c) | 0x20000, 0x6000600c); /* PWM enable */ 141 DEV_EN |= 0x20000; /* PWM enable */
142#endif 142#endif
143} 143}
144 144
diff --git a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
index 56f351c001..cf05397a78 100644
--- a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
@@ -364,9 +364,9 @@ void sd_init_device(void)
364 GPIOD_ENABLE |= (0x1f); 364 GPIOD_ENABLE |= (0x1f);
365 GPIOD_OUTPUT_EN |= (0x1f); 365 GPIOD_OUTPUT_EN |= (0x1f);
366 GPIOD_OUTPUT_VAL |= (0x1f); 366 GPIOD_OUTPUT_VAL |= (0x1f);
367 outl(inl(0x6000600c) | (1 << 14), 0x6000600c); 367 DEV_EN |= (1 << 14); /* Enable controller */
368 outl(inl(0x60006004) | (1 << 14), 0x60006004); 368 DEV_RS |= (1 << 14); /* Reset controller */
369 outl(inl(0x60006004) & ~(1 << 14), 0x60006004); /* Reset Controller? */ 369 DEV_RS &=~(1 << 14); /* Clear Reset */
370 outl(0, 0x6000b000); 370 outl(0, 0x6000b000);
371 outl(0, 0x6000a000); /* Init DMA controller? */ 371 outl(0, 0x6000a000); /* Init DMA controller? */
372 372
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
index 25bb6f04aa..e34ebd7c5a 100644
--- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
@@ -110,7 +110,7 @@ static inline void cache_flush(void)
110{ 110{
111#ifndef BOOTLOADER 111#ifndef BOOTLOADER
112 outl(inl(0xf000f044) | 0x2, 0xf000f044); 112 outl(inl(0xf000f044) | 0x2, 0xf000f044);
113 while ((inl(0x6000c000) & 0x8000) != 0) 113 while ((CACHE_CTL & 0x8000) != 0)
114 { 114 {
115 } 115 }
116#endif 116#endif
@@ -141,12 +141,12 @@ inline void lcd_init_device(void)
141 outl(((inl(0x70000010) & (0x03ffffff)) | (0x15 << 26)), 0x70000010); 141 outl(((inl(0x70000010) & (0x03ffffff)) | (0x15 << 26)), 0x70000010);
142 outl(((inl(0x70000014) & (0x0fffffff)) | (0x5 << 28)), 0x70000014); 142 outl(((inl(0x70000014) & (0x0fffffff)) | (0x5 << 28)), 0x70000014);
143 outl((inl(0x70000020) & ~(0x3 << 10)), 0x70000020); 143 outl((inl(0x70000020) & ~(0x3 << 10)), 0x70000020);
144 outl((inl(0x6000600c) | (1 << 26)), 0x6000600c); /* Enable controller */ 144 DEV_EN |= (1 << 26); /* Enable controller */
145 outl(0x6, 0x600060d0); 145 outl(0x6, 0x600060d0);
146 outl((inl(0x60006004) | (1 << 26)), 0x60006004); /* Reset controller? */ 146 DEV_RS |= (1 << 26); /* Reset controller */
147 outl((inl(0x70000020) & ~(1 << 14)), 0x70000020); 147 outl((inl(0x70000020) & ~(1 << 14)), 0x70000020);
148 lcd_bus_idle(); 148 lcd_bus_idle();
149 outl((inl(0x60006004) & ~(1 << 26)), 0x60006004); /* Clear reset? */ 149 DEV_RS &=~(1 << 26); /* Clear reset */
150 udelay(1000); 150 udelay(1000);
151 151
152 LCD_REG_0 = (LCD_REG_0 & (0x00ffffff)) | (0x22 << 24); 152 LCD_REG_0 = (LCD_REG_0 & (0x00ffffff)) | (0x22 << 24);