summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/include/mach/am33xx-devices.h
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2013-06-10 21:31:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-18 21:33:58 +0200
commit3b16061615781b187124c2534080441f19164118 (patch)
treef1247c652fc00db278bd8312e0c7231a4368e700 /arch/arm/mach-omap/include/mach/am33xx-devices.h
parent88796b1a99b04d30326d649ed6523233c438331b (diff)
downloadbarebox-3b16061615781b187124c2534080441f19164118.tar.gz
barebox-3b16061615781b187124c2534080441f19164118.tar.xz
arm: omap: am33xx: set up SPI devices
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/include/mach/am33xx-devices.h')
-rw-r--r--arch/arm/mach-omap/include/mach/am33xx-devices.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/include/mach/am33xx-devices.h b/arch/arm/mach-omap/include/mach/am33xx-devices.h
index fe9fba996b..7da4b9992e 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-devices.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-devices.h
@@ -37,4 +37,20 @@ static inline struct device_d *am33xx_add_cpsw(struct cpsw_platform_data *cpsw_d
AM335X_CPSW_BASE, SZ_32K, IORESOURCE_MEM, cpsw_data);
}
+static inline struct device_d *am33xx_add_spi(int id, resource_size_t start)
+{
+ return add_generic_device("omap3_spi", id, NULL, start + 0x100, SZ_4K - 0x100,
+ IORESOURCE_MEM, NULL);
+}
+
+static inline struct device_d *am33xx_add_spi0(void)
+{
+ return am33xx_add_spi(0, AM33XX_MCSPI0_BASE);
+}
+
+static inline struct device_d *am33xx_add_spi1(void)
+{
+ return am33xx_add_spi(1, AM33XX_MCSPI1_BASE);
+}
+
#endif /* __MACH_OMAP3_DEVICES_H */