diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 6 | ||||
-rw-r--r-- | arch/arm/common/scoop.c | 6 | ||||
-rw-r--r-- | arch/arm/kernel/armksyms.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 48 | ||||
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 95 | ||||
-rw-r--r-- | arch/arm/mach-pxa/time.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 152 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 73 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-vr1000.c | 56 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/time.c | 8 |
12 files changed, 410 insertions, 86 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 50f13eec6cd7..5ab94584baee 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -283,8 +283,14 @@ void flush_window(void) | |||
283 | putstr("."); | 283 | putstr("."); |
284 | } | 284 | } |
285 | 285 | ||
286 | #ifndef arch_error | ||
287 | #define arch_error(x) | ||
288 | #endif | ||
289 | |||
286 | static void error(char *x) | 290 | static void error(char *x) |
287 | { | 291 | { |
292 | arch_error(x); | ||
293 | |||
288 | putstr("\n\n"); | 294 | putstr("\n\n"); |
289 | putstr(x); | 295 | putstr(x); |
290 | putstr("\n\n -- System halted"); | 296 | putstr("\n\n -- System halted"); |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index bb4eff614413..c7fdf390cef9 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -19,12 +19,6 @@ | |||
19 | 19 | ||
20 | #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) | 20 | #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr))) |
21 | 21 | ||
22 | /* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c | ||
23 | There is no easy way to link multiple scoop devices into one | ||
24 | single entity for the pxa2xx_pcmcia device */ | ||
25 | int scoop_num; | ||
26 | struct scoop_pcmcia_dev *scoop_devs; | ||
27 | |||
28 | struct scoop_dev { | 22 | struct scoop_dev { |
29 | void *base; | 23 | void *base; |
30 | spinlock_t scoop_lock; | 24 | spinlock_t scoop_lock; |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 7b17a87a3311..7a3261f0bf79 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/in6.h> | 14 | #include <linux/in6.h> |
14 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |
@@ -126,6 +127,9 @@ EXPORT_SYMBOL(__put_user_2); | |||
126 | EXPORT_SYMBOL(__put_user_4); | 127 | EXPORT_SYMBOL(__put_user_4); |
127 | EXPORT_SYMBOL(__put_user_8); | 128 | EXPORT_SYMBOL(__put_user_8); |
128 | 129 | ||
130 | /* crypto hash */ | ||
131 | EXPORT_SYMBOL(sha_transform); | ||
132 | |||
129 | /* gcc lib functions */ | 133 | /* gcc lib functions */ |
130 | EXPORT_SYMBOL(__ashldi3); | 134 | EXPORT_SYMBOL(__ashldi3); |
131 | EXPORT_SYMBOL(__ashrdi3); | 135 | EXPORT_SYMBOL(__ashrdi3); |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index eb5f6d744a4a..100fb31b5156 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -62,6 +62,37 @@ static struct scoop_config corgi_scoop_setup = { | |||
62 | .io_out = CORGI_SCOOP_IO_OUT, | 62 | .io_out = CORGI_SCOOP_IO_OUT, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | struct platform_device corgiscoop_device = { | ||
66 | .name = "sharp-scoop", | ||
67 | .id = -1, | ||
68 | .dev = { | ||
69 | .platform_data = &corgi_scoop_setup, | ||
70 | }, | ||
71 | .num_resources = ARRAY_SIZE(corgi_scoop_resources), | ||
72 | .resource = corgi_scoop_resources, | ||
73 | }; | ||
74 | |||
75 | static void corgi_pcmcia_init(void) | ||
76 | { | ||
77 | /* Setup default state of GPIO outputs | ||
78 | before we enable them as outputs. */ | ||
79 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
80 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
81 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
82 | GPIO_bit(GPIO53_nPCE_2); | ||
83 | |||
84 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
85 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
86 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
87 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
88 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
89 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
90 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
91 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
92 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
93 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
94 | } | ||
95 | |||
65 | static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { | 96 | static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { |
66 | { | 97 | { |
67 | .dev = &corgiscoop_device.dev, | 98 | .dev = &corgiscoop_device.dev, |
@@ -71,16 +102,14 @@ static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = { | |||
71 | }, | 102 | }, |
72 | }; | 103 | }; |
73 | 104 | ||
74 | struct platform_device corgiscoop_device = { | 105 | static struct scoop_pcmcia_config corgi_pcmcia_config = { |
75 | .name = "sharp-scoop", | 106 | .devs = &corgi_pcmcia_scoop[0], |
76 | .id = -1, | 107 | .num_devs = 1, |
77 | .dev = { | 108 | .pcmcia_init = corgi_pcmcia_init, |
78 | .platform_data = &corgi_scoop_setup, | ||
79 | }, | ||
80 | .num_resources = ARRAY_SIZE(corgi_scoop_resources), | ||
81 | .resource = corgi_scoop_resources, | ||
82 | }; | 109 | }; |
83 | 110 | ||
111 | EXPORT_SYMBOL(corgiscoop_device); | ||
112 | |||
84 | 113 | ||
85 | /* | 114 | /* |
86 | * Corgi SSP Device | 115 | * Corgi SSP Device |
@@ -294,8 +323,7 @@ static void __init corgi_init(void) | |||
294 | pxa_set_mci_info(&corgi_mci_platform_data); | 323 | pxa_set_mci_info(&corgi_mci_platform_data); |
295 | pxa_set_ficp_info(&corgi_ficp_platform_data); | 324 | pxa_set_ficp_info(&corgi_ficp_platform_data); |
296 | 325 | ||
297 | scoop_num = 1; | 326 | platform_scoop_config = &corgi_pcmcia_config; |
298 | scoop_devs = &corgi_pcmcia_scoop[0]; | ||
299 | 327 | ||
300 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 328 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
301 | } | 329 | } |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index ad6a13f95a62..eef3de26ad37 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -65,6 +65,27 @@ struct platform_device poodle_scoop_device = { | |||
65 | .resource = poodle_scoop_resources, | 65 | .resource = poodle_scoop_resources, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static void poodle_pcmcia_init(void) | ||
69 | { | ||
70 | /* Setup default state of GPIO outputs | ||
71 | before we enable them as outputs. */ | ||
72 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
73 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
74 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
75 | GPIO_bit(GPIO53_nPCE_2); | ||
76 | |||
77 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
78 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
79 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
80 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
81 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
82 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
83 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
84 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
85 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
86 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
87 | } | ||
88 | |||
68 | static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { | 89 | static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { |
69 | { | 90 | { |
70 | .dev = &poodle_scoop_device.dev, | 91 | .dev = &poodle_scoop_device.dev, |
@@ -74,6 +95,14 @@ static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { | |||
74 | }, | 95 | }, |
75 | }; | 96 | }; |
76 | 97 | ||
98 | static struct scoop_pcmcia_config poodle_pcmcia_config = { | ||
99 | .devs = &poodle_pcmcia_scoop[0], | ||
100 | .num_devs = 1, | ||
101 | .pcmcia_init = poodle_pcmcia_init, | ||
102 | }; | ||
103 | |||
104 | EXPORT_SYMBOL(poodle_scoop_device); | ||
105 | |||
77 | 106 | ||
78 | /* LoCoMo device */ | 107 | /* LoCoMo device */ |
79 | static struct resource locomo_resources[] = { | 108 | static struct resource locomo_resources[] = { |
@@ -268,8 +297,7 @@ static void __init poodle_init(void) | |||
268 | pxa_set_mci_info(&poodle_mci_platform_data); | 297 | pxa_set_mci_info(&poodle_mci_platform_data); |
269 | pxa_set_ficp_info(&poodle_ficp_platform_data); | 298 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
270 | 299 | ||
271 | scoop_num = 1; | 300 | platform_scoop_config = &poodle_pcmcia_config; |
272 | scoop_devs = &poodle_pcmcia_scoop[0]; | ||
273 | 301 | ||
274 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 302 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
275 | if (ret) { | 303 | if (ret) { |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 6c6878cd2207..4e9a699ee428 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -104,6 +104,66 @@ struct platform_device spitzscoop2_device = { | |||
104 | .resource = spitz_scoop2_resources, | 104 | .resource = spitz_scoop2_resources, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | #define SPITZ_PWR_SD 0x01 | ||
108 | #define SPITZ_PWR_CF 0x02 | ||
109 | |||
110 | /* Power control is shared with between one of the CF slots and SD */ | ||
111 | static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr) | ||
112 | { | ||
113 | unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR); | ||
114 | |||
115 | if (new_cpr & 0x0007) { | ||
116 | set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
117 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) | ||
118 | mdelay(5); | ||
119 | if (device == SPITZ_PWR_CF) | ||
120 | cpr |= 0x0002; | ||
121 | if (device == SPITZ_PWR_SD) | ||
122 | cpr |= 0x0004; | ||
123 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); | ||
124 | } else { | ||
125 | if (device == SPITZ_PWR_CF) | ||
126 | cpr &= ~0x0002; | ||
127 | if (device == SPITZ_PWR_SD) | ||
128 | cpr &= ~0x0004; | ||
129 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); | ||
130 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) { | ||
131 | mdelay(1); | ||
132 | reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | |||
137 | static void spitz_pcmcia_init(void) | ||
138 | { | ||
139 | /* Setup default state of GPIO outputs | ||
140 | before we enable them as outputs. */ | ||
141 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
142 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
143 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO54_nPCE_2); | ||
144 | GPSR(GPIO85_nPCE_1) = GPIO_bit(GPIO85_nPCE_1); | ||
145 | |||
146 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
147 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
148 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
149 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
150 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
151 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
152 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
153 | pxa_gpio_mode(GPIO85_nPCE_1_MD); | ||
154 | pxa_gpio_mode(GPIO54_nPCE_2_MD); | ||
155 | pxa_gpio_mode(GPIO104_pSKTSEL_MD); | ||
156 | } | ||
157 | |||
158 | static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr) | ||
159 | { | ||
160 | /* Only need to override behaviour for slot 0 */ | ||
161 | if (nr == 0) | ||
162 | spitz_card_pwr_ctrl(SPITZ_PWR_CF, cpr); | ||
163 | else | ||
164 | write_scoop_reg(scoop, SCOOP_CPR, cpr); | ||
165 | } | ||
166 | |||
107 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { | 167 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { |
108 | { | 168 | { |
109 | .dev = &spitzscoop_device.dev, | 169 | .dev = &spitzscoop_device.dev, |
@@ -117,6 +177,16 @@ static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { | |||
117 | }, | 177 | }, |
118 | }; | 178 | }; |
119 | 179 | ||
180 | static struct scoop_pcmcia_config spitz_pcmcia_config = { | ||
181 | .devs = &spitz_pcmcia_scoop[0], | ||
182 | .num_devs = 2, | ||
183 | .pcmcia_init = spitz_pcmcia_init, | ||
184 | .power_ctrl = spitz_pcmcia_pwr, | ||
185 | }; | ||
186 | |||
187 | EXPORT_SYMBOL(spitzscoop_device); | ||
188 | EXPORT_SYMBOL(spitzscoop2_device); | ||
189 | |||
120 | 190 | ||
121 | /* | 191 | /* |
122 | * Spitz SSP Device | 192 | * Spitz SSP Device |
@@ -235,27 +305,14 @@ static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(in | |||
235 | return 0; | 305 | return 0; |
236 | } | 306 | } |
237 | 307 | ||
238 | /* Power control is shared with one of the CF slots so we have a mess */ | ||
239 | static void spitz_mci_setpower(struct device *dev, unsigned int vdd) | 308 | static void spitz_mci_setpower(struct device *dev, unsigned int vdd) |
240 | { | 309 | { |
241 | struct pxamci_platform_data* p_d = dev->platform_data; | 310 | struct pxamci_platform_data* p_d = dev->platform_data; |
242 | 311 | ||
243 | unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR); | 312 | if (( 1 << vdd) & p_d->ocr_mask) |
244 | 313 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0004); | |
245 | if (( 1 << vdd) & p_d->ocr_mask) { | 314 | else |
246 | /* printk(KERN_DEBUG "%s: on\n", __FUNCTION__); */ | 315 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000); |
247 | set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
248 | mdelay(2); | ||
249 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | 0x04); | ||
250 | } else { | ||
251 | /* printk(KERN_DEBUG "%s: off\n", __FUNCTION__); */ | ||
252 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr & ~0x04); | ||
253 | |||
254 | if (!(cpr | 0x02)) { | ||
255 | mdelay(1); | ||
256 | reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); | ||
257 | } | ||
258 | } | ||
259 | } | 316 | } |
260 | 317 | ||
261 | static int spitz_mci_get_ro(struct device *dev) | 318 | static int spitz_mci_get_ro(struct device *dev) |
@@ -351,8 +408,8 @@ static void __init common_init(void) | |||
351 | 408 | ||
352 | static void __init spitz_init(void) | 409 | static void __init spitz_init(void) |
353 | { | 410 | { |
354 | scoop_num = 2; | 411 | platform_scoop_config = &spitz_pcmcia_config; |
355 | scoop_devs = &spitz_pcmcia_scoop[0]; | 412 | |
356 | spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity; | 413 | spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity; |
357 | 414 | ||
358 | common_init(); | 415 | common_init(); |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 7dad3f1465e0..b9b2057349eb 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -132,11 +132,13 @@ static void __init pxa_timer_init(void) | |||
132 | tv.tv_sec = pxa_get_rtc_time(); | 132 | tv.tv_sec = pxa_get_rtc_time(); |
133 | do_settimeofday(&tv); | 133 | do_settimeofday(&tv); |
134 | 134 | ||
135 | OSMR0 = 0; /* set initial match at 0 */ | 135 | OIER = 0; /* disable any timer interrupts */ |
136 | OSCR = LATCH*2; /* push OSCR out of the way */ | ||
137 | OSMR0 = LATCH; /* set initial match */ | ||
136 | OSSR = 0xf; /* clear status on all timers */ | 138 | OSSR = 0xf; /* clear status on all timers */ |
137 | setup_irq(IRQ_OST0, &pxa_timer_irq); | 139 | setup_irq(IRQ_OST0, &pxa_timer_irq); |
138 | OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */ | 140 | OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ |
139 | OSCR = 0; /* initialize free-running timer, force first match */ | 141 | OSCR = 0; /* initialize free-running timer */ |
140 | } | 142 | } |
141 | 143 | ||
142 | #ifdef CONFIG_NO_IDLE_HZ | 144 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 400609f8b6a8..c312054dfb88 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -98,6 +98,9 @@ struct platform_device tosascoop_jc_device = { | |||
98 | .resource = tosa_scoop_jc_resources, | 98 | .resource = tosa_scoop_jc_resources, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | /* | ||
102 | * PCMCIA | ||
103 | */ | ||
101 | static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { | 104 | static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { |
102 | { | 105 | { |
103 | .dev = &tosascoop_device.dev, | 106 | .dev = &tosascoop_device.dev, |
@@ -111,16 +114,155 @@ static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = { | |||
111 | }, | 114 | }, |
112 | }; | 115 | }; |
113 | 116 | ||
117 | static void tosa_pcmcia_init(void) | ||
118 | { | ||
119 | /* Setup default state of GPIO outputs | ||
120 | before we enable them as outputs. */ | ||
121 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | | ||
122 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | | ||
123 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | | ||
124 | GPIO_bit(GPIO53_nPCE_2); | ||
125 | |||
126 | pxa_gpio_mode(GPIO48_nPOE_MD); | ||
127 | pxa_gpio_mode(GPIO49_nPWE_MD); | ||
128 | pxa_gpio_mode(GPIO50_nPIOR_MD); | ||
129 | pxa_gpio_mode(GPIO51_nPIOW_MD); | ||
130 | pxa_gpio_mode(GPIO55_nPREG_MD); | ||
131 | pxa_gpio_mode(GPIO56_nPWAIT_MD); | ||
132 | pxa_gpio_mode(GPIO57_nIOIS16_MD); | ||
133 | pxa_gpio_mode(GPIO52_nPCE_1_MD); | ||
134 | pxa_gpio_mode(GPIO53_nPCE_2_MD); | ||
135 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); | ||
136 | } | ||
137 | |||
138 | static struct scoop_pcmcia_config tosa_pcmcia_config = { | ||
139 | .devs = &tosa_pcmcia_scoop[0], | ||
140 | .num_devs = 2, | ||
141 | .pcmcia_init = tosa_pcmcia_init, | ||
142 | }; | ||
143 | |||
144 | /* | ||
145 | * USB Device Controller | ||
146 | */ | ||
147 | static void tosa_udc_command(int cmd) | ||
148 | { | ||
149 | switch(cmd) { | ||
150 | case PXA2XX_UDC_CMD_CONNECT: | ||
151 | set_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP); | ||
152 | break; | ||
153 | case PXA2XX_UDC_CMD_DISCONNECT: | ||
154 | reset_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP); | ||
155 | break; | ||
156 | } | ||
157 | } | ||
158 | |||
159 | static int tosa_udc_is_connected(void) | ||
160 | { | ||
161 | return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0); | ||
162 | } | ||
163 | |||
164 | |||
165 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | ||
166 | .udc_command = tosa_udc_command, | ||
167 | .udc_is_connected = tosa_udc_is_connected, | ||
168 | }; | ||
169 | |||
170 | /* | ||
171 | * MMC/SD Device | ||
172 | */ | ||
173 | static struct pxamci_platform_data tosa_mci_platform_data; | ||
174 | |||
175 | static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *, struct pt_regs *), void *data) | ||
176 | { | ||
177 | int err; | ||
178 | |||
179 | /* setup GPIO for PXA25x MMC controller */ | ||
180 | pxa_gpio_mode(GPIO6_MMCCLK_MD); | ||
181 | pxa_gpio_mode(GPIO8_MMCCS0_MD); | ||
182 | pxa_gpio_mode(TOSA_GPIO_nSD_DETECT | GPIO_IN); | ||
183 | |||
184 | tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
185 | |||
186 | err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, SA_INTERRUPT, | ||
187 | "MMC/SD card detect", data); | ||
188 | if (err) { | ||
189 | printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); | ||
190 | return -1; | ||
191 | } | ||
192 | |||
193 | set_irq_type(TOSA_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE); | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static void tosa_mci_setpower(struct device *dev, unsigned int vdd) | ||
199 | { | ||
200 | struct pxamci_platform_data* p_d = dev->platform_data; | ||
201 | |||
202 | if (( 1 << vdd) & p_d->ocr_mask) { | ||
203 | set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); | ||
204 | } else { | ||
205 | reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON); | ||
206 | } | ||
207 | } | ||
208 | |||
209 | static int tosa_mci_get_ro(struct device *dev) | ||
210 | { | ||
211 | return (read_scoop_reg(&tosascoop_device.dev, SCOOP_GPWR)&TOSA_SCOOP_SD_WP); | ||
212 | } | ||
213 | |||
214 | static void tosa_mci_exit(struct device *dev, void *data) | ||
215 | { | ||
216 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); | ||
217 | } | ||
218 | |||
219 | static struct pxamci_platform_data tosa_mci_platform_data = { | ||
220 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
221 | .init = tosa_mci_init, | ||
222 | .get_ro = tosa_mci_get_ro, | ||
223 | .setpower = tosa_mci_setpower, | ||
224 | .exit = tosa_mci_exit, | ||
225 | }; | ||
226 | |||
227 | /* | ||
228 | * Irda | ||
229 | */ | ||
230 | static void tosa_irda_transceiver_mode(struct device *dev, int mode) | ||
231 | { | ||
232 | if (mode & IR_OFF) { | ||
233 | reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); | ||
234 | pxa_gpio_mode(GPIO47_STTXD|GPIO_DFLT_LOW); | ||
235 | pxa_gpio_mode(GPIO47_STTXD|GPIO_OUT); | ||
236 | } else { | ||
237 | pxa_gpio_mode(GPIO47_STTXD_MD); | ||
238 | set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN); | ||
239 | } | ||
240 | } | ||
241 | |||
242 | static struct pxaficp_platform_data tosa_ficp_platform_data = { | ||
243 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
244 | .transceiver_mode = tosa_irda_transceiver_mode, | ||
245 | }; | ||
246 | |||
247 | /* | ||
248 | * Tosa Keyboard | ||
249 | */ | ||
250 | static struct platform_device tosakbd_device = { | ||
251 | .name = "tosa-keyboard", | ||
252 | .id = -1, | ||
253 | }; | ||
114 | 254 | ||
115 | static struct platform_device *devices[] __initdata = { | 255 | static struct platform_device *devices[] __initdata = { |
116 | &tosascoop_device, | 256 | &tosascoop_device, |
117 | &tosascoop_jc_device, | 257 | &tosascoop_jc_device, |
258 | &tosakbd_device, | ||
118 | }; | 259 | }; |
119 | 260 | ||
120 | static void __init tosa_init(void) | 261 | static void __init tosa_init(void) |
121 | { | 262 | { |
122 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); | 263 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); |
123 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); | 264 | pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); |
265 | pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); | ||
124 | 266 | ||
125 | /* setup sleep mode values */ | 267 | /* setup sleep mode values */ |
126 | PWER = 0x00000002; | 268 | PWER = 0x00000002; |
@@ -131,13 +273,15 @@ static void __init tosa_init(void) | |||
131 | PGSR2 = 0x00014000; | 273 | PGSR2 = 0x00014000; |
132 | PCFR |= PCFR_OPDE; | 274 | PCFR |= PCFR_OPDE; |
133 | 275 | ||
134 | // enable batt_fault | 276 | /* enable batt_fault */ |
135 | PMCR = 0x01; | 277 | PMCR = 0x01; |
136 | 278 | ||
137 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 279 | pxa_set_mci_info(&tosa_mci_platform_data); |
280 | pxa_set_udc_info(&udc_info); | ||
281 | pxa_set_ficp_info(&tosa_ficp_platform_data); | ||
282 | platform_scoop_config = &tosa_pcmcia_config; | ||
138 | 283 | ||
139 | scoop_num = 2; | 284 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
140 | scoop_devs = &tosa_pcmcia_scoop[0]; | ||
141 | } | 285 | } |
142 | 286 | ||
143 | static void __init fixup_tosa(struct machine_desc *desc, | 287 | static void __init fixup_tosa(struct machine_desc *desc, |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index c796bcdd6158..0b9d7ca49ec1 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -121,6 +121,14 @@ config S3C2410_BOOT_WATCHDOG | |||
121 | system resets depends on the value of PCLK. The timeout on an | 121 | system resets depends on the value of PCLK. The timeout on an |
122 | 200MHz s3c2410 should be about 30 seconds. | 122 | 200MHz s3c2410 should be about 30 seconds. |
123 | 123 | ||
124 | config S3C2410_BOOT_ERROR_RESET | ||
125 | bool "S3C2410 Reboot on decompression error" | ||
126 | depends on ARCH_S3C2410 | ||
127 | help | ||
128 | Say y here to use the watchdog to reset the system if the | ||
129 | kernel decompressor detects an error during decompression. | ||
130 | |||
131 | |||
124 | comment "S3C2410 Setup" | 132 | comment "S3C2410 Setup" |
125 | 133 | ||
126 | config S3C2410_DMA | 134 | config S3C2410_DMA |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 0b71c896bbd1..1be2567a7486 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -89,32 +89,63 @@ | |||
89 | 89 | ||
90 | /* macros to modify the physical addresses for io space */ | 90 | /* macros to modify the physical addresses for io space */ |
91 | 91 | ||
92 | #define PA_CS2(item) ((item) + S3C2410_CS2) | 92 | #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2)) |
93 | #define PA_CS3(item) ((item) + S3C2410_CS3) | 93 | #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3)) |
94 | #define PA_CS4(item) ((item) + S3C2410_CS4) | 94 | #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4)) |
95 | #define PA_CS5(item) ((item) + S3C2410_CS5) | 95 | #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5)) |
96 | 96 | ||
97 | static struct map_desc bast_iodesc[] __initdata = { | 97 | static struct map_desc bast_iodesc[] __initdata = { |
98 | /* ISA IO areas */ | 98 | /* ISA IO areas */ |
99 | 99 | { | |
100 | { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 100 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, |
101 | { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 101 | .pfn = PA_CS2(BAST_PA_ISAIO), |
102 | 102 | .length = SZ_16M, | |
103 | /* we could possibly compress the next set down into a set of smaller tables | 103 | .type = MT_DEVICE, |
104 | * pagetables, but that would mean using an L2 section, and it still means | 104 | }, { |
105 | * we cannot actually feed the same register to an LDR due to 16K spacing | 105 | .virtual = (u32)S3C24XX_VA_ISA_WORD, |
106 | */ | 106 | .pfn = PA_CS3(BAST_PA_ISAIO), |
107 | 107 | .length = SZ_16M, | |
108 | .type = MT_DEVICE, | ||
109 | }, | ||
108 | /* bast CPLD control registers, and external interrupt controls */ | 110 | /* bast CPLD control registers, and external interrupt controls */ |
109 | { (u32)BAST_VA_CTRL1, BAST_PA_CTRL1, SZ_1M, MT_DEVICE }, | 111 | { |
110 | { (u32)BAST_VA_CTRL2, BAST_PA_CTRL2, SZ_1M, MT_DEVICE }, | 112 | .virtual = (u32)BAST_VA_CTRL1, |
111 | { (u32)BAST_VA_CTRL3, BAST_PA_CTRL3, SZ_1M, MT_DEVICE }, | 113 | .pfn = __phys_to_pfn(BAST_PA_CTRL1), |
112 | { (u32)BAST_VA_CTRL4, BAST_PA_CTRL4, SZ_1M, MT_DEVICE }, | 114 | .length = SZ_1M, |
113 | 115 | .type = MT_DEVICE, | |
116 | }, { | ||
117 | .virtual = (u32)BAST_VA_CTRL2, | ||
118 | .pfn = __phys_to_pfn(BAST_PA_CTRL2), | ||
119 | .length = SZ_1M, | ||
120 | .type = MT_DEVICE, | ||
121 | }, { | ||
122 | .virtual = (u32)BAST_VA_CTRL3, | ||
123 | .pfn = __phys_to_pfn(BAST_PA_CTRL3), | ||
124 | .length = SZ_1M, | ||
125 | .type = MT_DEVICE, | ||
126 | }, { | ||
127 | .virtual = (u32)BAST_VA_CTRL4, | ||
128 | .pfn = __phys_to_pfn(BAST_PA_CTRL4), | ||
129 | .length = SZ_1M, | ||
130 | .type = MT_DEVICE, | ||
131 | }, | ||
114 | /* PC104 IRQ mux */ | 132 | /* PC104 IRQ mux */ |
115 | { (u32)BAST_VA_PC104_IRQREQ, BAST_PA_PC104_IRQREQ, SZ_1M, MT_DEVICE }, | 133 | { |
116 | { (u32)BAST_VA_PC104_IRQRAW, BAST_PA_PC104_IRQRAW, SZ_1M, MT_DEVICE }, | 134 | .virtual = (u32)BAST_VA_PC104_IRQREQ, |
117 | { (u32)BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK, SZ_1M, MT_DEVICE }, | 135 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQREQ), |
136 | .length = SZ_1M, | ||
137 | .type = MT_DEVICE, | ||
138 | }, { | ||
139 | .virtual = (u32)BAST_VA_PC104_IRQRAW, | ||
140 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQRAW), | ||
141 | .length = SZ_1M, | ||
142 | .type = MT_DEVICE, | ||
143 | }, { | ||
144 | .virtual = (u32)BAST_VA_PC104_IRQMASK, | ||
145 | .pfn = __phys_to_pfn(BAST_PA_PC104_IRQMASK), | ||
146 | .length = SZ_1M, | ||
147 | .type = MT_DEVICE, | ||
148 | }, | ||
118 | 149 | ||
119 | /* peripheral space... one for each of fast/slow/byte/16bit */ | 150 | /* peripheral space... one for each of fast/slow/byte/16bit */ |
120 | /* note, ide is only decoded in word space, even though some registers | 151 | /* note, ide is only decoded in word space, even though some registers |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 46b259673c18..ae7e099bf6c8 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -74,27 +74,47 @@ | |||
74 | 74 | ||
75 | /* macros to modify the physical addresses for io space */ | 75 | /* macros to modify the physical addresses for io space */ |
76 | 76 | ||
77 | #define PA_CS2(item) ((item) + S3C2410_CS2) | 77 | #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2)) |
78 | #define PA_CS3(item) ((item) + S3C2410_CS3) | 78 | #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3)) |
79 | #define PA_CS4(item) ((item) + S3C2410_CS4) | 79 | #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4)) |
80 | #define PA_CS5(item) ((item) + S3C2410_CS5) | 80 | #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5)) |
81 | 81 | ||
82 | static struct map_desc vr1000_iodesc[] __initdata = { | 82 | static struct map_desc vr1000_iodesc[] __initdata = { |
83 | /* ISA IO areas */ | 83 | /* ISA IO areas */ |
84 | 84 | { | |
85 | { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 85 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, |
86 | { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 86 | .pfn = PA_CS2(BAST_PA_ISAIO), |
87 | 87 | .length = SZ_16M, | |
88 | /* we could possibly compress the next set down into a set of smaller tables | 88 | .type = MT_DEVICE, |
89 | * pagetables, but that would mean using an L2 section, and it still means | 89 | }, { |
90 | * we cannot actually feed the same register to an LDR due to 16K spacing | 90 | .virtual = (u32)S3C24XX_VA_ISA_WORD, |
91 | */ | 91 | .pfn = PA_CS3(BAST_PA_ISAIO), |
92 | 92 | .length = SZ_16M, | |
93 | /* bast CPLD control registers, and external interrupt controls */ | 93 | .type = MT_DEVICE, |
94 | { (u32)VR1000_VA_CTRL1, VR1000_PA_CTRL1, SZ_1M, MT_DEVICE }, | 94 | }, |
95 | { (u32)VR1000_VA_CTRL2, VR1000_PA_CTRL2, SZ_1M, MT_DEVICE }, | 95 | |
96 | { (u32)VR1000_VA_CTRL3, VR1000_PA_CTRL3, SZ_1M, MT_DEVICE }, | 96 | /* CPLD control registers, and external interrupt controls */ |
97 | { (u32)VR1000_VA_CTRL4, VR1000_PA_CTRL4, SZ_1M, MT_DEVICE }, | 97 | { |
98 | .virtual = (u32)VR1000_VA_CTRL1, | ||
99 | .pfn = __phys_to_pfn(VR1000_PA_CTRL1), | ||
100 | .length = SZ_1M, | ||
101 | .type = MT_DEVICE, | ||
102 | }, { | ||
103 | .virtual = (u32)VR1000_VA_CTRL2, | ||
104 | .pfn = __phys_to_pfn(VR1000_PA_CTRL2), | ||
105 | .length = SZ_1M, | ||
106 | .type = MT_DEVICE, | ||
107 | }, { | ||
108 | .virtual = (u32)VR1000_VA_CTRL3, | ||
109 | .pfn = __phys_to_pfn(VR1000_PA_CTRL3), | ||
110 | .length = SZ_1M, | ||
111 | .type = MT_DEVICE, | ||
112 | }, { | ||
113 | .virtual = (u32)VR1000_VA_CTRL4, | ||
114 | .pfn = __phys_to_pfn(VR1000_PA_CTRL4), | ||
115 | .length = SZ_1M, | ||
116 | .type = MT_DEVICE, | ||
117 | }, | ||
98 | 118 | ||
99 | /* peripheral space... one for each of fast/slow/byte/16bit */ | 119 | /* peripheral space... one for each of fast/slow/byte/16bit */ |
100 | /* note, ide is only decoded in word space, even though some registers | 120 | /* note, ide is only decoded in word space, even though some registers |
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 47e0420623fc..e4b435e634e4 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -124,11 +124,13 @@ static void __init sa1100_timer_init(void) | |||
124 | tv.tv_sec = sa1100_get_rtc_time(); | 124 | tv.tv_sec = sa1100_get_rtc_time(); |
125 | do_settimeofday(&tv); | 125 | do_settimeofday(&tv); |
126 | 126 | ||
127 | OSMR0 = 0; /* set initial match at 0 */ | 127 | OIER = 0; /* disable any timer interrupts */ |
128 | OSCR = LATCH*2; /* push OSCR out of the way */ | ||
129 | OSMR0 = LATCH; /* set initial match */ | ||
128 | OSSR = 0xf; /* clear status on all timers */ | 130 | OSSR = 0xf; /* clear status on all timers */ |
129 | setup_irq(IRQ_OST0, &sa1100_timer_irq); | 131 | setup_irq(IRQ_OST0, &sa1100_timer_irq); |
130 | OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */ | 132 | OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */ |
131 | OSCR = 0; /* initialize free-running timer, force first match */ | 133 | OSCR = 0; /* initialize free-running timer */ |
132 | } | 134 | } |
133 | 135 | ||
134 | #ifdef CONFIG_NO_IDLE_HZ | 136 | #ifdef CONFIG_NO_IDLE_HZ |