1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/module.h>
3 #include <linux/kernel.h>
4 #include <linux/init.h>
5 #include <linux/platform_device.h>
6 #include <linux/clkdev.h>
7 #include <linux/dma-mapping.h>
8 #include <linux/dmaengine.h>
9 #include <linux/spi/pxa2xx_spi.h>
10 #include <linux/platform_data/i2c-pxa.h>
13 #include <linux/platform_data/usb-pxa3xx-ulpi.h>
14 #include <linux/platform_data/video-pxafb.h>
15 #include <linux/platform_data/mmc-pxamci.h>
16 #include <linux/platform_data/irda-pxaficp.h>
17 #include <mach/irqs.h>
18 #include <linux/platform_data/usb-ohci-pxa27x.h>
19 #include <linux/platform_data/keypad-pxa27x.h>
20 #include <linux/platform_data/media/camera-pxa.h>
21 #include <mach/audio.h>
22 #include <mach/hardware.h>
23 #include <linux/platform_data/mmp_dma.h>
24 #include <linux/platform_data/mtd-nand-pxa3xx.h>
29 void __init pxa_register_device(struct platform_device *dev, void *data)
33 dev->dev.platform_data = data;
35 ret = platform_device_register(dev);
37 dev_err(&dev->dev, "unable to register device: %d\n", ret);
40 static struct resource pxa_resource_pmu = {
43 .flags = IORESOURCE_IRQ,
46 struct platform_device pxa_device_pmu = {
49 .resource = &pxa_resource_pmu,
53 static struct resource pxamci_resources[] = {
57 .flags = IORESOURCE_MEM,
62 .flags = IORESOURCE_IRQ,
66 static u64 pxamci_dmamask = 0xffffffffUL;
68 struct platform_device pxa_device_mci = {
72 .dma_mask = &pxamci_dmamask,
73 .coherent_dma_mask = 0xffffffff,
75 .num_resources = ARRAY_SIZE(pxamci_resources),
76 .resource = pxamci_resources,
79 void __init pxa_set_mci_info(struct pxamci_platform_data *info)
81 pxa_register_device(&pxa_device_mci, info);
85 static struct pxa2xx_udc_mach_info pxa_udc_info = {
89 void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info)
91 memcpy(&pxa_udc_info, info, sizeof *info);
94 static struct resource pxa2xx_udc_resources[] = {
98 .flags = IORESOURCE_MEM,
103 .flags = IORESOURCE_IRQ,
107 static u64 udc_dma_mask = ~(u32)0;
109 struct platform_device pxa25x_device_udc = {
110 .name = "pxa25x-udc",
112 .resource = pxa2xx_udc_resources,
113 .num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
115 .platform_data = &pxa_udc_info,
116 .dma_mask = &udc_dma_mask,
120 struct platform_device pxa27x_device_udc = {
121 .name = "pxa27x-udc",
123 .resource = pxa2xx_udc_resources,
124 .num_resources = ARRAY_SIZE(pxa2xx_udc_resources),
126 .platform_data = &pxa_udc_info,
127 .dma_mask = &udc_dma_mask,
132 static struct resource pxa3xx_u2d_resources[] = {
136 .flags = IORESOURCE_MEM,
141 .flags = IORESOURCE_IRQ,
145 struct platform_device pxa3xx_device_u2d = {
146 .name = "pxa3xx-u2d",
148 .resource = pxa3xx_u2d_resources,
149 .num_resources = ARRAY_SIZE(pxa3xx_u2d_resources),
152 void __init pxa3xx_set_u2d_info(struct pxa3xx_u2d_platform_data *info)
154 pxa_register_device(&pxa3xx_device_u2d, info);
156 #endif /* CONFIG_PXA3xx */
158 static struct resource pxafb_resources[] = {
162 .flags = IORESOURCE_MEM,
167 .flags = IORESOURCE_IRQ,
171 static u64 fb_dma_mask = ~(u64)0;
173 struct platform_device pxa_device_fb = {
177 .dma_mask = &fb_dma_mask,
178 .coherent_dma_mask = 0xffffffff,
180 .num_resources = ARRAY_SIZE(pxafb_resources),
181 .resource = pxafb_resources,
184 void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info)
186 pxa_device_fb.dev.parent = parent;
187 pxa_register_device(&pxa_device_fb, info);
190 static struct resource pxa_resource_ffuart[] = {
194 .flags = IORESOURCE_MEM,
198 .flags = IORESOURCE_IRQ,
202 struct platform_device pxa_device_ffuart = {
203 .name = "pxa2xx-uart",
205 .resource = pxa_resource_ffuart,
206 .num_resources = ARRAY_SIZE(pxa_resource_ffuart),
209 void __init pxa_set_ffuart_info(void *info)
211 pxa_register_device(&pxa_device_ffuart, info);
214 static struct resource pxa_resource_btuart[] = {
218 .flags = IORESOURCE_MEM,
222 .flags = IORESOURCE_IRQ,
226 struct platform_device pxa_device_btuart = {
227 .name = "pxa2xx-uart",
229 .resource = pxa_resource_btuart,
230 .num_resources = ARRAY_SIZE(pxa_resource_btuart),
233 void __init pxa_set_btuart_info(void *info)
235 pxa_register_device(&pxa_device_btuart, info);
238 static struct resource pxa_resource_stuart[] = {
242 .flags = IORESOURCE_MEM,
246 .flags = IORESOURCE_IRQ,
250 struct platform_device pxa_device_stuart = {
251 .name = "pxa2xx-uart",
253 .resource = pxa_resource_stuart,
254 .num_resources = ARRAY_SIZE(pxa_resource_stuart),
257 void __init pxa_set_stuart_info(void *info)
259 pxa_register_device(&pxa_device_stuart, info);
262 static struct resource pxa_resource_hwuart[] = {
266 .flags = IORESOURCE_MEM,
270 .flags = IORESOURCE_IRQ,
274 struct platform_device pxa_device_hwuart = {
275 .name = "pxa2xx-uart",
277 .resource = pxa_resource_hwuart,
278 .num_resources = ARRAY_SIZE(pxa_resource_hwuart),
281 void __init pxa_set_hwuart_info(void *info)
284 pxa_register_device(&pxa_device_hwuart, info);
286 pr_info("UART: Ignoring attempt to register HWUART on non-PXA255 hardware");
289 static struct resource pxai2c_resources[] = {
293 .flags = IORESOURCE_MEM,
297 .flags = IORESOURCE_IRQ,
301 struct platform_device pxa_device_i2c = {
302 .name = "pxa2xx-i2c",
304 .resource = pxai2c_resources,
305 .num_resources = ARRAY_SIZE(pxai2c_resources),
308 void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
310 pxa_register_device(&pxa_device_i2c, info);
314 static struct resource pxa27x_resources_i2c_power[] = {
318 .flags = IORESOURCE_MEM,
322 .flags = IORESOURCE_IRQ,
326 struct platform_device pxa27x_device_i2c_power = {
327 .name = "pxa2xx-i2c",
329 .resource = pxa27x_resources_i2c_power,
330 .num_resources = ARRAY_SIZE(pxa27x_resources_i2c_power),
334 static struct resource pxai2s_resources[] = {
338 .flags = IORESOURCE_MEM,
342 .flags = IORESOURCE_IRQ,
346 struct platform_device pxa_device_i2s = {
347 .name = "pxa2xx-i2s",
349 .resource = pxai2s_resources,
350 .num_resources = ARRAY_SIZE(pxai2s_resources),
353 struct platform_device pxa_device_asoc_ssp1 = {
354 .name = "pxa-ssp-dai",
358 struct platform_device pxa_device_asoc_ssp2= {
359 .name = "pxa-ssp-dai",
363 struct platform_device pxa_device_asoc_ssp3 = {
364 .name = "pxa-ssp-dai",
368 struct platform_device pxa_device_asoc_ssp4 = {
369 .name = "pxa-ssp-dai",
373 struct platform_device pxa_device_asoc_platform = {
374 .name = "pxa-pcm-audio",
378 static u64 pxaficp_dmamask = ~(u32)0;
380 static struct resource pxa_ir_resources[] = {
384 .flags = IORESOURCE_IRQ,
389 .flags = IORESOURCE_IRQ,
394 .flags = IORESOURCE_MEM,
399 .flags = IORESOURCE_MEM,
403 struct platform_device pxa_device_ficp = {
406 .num_resources = ARRAY_SIZE(pxa_ir_resources),
407 .resource = pxa_ir_resources,
409 .dma_mask = &pxaficp_dmamask,
410 .coherent_dma_mask = 0xffffffff,
414 void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
416 pxa_register_device(&pxa_device_ficp, info);
419 static struct resource pxa_rtc_resources[] = {
422 .end = 0x40900000 + 0x3b,
423 .flags = IORESOURCE_MEM,
429 .flags = IORESOURCE_IRQ,
432 .start = IRQ_RTCAlrm,
435 .flags = IORESOURCE_IRQ,
439 struct platform_device pxa_device_rtc = {
442 .num_resources = ARRAY_SIZE(pxa_rtc_resources),
443 .resource = pxa_rtc_resources,
446 struct platform_device sa1100_device_rtc = {
447 .name = "sa1100-rtc",
449 .num_resources = ARRAY_SIZE(pxa_rtc_resources),
450 .resource = pxa_rtc_resources,
453 static struct resource pxa_ac97_resources[] = {
456 .end = 0x40500000 + 0xfff,
457 .flags = IORESOURCE_MEM,
462 .flags = IORESOURCE_IRQ,
466 static u64 pxa_ac97_dmamask = 0xffffffffUL;
468 struct platform_device pxa_device_ac97 = {
469 .name = "pxa2xx-ac97",
472 .dma_mask = &pxa_ac97_dmamask,
473 .coherent_dma_mask = 0xffffffff,
475 .num_resources = ARRAY_SIZE(pxa_ac97_resources),
476 .resource = pxa_ac97_resources,
479 void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops)
483 ret = clk_add_alias("ac97_clk", "pxa2xx-ac97:0", "AC97CLK",
484 &pxa_device_ac97.dev);
486 pr_err("PXA AC97 clock1 alias error: %d\n", ret);
488 ret = clk_add_alias("ac97_clk", "pxa2xx-ac97:1", "AC97CLK",
489 &pxa_device_ac97.dev);
491 pr_err("PXA AC97 clock2 alias error: %d\n", ret);
493 pxa_register_device(&pxa_device_ac97, ops);
498 static struct resource pxa25x_resource_pwm0[] = {
502 .flags = IORESOURCE_MEM,
506 struct platform_device pxa25x_device_pwm0 = {
507 .name = "pxa25x-pwm",
509 .resource = pxa25x_resource_pwm0,
510 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm0),
513 static struct resource pxa25x_resource_pwm1[] = {
517 .flags = IORESOURCE_MEM,
521 struct platform_device pxa25x_device_pwm1 = {
522 .name = "pxa25x-pwm",
524 .resource = pxa25x_resource_pwm1,
525 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm1),
528 static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
530 static struct resource pxa25x_resource_ssp[] = {
534 .flags = IORESOURCE_MEM,
539 .flags = IORESOURCE_IRQ,
543 struct platform_device pxa25x_device_ssp = {
544 .name = "pxa25x-ssp",
547 .dma_mask = &pxa25x_ssp_dma_mask,
548 .coherent_dma_mask = DMA_BIT_MASK(32),
550 .resource = pxa25x_resource_ssp,
551 .num_resources = ARRAY_SIZE(pxa25x_resource_ssp),
554 static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
556 static struct resource pxa25x_resource_nssp[] = {
560 .flags = IORESOURCE_MEM,
565 .flags = IORESOURCE_IRQ,
569 struct platform_device pxa25x_device_nssp = {
570 .name = "pxa25x-nssp",
573 .dma_mask = &pxa25x_nssp_dma_mask,
574 .coherent_dma_mask = DMA_BIT_MASK(32),
576 .resource = pxa25x_resource_nssp,
577 .num_resources = ARRAY_SIZE(pxa25x_resource_nssp),
580 static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
582 static struct resource pxa25x_resource_assp[] = {
586 .flags = IORESOURCE_MEM,
591 .flags = IORESOURCE_IRQ,
595 struct platform_device pxa25x_device_assp = {
596 /* ASSP is basically equivalent to NSSP */
597 .name = "pxa25x-nssp",
600 .dma_mask = &pxa25x_assp_dma_mask,
601 .coherent_dma_mask = DMA_BIT_MASK(32),
603 .resource = pxa25x_resource_assp,
604 .num_resources = ARRAY_SIZE(pxa25x_resource_assp),
606 #endif /* CONFIG_PXA25x */
608 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
609 static struct resource pxa27x_resource_camera[] = {
613 .flags = IORESOURCE_MEM,
618 .flags = IORESOURCE_IRQ,
622 static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32);
624 static struct platform_device pxa27x_device_camera = {
625 .name = "pxa27x-camera",
626 .id = 0, /* This is used to put cameras on this interface */
628 .dma_mask = &pxa27x_dma_mask_camera,
629 .coherent_dma_mask = 0xffffffff,
631 .num_resources = ARRAY_SIZE(pxa27x_resource_camera),
632 .resource = pxa27x_resource_camera,
635 void __init pxa_set_camera_info(struct pxacamera_platform_data *info)
637 pxa_register_device(&pxa27x_device_camera, info);
640 static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
642 static struct resource pxa27x_resource_ohci[] = {
646 .flags = IORESOURCE_MEM,
651 .flags = IORESOURCE_IRQ,
655 struct platform_device pxa27x_device_ohci = {
656 .name = "pxa27x-ohci",
659 .dma_mask = &pxa27x_ohci_dma_mask,
660 .coherent_dma_mask = DMA_BIT_MASK(32),
662 .num_resources = ARRAY_SIZE(pxa27x_resource_ohci),
663 .resource = pxa27x_resource_ohci,
666 void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
668 pxa_register_device(&pxa27x_device_ohci, info);
670 #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
672 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
673 static struct resource pxa27x_resource_keypad[] = {
677 .flags = IORESOURCE_MEM,
682 .flags = IORESOURCE_IRQ,
686 struct platform_device pxa27x_device_keypad = {
687 .name = "pxa27x-keypad",
689 .resource = pxa27x_resource_keypad,
690 .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
693 void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
695 pxa_register_device(&pxa27x_device_keypad, info);
698 static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
700 static struct resource pxa27x_resource_ssp1[] = {
704 .flags = IORESOURCE_MEM,
709 .flags = IORESOURCE_IRQ,
713 struct platform_device pxa27x_device_ssp1 = {
714 .name = "pxa27x-ssp",
717 .dma_mask = &pxa27x_ssp1_dma_mask,
718 .coherent_dma_mask = DMA_BIT_MASK(32),
720 .resource = pxa27x_resource_ssp1,
721 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
724 static u64 pxa27x_ssp2_dma_mask = DMA_BIT_MASK(32);
726 static struct resource pxa27x_resource_ssp2[] = {
730 .flags = IORESOURCE_MEM,
735 .flags = IORESOURCE_IRQ,
739 struct platform_device pxa27x_device_ssp2 = {
740 .name = "pxa27x-ssp",
743 .dma_mask = &pxa27x_ssp2_dma_mask,
744 .coherent_dma_mask = DMA_BIT_MASK(32),
746 .resource = pxa27x_resource_ssp2,
747 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
750 static u64 pxa27x_ssp3_dma_mask = DMA_BIT_MASK(32);
752 static struct resource pxa27x_resource_ssp3[] = {
756 .flags = IORESOURCE_MEM,
761 .flags = IORESOURCE_IRQ,
765 struct platform_device pxa27x_device_ssp3 = {
766 .name = "pxa27x-ssp",
769 .dma_mask = &pxa27x_ssp3_dma_mask,
770 .coherent_dma_mask = DMA_BIT_MASK(32),
772 .resource = pxa27x_resource_ssp3,
773 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
776 static struct resource pxa27x_resource_pwm0[] = {
780 .flags = IORESOURCE_MEM,
784 struct platform_device pxa27x_device_pwm0 = {
785 .name = "pxa27x-pwm",
787 .resource = pxa27x_resource_pwm0,
788 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm0),
791 static struct resource pxa27x_resource_pwm1[] = {
795 .flags = IORESOURCE_MEM,
799 struct platform_device pxa27x_device_pwm1 = {
800 .name = "pxa27x-pwm",
802 .resource = pxa27x_resource_pwm1,
803 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1),
805 #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
808 static struct resource pxa3xx_resources_mci2[] = {
812 .flags = IORESOURCE_MEM,
817 .flags = IORESOURCE_IRQ,
821 struct platform_device pxa3xx_device_mci2 = {
822 .name = "pxa2xx-mci",
825 .dma_mask = &pxamci_dmamask,
826 .coherent_dma_mask = 0xffffffff,
828 .num_resources = ARRAY_SIZE(pxa3xx_resources_mci2),
829 .resource = pxa3xx_resources_mci2,
832 void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
834 pxa_register_device(&pxa3xx_device_mci2, info);
837 static struct resource pxa3xx_resources_mci3[] = {
841 .flags = IORESOURCE_MEM,
846 .flags = IORESOURCE_IRQ,
850 struct platform_device pxa3xx_device_mci3 = {
851 .name = "pxa2xx-mci",
854 .dma_mask = &pxamci_dmamask,
855 .coherent_dma_mask = 0xffffffff,
857 .num_resources = ARRAY_SIZE(pxa3xx_resources_mci3),
858 .resource = pxa3xx_resources_mci3,
861 void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
863 pxa_register_device(&pxa3xx_device_mci3, info);
866 static struct resource pxa3xx_resources_gcu[] = {
870 .flags = IORESOURCE_MEM,
875 .flags = IORESOURCE_IRQ,
879 static u64 pxa3xx_gcu_dmamask = DMA_BIT_MASK(32);
881 struct platform_device pxa3xx_device_gcu = {
882 .name = "pxa3xx-gcu",
884 .num_resources = ARRAY_SIZE(pxa3xx_resources_gcu),
885 .resource = pxa3xx_resources_gcu,
887 .dma_mask = &pxa3xx_gcu_dmamask,
888 .coherent_dma_mask = 0xffffffff,
892 #endif /* CONFIG_PXA3xx */
894 #if defined(CONFIG_PXA3xx)
895 static struct resource pxa3xx_resources_i2c_power[] = {
899 .flags = IORESOURCE_MEM,
903 .flags = IORESOURCE_IRQ,
907 struct platform_device pxa3xx_device_i2c_power = {
908 .name = "pxa3xx-pwri2c",
910 .resource = pxa3xx_resources_i2c_power,
911 .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power),
914 static struct resource pxa3xx_resources_nand[] = {
918 .flags = IORESOURCE_MEM,
923 .flags = IORESOURCE_IRQ,
927 static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32);
929 struct platform_device pxa3xx_device_nand = {
930 .name = "pxa3xx-nand",
933 .dma_mask = &pxa3xx_nand_dma_mask,
934 .coherent_dma_mask = DMA_BIT_MASK(32),
936 .num_resources = ARRAY_SIZE(pxa3xx_resources_nand),
937 .resource = pxa3xx_resources_nand,
940 void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
942 pxa_register_device(&pxa3xx_device_nand, info);
945 static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
947 static struct resource pxa3xx_resource_ssp4[] = {
951 .flags = IORESOURCE_MEM,
956 .flags = IORESOURCE_IRQ,
961 * PXA3xx SSP is basically equivalent to PXA27x.
962 * However, we need to register the device by the correct name in order to
963 * make the driver set the correct internal type, hence we provide specific
964 * platform_devices for each of them.
966 struct platform_device pxa3xx_device_ssp1 = {
967 .name = "pxa3xx-ssp",
970 .dma_mask = &pxa27x_ssp1_dma_mask,
971 .coherent_dma_mask = DMA_BIT_MASK(32),
973 .resource = pxa27x_resource_ssp1,
974 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
977 struct platform_device pxa3xx_device_ssp2 = {
978 .name = "pxa3xx-ssp",
981 .dma_mask = &pxa27x_ssp2_dma_mask,
982 .coherent_dma_mask = DMA_BIT_MASK(32),
984 .resource = pxa27x_resource_ssp2,
985 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
988 struct platform_device pxa3xx_device_ssp3 = {
989 .name = "pxa3xx-ssp",
992 .dma_mask = &pxa27x_ssp3_dma_mask,
993 .coherent_dma_mask = DMA_BIT_MASK(32),
995 .resource = pxa27x_resource_ssp3,
996 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
999 struct platform_device pxa3xx_device_ssp4 = {
1000 .name = "pxa3xx-ssp",
1003 .dma_mask = &pxa3xx_ssp4_dma_mask,
1004 .coherent_dma_mask = DMA_BIT_MASK(32),
1006 .resource = pxa3xx_resource_ssp4,
1007 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
1009 #endif /* CONFIG_PXA3xx */
1011 struct resource pxa_resource_gpio[] = {
1013 .start = 0x40e00000,
1015 .flags = IORESOURCE_MEM,
1020 .flags = IORESOURCE_IRQ,
1025 .flags = IORESOURCE_IRQ,
1027 .start = IRQ_GPIO_2_x,
1028 .end = IRQ_GPIO_2_x,
1030 .flags = IORESOURCE_IRQ,
1034 struct platform_device pxa25x_device_gpio = {
1035 #ifdef CONFIG_CPU_PXA26x
1036 .name = "pxa26x-gpio",
1038 .name = "pxa25x-gpio",
1041 .num_resources = ARRAY_SIZE(pxa_resource_gpio),
1042 .resource = pxa_resource_gpio,
1045 struct platform_device pxa27x_device_gpio = {
1046 .name = "pxa27x-gpio",
1048 .num_resources = ARRAY_SIZE(pxa_resource_gpio),
1049 .resource = pxa_resource_gpio,
1052 struct platform_device pxa3xx_device_gpio = {
1053 .name = "pxa3xx-gpio",
1055 .num_resources = ARRAY_SIZE(pxa_resource_gpio),
1056 .resource = pxa_resource_gpio,
1059 struct platform_device pxa93x_device_gpio = {
1060 .name = "pxa93x-gpio",
1062 .num_resources = ARRAY_SIZE(pxa_resource_gpio),
1063 .resource = pxa_resource_gpio,
1066 /* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
1067 * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */
1068 void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info)
1070 struct platform_device *pd;
1072 pd = platform_device_alloc("pxa2xx-spi", id);
1074 printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n",
1079 pd->dev.platform_data = info;
1080 platform_device_add(pd);
1083 static struct resource pxa_dma_resource[] = {
1085 .start = 0x40000000,
1087 .flags = IORESOURCE_MEM,
1092 .flags = IORESOURCE_IRQ,
1096 static u64 pxadma_dmamask = 0xffffffffUL;
1098 static struct platform_device pxa2xx_pxa_dma = {
1102 .dma_mask = &pxadma_dmamask,
1103 .coherent_dma_mask = 0xffffffff,
1105 .num_resources = ARRAY_SIZE(pxa_dma_resource),
1106 .resource = pxa_dma_resource,
1109 void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata)
1111 pxa_register_device(&pxa2xx_pxa_dma, dma_pdata);