aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index a6f2390ce662..abc161dd083a 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -13,6 +13,7 @@
13#include <asm/arch/mfp-pxa27x.h> 13#include <asm/arch/mfp-pxa27x.h>
14#include <asm/arch/ohci.h> 14#include <asm/arch/ohci.h>
15#include <asm/arch/pxa27x_keypad.h> 15#include <asm/arch/pxa27x_keypad.h>
16#include <asm/arch/pxa2xx_spi.h>
16#include <asm/arch/camera.h> 17#include <asm/arch/camera.h>
17#include <asm/arch/audio.h> 18#include <asm/arch/audio.h>
18 19
@@ -831,3 +832,20 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
831} 832}
832 833
833#endif /* CONFIG_PXA3xx */ 834#endif /* CONFIG_PXA3xx */
835
836/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
837 * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */
838void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
839{
840 struct platform_device *pd;
841
842 pd = platform_device_alloc("pxa2xx-spi", id);
843 if (pd == NULL) {
844 printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n",
845 id);
846 return;
847 }
848
849 pd->dev.platform_data = info;
850 platform_device_add(pd);
851}