1 #include <linux/module.h>
2 #include <linux/kernel.h>
14 #include <mach/irqs.h>
19 #include <mach/hardware.h>
33 dev_err(&dev->
dev,
"unable to register device: %d\n", ret);
36 static struct resource pxa_resource_pmu = {
45 .resource = &pxa_resource_pmu,
49 static struct resource pxamci_resources[] = {
72 static u64 pxamci_dmamask = 0xffffffff
UL;
78 .dma_mask = &pxamci_dmamask,
79 .coherent_dma_mask = 0xffffffff,
82 .resource = pxamci_resources,
97 memcpy(&pxa_udc_info, info,
sizeof *info);
100 static struct resource pxa2xx_udc_resources[] = {
113 static u64 udc_dma_mask = ~(
u32)0;
116 .name =
"pxa25x-udc",
118 .resource = pxa2xx_udc_resources,
119 .num_resources =
ARRAY_SIZE(pxa2xx_udc_resources),
121 .platform_data = &pxa_udc_info,
122 .dma_mask = &udc_dma_mask,
127 .name =
"pxa27x-udc",
129 .resource = pxa2xx_udc_resources,
130 .num_resources =
ARRAY_SIZE(pxa2xx_udc_resources),
132 .platform_data = &pxa_udc_info,
133 .dma_mask = &udc_dma_mask,
138 static struct resource pxa3xx_u2d_resources[] = {
152 .name =
"pxa3xx-u2d",
154 .resource = pxa3xx_u2d_resources,
155 .num_resources =
ARRAY_SIZE(pxa3xx_u2d_resources),
164 static struct resource pxafb_resources[] = {
177 static u64 fb_dma_mask = ~(
u64)0;
183 .dma_mask = &fb_dma_mask,
184 .coherent_dma_mask = 0xffffffff,
187 .resource = pxafb_resources,
192 pxa_device_fb.
dev.parent = parent;
196 static struct resource pxa_resource_ffuart[] = {
209 .name =
"pxa2xx-uart",
211 .resource = pxa_resource_ffuart,
212 .num_resources =
ARRAY_SIZE(pxa_resource_ffuart),
220 static struct resource pxa_resource_btuart[] = {
233 .name =
"pxa2xx-uart",
235 .resource = pxa_resource_btuart,
236 .num_resources =
ARRAY_SIZE(pxa_resource_btuart),
244 static struct resource pxa_resource_stuart[] = {
257 .name =
"pxa2xx-uart",
259 .resource = pxa_resource_stuart,
260 .num_resources =
ARRAY_SIZE(pxa_resource_stuart),
268 static struct resource pxa_resource_hwuart[] = {
281 .name =
"pxa2xx-uart",
283 .resource = pxa_resource_hwuart,
284 .num_resources =
ARRAY_SIZE(pxa_resource_hwuart),
292 pr_info(
"UART: Ignoring attempt to register HWUART on non-PXA255 hardware");
295 static struct resource pxai2c_resources[] = {
308 .name =
"pxa2xx-i2c",
310 .resource = pxai2c_resources,
311 .num_resources =
ARRAY_SIZE(pxai2c_resources),
320 static struct resource pxa27x_resources_i2c_power[] = {
333 .name =
"pxa2xx-i2c",
335 .resource = pxa27x_resources_i2c_power,
336 .num_resources =
ARRAY_SIZE(pxa27x_resources_i2c_power),
340 static struct resource pxai2s_resources[] = {
353 .name =
"pxa2xx-i2s",
355 .resource = pxai2s_resources,
356 .num_resources =
ARRAY_SIZE(pxai2s_resources),
360 .name =
"pxa-ssp-dai",
365 .name =
"pxa-ssp-dai",
370 .name =
"pxa-ssp-dai",
375 .name =
"pxa-ssp-dai",
380 .name =
"pxa-pcm-audio",
384 static u64 pxaficp_dmamask = ~(
u32)0;
386 static struct resource pxa_ir_resources[] = {
402 .num_resources =
ARRAY_SIZE(pxa_ir_resources),
403 .resource = pxa_ir_resources,
405 .dma_mask = &pxaficp_dmamask,
406 .coherent_dma_mask = 0xffffffff,
415 static struct resource pxa_rtc_resources[] = {
418 .end = 0x40900000 + 0x3b,
438 .num_resources =
ARRAY_SIZE(pxa_rtc_resources),
439 .resource = pxa_rtc_resources,
442 static struct resource sa1100_rtc_resources[] = {
457 .name =
"sa1100-rtc",
459 .num_resources =
ARRAY_SIZE(sa1100_rtc_resources),
460 .resource = sa1100_rtc_resources,
463 static struct resource pxa_ac97_resources[] = {
466 .end = 0x40500000 + 0xfff,
476 static u64 pxa_ac97_dmamask = 0xffffffff
UL;
479 .name =
"pxa2xx-ac97",
482 .dma_mask = &pxa_ac97_dmamask,
483 .coherent_dma_mask = 0xffffffff,
485 .num_resources =
ARRAY_SIZE(pxa_ac97_resources),
486 .resource = pxa_ac97_resources,
496 static struct resource pxa25x_resource_pwm0[] = {
505 .name =
"pxa25x-pwm",
507 .resource = pxa25x_resource_pwm0,
508 .num_resources =
ARRAY_SIZE(pxa25x_resource_pwm0),
511 static struct resource pxa25x_resource_pwm1[] = {
520 .name =
"pxa25x-pwm",
522 .resource = pxa25x_resource_pwm1,
523 .num_resources =
ARRAY_SIZE(pxa25x_resource_pwm1),
528 static struct resource pxa25x_resource_ssp[] = {
554 .name =
"pxa25x-ssp",
557 .dma_mask = &pxa25x_ssp_dma_mask,
560 .resource = pxa25x_resource_ssp,
561 .num_resources =
ARRAY_SIZE(pxa25x_resource_ssp),
566 static struct resource pxa25x_resource_nssp[] = {
592 .name =
"pxa25x-nssp",
595 .dma_mask = &pxa25x_nssp_dma_mask,
598 .resource = pxa25x_resource_nssp,
599 .num_resources =
ARRAY_SIZE(pxa25x_resource_nssp),
604 static struct resource pxa25x_resource_assp[] = {
631 .name =
"pxa25x-nssp",
634 .dma_mask = &pxa25x_assp_dma_mask,
637 .resource = pxa25x_resource_assp,
638 .num_resources =
ARRAY_SIZE(pxa25x_resource_assp),
642 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
643 static struct resource pxa27x_resource_camera[] = {
659 .
name =
"pxa27x-camera",
662 .dma_mask = &pxa27x_dma_mask_camera,
663 .coherent_dma_mask = 0xffffffff,
665 .num_resources =
ARRAY_SIZE(pxa27x_resource_camera),
666 .resource = pxa27x_resource_camera,
676 static struct resource pxa27x_resource_ohci[] = {
690 .name =
"pxa27x-ohci",
693 .dma_mask = &pxa27x_ohci_dma_mask,
696 .num_resources =
ARRAY_SIZE(pxa27x_resource_ohci),
697 .resource = pxa27x_resource_ohci,
706 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x)
707 static struct resource pxa27x_resource_keypad[] = {
721 .name =
"pxa27x-keypad",
723 .resource = pxa27x_resource_keypad,
724 .num_resources =
ARRAY_SIZE(pxa27x_resource_keypad),
734 static struct resource pxa27x_resource_ssp1[] = {
760 .name =
"pxa27x-ssp",
763 .dma_mask = &pxa27x_ssp1_dma_mask,
766 .resource = pxa27x_resource_ssp1,
767 .num_resources =
ARRAY_SIZE(pxa27x_resource_ssp1),
772 static struct resource pxa27x_resource_ssp2[] = {
798 .name =
"pxa27x-ssp",
801 .dma_mask = &pxa27x_ssp2_dma_mask,
804 .resource = pxa27x_resource_ssp2,
805 .num_resources =
ARRAY_SIZE(pxa27x_resource_ssp2),
810 static struct resource pxa27x_resource_ssp3[] = {
836 .name =
"pxa27x-ssp",
839 .dma_mask = &pxa27x_ssp3_dma_mask,
842 .resource = pxa27x_resource_ssp3,
843 .num_resources =
ARRAY_SIZE(pxa27x_resource_ssp3),
846 static struct resource pxa27x_resource_pwm0[] = {
855 .name =
"pxa27x-pwm",
857 .resource = pxa27x_resource_pwm0,
858 .num_resources =
ARRAY_SIZE(pxa27x_resource_pwm0),
861 static struct resource pxa27x_resource_pwm1[] = {
870 .name =
"pxa27x-pwm",
872 .resource = pxa27x_resource_pwm1,
873 .num_resources =
ARRAY_SIZE(pxa27x_resource_pwm1),
878 static struct resource pxa3xx_resources_mci2[] = {
902 .name =
"pxa2xx-mci",
905 .dma_mask = &pxamci_dmamask,
906 .coherent_dma_mask = 0xffffffff,
908 .num_resources =
ARRAY_SIZE(pxa3xx_resources_mci2),
909 .resource = pxa3xx_resources_mci2,
917 static struct resource pxa3xx_resources_mci3[] = {
941 .name =
"pxa2xx-mci",
944 .dma_mask = &pxamci_dmamask,
945 .coherent_dma_mask = 0xffffffff,
947 .num_resources =
ARRAY_SIZE(pxa3xx_resources_mci3),
948 .resource = pxa3xx_resources_mci3,
956 static struct resource pxa3xx_resources_gcu[] = {
972 .name =
"pxa3xx-gcu",
974 .num_resources =
ARRAY_SIZE(pxa3xx_resources_gcu),
975 .resource = pxa3xx_resources_gcu,
977 .dma_mask = &pxa3xx_gcu_dmamask,
978 .coherent_dma_mask = 0xffffffff,
984 #if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x)
985 static struct resource pxa3xx_resources_i2c_power[] = {
998 .name =
"pxa3xx-pwri2c",
1000 .resource = pxa3xx_resources_i2c_power,
1001 .num_resources =
ARRAY_SIZE(pxa3xx_resources_i2c_power),
1004 static struct resource pxa3xx_resources_nand[] = {
1006 .
start = 0x43100000,
1032 .name =
"pxa3xx-nand",
1035 .dma_mask = &pxa3xx_nand_dma_mask,
1038 .num_resources =
ARRAY_SIZE(pxa3xx_resources_nand),
1039 .resource = pxa3xx_resources_nand,
1049 static struct resource pxa3xx_resource_ssp4[] = {
1051 .
start = 0x41a00000,
1076 .name =
"pxa27x-ssp",
1079 .dma_mask = &pxa3xx_ssp4_dma_mask,
1082 .resource = pxa3xx_resource_ssp4,
1083 .num_resources =
ARRAY_SIZE(pxa3xx_resource_ssp4),
1089 .start = 0x40e00000,
1113 .num_resources =
ARRAY_SIZE(pxa_resource_gpio),