ARM: 7372/1: ux500: factor out dynamic amba device allocator
This replaces the dynamic device allocator in the ux500 machine with the common device allocator in the bus code. Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:

committed by
Russell King

parent
4ff35d863e
commit
08956a0e8a
@@ -11,13 +11,9 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/sys_soc.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <plat/i2c.h>
|
||||
|
||||
extern struct amba_device *
|
||||
dbx500_add_amba_device(struct device *parent, const char *name,
|
||||
resource_size_t base, int irq, void *pdata,
|
||||
unsigned int periphid);
|
||||
|
||||
struct spi_master_cntlr;
|
||||
|
||||
static inline struct amba_device *
|
||||
@@ -25,8 +21,8 @@ dbx500_add_msp_spi(struct device *parent, const char *name,
|
||||
resource_size_t base, int irq,
|
||||
struct spi_master_cntlr *pdata)
|
||||
{
|
||||
return dbx500_add_amba_device(parent, name, base, irq,
|
||||
pdata, 0);
|
||||
return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
|
||||
pdata, 0);
|
||||
}
|
||||
|
||||
static inline struct amba_device *
|
||||
@@ -34,8 +30,8 @@ dbx500_add_spi(struct device *parent, const char *name, resource_size_t base,
|
||||
int irq, struct spi_master_cntlr *pdata,
|
||||
u32 periphid)
|
||||
{
|
||||
return dbx500_add_amba_device(parent, name, base, irq,
|
||||
pdata, periphid);
|
||||
return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
|
||||
pdata, periphid);
|
||||
}
|
||||
|
||||
struct mmci_platform_data;
|
||||
@@ -44,8 +40,8 @@ static inline struct amba_device *
|
||||
dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base,
|
||||
int irq, struct mmci_platform_data *pdata, u32 periphid)
|
||||
{
|
||||
return dbx500_add_amba_device(parent, name, base, irq,
|
||||
pdata, periphid);
|
||||
return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
|
||||
pdata, periphid);
|
||||
}
|
||||
|
||||
struct amba_pl011_data;
|
||||
@@ -54,7 +50,7 @@ static inline struct amba_device *
|
||||
dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
|
||||
int irq, struct amba_pl011_data *pdata)
|
||||
{
|
||||
return dbx500_add_amba_device(parent, name, base, irq, pdata, 0);
|
||||
return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
|
||||
}
|
||||
|
||||
struct nmk_i2c_controller;
|
||||
@@ -85,7 +81,8 @@ dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq,
|
||||
static inline struct amba_device *
|
||||
dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
|
||||
{
|
||||
return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0);
|
||||
return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq,
|
||||
0, NULL, 0);
|
||||
}
|
||||
|
||||
struct nmk_gpio_platform_data;
|
||||
|
Reference in New Issue
Block a user