summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-08-13 21:59:19 +0200
committerHaojian Zhuang <haojian.zhuang@linaro.org>2014-09-19 01:58:43 +0800
commit0da0e227477fdf7c7712ab973621630ba88aebcb (patch)
treee80f99b009b810e39fe8f88a20c04b106d459e4f /arch/arm/mach-pxa/devices.c
parent6f0243a1ec55e7140f69629b53e105d0715ef31b (diff)
ARM: pxa3xx: provide specific platform_devices for all ssp ports
Currently, devices for SSP ports 1, 2 and 3 are registered as compatible devices to pxa27x-ssp. While the actual IP core is comparable, there are some subtle differences which users of the SSP ports address by looking at the 'type' field. By registering devices of type 'pxa27x-ssp', this 'type' field is incorrectly set to PXA27x_SSP which confuses the users. To fix this, provide specific ssp port plaform devices which use 'pxa3xx-ssp' as driver name, an instantiate them from pxa3xx.c. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 666094315ab1..ac7b3eabbd85 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -1071,9 +1071,47 @@ static struct resource pxa3xx_resource_ssp4[] = {
},
};
+/*
+ * PXA3xx SSP is basically equivalent to PXA27x.
+ * However, we need to register the device by the correct name in order to
+ * make the driver set the correct internal type, hence we provide specific
+ * platform_devices for each of them.
+ */
+struct platform_device pxa3xx_device_ssp1 = {
+ .name = "pxa3xx-ssp",
+ .id = 0,
+ .dev = {
+ .dma_mask = &pxa27x_ssp1_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ .resource = pxa27x_resource_ssp1,
+ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
+};
+
+struct platform_device pxa3xx_device_ssp2 = {
+ .name = "pxa3xx-ssp",
+ .id = 1,
+ .dev = {
+ .dma_mask = &pxa27x_ssp2_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ .resource = pxa27x_resource_ssp2,
+ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
+};
+
+struct platform_device pxa3xx_device_ssp3 = {
+ .name = "pxa3xx-ssp",
+ .id = 2,
+ .dev = {
+ .dma_mask = &pxa27x_ssp3_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ .resource = pxa27x_resource_ssp3,
+ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
+};
+
struct platform_device pxa3xx_device_ssp4 = {
- /* PXA3xx SSP is basically equivalent to PXA27x */
- .name = "pxa27x-ssp",
+ .name = "pxa3xx-ssp",
.id = 3,
.dev = {
.dma_mask = &pxa3xx_ssp4_dma_mask,