diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 29 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 60 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 29 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 58 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/irq.c | 4 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 54 | ||||
-rw-r--r-- | arch/sh/include/asm/addrspace.h | 8 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 12 | ||||
-rw-r--r-- | arch/sh/include/asm/system.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/system_32.h | 36 | ||||
-rw-r--r-- | arch/sh/include/asm/system_64.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/uncached.h | 40 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 6 | ||||
-rw-r--r-- | arch/sh/mm/Kconfig | 2 | ||||
-rw-r--r-- | arch/sh/mm/consistent.c | 15 | ||||
-rw-r--r-- | arch/sh/mm/uncached.c | 2 |
17 files changed, 196 insertions, 167 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 5c075f562eba..7f217b3a50a8 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -193,6 +193,7 @@ config CPU_SH2 | |||
193 | config CPU_SH2A | 193 | config CPU_SH2A |
194 | bool | 194 | bool |
195 | select CPU_SH2 | 195 | select CPU_SH2 |
196 | select UNCACHED_MAPPING | ||
196 | 197 | ||
197 | config CPU_SH3 | 198 | config CPU_SH3 |
198 | bool | 199 | bool |
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 881a3a5f5647..07ea908c510d 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -176,6 +176,21 @@ static void ap320_wvga_power_off(void *board_data) | |||
176 | __raw_writew(0, FPGA_LCDREG); | 176 | __raw_writew(0, FPGA_LCDREG); |
177 | } | 177 | } |
178 | 178 | ||
179 | const static struct fb_videomode ap325rxa_lcdc_modes[] = { | ||
180 | { | ||
181 | .name = "LB070WV1", | ||
182 | .xres = 800, | ||
183 | .yres = 480, | ||
184 | .left_margin = 32, | ||
185 | .right_margin = 160, | ||
186 | .hsync_len = 8, | ||
187 | .upper_margin = 63, | ||
188 | .lower_margin = 80, | ||
189 | .vsync_len = 1, | ||
190 | .sync = 0, /* hsync and vsync are active low */ | ||
191 | }, | ||
192 | }; | ||
193 | |||
179 | static struct sh_mobile_lcdc_info lcdc_info = { | 194 | static struct sh_mobile_lcdc_info lcdc_info = { |
180 | .clock_source = LCDC_CLK_EXTERNAL, | 195 | .clock_source = LCDC_CLK_EXTERNAL, |
181 | .ch[0] = { | 196 | .ch[0] = { |
@@ -183,18 +198,8 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
183 | .bpp = 16, | 198 | .bpp = 16, |
184 | .interface_type = RGB18, | 199 | .interface_type = RGB18, |
185 | .clock_divider = 1, | 200 | .clock_divider = 1, |
186 | .lcd_cfg = { | 201 | .lcd_cfg = ap325rxa_lcdc_modes, |
187 | .name = "LB070WV1", | 202 | .num_cfg = ARRAY_SIZE(ap325rxa_lcdc_modes), |
188 | .xres = 800, | ||
189 | .yres = 480, | ||
190 | .left_margin = 32, | ||
191 | .right_margin = 160, | ||
192 | .hsync_len = 8, | ||
193 | .upper_margin = 63, | ||
194 | .lower_margin = 80, | ||
195 | .vsync_len = 1, | ||
196 | .sync = 0, /* hsync and vsync are active low */ | ||
197 | }, | ||
198 | .lcd_size_cfg = { /* 7.0 inch */ | 203 | .lcd_size_cfg = { /* 7.0 inch */ |
199 | .width = 152, | 204 | .width = 152, |
200 | .height = 91, | 205 | .height = 91, |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index ddc7e4e4d2a0..2eaeb9e59585 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -231,14 +231,41 @@ static struct platform_device usb1_common_device = { | |||
231 | }; | 231 | }; |
232 | 232 | ||
233 | /* LCDC */ | 233 | /* LCDC */ |
234 | const static struct fb_videomode ecovec_lcd_modes[] = { | ||
235 | { | ||
236 | .name = "Panel", | ||
237 | .xres = 800, | ||
238 | .yres = 480, | ||
239 | .left_margin = 220, | ||
240 | .right_margin = 110, | ||
241 | .hsync_len = 70, | ||
242 | .upper_margin = 20, | ||
243 | .lower_margin = 5, | ||
244 | .vsync_len = 5, | ||
245 | .sync = 0, /* hsync and vsync are active low */ | ||
246 | }, | ||
247 | }; | ||
248 | |||
249 | const static struct fb_videomode ecovec_dvi_modes[] = { | ||
250 | { | ||
251 | .name = "DVI", | ||
252 | .xres = 1280, | ||
253 | .yres = 720, | ||
254 | .left_margin = 220, | ||
255 | .right_margin = 110, | ||
256 | .hsync_len = 40, | ||
257 | .upper_margin = 20, | ||
258 | .lower_margin = 5, | ||
259 | .vsync_len = 5, | ||
260 | .sync = 0, /* hsync and vsync are active low */ | ||
261 | }, | ||
262 | }; | ||
263 | |||
234 | static struct sh_mobile_lcdc_info lcdc_info = { | 264 | static struct sh_mobile_lcdc_info lcdc_info = { |
235 | .ch[0] = { | 265 | .ch[0] = { |
236 | .interface_type = RGB18, | 266 | .interface_type = RGB18, |
237 | .chan = LCDC_CHAN_MAINLCD, | 267 | .chan = LCDC_CHAN_MAINLCD, |
238 | .bpp = 16, | 268 | .bpp = 16, |
239 | .lcd_cfg = { | ||
240 | .sync = 0, /* hsync and vsync are active low */ | ||
241 | }, | ||
242 | .lcd_size_cfg = { /* 7.0 inch */ | 269 | .lcd_size_cfg = { /* 7.0 inch */ |
243 | .width = 152, | 270 | .width = 152, |
244 | .height = 91, | 271 | .height = 91, |
@@ -1075,33 +1102,18 @@ static int __init arch_setup(void) | |||
1075 | if (gpio_get_value(GPIO_PTE6)) { | 1102 | if (gpio_get_value(GPIO_PTE6)) { |
1076 | /* DVI */ | 1103 | /* DVI */ |
1077 | lcdc_info.clock_source = LCDC_CLK_EXTERNAL; | 1104 | lcdc_info.clock_source = LCDC_CLK_EXTERNAL; |
1078 | lcdc_info.ch[0].clock_divider = 1, | 1105 | lcdc_info.ch[0].clock_divider = 1; |
1079 | lcdc_info.ch[0].lcd_cfg.name = "DVI"; | 1106 | lcdc_info.ch[0].lcd_cfg = ecovec_dvi_modes; |
1080 | lcdc_info.ch[0].lcd_cfg.xres = 1280; | 1107 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(ecovec_dvi_modes); |
1081 | lcdc_info.ch[0].lcd_cfg.yres = 720; | ||
1082 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
1083 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
1084 | lcdc_info.ch[0].lcd_cfg.hsync_len = 40; | ||
1085 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
1086 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
1087 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
1088 | 1108 | ||
1089 | gpio_set_value(GPIO_PTA2, 1); | 1109 | gpio_set_value(GPIO_PTA2, 1); |
1090 | gpio_set_value(GPIO_PTU1, 1); | 1110 | gpio_set_value(GPIO_PTU1, 1); |
1091 | } else { | 1111 | } else { |
1092 | /* Panel */ | 1112 | /* Panel */ |
1093 | |||
1094 | lcdc_info.clock_source = LCDC_CLK_PERIPHERAL; | 1113 | lcdc_info.clock_source = LCDC_CLK_PERIPHERAL; |
1095 | lcdc_info.ch[0].clock_divider = 2, | 1114 | lcdc_info.ch[0].clock_divider = 2; |
1096 | lcdc_info.ch[0].lcd_cfg.name = "Panel"; | 1115 | lcdc_info.ch[0].lcd_cfg = ecovec_lcd_modes; |
1097 | lcdc_info.ch[0].lcd_cfg.xres = 800; | 1116 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(ecovec_lcd_modes); |
1098 | lcdc_info.ch[0].lcd_cfg.yres = 480; | ||
1099 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
1100 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
1101 | lcdc_info.ch[0].lcd_cfg.hsync_len = 70; | ||
1102 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
1103 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
1104 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
1105 | 1117 | ||
1106 | gpio_set_value(GPIO_PTR1, 1); | 1118 | gpio_set_value(GPIO_PTR1, 1); |
1107 | 1119 | ||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 1742849db648..9b60eaabf8f3 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -126,6 +126,21 @@ static struct platform_device kfr2r09_sh_keysc_device = { | |||
126 | }, | 126 | }, |
127 | }; | 127 | }; |
128 | 128 | ||
129 | const static struct fb_videomode kfr2r09_lcdc_modes[] = { | ||
130 | { | ||
131 | .name = "TX07D34VM0AAA", | ||
132 | .xres = 240, | ||
133 | .yres = 400, | ||
134 | .left_margin = 0, | ||
135 | .right_margin = 16, | ||
136 | .hsync_len = 8, | ||
137 | .upper_margin = 0, | ||
138 | .lower_margin = 1, | ||
139 | .vsync_len = 1, | ||
140 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
141 | }, | ||
142 | }; | ||
143 | |||
129 | static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | 144 | static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { |
130 | .clock_source = LCDC_CLK_BUS, | 145 | .clock_source = LCDC_CLK_BUS, |
131 | .ch[0] = { | 146 | .ch[0] = { |
@@ -134,18 +149,8 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | |||
134 | .interface_type = SYS18, | 149 | .interface_type = SYS18, |
135 | .clock_divider = 6, | 150 | .clock_divider = 6, |
136 | .flags = LCDC_FLAGS_DWPOL, | 151 | .flags = LCDC_FLAGS_DWPOL, |
137 | .lcd_cfg = { | 152 | .lcd_cfg = kfr2r09_lcdc_modes, |
138 | .name = "TX07D34VM0AAA", | 153 | .num_cfg = ARRAY_SIZE(kfr2r09_lcdc_modes), |
139 | .xres = 240, | ||
140 | .yres = 400, | ||
141 | .left_margin = 0, | ||
142 | .right_margin = 16, | ||
143 | .hsync_len = 8, | ||
144 | .upper_margin = 0, | ||
145 | .lower_margin = 1, | ||
146 | .vsync_len = 1, | ||
147 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
148 | }, | ||
149 | .lcd_size_cfg = { | 154 | .lcd_size_cfg = { |
150 | .width = 35, | 155 | .width = 35, |
151 | .height = 58, | 156 | .height = 58, |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 03af84842559..c8acfec98695 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -213,51 +213,55 @@ static struct platform_device migor_nand_flash_device = { | |||
213 | } | 213 | } |
214 | }; | 214 | }; |
215 | 215 | ||
216 | const static struct fb_videomode migor_lcd_modes[] = { | ||
217 | { | ||
218 | #if defined(CONFIG_SH_MIGOR_RTA_WVGA) | ||
219 | .name = "LB070WV1", | ||
220 | .xres = 800, | ||
221 | .yres = 480, | ||
222 | .left_margin = 64, | ||
223 | .right_margin = 16, | ||
224 | .hsync_len = 120, | ||
225 | .sync = 0, | ||
226 | #elif defined(CONFIG_SH_MIGOR_QVGA) | ||
227 | .name = "PH240320T", | ||
228 | .xres = 320, | ||
229 | .yres = 240, | ||
230 | .left_margin = 0, | ||
231 | .right_margin = 16, | ||
232 | .hsync_len = 8, | ||
233 | .sync = FB_SYNC_HOR_HIGH_ACT, | ||
234 | #endif | ||
235 | .upper_margin = 1, | ||
236 | .lower_margin = 17, | ||
237 | .vsync_len = 2, | ||
238 | }, | ||
239 | }; | ||
240 | |||
216 | static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { | 241 | static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { |
217 | #ifdef CONFIG_SH_MIGOR_RTA_WVGA | 242 | #if defined(CONFIG_SH_MIGOR_RTA_WVGA) |
218 | .clock_source = LCDC_CLK_BUS, | 243 | .clock_source = LCDC_CLK_BUS, |
219 | .ch[0] = { | 244 | .ch[0] = { |
220 | .chan = LCDC_CHAN_MAINLCD, | 245 | .chan = LCDC_CHAN_MAINLCD, |
221 | .bpp = 16, | 246 | .bpp = 16, |
222 | .interface_type = RGB16, | 247 | .interface_type = RGB16, |
223 | .clock_divider = 2, | 248 | .clock_divider = 2, |
224 | .lcd_cfg = { | 249 | .lcd_cfg = migor_lcd_modes, |
225 | .name = "LB070WV1", | 250 | .num_cfg = ARRAY_SIZE(migor_lcd_modes), |
226 | .xres = 800, | ||
227 | .yres = 480, | ||
228 | .left_margin = 64, | ||
229 | .right_margin = 16, | ||
230 | .hsync_len = 120, | ||
231 | .upper_margin = 1, | ||
232 | .lower_margin = 17, | ||
233 | .vsync_len = 2, | ||
234 | .sync = 0, | ||
235 | }, | ||
236 | .lcd_size_cfg = { /* 7.0 inch */ | 251 | .lcd_size_cfg = { /* 7.0 inch */ |
237 | .width = 152, | 252 | .width = 152, |
238 | .height = 91, | 253 | .height = 91, |
239 | }, | 254 | }, |
240 | } | 255 | } |
241 | #endif | 256 | #elif defined(CONFIG_SH_MIGOR_QVGA) |
242 | #ifdef CONFIG_SH_MIGOR_QVGA | ||
243 | .clock_source = LCDC_CLK_PERIPHERAL, | 257 | .clock_source = LCDC_CLK_PERIPHERAL, |
244 | .ch[0] = { | 258 | .ch[0] = { |
245 | .chan = LCDC_CHAN_MAINLCD, | 259 | .chan = LCDC_CHAN_MAINLCD, |
246 | .bpp = 16, | 260 | .bpp = 16, |
247 | .interface_type = SYS16A, | 261 | .interface_type = SYS16A, |
248 | .clock_divider = 10, | 262 | .clock_divider = 10, |
249 | .lcd_cfg = { | 263 | .lcd_cfg = migor_lcd_modes, |
250 | .name = "PH240320T", | 264 | .num_cfg = ARRAY_SIZE(migor_lcd_modes), |
251 | .xres = 320, | ||
252 | .yres = 240, | ||
253 | .left_margin = 0, | ||
254 | .right_margin = 16, | ||
255 | .hsync_len = 8, | ||
256 | .upper_margin = 1, | ||
257 | .lower_margin = 17, | ||
258 | .vsync_len = 2, | ||
259 | .sync = FB_SYNC_HOR_HIGH_ACT, | ||
260 | }, | ||
261 | .lcd_size_cfg = { /* 2.4 inch */ | 265 | .lcd_size_cfg = { /* 2.4 inch */ |
262 | .width = 49, | 266 | .width = 49, |
263 | .height = 37, | 267 | .height = 37, |
diff --git a/arch/sh/boards/mach-se/7206/irq.c b/arch/sh/boards/mach-se/7206/irq.c index 883b21eacaa6..d961949600fd 100644 --- a/arch/sh/boards/mach-se/7206/irq.c +++ b/arch/sh/boards/mach-se/7206/irq.c | |||
@@ -139,11 +139,13 @@ void __init init_se7206_IRQ(void) | |||
139 | make_se7206_irq(IRQ0_IRQ); /* SMC91C111 */ | 139 | make_se7206_irq(IRQ0_IRQ); /* SMC91C111 */ |
140 | make_se7206_irq(IRQ1_IRQ); /* ATA */ | 140 | make_se7206_irq(IRQ1_IRQ); /* ATA */ |
141 | make_se7206_irq(IRQ3_IRQ); /* SLOT / PCM */ | 141 | make_se7206_irq(IRQ3_IRQ); /* SLOT / PCM */ |
142 | __raw_writew(inw(INTC_ICR1) | 0x000b ,INTC_ICR1 ) ; /* ICR1 */ | 142 | |
143 | __raw_writew(__raw_readw(INTC_ICR1) | 0x000b, INTC_ICR); /* ICR1 */ | ||
143 | 144 | ||
144 | /* FPGA System register setup*/ | 145 | /* FPGA System register setup*/ |
145 | __raw_writew(0x0000,INTSTS0); /* Clear INTSTS0 */ | 146 | __raw_writew(0x0000,INTSTS0); /* Clear INTSTS0 */ |
146 | __raw_writew(0x0000,INTSTS1); /* Clear INTSTS1 */ | 147 | __raw_writew(0x0000,INTSTS1); /* Clear INTSTS1 */ |
148 | |||
147 | /* IRQ0=LAN, IRQ1=ATA, IRQ3=SLT,PCM */ | 149 | /* IRQ0=LAN, IRQ1=ATA, IRQ3=SLT,PCM */ |
148 | __raw_writew(0x0001,INTSEL); | 150 | __raw_writew(0x0001,INTSEL); |
149 | } | 151 | } |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 8cc1d7295d85..c31d228fdfc6 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -144,16 +144,42 @@ static struct platform_device nor_flash_device = { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /* LCDC */ | 146 | /* LCDC */ |
147 | const static struct fb_videomode lcdc_720p_modes[] = { | ||
148 | { | ||
149 | .name = "LB070WV1", | ||
150 | .sync = 0, /* hsync and vsync are active low */ | ||
151 | .xres = 1280, | ||
152 | .yres = 720, | ||
153 | .left_margin = 220, | ||
154 | .right_margin = 110, | ||
155 | .hsync_len = 40, | ||
156 | .upper_margin = 20, | ||
157 | .lower_margin = 5, | ||
158 | .vsync_len = 5, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | const static struct fb_videomode lcdc_vga_modes[] = { | ||
163 | { | ||
164 | .name = "LB070WV1", | ||
165 | .sync = 0, /* hsync and vsync are active low */ | ||
166 | .xres = 640, | ||
167 | .yres = 480, | ||
168 | .left_margin = 105, | ||
169 | .right_margin = 50, | ||
170 | .hsync_len = 96, | ||
171 | .upper_margin = 33, | ||
172 | .lower_margin = 10, | ||
173 | .vsync_len = 2, | ||
174 | }, | ||
175 | }; | ||
176 | |||
147 | static struct sh_mobile_lcdc_info lcdc_info = { | 177 | static struct sh_mobile_lcdc_info lcdc_info = { |
148 | .clock_source = LCDC_CLK_EXTERNAL, | 178 | .clock_source = LCDC_CLK_EXTERNAL, |
149 | .ch[0] = { | 179 | .ch[0] = { |
150 | .chan = LCDC_CHAN_MAINLCD, | 180 | .chan = LCDC_CHAN_MAINLCD, |
151 | .bpp = 16, | 181 | .bpp = 16, |
152 | .clock_divider = 1, | 182 | .clock_divider = 1, |
153 | .lcd_cfg = { | ||
154 | .name = "LB070WV1", | ||
155 | .sync = 0, /* hsync and vsync are active low */ | ||
156 | }, | ||
157 | .lcd_size_cfg = { /* 7.0 inch */ | 183 | .lcd_size_cfg = { /* 7.0 inch */ |
158 | .width = 152, | 184 | .width = 152, |
159 | .height = 91, | 185 | .height = 91, |
@@ -908,24 +934,12 @@ static int __init devices_setup(void) | |||
908 | 934 | ||
909 | if (sw & SW41_B) { | 935 | if (sw & SW41_B) { |
910 | /* 720p */ | 936 | /* 720p */ |
911 | lcdc_info.ch[0].lcd_cfg.xres = 1280; | 937 | lcdc_info.ch[0].lcd_cfg = lcdc_720p_modes; |
912 | lcdc_info.ch[0].lcd_cfg.yres = 720; | 938 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_720p_modes); |
913 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
914 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
915 | lcdc_info.ch[0].lcd_cfg.hsync_len = 40; | ||
916 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
917 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
918 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
919 | } else { | 939 | } else { |
920 | /* VGA */ | 940 | /* VGA */ |
921 | lcdc_info.ch[0].lcd_cfg.xres = 640; | 941 | lcdc_info.ch[0].lcd_cfg = lcdc_vga_modes; |
922 | lcdc_info.ch[0].lcd_cfg.yres = 480; | 942 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_vga_modes); |
923 | lcdc_info.ch[0].lcd_cfg.left_margin = 105; | ||
924 | lcdc_info.ch[0].lcd_cfg.right_margin = 50; | ||
925 | lcdc_info.ch[0].lcd_cfg.hsync_len = 96; | ||
926 | lcdc_info.ch[0].lcd_cfg.upper_margin = 33; | ||
927 | lcdc_info.ch[0].lcd_cfg.lower_margin = 10; | ||
928 | lcdc_info.ch[0].lcd_cfg.vsync_len = 2; | ||
929 | } | 943 | } |
930 | 944 | ||
931 | if (sw & SW41_A) { | 945 | if (sw & SW41_A) { |
diff --git a/arch/sh/include/asm/addrspace.h b/arch/sh/include/asm/addrspace.h index 446b3831c214..3d1ae2bfaa6f 100644 --- a/arch/sh/include/asm/addrspace.h +++ b/arch/sh/include/asm/addrspace.h | |||
@@ -44,10 +44,10 @@ | |||
44 | /* | 44 | /* |
45 | * These will never work in 32-bit, don't even bother. | 45 | * These will never work in 32-bit, don't even bother. |
46 | */ | 46 | */ |
47 | #define P1SEGADDR(a) __futile_remapping_attempt | 47 | #define P1SEGADDR(a) ({ (void)(a); BUG(); NULL; }) |
48 | #define P2SEGADDR(a) __futile_remapping_attempt | 48 | #define P2SEGADDR(a) ({ (void)(a); BUG(); NULL; }) |
49 | #define P3SEGADDR(a) __futile_remapping_attempt | 49 | #define P3SEGADDR(a) ({ (void)(a); BUG(); NULL; }) |
50 | #define P4SEGADDR(a) __futile_remapping_attempt | 50 | #define P4SEGADDR(a) ({ (void)(a); BUG(); NULL; }) |
51 | #endif | 51 | #endif |
52 | #endif /* P1SEG */ | 52 | #endif /* P1SEG */ |
53 | 53 | ||
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index a15f1058bbf4..083ea068e819 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -66,7 +66,6 @@ static inline unsigned long long neff_sign_extend(unsigned long val) | |||
66 | #define PHYS_ADDR_MASK29 0x1fffffff | 66 | #define PHYS_ADDR_MASK29 0x1fffffff |
67 | #define PHYS_ADDR_MASK32 0xffffffff | 67 | #define PHYS_ADDR_MASK32 0xffffffff |
68 | 68 | ||
69 | #ifdef CONFIG_PMB | ||
70 | static inline unsigned long phys_addr_mask(void) | 69 | static inline unsigned long phys_addr_mask(void) |
71 | { | 70 | { |
72 | /* Is the MMU in 29bit mode? */ | 71 | /* Is the MMU in 29bit mode? */ |
@@ -75,17 +74,6 @@ static inline unsigned long phys_addr_mask(void) | |||
75 | 74 | ||
76 | return PHYS_ADDR_MASK32; | 75 | return PHYS_ADDR_MASK32; |
77 | } | 76 | } |
78 | #elif defined(CONFIG_32BIT) | ||
79 | static inline unsigned long phys_addr_mask(void) | ||
80 | { | ||
81 | return PHYS_ADDR_MASK32; | ||
82 | } | ||
83 | #else | ||
84 | static inline unsigned long phys_addr_mask(void) | ||
85 | { | ||
86 | return PHYS_ADDR_MASK29; | ||
87 | } | ||
88 | #endif | ||
89 | 77 | ||
90 | #define PTE_PHYS_MASK (phys_addr_mask() & PAGE_MASK) | 78 | #define PTE_PHYS_MASK (phys_addr_mask() & PAGE_MASK) |
91 | #define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT) | 79 | #define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT) |
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h index 1f1af5afff03..10c8b1823a18 100644 --- a/arch/sh/include/asm/system.h +++ b/arch/sh/include/asm/system.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | #include <asm/types.h> | 12 | #include <asm/types.h> |
13 | #include <asm/uncached.h> | ||
13 | 14 | ||
14 | #define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */ | 15 | #define AT_VECTOR_SIZE_ARCH 5 /* entries in ARCH_DLINFO */ |
15 | 16 | ||
@@ -137,9 +138,6 @@ extern unsigned int instruction_size(unsigned int insn); | |||
137 | #define instruction_size(insn) (4) | 138 | #define instruction_size(insn) (4) |
138 | #endif | 139 | #endif |
139 | 140 | ||
140 | extern unsigned long cached_to_uncached; | ||
141 | extern unsigned long uncached_size; | ||
142 | |||
143 | void per_cpu_trap_init(void); | 141 | void per_cpu_trap_init(void); |
144 | void default_idle(void); | 142 | void default_idle(void); |
145 | void cpu_idle_wait(void); | 143 | void cpu_idle_wait(void); |
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h index c941b2739405..a4ad1cd9bc4d 100644 --- a/arch/sh/include/asm/system_32.h +++ b/arch/sh/include/asm/system_32.h | |||
@@ -145,42 +145,6 @@ do { \ | |||
145 | __restore_dsp(prev); \ | 145 | __restore_dsp(prev); \ |
146 | } while (0) | 146 | } while (0) |
147 | 147 | ||
148 | /* | ||
149 | * Jump to uncached area. | ||
150 | * When handling TLB or caches, we need to do it from an uncached area. | ||
151 | */ | ||
152 | #define jump_to_uncached() \ | ||
153 | do { \ | ||
154 | unsigned long __dummy; \ | ||
155 | \ | ||
156 | __asm__ __volatile__( \ | ||
157 | "mova 1f, %0\n\t" \ | ||
158 | "add %1, %0\n\t" \ | ||
159 | "jmp @%0\n\t" \ | ||
160 | " nop\n\t" \ | ||
161 | ".balign 4\n" \ | ||
162 | "1:" \ | ||
163 | : "=&z" (__dummy) \ | ||
164 | : "r" (cached_to_uncached)); \ | ||
165 | } while (0) | ||
166 | |||
167 | /* | ||
168 | * Back to cached area. | ||
169 | */ | ||
170 | #define back_to_cached() \ | ||
171 | do { \ | ||
172 | unsigned long __dummy; \ | ||
173 | ctrl_barrier(); \ | ||
174 | __asm__ __volatile__( \ | ||
175 | "mov.l 1f, %0\n\t" \ | ||
176 | "jmp @%0\n\t" \ | ||
177 | " nop\n\t" \ | ||
178 | ".balign 4\n" \ | ||
179 | "1: .long 2f\n" \ | ||
180 | "2:" \ | ||
181 | : "=&r" (__dummy)); \ | ||
182 | } while (0) | ||
183 | |||
184 | #ifdef CONFIG_CPU_HAS_SR_RB | 148 | #ifdef CONFIG_CPU_HAS_SR_RB |
185 | #define lookup_exception_vector() \ | 149 | #define lookup_exception_vector() \ |
186 | ({ \ | 150 | ({ \ |
diff --git a/arch/sh/include/asm/system_64.h b/arch/sh/include/asm/system_64.h index 36338646dfc8..8593bc8d1a4e 100644 --- a/arch/sh/include/asm/system_64.h +++ b/arch/sh/include/asm/system_64.h | |||
@@ -34,9 +34,6 @@ do { \ | |||
34 | &next->thread); \ | 34 | &next->thread); \ |
35 | } while (0) | 35 | } while (0) |
36 | 36 | ||
37 | #define jump_to_uncached() do { } while (0) | ||
38 | #define back_to_cached() do { } while (0) | ||
39 | |||
40 | #define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr)) | 37 | #define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr)) |
41 | #define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr)) | 38 | #define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr)) |
42 | #define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr)) | 39 | #define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr)) |
diff --git a/arch/sh/include/asm/uncached.h b/arch/sh/include/asm/uncached.h index e3419f96626a..6f8816b79cf1 100644 --- a/arch/sh/include/asm/uncached.h +++ b/arch/sh/include/asm/uncached.h | |||
@@ -4,15 +4,55 @@ | |||
4 | #include <linux/bug.h> | 4 | #include <linux/bug.h> |
5 | 5 | ||
6 | #ifdef CONFIG_UNCACHED_MAPPING | 6 | #ifdef CONFIG_UNCACHED_MAPPING |
7 | extern unsigned long cached_to_uncached; | ||
8 | extern unsigned long uncached_size; | ||
7 | extern unsigned long uncached_start, uncached_end; | 9 | extern unsigned long uncached_start, uncached_end; |
8 | 10 | ||
9 | extern int virt_addr_uncached(unsigned long kaddr); | 11 | extern int virt_addr_uncached(unsigned long kaddr); |
10 | extern void uncached_init(void); | 12 | extern void uncached_init(void); |
11 | extern void uncached_resize(unsigned long size); | 13 | extern void uncached_resize(unsigned long size); |
14 | |||
15 | /* | ||
16 | * Jump to uncached area. | ||
17 | * When handling TLB or caches, we need to do it from an uncached area. | ||
18 | */ | ||
19 | #define jump_to_uncached() \ | ||
20 | do { \ | ||
21 | unsigned long __dummy; \ | ||
22 | \ | ||
23 | __asm__ __volatile__( \ | ||
24 | "mova 1f, %0\n\t" \ | ||
25 | "add %1, %0\n\t" \ | ||
26 | "jmp @%0\n\t" \ | ||
27 | " nop\n\t" \ | ||
28 | ".balign 4\n" \ | ||
29 | "1:" \ | ||
30 | : "=&z" (__dummy) \ | ||
31 | : "r" (cached_to_uncached)); \ | ||
32 | } while (0) | ||
33 | |||
34 | /* | ||
35 | * Back to cached area. | ||
36 | */ | ||
37 | #define back_to_cached() \ | ||
38 | do { \ | ||
39 | unsigned long __dummy; \ | ||
40 | ctrl_barrier(); \ | ||
41 | __asm__ __volatile__( \ | ||
42 | "mov.l 1f, %0\n\t" \ | ||
43 | "jmp @%0\n\t" \ | ||
44 | " nop\n\t" \ | ||
45 | ".balign 4\n" \ | ||
46 | "1: .long 2f\n" \ | ||
47 | "2:" \ | ||
48 | : "=&r" (__dummy)); \ | ||
49 | } while (0) | ||
12 | #else | 50 | #else |
13 | #define virt_addr_uncached(kaddr) (0) | 51 | #define virt_addr_uncached(kaddr) (0) |
14 | #define uncached_init() do { } while (0) | 52 | #define uncached_init() do { } while (0) |
15 | #define uncached_resize(size) BUG() | 53 | #define uncached_resize(size) BUG() |
54 | #define jump_to_uncached() do { } while (0) | ||
55 | #define back_to_cached() do { } while (0) | ||
16 | #endif | 56 | #endif |
17 | 57 | ||
18 | #endif /* __ASM_SH_UNCACHED_H */ | 58 | #endif /* __ASM_SH_UNCACHED_H */ |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c index 2d9700c6b53a..0fe2e9329cb2 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c | |||
@@ -48,7 +48,7 @@ static struct clk r_clk = { | |||
48 | * Default rate for the root input clock, reset this with clk_set_rate() | 48 | * Default rate for the root input clock, reset this with clk_set_rate() |
49 | * from the platform code. | 49 | * from the platform code. |
50 | */ | 50 | */ |
51 | struct clk extal_clk = { | 51 | static struct clk extal_clk = { |
52 | .rate = 33333333, | 52 | .rate = 33333333, |
53 | }; | 53 | }; |
54 | 54 | ||
@@ -111,7 +111,7 @@ static struct clk div3_clk = { | |||
111 | .parent = &pll_clk, | 111 | .parent = &pll_clk, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | struct clk *main_clks[] = { | 114 | static struct clk *main_clks[] = { |
115 | &r_clk, | 115 | &r_clk, |
116 | &extal_clk, | 116 | &extal_clk, |
117 | &fll_clk, | 117 | &fll_clk, |
@@ -156,7 +156,7 @@ struct clk div4_clks[DIV4_NR] = { | |||
156 | 156 | ||
157 | enum { DIV6_V, DIV6_FA, DIV6_FB, DIV6_I, DIV6_S, DIV6_NR }; | 157 | enum { DIV6_V, DIV6_FA, DIV6_FB, DIV6_I, DIV6_S, DIV6_NR }; |
158 | 158 | ||
159 | struct clk div6_clks[DIV6_NR] = { | 159 | static struct clk div6_clks[DIV6_NR] = { |
160 | [DIV6_V] = SH_CLK_DIV6(&div3_clk, VCLKCR, 0), | 160 | [DIV6_V] = SH_CLK_DIV6(&div3_clk, VCLKCR, 0), |
161 | [DIV6_FA] = SH_CLK_DIV6(&div3_clk, FCLKACR, 0), | 161 | [DIV6_FA] = SH_CLK_DIV6(&div3_clk, FCLKACR, 0), |
162 | [DIV6_FB] = SH_CLK_DIV6(&div3_clk, FCLKBCR, 0), | 162 | [DIV6_FB] = SH_CLK_DIV6(&div3_clk, FCLKBCR, 0), |
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 09370392aff1..c3e61b366493 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -79,7 +79,7 @@ config 29BIT | |||
79 | 79 | ||
80 | config 32BIT | 80 | config 32BIT |
81 | bool | 81 | bool |
82 | default y if CPU_SH5 | 82 | default y if CPU_SH5 || !MMU |
83 | 83 | ||
84 | config PMB | 84 | config PMB |
85 | bool "Support 32-bit physical addressing through PMB" | 85 | bool "Support 32-bit physical addressing through PMB" |
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 038793286990..40733a952402 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -79,21 +79,20 @@ void dma_generic_free_coherent(struct device *dev, size_t size, | |||
79 | void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 79 | void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
80 | enum dma_data_direction direction) | 80 | enum dma_data_direction direction) |
81 | { | 81 | { |
82 | #if defined(CONFIG_CPU_SH5) || defined(CONFIG_PMB) | 82 | void *addr; |
83 | void *p1addr = vaddr; | 83 | |
84 | #else | 84 | addr = __in_29bit_mode() ? |
85 | void *p1addr = (void*) P1SEGADDR((unsigned long)vaddr); | 85 | (void *)P1SEGADDR((unsigned long)vaddr) : vaddr; |
86 | #endif | ||
87 | 86 | ||
88 | switch (direction) { | 87 | switch (direction) { |
89 | case DMA_FROM_DEVICE: /* invalidate only */ | 88 | case DMA_FROM_DEVICE: /* invalidate only */ |
90 | __flush_invalidate_region(p1addr, size); | 89 | __flush_invalidate_region(addr, size); |
91 | break; | 90 | break; |
92 | case DMA_TO_DEVICE: /* writeback only */ | 91 | case DMA_TO_DEVICE: /* writeback only */ |
93 | __flush_wback_region(p1addr, size); | 92 | __flush_wback_region(addr, size); |
94 | break; | 93 | break; |
95 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ | 94 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ |
96 | __flush_purge_region(p1addr, size); | 95 | __flush_purge_region(addr, size); |
97 | break; | 96 | break; |
98 | default: | 97 | default: |
99 | BUG(); | 98 | BUG(); |
diff --git a/arch/sh/mm/uncached.c b/arch/sh/mm/uncached.c index 8a4eca551fc0..a7767da815e9 100644 --- a/arch/sh/mm/uncached.c +++ b/arch/sh/mm/uncached.c | |||
@@ -28,7 +28,7 @@ EXPORT_SYMBOL(virt_addr_uncached); | |||
28 | 28 | ||
29 | void __init uncached_init(void) | 29 | void __init uncached_init(void) |
30 | { | 30 | { |
31 | #ifdef CONFIG_29BIT | 31 | #if defined(CONFIG_29BIT) || !defined(CONFIG_MMU) |
32 | uncached_start = P2SEG; | 32 | uncached_start = P2SEG; |
33 | #else | 33 | #else |
34 | uncached_start = memory_end; | 34 | uncached_start = memory_end; |