@@ -20,8 +20,9 @@
#include "devices-common.h"
struct amba_device *
-dbx500_add_amba_device(const char *name, resource_size_t base,
- int irq, void *pdata, unsigned int periphid)
+dbx500_add_amba_device(const char *init_name, resource_size_t base,
+ int irq, void *pdata, unsigned int periphid,
+ const char *name)
{
struct amba_device *dev;
int ret;
@@ -30,7 +31,7 @@ dbx500_add_amba_device(const char *name, resource_size_t base,
if (!dev)
return ERR_PTR(-ENOMEM);
- dev->dev.init_name = name;
+ dev->dev.init_name = init_name;
dev->res.start = base;
dev->res.end = base + SZ_4K - 1;
@@ -43,6 +44,7 @@ dbx500_add_amba_device(const char *name, resource_size_t base,
dev->irq[1] = NO_IRQ;
dev->periphid = periphid;
+ dev->name = name;
dev->dev.platform_data = pdata;
@@ -9,8 +9,9 @@
#define __DEVICES_COMMON_H
extern struct amba_device *
-dbx500_add_amba_device(const char *name, resource_size_t base,
- int irq, void *pdata, unsigned int periphid);
+dbx500_add_amba_device(const char *init_name, resource_size_t base,
+ int irq, void *pdata, unsigned int periphid,
+ const char *name);
extern struct platform_device *
dbx500_add_platform_device_4k1irq(const char *name, int id,
@@ -23,23 +24,33 @@ static inline struct amba_device *
dbx500_add_msp_spi(const char *name, resource_size_t base, int irq,
struct spi_master_cntlr *pdata)
{
- return dbx500_add_amba_device(name, base, irq, pdata, 0);
+ return dbx500_add_amba_device(name, base, irq, pdata, 0, NULL);
}
static inline struct amba_device *
-dbx500_add_spi(const char *name, resource_size_t base, int irq,
- struct spi_master_cntlr *pdata)
+dbx500_add_spi(const char *init_name, resource_size_t base, int irq,
+ struct spi_master_cntlr *pdata)
{
- return dbx500_add_amba_device(name, base, irq, pdata, 0);
+ const char *name = NULL;
+
+ if (cpu_is_u5500())
+ name = "db5500-spi";
+
+ return dbx500_add_amba_device(init_name, base, irq, pdata, 0, name);
}
struct mmci_platform_data;
static inline struct amba_device *
-dbx500_add_sdi(const char *name, resource_size_t base, int irq,
+dbx500_add_sdi(const char *init_name, resource_size_t base, int irq,
struct mmci_platform_data *pdata)
{
- return dbx500_add_amba_device(name, base, irq, pdata, 0);
+ const char *name = NULL;
+
+ if (cpu_is_u8500v2())
+ name = "db8500v2-sdi";
+
+ return dbx500_add_amba_device(init_name, base, irq, pdata, 0, name);
}
struct amba_pl011_data;
@@ -48,7 +59,7 @@ static inline struct amba_device *
dbx500_add_uart(const char *name, resource_size_t base, int irq,
struct amba_pl011_data *pdata)
{
- return dbx500_add_amba_device(name, base, irq, pdata, 0);
+ return dbx500_add_amba_device(name, base, irq, pdata, 0, NULL);
}
struct nmk_i2c_controller;
@@ -74,7 +85,7 @@ dbx500_add_msp_i2s(int id, resource_size_t base, int irq,
static inline struct amba_device *
dbx500_add_rtc(resource_size_t base, int irq)
{
- return dbx500_add_amba_device("rtc-pl031", base, irq, NULL, 0);
+ return dbx500_add_amba_device("rtc-pl031", base, irq, NULL, 0, NULL);
}
struct nmk_gpio_platform_data;
@@ -25,7 +25,7 @@ static inline struct amba_device *
db8500_add_ssp(const char *name, resource_size_t base, int irq,
struct pl022_ssp_controller *pdata)
{
- return dbx500_add_amba_device(name, base, irq, pdata, SSP_PER_ID);
+ return dbx500_add_amba_device(name, base, irq, pdata, 0, NULL);
}
@@ -29,9 +29,6 @@
#include <mach/db8500-regs.h>
#include <mach/db5500-regs.h>
-/* ST-Ericsson modified pl022 id */
-#define SSP_PER_ID 0x01080022
-
#ifndef __ASSEMBLY__
#include <mach/id.h>