mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources
@ 2011-07-19 17:17 Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91rm9200ek/init.c      |    1 +
 arch/arm/boards/at91sam9261ek/init.c     |    2 ++
 arch/arm/boards/at91sam9263ek/init.c     |    1 +
 arch/arm/boards/mmccpu/init.c            |    1 +
 arch/arm/boards/pm9261/init.c            |    2 ++
 arch/arm/boards/pm9263/init.c            |    1 +
 arch/arm/mach-at91/at91rm9200_devices.c  |    7 +++++++
 arch/arm/mach-at91/at91sam9260_devices.c |   10 ++++++++++
 arch/arm/mach-at91/at91sam9261_devices.c |    6 ++++++
 arch/arm/mach-at91/at91sam9263_devices.c |    8 ++++++++
 arch/arm/mach-at91/at91sam9g45_devices.c |    9 +++++++++
 11 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c
index b21dc5f..2b16980 100644
--- a/arch/arm/boards/at91rm9200ek/init.c
+++ b/arch/arm/boards/at91rm9200ek/init.c
@@ -37,6 +37,7 @@
 static struct resource cfi_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_0,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 4e52ab8..4009523 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -97,10 +97,12 @@ static struct resource dm9000_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_2,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
 		.start	= AT91_CHIPSELECT_2 + 4,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index fe69305..af8a1e1 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -91,6 +91,7 @@ static struct resource cfi_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_0,
 		.size	= 8 * 1024 * 1024,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/mmccpu/init.c b/arch/arm/boards/mmccpu/init.c
index b79062e..8cc5f2c 100644
--- a/arch/arm/boards/mmccpu/init.c
+++ b/arch/arm/boards/mmccpu/init.c
@@ -40,6 +40,7 @@
 static struct resource cfi_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_0,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index 4811c73..ad4fa9d 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -97,10 +97,12 @@ static struct resource dm9000_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_2,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
 		.start	= AT91_CHIPSELECT_2 + 4,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index 6544837..e21e8e3 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -90,6 +90,7 @@ static struct resource cfi_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_0,
 		.size	= 4 * 1024 * 1024,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index d0502ca..16c94a6 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -38,6 +38,7 @@ static struct resource eth_resources[] = {
 	[0] = {
 		.start	= AT91_VA_BASE_EMAC,
 		.size	= 0x1000,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -92,6 +93,7 @@ static struct resource nand_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_3,
 		.size	= 0x10,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -151,6 +153,7 @@ static struct resource dbgu_resources[] = {
 	[0] = {
 		.start	= AT91_BASE_SYS + AT91_DBGU,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -171,6 +174,7 @@ static struct resource uart0_resources[] = {
 	[0] = {
 		.start	= AT91RM9200_BASE_US0,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -202,6 +206,7 @@ static struct resource uart1_resources[] = {
 	[0] = {
 		.start	= AT91RM9200_BASE_US1,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -235,6 +240,7 @@ static struct resource uart2_resources[] = {
 	[0] = {
 		.start	= AT91RM9200_BASE_US2,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -260,6 +266,7 @@ static struct resource uart3_resources[] = {
 	[0] = {
 		.start	= AT91RM9200_BASE_US3,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 988dd92..3808c66 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -35,6 +35,7 @@ static struct resource eth_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_EMAC,
 		.size	= 0x1000,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -85,6 +86,7 @@ static struct resource nand_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_3,
 		.size	= 0x10,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -128,6 +130,7 @@ static struct resource dbgu_resources[] = {
 	[0] = {
 		.start	= AT91_BASE_SYS + AT91_DBGU,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -148,6 +151,7 @@ static struct resource uart0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US0,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -181,6 +185,7 @@ static struct resource uart1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US1,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -206,6 +211,7 @@ static struct resource uart2_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US2,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -231,6 +237,7 @@ static struct resource uart3_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US3,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -256,6 +263,7 @@ static struct resource uart4_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US4,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -276,6 +284,7 @@ static struct resource uart5_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_US5,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -340,6 +349,7 @@ static struct resource mci_resources[] = {
 	[0] = {
 		.start	= AT91SAM9260_BASE_MCI,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index e00c3e0..f2a0664 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -35,6 +35,7 @@ static struct resource nand_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_3,
 		.size	= 0x10,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -81,6 +82,7 @@ static struct resource dbgu_resources[] = {
 	[0] = {
 		.start	= (AT91_BASE_SYS + AT91_DBGU),
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -101,6 +103,7 @@ static struct resource uart0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9261_BASE_US0,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -126,6 +129,7 @@ static struct resource uart1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9261_BASE_US1,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -151,6 +155,7 @@ static struct resource uart2_resources[] = {
 	[0] = {
 		.start	= AT91SAM9261_BASE_US2,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -205,6 +210,7 @@ static struct resource mci_resources[] = {
 	[0] = {
 		.start	= AT91SAM9261_BASE_MCI,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 752f789..c951800 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -35,6 +35,7 @@ static struct resource eth_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_EMAC,
 		.size	= 0x1000,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -84,6 +85,7 @@ static struct resource nand_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_3,
 		.size	= 0x10,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -127,6 +129,7 @@ static struct resource dbgu_resources[] = {
 	[0] = {
 		.start	= (AT91_BASE_SYS + AT91_DBGU),
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -147,6 +150,7 @@ static struct resource uart0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_US0,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -172,6 +176,7 @@ static struct resource uart1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_US1,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -197,6 +202,7 @@ static struct resource uart2_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_US2,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -252,6 +258,7 @@ static struct resource mci0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_MCI0,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -266,6 +273,7 @@ static struct resource mci1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9263_BASE_MCI1,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 8a02c8d..4f5279f 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -35,6 +35,7 @@ static struct resource eth_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_EMAC,
 		.size	= 0x1000,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -85,6 +86,7 @@ static struct resource nand_resources[] = {
 	[0] = {
 		.start	= AT91_CHIPSELECT_3,
 		.size	= 0x10,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -131,6 +133,7 @@ static struct resource dbgu_resources[] = {
 	[0] = {
 		.start	= (AT91_BASE_SYS + AT91_DBGU),
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -151,6 +154,7 @@ static struct resource uart0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_US0,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -176,6 +180,7 @@ static struct resource uart1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_US1,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -201,6 +206,7 @@ static struct resource uart2_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_US2,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -226,6 +232,7 @@ static struct resource uart3_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_US3,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -286,6 +293,7 @@ static struct resource mci0_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_MCI0,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -300,6 +308,7 @@ static struct resource mci1_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_MCI1,
 		.size	= SZ_16K,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 3/8] dm9000: " Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/mci/atmel_mci.c       |    2 +-
 drivers/mtd/nand/atmel_nand.c |    2 +-
 drivers/net/macb.c            |    2 +-
 drivers/serial/atmel.c        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 70041ba..b4489dd 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -456,7 +456,7 @@ static int mci_probe(struct device_d *hw_dev)
 	if (pd->bus_width == 8)
 		host->mci.host_caps |= MMC_MODE_8BIT;
 
-	host->base = (void __iomem *)hw_dev->resource[0].start;
+	host->base = dev_request_mem_region(hw_dev, 0);
 	host->hw_dev = hw_dev;
 	hw_dev->priv = host;
 	host->clk = clk_get(hw_dev, "mci_clk");
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 937bb70..f79be9a 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -381,7 +381,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
 	if (!host)
 		return -ENOMEM;
 
-	host->io_base = (void __iomem *)dev->resource[0].start;
+	host->io_base = dev_request_mem_region(dev, 0);
 
 	mtd = &host->mtd;
 	nand_chip = &host->nand_chip;
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e030154..95ad3d7 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -446,7 +446,7 @@ static int macb_probe(struct device_d *dev)
 	macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
 	macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
 
-	macb->regs = (void __iomem *)dev->resource[0].start;
+	macb->regs = dev_request_mem_region(dev, 0);
 
 	/*
 	 * Do some basic initialization so that we at least can talk
diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c
index d8713b3..ff0e75e 100644
--- a/drivers/serial/atmel.c
+++ b/drivers/serial/atmel.c
@@ -375,7 +375,7 @@ static int atmel_serial_init_port(struct console_device *cdev)
 	struct device_d *dev = cdev->dev;
 	struct atmel_uart_port *uart = to_atmel_uart_port(cdev);
 
-	uart->base = (void __iomem *)dev->resource[0].start;
+	uart->base = dev_request_mem_region(dev, 0);
 	uart->clk = clk_get(dev, "usart");
 	clk_enable(uart->clk);
 	uart->uartclk = clk_get_rate(uart->clk);
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/8] dm9000: switch to dev_request_mem_region
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 4/8] nomadik: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/mini2440/mini2440.c |    2 ++
 arch/arm/boards/scb9328/scb9328.c   |    2 ++
 drivers/net/dm9000.c                |    4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c
index 2bdc2ca..2d27b00 100644
--- a/arch/arm/boards/mini2440/mini2440.c
+++ b/arch/arm/boards/mini2440/mini2440.c
@@ -71,10 +71,12 @@ static struct resource dm9000_resources[] = {
 	[0] = {
 		.start	= CS4_BASE + 0x300,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
 		.start	= CS4_BASE + 0x304,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index dc818ce..2fe8236 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -50,10 +50,12 @@ static struct resource dm9000_resources[] = {
 	[0] = {
 		.start	= 0x16000000,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
 		.start	= 0x16000004,
 		.size	= 4,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 708801d..b867d21 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -501,8 +501,8 @@ static int dm9000_probe(struct device_d *dev)
 
 	priv = edev->priv;
 	priv->buswidth = pdata->buswidth;
-	priv->iodata = (void __iomem *)dev->resource[1].start;
-	priv->iobase = (void __iomem *)dev->resource[0].start;
+	priv->iodata = dev_request_mem_region(dev, 1);
+	priv->iobase = dev_request_mem_region(dev, 0);
 	priv->srom = pdata->srom;
 
 	edev->init = dm9000_init_dev;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 4/8] nomadik: add missing IORESOURCE_MEM flags to resources
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 3/8] dm9000: " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 5/8] nomadik/nand: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/nhk8815/setup.c |    4 ++++
 arch/arm/mach-nomadik/8815.c    |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/nhk8815/setup.c b/arch/arm/boards/nhk8815/setup.c
index 3b67e44..b7fa50a 100644
--- a/arch/arm/boards/nhk8815/setup.c
+++ b/arch/arm/boards/nhk8815/setup.c
@@ -37,6 +37,7 @@ static struct resource nhk8815_network_resources[] = {
 	[0] = {
 		.start	= 0x34000300,
 		.size	= 16,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -70,12 +71,15 @@ static struct resource nhk8815_nand_resources[] = {
 	{
 		.start	= NAND_IO_ADDR,
 		.size	= 0xfff,
+		.flags	= IORESOURCE_MEM,
 	}, {
 		.start	= NAND_IO_CMD,
 		.size	= 0xfff,
+		.flags	= IORESOURCE_MEM,
 	}, {
 		.start	= NAND_IO_DATA,
 		.size	= 0xfff,
+		.flags	= IORESOURCE_MEM,
 	}
 };
 
diff --git a/arch/arm/mach-nomadik/8815.c b/arch/arm/mach-nomadik/8815.c
index e5adafd..9df32a3 100644
--- a/arch/arm/mach-nomadik/8815.c
+++ b/arch/arm/mach-nomadik/8815.c
@@ -44,6 +44,7 @@ static struct resource uart0_serial_resources[] = {
 	[0] = {
 		.start	= NOMADIK_UART0_BASE,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
@@ -58,6 +59,7 @@ static struct resource uart1_serial_resources[] = {
 	[0] = {
 		.start	= NOMADIK_UART1_BASE,
 		.size	= 4096,
+		.flags	= IORESOURCE_MEM,
 	},
 };
 
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 5/8] nomadik/nand: switch to dev_request_mem_region
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2011-07-19 17:17 ` [PATCH 4/8] nomadik: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 6/8] amba-pl011: fix missing switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/mtd/nand/nomadik_nand.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c
index 058170f..3073011 100644
--- a/drivers/mtd/nand/nomadik_nand.c
+++ b/drivers/mtd/nand/nomadik_nand.c
@@ -189,8 +189,8 @@ static int nomadik_nand_probe(struct device_d *dev)
 		goto err;
 	}
 
-	host->cmd_va = (void __iomem*)dev->resource[1].start;
-	host->addr_va = (void __iomem*)dev->resource[0].start;
+	host->cmd_va = dev_request_mem_region(dev, 1);
+	host->addr_va = dev_request_mem_region(dev, 0);
 
 	/* Link all private pointers */
 	mtd = &host->mtd;
@@ -198,8 +198,7 @@ static int nomadik_nand_probe(struct device_d *dev)
 	mtd->priv = nand;
 	nand->priv = host;
 
-	nand->IO_ADDR_R = (void __iomem *)dev->resource[2].start;
-	nand->IO_ADDR_W = (void __iomem *)dev->resource[2].start;
+	nand->IO_ADDR_W = nand->IO_ADDR_R = dev_request_mem_region(dev, 2);
 	nand->cmd_ctrl = nomadik_cmd_ctrl;
 
 	nand->ecc.mode = NAND_ECC_HW;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 6/8] amba-pl011: fix missing switch to "struct resource"
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 preceding siblings ...)
  2011-07-19 17:17 ` [PATCH 5/8] nomadik/nand: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 7/8] amba-pl011: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 8/8] armlinux: mem tag switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/serial/amba-pl011.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index c83983d..b5755dd 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -143,13 +143,13 @@ int pl011_init_port (struct console_device *cdev)
 	 ** Set the UART to be 8 bits, 1 stop bit, no parity, fifo enabled.
 	 */
 	writel((UART01x_LCRH_WLEN_8 | UART01x_LCRH_FEN),
-	       dev->map_base + UART011_LCRH);
+	       uart->base + UART011_LCRH);
 
 	/*
 	 ** Finally, enable the UART
 	 */
 	writel((UART01x_CR_UARTEN | UART011_CR_TXE | UART011_CR_RXE),
-	       dev->map_base + UART011_CR);
+	       uart->base + UART011_CR);
 
 	return 0;
 }
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 7/8] amba-pl011: switch to dev_request_mem_region
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 preceding siblings ...)
  2011-07-19 17:17 ` [PATCH 6/8] amba-pl011: fix missing switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-07-19 17:17 ` [PATCH 8/8] armlinux: mem tag switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/serial/amba-pl011.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index b5755dd..2b6d5d3 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -121,7 +121,7 @@ int pl011_init_port (struct console_device *cdev)
 	struct device_d *dev = cdev->dev;
 	struct amba_uart_port *uart = to_amba_uart_port(cdev);
 
-	uart->base = (void __iomem *)dev->resource[0].start;
+	uart->base = dev_request_mem_region(dev, 0);
 
 	/*
 	 ** First, disable everything.
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 8/8] armlinux: mem tag switch to "struct resource"
  2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 preceding siblings ...)
  2011-07-19 17:17 ` [PATCH 7/8] amba-pl011: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD
  6 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-19 17:17 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/lib/armlinux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index ce1cc6b..e35e45d 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -79,8 +79,8 @@ static void setup_memory_tags(void)
 		params->hdr.tag = ATAG_MEM;
 		params->hdr.size = tag_size(tag_mem32);
 
-		params->u.mem.start = mem->dev->map_base;
-		params->u.mem.size = mem->dev->size;
+		params->u.mem.start = mem->dev->resource[0].start;
+		params->u.mem.size = mem->dev->resource[0].size;
 
 		params = tag_next(params);
 	}
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-07-19 17:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 3/8] dm9000: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 4/8] nomadik: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 5/8] nomadik/nand: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 6/8] amba-pl011: fix missing switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 7/8] amba-pl011: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 8/8] armlinux: mem tag switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox