diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /arch/arm/mach-mx2 | |
parent | 004c1c7096659d352b83047a7593e91d8a30e3c5 (diff) | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'arch/arm/mach-mx2')
-rw-r--r-- | arch/arm/mach-mx2/clock_imx21.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx2/clock_imx27.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx2/devices.c | 63 | ||||
-rw-r--r-- | arch/arm/mach-mx2/devices.h | 1 |
4 files changed, 47 insertions, 25 deletions
diff --git a/arch/arm/mach-mx2/clock_imx21.c b/arch/arm/mach-mx2/clock_imx21.c index 8974faf9cef0..bb419ef4d133 100644 --- a/arch/arm/mach-mx2/clock_imx21.c +++ b/arch/arm/mach-mx2/clock_imx21.c | |||
@@ -1199,7 +1199,6 @@ static struct clk_lookup lookups[] = { | |||
1199 | */ | 1199 | */ |
1200 | int __init mx21_clocks_init(unsigned long lref, unsigned long href) | 1200 | int __init mx21_clocks_init(unsigned long lref, unsigned long href) |
1201 | { | 1201 | { |
1202 | int i; | ||
1203 | u32 cscr; | 1202 | u32 cscr; |
1204 | 1203 | ||
1205 | external_low_reference = lref; | 1204 | external_low_reference = lref; |
@@ -1217,8 +1216,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) | |||
1217 | else | 1216 | else |
1218 | spll_clk.parent = &fpm_clk; | 1217 | spll_clk.parent = &fpm_clk; |
1219 | 1218 | ||
1220 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 1219 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
1221 | clkdev_add(&lookups[i]); | ||
1222 | 1220 | ||
1223 | /* Turn off all clock gates */ | 1221 | /* Turn off all clock gates */ |
1224 | __raw_writel(0, CCM_PCCR0); | 1222 | __raw_writel(0, CCM_PCCR0); |
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c index 68bf93e6e907..0f0823c8b170 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-mx2/clock_imx27.c | |||
@@ -721,7 +721,6 @@ static void __init to2_adjust_clocks(void) | |||
721 | int __init mx27_clocks_init(unsigned long fref) | 721 | int __init mx27_clocks_init(unsigned long fref) |
722 | { | 722 | { |
723 | u32 cscr = __raw_readl(CCM_CSCR); | 723 | u32 cscr = __raw_readl(CCM_CSCR); |
724 | int i; | ||
725 | 724 | ||
726 | external_high_reference = fref; | 725 | external_high_reference = fref; |
727 | 726 | ||
@@ -738,8 +737,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
738 | 737 | ||
739 | to2_adjust_clocks(); | 738 | to2_adjust_clocks(); |
740 | 739 | ||
741 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 740 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
742 | clkdev_add(&lookups[i]); | ||
743 | 741 | ||
744 | /* Turn off all clocks we do not need */ | 742 | /* Turn off all clocks we do not need */ |
745 | __raw_writel(0, CCM_PCCR0); | 743 | __raw_writel(0, CCM_PCCR0); |
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index a4b809b82fa3..b91e412f7b3e 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
34 | #include <linux/dma-mapping.h> | ||
34 | 35 | ||
35 | #include <mach/irqs.h> | 36 | #include <mach/irqs.h> |
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
@@ -197,7 +198,7 @@ struct platform_device mxc_fb_device = { | |||
197 | .num_resources = ARRAY_SIZE(mxc_fb), | 198 | .num_resources = ARRAY_SIZE(mxc_fb), |
198 | .resource = mxc_fb, | 199 | .resource = mxc_fb, |
199 | .dev = { | 200 | .dev = { |
200 | .coherent_dma_mask = 0xFFFFFFFF, | 201 | .coherent_dma_mask = DMA_BIT_MASK(32), |
201 | }, | 202 | }, |
202 | }; | 203 | }; |
203 | 204 | ||
@@ -267,9 +268,6 @@ struct platform_device mxc_pwm_device = { | |||
267 | .resource = mxc_pwm_resources, | 268 | .resource = mxc_pwm_resources, |
268 | }; | 269 | }; |
269 | 270 | ||
270 | /* | ||
271 | * Resource definition for the MXC SDHC | ||
272 | */ | ||
273 | #define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \ | 271 | #define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \ |
274 | static struct resource mxc_sdhc_resources ## n[] = { \ | 272 | static struct resource mxc_sdhc_resources ## n[] = { \ |
275 | { \ | 273 | { \ |
@@ -287,14 +285,14 @@ struct platform_device mxc_pwm_device = { | |||
287 | }, \ | 285 | }, \ |
288 | }; \ | 286 | }; \ |
289 | \ | 287 | \ |
290 | static u64 mxc_sdhc ## n ## _dmamask = 0xffffffffUL; \ | 288 | static u64 mxc_sdhc ## n ## _dmamask = DMA_BIT_MASK(32); \ |
291 | \ | 289 | \ |
292 | struct platform_device mxc_sdhc_device ## n = { \ | 290 | struct platform_device mxc_sdhc_device ## n = { \ |
293 | .name = "mxc-mmc", \ | 291 | .name = "mxc-mmc", \ |
294 | .id = n, \ | 292 | .id = n, \ |
295 | .dev = { \ | 293 | .dev = { \ |
296 | .dma_mask = &mxc_sdhc ## n ## _dmamask, \ | 294 | .dma_mask = &mxc_sdhc ## n ## _dmamask, \ |
297 | .coherent_dma_mask = 0xffffffff, \ | 295 | .coherent_dma_mask = DMA_BIT_MASK(32), \ |
298 | }, \ | 296 | }, \ |
299 | .num_resources = ARRAY_SIZE(mxc_sdhc_resources ## n), \ | 297 | .num_resources = ARRAY_SIZE(mxc_sdhc_resources ## n), \ |
300 | .resource = mxc_sdhc_resources ## n, \ | 298 | .resource = mxc_sdhc_resources ## n, \ |
@@ -316,18 +314,18 @@ static struct resource otg_resources[] = { | |||
316 | }, | 314 | }, |
317 | }; | 315 | }; |
318 | 316 | ||
319 | static u64 otg_dmamask = 0xffffffffUL; | 317 | static u64 otg_dmamask = DMA_BIT_MASK(32); |
320 | 318 | ||
321 | /* OTG gadget device */ | 319 | /* OTG gadget device */ |
322 | struct platform_device mxc_otg_udc_device = { | 320 | struct platform_device mxc_otg_udc_device = { |
323 | .name = "fsl-usb2-udc", | 321 | .name = "fsl-usb2-udc", |
324 | .id = -1, | 322 | .id = -1, |
325 | .dev = { | 323 | .dev = { |
326 | .dma_mask = &otg_dmamask, | 324 | .dma_mask = &otg_dmamask, |
327 | .coherent_dma_mask = 0xffffffffUL, | 325 | .coherent_dma_mask = DMA_BIT_MASK(32), |
328 | }, | 326 | }, |
329 | .resource = otg_resources, | 327 | .resource = otg_resources, |
330 | .num_resources = ARRAY_SIZE(otg_resources), | 328 | .num_resources = ARRAY_SIZE(otg_resources), |
331 | }; | 329 | }; |
332 | 330 | ||
333 | /* OTG host */ | 331 | /* OTG host */ |
@@ -335,7 +333,7 @@ struct platform_device mxc_otg_host = { | |||
335 | .name = "mxc-ehci", | 333 | .name = "mxc-ehci", |
336 | .id = 0, | 334 | .id = 0, |
337 | .dev = { | 335 | .dev = { |
338 | .coherent_dma_mask = 0xffffffff, | 336 | .coherent_dma_mask = DMA_BIT_MASK(32), |
339 | .dma_mask = &otg_dmamask, | 337 | .dma_mask = &otg_dmamask, |
340 | }, | 338 | }, |
341 | .resource = otg_resources, | 339 | .resource = otg_resources, |
@@ -344,7 +342,7 @@ struct platform_device mxc_otg_host = { | |||
344 | 342 | ||
345 | /* USB host 1 */ | 343 | /* USB host 1 */ |
346 | 344 | ||
347 | static u64 usbh1_dmamask = 0xffffffffUL; | 345 | static u64 usbh1_dmamask = DMA_BIT_MASK(32); |
348 | 346 | ||
349 | static struct resource mxc_usbh1_resources[] = { | 347 | static struct resource mxc_usbh1_resources[] = { |
350 | { | 348 | { |
@@ -362,7 +360,7 @@ struct platform_device mxc_usbh1 = { | |||
362 | .name = "mxc-ehci", | 360 | .name = "mxc-ehci", |
363 | .id = 1, | 361 | .id = 1, |
364 | .dev = { | 362 | .dev = { |
365 | .coherent_dma_mask = 0xffffffff, | 363 | .coherent_dma_mask = DMA_BIT_MASK(32), |
366 | .dma_mask = &usbh1_dmamask, | 364 | .dma_mask = &usbh1_dmamask, |
367 | }, | 365 | }, |
368 | .resource = mxc_usbh1_resources, | 366 | .resource = mxc_usbh1_resources, |
@@ -370,7 +368,7 @@ struct platform_device mxc_usbh1 = { | |||
370 | }; | 368 | }; |
371 | 369 | ||
372 | /* USB host 2 */ | 370 | /* USB host 2 */ |
373 | static u64 usbh2_dmamask = 0xffffffffUL; | 371 | static u64 usbh2_dmamask = DMA_BIT_MASK(32); |
374 | 372 | ||
375 | static struct resource mxc_usbh2_resources[] = { | 373 | static struct resource mxc_usbh2_resources[] = { |
376 | { | 374 | { |
@@ -388,7 +386,7 @@ struct platform_device mxc_usbh2 = { | |||
388 | .name = "mxc-ehci", | 386 | .name = "mxc-ehci", |
389 | .id = 2, | 387 | .id = 2, |
390 | .dev = { | 388 | .dev = { |
391 | .coherent_dma_mask = 0xffffffff, | 389 | .coherent_dma_mask = DMA_BIT_MASK(32), |
392 | .dma_mask = &usbh2_dmamask, | 390 | .dma_mask = &usbh2_dmamask, |
393 | }, | 391 | }, |
394 | .resource = mxc_usbh2_resources, | 392 | .resource = mxc_usbh2_resources, |
@@ -481,3 +479,30 @@ int __init mxc_register_gpios(void) | |||
481 | #endif | 479 | #endif |
482 | return 0; | 480 | return 0; |
483 | } | 481 | } |
482 | |||
483 | #ifdef CONFIG_MACH_MX21 | ||
484 | static struct resource mx21_usbhc_resources[] = { | ||
485 | { | ||
486 | .start = MX21_BASE_ADDR, | ||
487 | .end = MX21_BASE_ADDR + 0x1FFF, | ||
488 | .flags = IORESOURCE_MEM, | ||
489 | }, | ||
490 | { | ||
491 | .start = MX21_INT_USBHOST, | ||
492 | .end = MX21_INT_USBHOST, | ||
493 | .flags = IORESOURCE_IRQ, | ||
494 | }, | ||
495 | }; | ||
496 | |||
497 | struct platform_device mx21_usbhc_device = { | ||
498 | .name = "imx21-hcd", | ||
499 | .id = 0, | ||
500 | .dev = { | ||
501 | .dma_mask = &mx21_usbhc_device.dev.coherent_dma_mask, | ||
502 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
503 | }, | ||
504 | .num_resources = ARRAY_SIZE(mx21_usbhc_resources), | ||
505 | .resource = mx21_usbhc_resources, | ||
506 | }; | ||
507 | #endif | ||
508 | |||
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index f15df2aaae4d..84ed51380174 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h | |||
@@ -37,5 +37,6 @@ extern struct platform_device mxc_spi_device1; | |||
37 | #ifdef CONFIG_MACH_MX27 | 37 | #ifdef CONFIG_MACH_MX27 |
38 | extern struct platform_device mxc_spi_device2; | 38 | extern struct platform_device mxc_spi_device2; |
39 | #endif | 39 | #endif |
40 | extern struct platform_device mx21_usbhc_device; | ||
40 | extern struct platform_device imx_ssi_device0; | 41 | extern struct platform_device imx_ssi_device0; |
41 | extern struct platform_device imx_ssi_device1; | 42 | extern struct platform_device imx_ssi_device1; |