All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices
@ 2011-03-15 14:41 Philippe Langlais
  2011-03-15 14:41 ` [PATCH 1/4] amba: add name based matching Philippe Langlais
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Philippe Langlais @ 2011-03-15 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philippe Langlais <philippe.langlais@linaro.org>

Add name based matching for ST-Ericsson amba devices with same ID but with
some differences.
This patch set fixes mmci/pl180 U8500v2 variant (datactrl register divergence),
and spi/pl022 U5500 variant (loopback support).

Philippe Langlais (2):
  mmci/pl180: Support for db8500v2.     ST-Ericsson modified ARM
    PrimeCell PL180 block has not got     an updated corresponding
    amba-id, althought the IP block has     changed in db8500v2. The
    change was done to the datactrl register.
  ux500: pass name for db5500-spi & db8500v2-sdi devices

Prajadevi H (1):
  amba-pl022: Add loopback support for the SPI on 5500

Rabin Vincent (1):
  amba: add name based matching

 arch/arm/mach-ux500/devices-common.c        |    8 ++++--
 arch/arm/mach-ux500/devices-common.h        |   31 ++++++++++++++++++--------
 arch/arm/mach-ux500/devices-db8500.h        |    2 +-
 arch/arm/mach-ux500/include/mach/hardware.h |    3 --
 drivers/amba/bus.c                          |    6 +++++
 drivers/mmc/host/mmci.c                     |   24 ++++++++++++++++++++-
 drivers/spi/amba-pl022.c                    |   21 +++++++++++++++++-
 include/linux/amba/bus.h                    |    2 +
 8 files changed, 78 insertions(+), 19 deletions(-)

-- 
1.7.3.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-15 14:41 [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices Philippe Langlais
@ 2011-03-15 14:41 ` Philippe Langlais
  2011-03-15 14:49   ` Russell King - ARM Linux
  2011-03-15 14:41 ` [PATCH 2/4] amba-pl022: Add loopback support for the SPI on 5500 Philippe Langlais
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Philippe Langlais @ 2011-03-15 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rabin Vincent <rabin.vincent@stericsson.com>

Some peripherals on the DBx500 family of SoCs have changes in their
functionality and registers between different variants in the family but
retain the same AMBA peripheral ID, making it impossible to distinguish
between them in AMBA drivers with the current AMBA id_table.

To support this, add a name parameter to the amba_device and the amba_id
and allow name based matching as a second level filter after the
periphid match.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
---
 drivers/amba/bus.c       |    6 ++++++
 include/linux/amba/bus.h |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 6d2bb25..7f1590f 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -29,6 +29,12 @@ amba_lookup(const struct amba_id *table, struct amba_device *dev)
 
 	while (table->mask) {
 		ret = (dev->periphid & table->mask) == table->id;
+		if (ret && (table->name || dev->name)) {
+			if (table->name && dev->name)
+				ret = strcmp(dev->name, table->name) == 0;
+			else
+				ret = 0;
+		}
 		if (ret)
 			break;
 		table++;
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index fcbbe71..f5f82b2 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -32,12 +32,14 @@ struct amba_device {
 	struct regulator	*vcore;
 	u64			dma_mask;
 	unsigned int		periphid;
+	const char		*name;
 	unsigned int		irq[AMBA_NR_IRQS];
 };
 
 struct amba_id {
 	unsigned int		id;
 	unsigned int		mask;
+	const char		*name;
 	void			*data;
 };
 
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] amba-pl022: Add loopback support for the SPI on 5500
  2011-03-15 14:41 [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices Philippe Langlais
  2011-03-15 14:41 ` [PATCH 1/4] amba: add name based matching Philippe Langlais
@ 2011-03-15 14:41 ` Philippe Langlais
  2011-03-15 14:41 ` [PATCH 3/4] mmci/pl180: Support for db8500v2. ST-Ericsson modified ARM PrimeCell PL180 block has not got an updated corresponding amba-id, althought the IP block has changed in db8500v2. The change was done to the datactrl register Philippe Langlais
  2011-03-15 14:41 ` [PATCH 4/4] ux500: pass name for db5500-spi & db8500v2-sdi devices Philippe Langlais
  3 siblings, 0 replies; 10+ messages in thread
From: Philippe Langlais @ 2011-03-15 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Prajadevi H <prajadevi.h@stericsson.com>

Add new amba-pl022 vendor for the DB5500 pl023,
as the pl023 on db8500 and db5500 vary.

Signed-off-by: Prajadevi H <prajadevi.h@stericsson.com>
---
 drivers/spi/amba-pl022.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 5c2b092..413eaf0 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -324,6 +324,7 @@ struct vendor_data {
 	bool unidir;
 	bool extended_cr;
 	bool pl023;
+	bool loopback;
 };
 
 /**
@@ -1983,7 +1984,7 @@ static int pl022_setup(struct spi_device *spi)
 
 	SSP_WRITE_BITS(chip->cr0, clk_freq.scr, SSP_CR0_MASK_SCR, 8);
 	/* Loopback is available on all versions except PL023 */
-	if (!pl022->vendor->pl023) {
+	if (pl022->vendor->loopback) {
 		if (spi->mode & SPI_LOOP)
 			tmp = LOOPBACK_ENABLED;
 		else
@@ -2233,6 +2234,7 @@ static struct vendor_data vendor_arm = {
 	.unidir = false,
 	.extended_cr = false,
 	.pl023 = false,
+	.loopback = true,
 };
 
 
@@ -2242,6 +2244,7 @@ static struct vendor_data vendor_st = {
 	.unidir = false,
 	.extended_cr = true,
 	.pl023 = false,
+	.loopback = true,
 };
 
 static struct vendor_data vendor_st_pl023 = {
@@ -2250,6 +2253,16 @@ static struct vendor_data vendor_st_pl023 = {
 	.unidir = false,
 	.extended_cr = true,
 	.pl023 = true,
+	.loopback = false,
+};
+
+static struct vendor_data vendor_db5500_pl023 = {
+	.fifodepth = 32,
+	.max_bpw = 32,
+	.unidir = false,
+	.extended_cr = true,
+	.pl023 = true,
+	.loopback = true,
 };
 
 static struct amba_id pl022_ids[] = {
@@ -2283,6 +2296,12 @@ static struct amba_id pl022_ids[] = {
 		.mask   = 0xffffffff,
 		.data   = &vendor_st_pl023,
 	},
+	{
+		.id	= 0x00080023,
+		.mask	= 0xffffffff,
+		.data	= &vendor_db5500_pl023,
+		.name	= "db5500-spi",
+	},
 	{ 0, 0 },
 };
 
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] mmci/pl180: Support for db8500v2. ST-Ericsson modified ARM PrimeCell PL180 block has not got an updated corresponding amba-id, althought the IP block has changed in db8500v2. The change was done to the datactrl register.
  2011-03-15 14:41 [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices Philippe Langlais
  2011-03-15 14:41 ` [PATCH 1/4] amba: add name based matching Philippe Langlais
  2011-03-15 14:41 ` [PATCH 2/4] amba-pl022: Add loopback support for the SPI on 5500 Philippe Langlais
@ 2011-03-15 14:41 ` Philippe Langlais
  2011-03-15 14:41 ` [PATCH 4/4] ux500: pass name for db5500-spi & db8500v2-sdi devices Philippe Langlais
  3 siblings, 0 replies; 10+ messages in thread
From: Philippe Langlais @ 2011-03-15 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philippe Langlais <philippe.langlais@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
---
 drivers/mmc/host/mmci.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 1dfd099..0b92c87 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -51,6 +51,7 @@ static unsigned int fmax = 515633;
  *		  is asserted (likewise for RX)
  * @sdio: variant supports SDIO
  * @st_clkdiv: true if using a ST-specific clock divider algorithm
+ * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register
  */
 struct variant_data {
 	unsigned int		clkreg;
@@ -60,6 +61,7 @@ struct variant_data {
 	unsigned int		fifohalfsize;
 	bool			sdio;
 	bool			st_clkdiv;
+	bool			blksz_datactrl16;
 };
 
 static struct variant_data variant_arm = {
@@ -86,6 +88,17 @@ static struct variant_data variant_ux500 = {
 	.st_clkdiv		= true,
 };
 
+static struct variant_data variant_ux500v2 = {
+	.fifosize		= 30 * 4,
+	.fifohalfsize		= 8 * 4,
+	.clkreg			= MCI_CLK_ENABLE,
+	.clkreg_enable		= MCI_ST_UX500_HWFCEN,
+	.datalength_bits	= 24,
+	.sdio			= true,
+	.st_clkdiv		= true,
+	.blksz_datactrl16	= true,
+};
+
 /*
  * This must be called with host->lock held
  */
@@ -457,7 +470,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
 	blksz_bits = ffs(data->blksz) - 1;
 	BUG_ON(1 << blksz_bits != data->blksz);
 
-	datactrl = MCI_DPSM_ENABLE | blksz_bits << 4;
+	if (variant->blksz_datactrl16)
+		datactrl = MCI_DPSM_ENABLE | (data->blksz << 16);
+	else
+		datactrl = MCI_DPSM_ENABLE | blksz_bits << 4;
 
 	if (data->flags & MMC_DATA_READ)
 		datactrl |= MCI_DPSM_DIRECTION;
@@ -1289,6 +1305,12 @@ static struct amba_id mmci_ids[] = {
 		.mask   = 0x00ffffff,
 		.data	= &variant_ux500,
 	},
+	{
+		.id     = 0x00480180,
+		.mask   = 0x00ffffff,
+		.data	= &variant_ux500v2,
+		.name	= "db8500v2-sdi",
+	},
 	{ 0, 0 },
 };
 
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] ux500: pass name for db5500-spi & db8500v2-sdi devices
  2011-03-15 14:41 [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices Philippe Langlais
                   ` (2 preceding siblings ...)
  2011-03-15 14:41 ` [PATCH 3/4] mmci/pl180: Support for db8500v2. ST-Ericsson modified ARM PrimeCell PL180 block has not got an updated corresponding amba-id, althought the IP block has changed in db8500v2. The change was done to the datactrl register Philippe Langlais
@ 2011-03-15 14:41 ` Philippe Langlais
  3 siblings, 0 replies; 10+ messages in thread
From: Philippe Langlais @ 2011-03-15 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philippe Langlais <philippe.langlais@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
---
 arch/arm/mach-ux500/devices-common.c        |    8 ++++--
 arch/arm/mach-ux500/devices-common.h        |   31 ++++++++++++++++++--------
 arch/arm/mach-ux500/devices-db8500.h        |    2 +-
 arch/arm/mach-ux500/include/mach/hardware.h |    3 --
 4 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index 13a4ce0..e0acb75 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -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;
 
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h
index c719b5a1..cb5739e 100644
--- a/arch/arm/mach-ux500/devices-common.h
+++ b/arch/arm/mach-ux500/devices-common.h
@@ -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;
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index 9cc6f8f..fdcea73 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -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);
 }
 
 
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
index bf63f26..d54bb61 100644
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ b/arch/arm/mach-ux500/include/mach/hardware.h
@@ -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>
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-15 14:41 ` [PATCH 1/4] amba: add name based matching Philippe Langlais
@ 2011-03-15 14:49   ` Russell King - ARM Linux
  2011-03-15 14:55     ` Linus Walleij
  2011-03-17  8:47     ` Linus Walleij
  0 siblings, 2 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-03-15 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 15, 2011 at 03:41:53PM +0100, Philippe Langlais wrote:
> From: Rabin Vincent <rabin.vincent@stericsson.com>
> 
> Some peripherals on the DBx500 family of SoCs have changes in their
> functionality and registers between different variants in the family but
> retain the same AMBA peripheral ID, making it impossible to distinguish
> between them in AMBA drivers with the current AMBA id_table.
> 
> To support this, add a name parameter to the amba_device and the amba_id
> and allow name based matching as a second level filter after the
> periphid match.

I really hate the idea of matching AMBA stuff by name.  Isn't there any
other solution to this?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-15 14:49   ` Russell King - ARM Linux
@ 2011-03-15 14:55     ` Linus Walleij
  2011-03-17  8:47     ` Linus Walleij
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2011-03-15 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 15, 2011 at 3:49 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> I really hate the idea of matching AMBA stuff by name. ?Isn't there any
> other solution to this?

The second option I would try is to add a field to the platform data
for pl022 and mmci/pl180 such as "u8 silicon_revision" and encode
that with some 0x01, 0x02, 0x03... for the silicon revisions that
matter to behaviour.

Would you prefer this approach?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-15 14:49   ` Russell King - ARM Linux
  2011-03-15 14:55     ` Linus Walleij
@ 2011-03-17  8:47     ` Linus Walleij
  2011-03-17  8:48       ` Russell King - ARM Linux
  1 sibling, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2011-03-17  8:47 UTC (permalink / raw)
  To: linux-arm-kernel

2011/3/15 Russell King - ARM Linux <linux@arm.linux.org.uk>:

> I really hate the idea of matching AMBA stuff by name. ?Isn't there any
> other solution to this?

What do you think about this:

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 6d2bb25..fcf355c 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -603,6 +603,10 @@ int amba_device_register(struct amba_device *dev,
struct resource *parent)
        if (ret)
                goto err_out;

+       /* Hard-coded primecell ID instead of plug-n-play */
+       if (dev->periphid != 0)
+               goto skip_probe;
+
        /*
         * Dynamically calculate the size of the resource
         * and use this for iomap
@@ -643,6 +647,7 @@ int amba_device_register(struct amba_device *dev,
struct resource *parent)
        if (ret)
                goto err_release;

+ skip_probe:
        ret = device_add(&dev->dev);
        if (ret)
                goto err_release;

This way, if we hardcode periphid in the platform, it will take
precedence. Currently hardware will override such hard-codec
values.

There are a few instances using this in the kernel I think, but
to my memory they are all of the type where the hardcoded
number and the ID found in hardware are actually identical,
and eiher make no harm or should be patched away with.

Yours,
Linus Walleij

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-17  8:47     ` Linus Walleij
@ 2011-03-17  8:48       ` Russell King - ARM Linux
  2011-03-17  8:58         ` Linus Walleij
  0 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-03-17  8:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 17, 2011 at 09:47:35AM +0100, Linus Walleij wrote:
> 2011/3/15 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> 
> > I really hate the idea of matching AMBA stuff by name. ?Isn't there any
> > other solution to this?
> 
> What do you think about this:
> 
> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
> index 6d2bb25..fcf355c 100644
> --- a/drivers/amba/bus.c
> +++ b/drivers/amba/bus.c
> @@ -603,6 +603,10 @@ int amba_device_register(struct amba_device *dev,
> struct resource *parent)
>         if (ret)
>                 goto err_out;
> 
> +       /* Hard-coded primecell ID instead of plug-n-play */
> +       if (dev->periphid != 0)
> +               goto skip_probe;
> +
>         /*
>          * Dynamically calculate the size of the resource
>          * and use this for iomap
> @@ -643,6 +647,7 @@ int amba_device_register(struct amba_device *dev,
> struct resource *parent)
>         if (ret)
>                 goto err_release;
> 
> + skip_probe:
>         ret = device_add(&dev->dev);
>         if (ret)
>                 goto err_release;
> 
> This way, if we hardcode periphid in the platform, it will take
> precedence. Currently hardware will override such hard-codec
> values.
> 
> There are a few instances using this in the kernel I think, but
> to my memory they are all of the type where the hardcoded
> number and the ID found in hardware are actually identical,
> and eiher make no harm or should be patched away with.

This means we don't pick up on the hardware configuration when platforms
have set the ID, and since we always provide the ID that would be bad.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] amba: add name based matching
  2011-03-17  8:48       ` Russell King - ARM Linux
@ 2011-03-17  8:58         ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2011-03-17  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 17, 2011 at 9:48 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> This means we don't pick up on the hardware configuration when platforms
> have set the ID, and since we always provide the ID that would be bad.

Yes, so I don't put in this one patch, but also take a grep
and check through the kernel tree and try to find and eleminate those, so
that the possibility of hardcoding the ID is only used when it is proper,
i.e. when it should have been something else than what is in the hardware.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-17  8:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 14:41 [PATCH 0/4] Fix ST-Ericsson Ux500 specific PL022 & PL180 amba devices Philippe Langlais
2011-03-15 14:41 ` [PATCH 1/4] amba: add name based matching Philippe Langlais
2011-03-15 14:49   ` Russell King - ARM Linux
2011-03-15 14:55     ` Linus Walleij
2011-03-17  8:47     ` Linus Walleij
2011-03-17  8:48       ` Russell King - ARM Linux
2011-03-17  8:58         ` Linus Walleij
2011-03-15 14:41 ` [PATCH 2/4] amba-pl022: Add loopback support for the SPI on 5500 Philippe Langlais
2011-03-15 14:41 ` [PATCH 3/4] mmci/pl180: Support for db8500v2. ST-Ericsson modified ARM PrimeCell PL180 block has not got an updated corresponding amba-id, althought the IP block has changed in db8500v2. The change was done to the datactrl register Philippe Langlais
2011-03-15 14:41 ` [PATCH 4/4] ux500: pass name for db5500-spi & db8500v2-sdi devices Philippe Langlais

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.