ux500: dynamic SOC detection
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-ux500 / devices-common.h
blobcbadc117d2db0dfd0043f9539593b374effbff31
1 /*
2 * Copyright (C) ST-Ericsson SA 2010
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL), version 2.
6 */
8 #ifndef __DEVICES_COMMON_H
9 #define __DEVICES_COMMON_H
11 extern struct amba_device *
12 dbx500_add_amba_device(const char *name, resource_size_t base,
13 int irq, void *pdata, unsigned int periphid);
15 extern struct platform_device *
16 dbx500_add_platform_device_4k1irq(const char *name, int id,
17 resource_size_t base,
18 int irq, void *pdata);
20 struct spi_master_cntlr;
22 static inline struct amba_device *
23 dbx500_add_msp_spi(const char *name, resource_size_t base, int irq,
24 struct spi_master_cntlr *pdata)
26 return dbx500_add_amba_device(name, base, irq, pdata, 0);
29 static inline struct amba_device *
30 dbx500_add_spi(const char *name, resource_size_t base, int irq,
31 struct spi_master_cntlr *pdata)
33 return dbx500_add_amba_device(name, base, irq, pdata, 0);
36 struct mmci_platform_data;
38 static inline struct amba_device *
39 dbx500_add_sdi(const char *name, resource_size_t base, int irq,
40 struct mmci_platform_data *pdata)
42 return dbx500_add_amba_device(name, base, irq, pdata, 0);
45 static inline struct amba_device *
46 dbx500_add_uart(const char *name, resource_size_t base, int irq)
48 return dbx500_add_amba_device(name, base, irq, NULL, 0);
51 struct nmk_i2c_controller;
53 static inline struct platform_device *
54 dbx500_add_i2c(int id, resource_size_t base, int irq,
55 struct nmk_i2c_controller *pdata)
57 return dbx500_add_platform_device_4k1irq("nmk-i2c", id, base, irq,
58 pdata);
61 struct msp_i2s_platform_data;
63 static inline struct platform_device *
64 dbx500_add_msp_i2s(int id, resource_size_t base, int irq,
65 struct msp_i2s_platform_data *pdata)
67 return dbx500_add_platform_device_4k1irq("MSP_I2S", id, base, irq,
68 pdata);
71 static inline struct amba_device *
72 dbx500_add_rtc(resource_size_t base, int irq)
74 return dbx500_add_amba_device("rtc-pl031", base, irq, NULL, 0);
77 struct nmk_gpio_platform_data;
79 void dbx500_add_gpios(resource_size_t *base, int num, int irq,
80 struct nmk_gpio_platform_data *pdata);
82 #endif