mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* AT91: Pull
@ 2011-12-31 15:16 Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:16 UTC (permalink / raw)
  To: barebox

Hi,

	the following patch serie update nand, lowlevel init sram, gpio and
	Atmel and Calao boards

The following changes since commit 06d9b16d98f9da5ff2b8ddf4bb3dea9e9352abf0:

  atmel_nand: add on_flash_btt option to enable bbt option (2011-12-31 22:17:29 +0800)

are available in the git repository at:
  git://uboot.jcrosoft.org/barebox.git at91

Jean-Christophe PLAGNIOL-VILLARD (12):
      atmel: reference boards and Caloa boards bbt option enabled
      ARM: import memcpy_from/toio and memset_io from linux
      mtd: atmel_nand: optimize read/write buffer functions
      atmel_nand: drop dead code
      at91: add sram memory devices
      at91sam9263ek: add nor partition
      at91sam9x: switch lowlevel init to c
      at91/gpio: simplify resources
      usb-a926x: add led support
      usb-a926x: add dfu support
      at91_udc: update vbus param only if updated
      usb-a926x: update defconfig

 arch/arm/boards/at91sam9260ek/init.c           |    1 +
 arch/arm/boards/at91sam9261ek/init.c           |    1 +
 arch/arm/boards/at91sam9263ek/config.h         |   18 --
 arch/arm/boards/at91sam9263ek/env/config       |    2 +
 arch/arm/boards/at91sam9263ek/init.c           |    1 +
 arch/arm/boards/at91sam9m10g45ek/init.c        |    1 +
 arch/arm/boards/mmccpu/config.h                |   18 --
 arch/arm/boards/pm9261/config.h                |   18 --
 arch/arm/boards/pm9263/config.h                |   18 --
 arch/arm/boards/usb-a926x/env/bin/init_board   |   43 ++++
 arch/arm/boards/usb-a926x/init.c               |   28 +++
 arch/arm/configs/usb_a9260_defconfig           |   20 ++-
 arch/arm/configs/usb_a9263_128mib_defconfig    |   20 ++-
 arch/arm/configs/usb_a9263_defconfig           |   20 ++-
 arch/arm/configs/usb_a9g20_128mib_defconfig    |   20 ++-
 arch/arm/configs/usb_a9g20_defconfig           |   20 ++-
 arch/arm/include/asm/io.h                      |    7 +
 arch/arm/lib/Makefile                          |    1 +
 arch/arm/lib/io.c                              |   50 +++++
 arch/arm/mach-at91/at91rm9200.c                |   12 +-
 arch/arm/mach-at91/at91rm9200_devices.c        |    2 +
 arch/arm/mach-at91/at91sam9260.c               |    9 +-
 arch/arm/mach-at91/at91sam9260_devices.c       |   12 +
 arch/arm/mach-at91/at91sam9261.c               |    9 +-
 arch/arm/mach-at91/at91sam9261_devices.c       |    7 +
 arch/arm/mach-at91/at91sam9263.c               |   15 +-
 arch/arm/mach-at91/at91sam9263_devices.c       |    4 +
 arch/arm/mach-at91/at91sam926x_lowlevel_init.S |  278 ------------------------
 arch/arm/mach-at91/at91sam926x_lowlevel_init.c |  171 +++++++++++++++
 arch/arm/mach-at91/at91sam9g45.c               |   15 +-
 arch/arm/mach-at91/at91sam9g45_devices.c       |    2 +
 arch/arm/mach-at91/gpio.c                      |   13 +-
 arch/arm/mach-at91/include/mach/at91rm9200.h   |    9 +-
 arch/arm/mach-at91/include/mach/at91sam9260.h  |   17 ++-
 arch/arm/mach-at91/include/mach/at91sam9261.h  |   10 +-
 arch/arm/mach-at91/include/mach/at91sam9263.h  |   11 +-
 arch/arm/mach-at91/include/mach/at91sam9g45.h  |   11 +-
 arch/arm/mach-at91/include/mach/gpio.h         |    4 -
 drivers/mtd/nand/atmel_nand.c                  |   46 +----
 drivers/usb/gadget/at91_udc.c                  |   17 ++-
 drivers/usb/gadget/at91_udc.h                  |    1 +
 41 files changed, 497 insertions(+), 485 deletions(-)
 create mode 100644 arch/arm/boards/usb-a926x/env/bin/init_board
 create mode 100644 arch/arm/lib/io.c
 delete mode 100644 arch/arm/mach-at91/at91sam926x_lowlevel_init.S
 create mode 100644 arch/arm/mach-at91/at91sam926x_lowlevel_init.c

Best Regards,
J.

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

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

* [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-03  9:37   ` Sascha Hauer
  2011-12-31 15:21 ` [PATCH 02/12] ARM: import memcpy_from/toio and memset_io from linux Jean-Christophe PLAGNIOL-VILLARD
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9260ek/init.c    |    1 +
 arch/arm/boards/at91sam9261ek/init.c    |    1 +
 arch/arm/boards/at91sam9263ek/init.c    |    1 +
 arch/arm/boards/at91sam9m10g45ek/init.c |    1 +
 arch/arm/boards/usb-a926x/init.c        |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index dbd6541..b10d0dc 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -71,6 +71,7 @@ static struct atmel_nand_data nand_pdata = {
 #else
 	.bus_width_16	= 0,
 #endif
+	.on_flash_bbt	= 1,
 };
 
 static struct sam9_smc_config ek_9260_nand_smc_config = {
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 0854eea..8b192b2 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -50,6 +50,7 @@ static struct atmel_nand_data nand_pdata = {
 #else
 	.bus_width_16	= 0,
 #endif
+	.on_flash_bbt	= 1,
 };
 
 static struct sam9_smc_config ek_nand_smc_config = {
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index bb564d7..d7b9afe 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -51,6 +51,7 @@ static struct atmel_nand_data nand_pdata = {
 #else
 	.bus_width_16	= 0,
 #endif
+	.on_flash_bbt	= 1,
 };
 
 static struct sam9_smc_config ek_nand_smc_config = {
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index 5fdc960..eff2769 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -72,6 +72,7 @@ static struct atmel_nand_data nand_pdata = {
 #else
 	.bus_width_16	= 0,
 #endif
+	.on_flash_bbt	= 1,
 };
 
 static struct sam9_smc_config ek_nand_smc_config = {
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 20af4b0..41daab8 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -57,6 +57,7 @@ static struct atmel_nand_data nand_pdata = {
 /*	.det_pin	= ... not connected */
 	.rdy_pin	= AT91_PIN_PC13,
 	.enable_pin	= AT91_PIN_PC14,
+	.on_flash_bbt	= 1,
 };
 
 static struct sam9_smc_config usb_a9260_nand_smc_config = {
-- 
1.7.7


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

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

* [PATCH 02/12] ARM: import memcpy_from/toio and memset_io from linux
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 03/12] mtd: atmel_nand: optimize read/write buffer functions Jean-Christophe PLAGNIOL-VILLARD
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/include/asm/io.h |    7 ++++++
 arch/arm/lib/Makefile     |    1 +
 arch/arm/lib/io.c         |   50 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/lib/io.c

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index ab78be3..e0630eb 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -3,4 +3,11 @@
 
 #include <asm-generic/io.h>
 
+/*
+ * String version of IO memory access ops:
+ */
+extern void memcpy_fromio(void *, const volatile void __iomem *, size_t);
+extern void memcpy_toio(volatile void __iomem *, const void *, size_t);
+extern void memset_io(volatile void __iomem *, int, size_t);
+
 #endif	/* __ASM_ARM_IO_H */
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 9383ae1..27a4b88 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -5,6 +5,7 @@ obj-$(CONFIG_CMD_BOOTU)	+= bootu.o
 obj-y	+= div0.o
 obj-y	+= findbit.o
 obj-y	+= arm.o
+obj-y	+= io.o
 obj-y	+= io-readsb.o
 obj-y	+= io-readsw-armv4.o
 obj-y	+= io-readsl.o
diff --git a/arch/arm/lib/io.c b/arch/arm/lib/io.c
new file mode 100644
index 0000000..abfd887
--- /dev/null
+++ b/arch/arm/lib/io.c
@@ -0,0 +1,50 @@
+#include <module.h>
+#include <linux/types.h>
+#include <io.h>
+
+/*
+ * Copy data from IO memory space to "real" memory space.
+ * This needs to be optimized.
+ */
+void memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
+{
+	unsigned char *t = to;
+	while (count) {
+		count--;
+		*t = readb(from);
+		t++;
+		from++;
+	}
+}
+
+/*
+ * Copy data from "real" memory space to IO memory space.
+ * This needs to be optimized.
+ */
+void memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
+{
+	const unsigned char *f = from;
+	while (count) {
+		count--;
+		writeb(*f, to);
+		f++;
+		to++;
+	}
+}
+
+/*
+ * "memset" on IO memory space.
+ * This needs to be optimized.
+ */
+void memset_io(volatile void __iomem *dst, int c, size_t count)
+{
+	while (count) {
+		count--;
+		writeb(c, dst);
+		dst++;
+	}
+}
+
+EXPORT_SYMBOL(memcpy_fromio);
+EXPORT_SYMBOL(memcpy_toio);
+EXPORT_SYMBOL(memset_io);
-- 
1.7.7


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

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

* [PATCH 03/12] mtd: atmel_nand: optimize read/write buffer functions
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 02/12] ARM: import memcpy_from/toio and memset_io from linux Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 04/12] atmel_nand: drop dead code Jean-Christophe PLAGNIOL-VILLARD
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox; +Cc: Nicolas Ferre

For PIO NAND access functions, we use the features of the SMC:
 - no need to take into account the NAND bus width: SMC will deal with this
 - use of an IO memcpy on the NAND chip-select space is able to generate
   proper SMC behavior.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/mtd/nand/atmel_nand.c |   33 ++++++++-------------------------
 1 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index d539a25..731ec0b 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -148,30 +148,16 @@ static int atmel_nand_device_ready(struct mtd_info *mtd)
  */
 static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len)
 {
-	struct nand_chip	*nand_chip = mtd->priv;
+	struct nand_chip *chip = mtd->priv;
 
-	readsb(nand_chip->IO_ADDR_R, buf, len);
-}
-
-static void atmel_read_buf16(struct mtd_info *mtd, u8 *buf, int len)
-{
-	struct nand_chip	*nand_chip = mtd->priv;
-
-	readsw(nand_chip->IO_ADDR_R, buf, len / 2);
+	memcpy_fromio(buf, chip->IO_ADDR_R, len);
 }
 
 static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len)
 {
-	struct nand_chip	*nand_chip = mtd->priv;
+	struct nand_chip *chip = mtd->priv;
 
-	writesb(nand_chip->IO_ADDR_W, buf, len);
-}
-
-static void atmel_write_buf16(struct mtd_info *mtd, const u8 *buf, int len)
-{
-	struct nand_chip	*nand_chip = mtd->priv;
-
-	writesw(nand_chip->IO_ADDR_W, buf, len / 2);
+	memcpy_toio(chip->IO_ADDR_W, buf, len);
 }
 
 /*
@@ -417,14 +403,11 @@ static int __init atmel_nand_probe(struct device_d *dev)
 
 	nand_chip->chip_delay = 20;		/* 20us command delay time */
 
-	if (host->board->bus_width_16) {	/* 16-bit bus width */
+	if (host->board->bus_width_16)		/* 16-bit bus width */
 		nand_chip->options |= NAND_BUSWIDTH_16;
-		nand_chip->read_buf = atmel_read_buf16;
-		nand_chip->write_buf = atmel_write_buf16;
-	} else {
-		nand_chip->read_buf = atmel_read_buf;
-		nand_chip->write_buf = atmel_write_buf;
-	}
+
+	nand_chip->read_buf = atmel_read_buf;
+	nand_chip->write_buf = atmel_write_buf;
 
 	atmel_nand_enable(host);
 
-- 
1.7.7


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

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

* [PATCH 04/12] atmel_nand: drop dead code
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 03/12] mtd: atmel_nand: optimize read/write buffer functions Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 05/12] at91: add sram memory devices Jean-Christophe PLAGNIOL-VILLARD
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

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

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 731ec0b..3e00226 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -36,18 +36,6 @@
 
 #include <errno.h>
 
-#ifdef CONFIG_MTD_NAND_ATMEL_ECC_HW
-#define hard_ecc	1
-#else
-#define hard_ecc	0
-#endif
-
-#ifdef CONFIG_MTD_NAND_ATMEL_ECC_NONE
-#define no_ecc		1
-#else
-#define no_ecc		0
-#endif
-
 /* Register access macros */
 #define ecc_readl(add, reg)				\
 	readl(add + ATMEL_ECC_##reg)
@@ -174,7 +162,6 @@ static int atmel_nand_calculate(struct mtd_info *mtd,
 {
 	struct nand_chip *nand_chip = mtd->priv;
 	struct atmel_nand_host *host = nand_chip->priv;
-/* 	uint32_t *eccpos = nand_chip->ecc.layout->eccpos; */
 	unsigned int ecc_value;
 
 	/* get the first 2 ECC bytes */
-- 
1.7.7


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

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

* [PATCH 05/12] at91: add sram memory devices
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 04/12] atmel_nand: drop dead code Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-04 13:42   ` Sascha Hauer
  2011-12-31 15:21 ` [PATCH 06/12] at91sam9263ek: add nor partition Jean-Christophe PLAGNIOL-VILLARD
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-at91/at91rm9200_devices.c       |    2 ++
 arch/arm/mach-at91/at91sam9260_devices.c      |   12 ++++++++++++
 arch/arm/mach-at91/at91sam9261_devices.c      |    7 +++++++
 arch/arm/mach-at91/at91sam9263_devices.c      |    4 ++++
 arch/arm/mach-at91/at91sam9g45_devices.c      |    2 ++
 arch/arm/mach-at91/include/mach/at91sam9260.h |   10 ++++++++++
 arch/arm/mach-at91/include/mach/at91sam9261.h |    3 +++
 7 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 8c19846..7032789 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -23,6 +23,8 @@
 void at91_add_device_sdram(u32 size)
 {
 	arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+	add_mem_device("sram0", AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE,
+			IORESOURCE_MEM_WRITEABLE);
 }
 
 /* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 945530f..25a68ca 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -18,12 +18,24 @@
 #include <mach/at91sam9260_matrix.h>
 #include <mach/gpio.h>
 #include <mach/io.h>
+#include <mach/cpu.h>
 
 #include "generic.h"
 
 void at91_add_device_sdram(u32 size)
 {
 	arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+	if (cpu_is_at91sam9g20()) {
+		add_mem_device("sram0", AT91SAM9G20_SRAM0_BASE,
+			AT91SAM9G20_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+		add_mem_device("sram1", AT91SAM9G20_SRAM1_BASE,
+			AT91SAM9G20_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+	} else {
+		add_mem_device("sram0", AT91SAM9260_SRAM0_BASE,
+			AT91SAM9260_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+		add_mem_device("sram1", AT91SAM9260_SRAM1_BASE,
+			AT91SAM9260_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+	}
 }
 
 #if defined(CONFIG_USB_OHCI)
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 4fd3c79..ff7a938 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -18,12 +18,19 @@
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/io.h>
+#include <mach/cpu.h>
 
 #include "generic.h"
 
 void at91_add_device_sdram(u32 size)
 {
 	arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+	if (cpu_is_at91sam9g10())
+		add_mem_device("sram0", AT91SAM9G10_SRAM_BASE,
+			AT91SAM9G10_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
+	else
+		add_mem_device("sram0", AT91SAM9261_SRAM_BASE,
+			AT91SAM9261_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
 }
 
 /* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index bbadc5d..d447e24 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -24,6 +24,10 @@
 void at91_add_device_sdram(u32 size)
 {
 	arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
+	add_mem_device("sram0", AT91SAM9263_SRAM0_BASE,
+			AT91SAM9263_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
+	add_mem_device("sram1", AT91SAM9263_SRAM1_BASE,
+			AT91SAM9263_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
 }
 
 /* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 1d47dcf..5f1a45a 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -24,6 +24,8 @@
 void at91_add_device_sdram(u32 size)
 {
 	arm_add_mem_device("ram0", AT91_CHIPSELECT_6, size);
+	add_mem_device("sram0", AT91SAM9G45_SRAM_BASE,
+			AT91SAM9G45_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
 }
 
 /* --------------------------------------------------------------------
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 7d166b7..771e756 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -126,6 +126,16 @@
 #define AT91SAM9XE_FLASH_BASE	0x00200000	/* Internal FLASH base address */
 #define AT91SAM9XE_SRAM_BASE	0x00300000	/* Internal SRAM base address */
 
+#define AT91SAM9G20_ROM_BASE	0x00100000	/* Internal ROM base address */
+#define AT91SAM9G20_ROM_SIZE	SZ_32K		/* Internal ROM size (32Kb) */
+
+#define AT91SAM9G20_SRAM0_BASE	0x00200000	/* Internal SRAM 0 base address */
+#define AT91SAM9G20_SRAM0_SIZE	SZ_16K		/* Internal SRAM 0 size (16Kb) */
+#define AT91SAM9G20_SRAM1_BASE	0x00300000	/* Internal SRAM 1 base address */
+#define AT91SAM9G20_SRAM1_SIZE	SZ_16K		/* Internal SRAM 1 size (16Kb) */
+
+#define AT91SAM9G20_UHP_BASE	0x00500000	/* USB Host controller */
+
 /*
  * Cpu Name
  */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index b303e07..c863887 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -95,6 +95,9 @@
 #define AT91SAM9261_SRAM_BASE	0x00300000	/* Internal SRAM base address */
 #define AT91SAM9261_SRAM_SIZE	0x00028000	/* Internal SRAM size (160Kb) */
 
+#define AT91SAM9G10_SRAM_BASE	AT91SAM9261_SRAM_BASE	/* Internal SRAM base address */
+#define AT91SAM9G10_SRAM_SIZE	0x00004000	/* Internal SRAM size (16Kb) */
+
 #define AT91SAM9261_ROM_BASE	0x00400000	/* Internal ROM base address */
 #define AT91SAM9261_ROM_SIZE	SZ_32K		/* Internal ROM size (32Kb) */
 
-- 
1.7.7


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

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

* [PATCH 06/12] at91sam9263ek: add nor partition
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 05/12] at91: add sram memory devices Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 07/12] at91sam9x: switch lowlevel init to c Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9263ek/env/config |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9263ek/env/config b/arch/arm/boards/at91sam9263ek/env/config
index bd771ac..e189b8e 100644
--- a/arch/arm/boards/at91sam9263ek/env/config
+++ b/arch/arm/boards/at91sam9263ek/env/config
@@ -28,6 +28,8 @@ nand_device=atmel_nand
 nand_parts="256k(barebox)ro,128k(bareboxenv),1536k(kernel),-(root)"
 rootfs_mtdblock_nand=3
 
+nor_parts="256k(barebox),64k(bareboxenv),1536k(kernel),-(root)"
+
 autoboot_timeout=3
 
 bootargs="console=ttyS0,115200"
-- 
1.7.7


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

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

* [PATCH 07/12] at91sam9x: switch lowlevel init to c
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 06/12] at91sam9263ek: add nor partition Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 08/12] at91/gpio: simplify resources Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9263ek/config.h         |   18 --
 arch/arm/boards/mmccpu/config.h                |   18 --
 arch/arm/boards/pm9261/config.h                |   18 --
 arch/arm/boards/pm9263/config.h                |   18 --
 arch/arm/mach-at91/at91sam926x_lowlevel_init.S |  278 ------------------------
 arch/arm/mach-at91/at91sam926x_lowlevel_init.c |  171 +++++++++++++++
 6 files changed, 171 insertions(+), 350 deletions(-)
 delete mode 100644 arch/arm/mach-at91/at91sam926x_lowlevel_init.S
 create mode 100644 arch/arm/mach-at91/at91sam926x_lowlevel_init.c

diff --git a/arch/arm/boards/at91sam9263ek/config.h b/arch/arm/boards/at91sam9263ek/config.h
index bc33227..8f764eb 100644
--- a/arch/arm/boards/at91sam9263ek/config.h
+++ b/arch/arm/boards/at91sam9263ek/config.h
@@ -40,8 +40,6 @@
 	 AT91_MATRIX_EBI0_CS1A_SDRAMC)
 
 /* SDRAM */
-/* SDRAMC_MR Mode register */
-#define CONFIG_SYS_SDRC_MR_VAL1		0
 /* SDRAMC_TR - Refresh Timer register */
 #define CONFIG_SYS_SDRC_TR_VAL1		0x13C
 /* SDRAMC_CR - Configuration register*/
@@ -60,23 +58,7 @@
 
 /* Memory Device Register -> SDRAM */
 #define CONFIG_SYS_SDRC_MDR_VAL		AT91_SDRAMC_MD_SDRAM
-#define CONFIG_SYS_SDRC_MR_VAL2		AT91_SDRAMC_MODE_PRECHARGE
-#define CONFIG_SYS_SDRAM_VAL1		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL3		AT91_SDRAMC_MODE_REFRESH
-#define CONFIG_SYS_SDRAM_VAL2		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL3		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL4		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL5		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL6		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL7		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL8		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL9		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL4		AT91_SDRAMC_MODE_LMR
-#define CONFIG_SYS_SDRAM_VAL10		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL5		AT91_SDRAMC_MODE_NORMAL
-#define CONFIG_SYS_SDRAM_VAL11		0		/* SDRAM_BASE */
 #define CONFIG_SYS_SDRC_TR_VAL2		1200		/* SDRAM_TR */
-#define CONFIG_SYS_SDRAM_VAL12		0		/* SDRAM_BASE */
 
 /* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */
 #define CONFIG_SYS_SMC0_SETUP0_VAL					\
diff --git a/arch/arm/boards/mmccpu/config.h b/arch/arm/boards/mmccpu/config.h
index c37d5eb..765b610 100644
--- a/arch/arm/boards/mmccpu/config.h
+++ b/arch/arm/boards/mmccpu/config.h
@@ -41,8 +41,6 @@
 	 AT91_MATRIX_EBI0_CS1A_SDRAMC | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA)
 
 /* SDRAM */
-/* SDRAMC_MR Mode register */
-#define CONFIG_SYS_SDRC_MR_VAL1		0
 /* SDRAMC_TR - Refresh Timer register */
 #define CONFIG_SYS_SDRC_TR_VAL1		0x13c
 /* SDRAMC_CR - Configuration register*/
@@ -61,23 +59,7 @@
 
 /* Memory Device Register -> SDRAM */
 #define CONFIG_SYS_SDRC_MDR_VAL		AT91_SDRAMC_MD_SDRAM
-#define CONFIG_SYS_SDRC_MR_VAL2		AT91_SDRAMC_MODE_PRECHARGE
-#define CONFIG_SYS_SDRAM_VAL1		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL3		AT91_SDRAMC_MODE_REFRESH
-#define CONFIG_SYS_SDRAM_VAL2		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL3		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL4		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL5		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL6		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL7		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL8		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL9		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL4		AT91_SDRAMC_MODE_LMR
-#define CONFIG_SYS_SDRAM_VAL10		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL5		AT91_SDRAMC_MODE_NORMAL
-#define CONFIG_SYS_SDRAM_VAL11		0		/* SDRAM_BASE */
 #define CONFIG_SYS_SDRC_TR_VAL2		780		/* SDRAM_TR */
-#define CONFIG_SYS_SDRAM_VAL12		0		/* SDRAM_BASE */
 
 /* setup CS0 (NOR Flash) - 16-bit */
 #if 1
diff --git a/arch/arm/boards/pm9261/config.h b/arch/arm/boards/pm9261/config.h
index 97f8efc..e8822a5 100644
--- a/arch/arm/boards/pm9261/config.h
+++ b/arch/arm/boards/pm9261/config.h
@@ -40,8 +40,6 @@
        (AT91_MATRIX_DBPUC | AT91_MATRIX_CS1A_SDRAMC)
 
 /* SDRAM */
-/* SDRAMC_MR Mode register */
-#define CONFIG_SYS_SDRC_MR_VAL1		AT91_SDRAMC_MODE_NORMAL
 /* SDRAMC_TR - Refresh Timer register */
 #define CONFIG_SYS_SDRC_TR_VAL1		0x13C
 /* SDRAMC_CR - Configuration register*/
@@ -60,23 +58,7 @@
 
 /* Memory Device Register -> SDRAM */
 #define CONFIG_SYS_SDRC_MDR_VAL		AT91_SDRAMC_MD_SDRAM
-#define CONFIG_SYS_SDRC_MR_VAL2		AT91_SDRAMC_MODE_PRECHARGE
-#define CONFIG_SYS_SDRAM_VAL1		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL3		AT91_SDRAMC_MODE_REFRESH
-#define CONFIG_SYS_SDRAM_VAL2		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL3		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL4		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL5		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL6		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL7		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL8		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL9		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL4		AT91_SDRAMC_MODE_LMR
-#define CONFIG_SYS_SDRAM_VAL10		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL5		AT91_SDRAMC_MODE_NORMAL
-#define CONFIG_SYS_SDRAM_VAL11		0		/* SDRAM_BASE */
 #define CONFIG_SYS_SDRC_TR_VAL2		1200		/* SDRAM_TR */
-#define CONFIG_SYS_SDRAM_VAL12		0		/* SDRAM_BASE */
 
 /* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */
 #define CONFIG_SYS_SMC0_SETUP0_VAL					\
diff --git a/arch/arm/boards/pm9263/config.h b/arch/arm/boards/pm9263/config.h
index 5252df2..d5add0f 100644
--- a/arch/arm/boards/pm9263/config.h
+++ b/arch/arm/boards/pm9263/config.h
@@ -55,8 +55,6 @@
 	 AT91_MATRIX_EBI0_CS1A_SDRAMC)
 
 /* SDRAM */
-/* SDRAMC_MR Mode register */
-#define CONFIG_SYS_SDRC_MR_VAL1		0
 /* SDRAMC_TR - Refresh Timer register */
 #define CONFIG_SYS_SDRC_TR_VAL1		0x3AA
 /* SDRAMC_CR - Configuration register*/
@@ -75,23 +73,7 @@
 
 /* Memory Device Register -> SDRAM */
 #define CONFIG_SYS_SDRC_MDR_VAL		AT91_SDRAMC_MD_SDRAM
-#define CONFIG_SYS_SDRC_MR_VAL2		AT91_SDRAMC_MODE_PRECHARGE
-#define CONFIG_SYS_SDRAM_VAL1		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL3		AT91_SDRAMC_MODE_REFRESH
-#define CONFIG_SYS_SDRAM_VAL2		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL3		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL4		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL5		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL6		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL7		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL8		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRAM_VAL9		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL4		AT91_SDRAMC_MODE_LMR
-#define CONFIG_SYS_SDRAM_VAL10		0		/* SDRAM_BASE */
-#define CONFIG_SYS_SDRC_MR_VAL5		AT91_SDRAMC_MODE_NORMAL
-#define CONFIG_SYS_SDRAM_VAL11		0		/* SDRAM_BASE */
 #define CONFIG_SYS_SDRC_TR_VAL2		1200		/* SDRAM_TR */
-#define CONFIG_SYS_SDRAM_VAL12		0		/* SDRAM_BASE */
 
 /* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */
 #define CONFIG_SYS_SMC0_SETUP0_VAL					\
diff --git a/arch/arm/mach-at91/at91sam926x_lowlevel_init.S b/arch/arm/mach-at91/at91sam926x_lowlevel_init.S
deleted file mode 100644
index 805b201..0000000
--- a/arch/arm/mach-at91/at91sam926x_lowlevel_init.S
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Memory Setup stuff - taken from blob memsetup.S
- *
- * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and
- *		       Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
- *
- * Copyright (C) 2008 Ronetix Ilko Iliev (www.ronetix.at)
- * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_pio.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91_wdt.h>
-#include <mach/at91sam9_matrix.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9_smc.h>
-
-_TEXT_BASE:
-	.word	TEXT_BASE
-
-.globl board_init_lowlevel
-.type board_init_lowlevel,function
-board_init_lowlevel:
-
-	mov	r5, pc		/* r5 = POS1 + 4 current */
-POS1:
-	ldr	r0, =POS1	/* r0 = POS1 compile */
-	ldr	r2, _TEXT_BASE
-	sub	r0, r0, r2	/* r0 = POS1-_TEXT_BASE (POS1 relative) */
-	sub	r5, r5, r0	/* r0 = TEXT_BASE-1 */
-	sub	r5, r5, #4	/* r1 = text base - current */
-
-	/* memory control configuration 1 */
-	ldr	r0, =SMRDATA
-	ldr	r2, =SMRDATA1
-	ldr	r1, _TEXT_BASE
-	sub	r0, r0, r1
-	sub	r2, r2, r1
-	add	r0, r0, r5
-	add	r2, r2, r5
-0:
-	/* the address */
-	ldr	r1, [r0], #4
-	/* the value */
-	ldr	r3, [r0], #4
-	str	r3, [r1]
-	cmp	r2, r0
-	bne	0b
-
-/* ----------------------------------------------------------------------------
- * PMC Init Step 1.
- * ----------------------------------------------------------------------------
- * - Check if the PLL is already initialized
- * ----------------------------------------------------------------------------
- */
-	ldr	r1, =(AT91_BASE_SYS + AT91_PMC_MCKR)
-	ldr	r0, [r1]
-	and	r0, r0, #3
-	cmp	r0, #0
-	bne	PLL_setup_end
-
-/* ---------------------------------------------------------------------------
- * - Enable the Main Oscillator
- * ---------------------------------------------------------------------------
- */
-	ldr	r1, =(AT91_BASE_SYS + AT91_CKGR_MOR)
-	ldr	r2, =(AT91_BASE_SYS + AT91_PMC_SR)
-	/* Main oscillator Enable register PMC_MOR: */
-	ldr	r0, =CONFIG_SYS_MOR_VAL
-	str	r0, [r1]
-
-	/* Reading the PMC Status to detect when the Main Oscillator is enabled */
-	mov	r4, #AT91_PMC_MOSCS
-MOSCS_Loop:
-	ldr	r3, [r2]
-	and	r3, r4, r3
-	cmp	r3, #AT91_PMC_MOSCS
-	bne	MOSCS_Loop
-
-/* ----------------------------------------------------------------------------
- * PMC Init Step 2.
- * ----------------------------------------------------------------------------
- * Setup PLLA
- * ----------------------------------------------------------------------------
- */
-	ldr	r1, =(AT91_BASE_SYS + AT91_CKGR_PLLAR)
-	ldr	r0, =CONFIG_SYS_PLLAR_VAL
-	str	r0, [r1]
-
-	/* Reading the PMC Status register to detect when the PLLA is locked */
-	mov	r4, #AT91_PMC_LOCKA
-MOSCS_Loop1:
-	ldr	r3, [r2]
-	and	r3, r4, r3
-	cmp	r3, #AT91_PMC_LOCKA
-	bne	MOSCS_Loop1
-
-/* ----------------------------------------------------------------------------
- * PMC Init Step 3.
- * ----------------------------------------------------------------------------
- * - Switch on the Main Oscillator
- * ----------------------------------------------------------------------------
- */
-	ldr	r1, =(AT91_BASE_SYS + AT91_PMC_MCKR)
-
-	/* -Master Clock Controller register PMC_MCKR */
-	ldr	r0, =CONFIG_SYS_MCKR1_VAL
-	str	r0, [r1]
-
-	/* Reading the PMC Status to detect when the Master clock is ready */
-	mov	r4, #AT91_PMC_MCKRDY
-MCKRDY_Loop:
-	ldr	r3, [r2]
-	and	r3, r4, r3
-	cmp	r3, #AT91_PMC_MCKRDY
-	bne	MCKRDY_Loop
-
-	ldr	r0, =CONFIG_SYS_MCKR2_VAL
-	str	r0, [r1]
-
-	/* Reading the PMC Status to detect when the Master clock is ready */
-	mov	r4, #AT91_PMC_MCKRDY
-MCKRDY_Loop1:
-	ldr	r3, [r2]
-	and	r3, r4, r3
-	cmp	r3, #AT91_PMC_MCKRDY
-	bne	MCKRDY_Loop1
-
-PLL_setup_end:
-
-/* ----------------------------------------------------------------------------
- * - memory control configuration 2
- * ----------------------------------------------------------------------------
- */
-	ldr	r0, =(AT91_BASE_SYS + AT91_SDRAMC_TR)
-	ldr	r1, [r0]
-	cmp	r1, #0
-	bne	SDRAM_setup_end
-
-	ldr	r0, =SMRDATA1
-	ldr	r2, =SMRDATA2
-	ldr	r1, _TEXT_BASE
-	sub	r0, r0, r1
-	sub	r2, r2, r1
-	add	r0, r0, r5
-	add	r2, r2, r5
-
-2:
-	/* the address */
-	ldr	r1, [r0], #4
-	/* the value */
-	ldr	r3, [r0], #4
-	str	r3, [r1]
-	cmp	r2, r0
-	bne	2b
-
-SDRAM_setup_end:
-	/* everything is fine now */
-	mov	pc, lr
-
-	.ltorg
-
-SMRDATA:
-	.word (AT91_BASE_SYS + AT91_WDT_MR)
-	.word CONFIG_SYS_WDTC_WDMR_VAL
-
-	/* configure PIOx as EBI0 D[16-31] */
-#if defined(CONFIG_ARCH_AT91SAM9263)
-	.word (AT91_BASE_SYS + AT91_PIOD + PIO_PDR)
-	.word CONFIG_SYS_PIOD_PDR_VAL1
-	.word (AT91_BASE_SYS + AT91_PIOD + PIO_PUDR)
-	.word CONFIG_SYS_PIOD_PPUDR_VAL
-	.word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR)
-	.word CONFIG_SYS_PIOD_PPUDR_VAL
-#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) \
-	|| defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91SAM9G10)
-	.word (AT91_BASE_SYS + AT91_PIOC + PIO_PDR)
-	.word CONFIG_SYS_PIOC_PDR_VAL1
-	.word (AT91_BASE_SYS + AT91_PIOC + PIO_PUDR)
-	.word CONFIG_SYS_PIOC_PPUDR_VAL
-#endif
-
-#if defined(AT91_MATRIX_EBI0CSA)
-	.word (AT91_BASE_SYS + AT91_MATRIX_EBI0CSA)
-	.word CONFIG_SYS_MATRIX_EBI0CSA_VAL
-#else /* AT91_MATRIX_EBICSA */
-	.word (AT91_BASE_SYS + AT91_MATRIX_EBICSA)
-	.word CONFIG_SYS_MATRIX_EBICSA_VAL
-#endif
-
-	/* flash */
-	.word (AT91_BASE_SYS + AT91_SMC_MODE(0))
-	.word CONFIG_SYS_SMC0_MODE0_VAL
-
-	.word (AT91_BASE_SYS + AT91_SMC_CYCLE(0))
-	.word CONFIG_SYS_SMC0_CYCLE0_VAL
-
-	.word (AT91_BASE_SYS + AT91_SMC_PULSE(0))
-	.word CONFIG_SYS_SMC0_PULSE0_VAL
-
-	.word (AT91_BASE_SYS + AT91_SMC_SETUP(0))
-	.word CONFIG_SYS_SMC0_SETUP0_VAL
-
-SMRDATA1:
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MR)
-	.word CONFIG_SYS_SDRC_MR_VAL1
-	.word (AT91_BASE_SYS + AT91_SDRAMC_TR)
-	.word CONFIG_SYS_SDRC_TR_VAL1
-	.word (AT91_BASE_SYS + AT91_SDRAMC_CR)
-	.word CONFIG_SYS_SDRC_CR_VAL
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MDR)
-	.word CONFIG_SYS_SDRC_MDR_VAL
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MR)
-	.word CONFIG_SYS_SDRC_MR_VAL2
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL1
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MR)
-	.word CONFIG_SYS_SDRC_MR_VAL3
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL2
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL3
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL4
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL5
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL6
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL7
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL8
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL9
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MR)
-	.word CONFIG_SYS_SDRC_MR_VAL4
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL10
-	.word (AT91_BASE_SYS + AT91_SDRAMC_MR)
-	.word CONFIG_SYS_SDRC_MR_VAL5
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL11
-	.word (AT91_BASE_SYS + AT91_SDRAMC_TR)
-	.word CONFIG_SYS_SDRC_TR_VAL2
-	.word AT91_SDRAM_BASE
-	.word CONFIG_SYS_SDRAM_VAL12
-	/* User reset enable*/
-	.word (AT91_BASE_SYS + AT91_RSTC_MR)
-	.word CONFIG_SYS_RSTC_RMR_VAL
-#ifdef CONFIG_SYS_MATRIX_MCFG_REMAP
-	/* MATRIX_MCFG - REMAP all masters */
-	.word (AT91_BASE_SYS + AT91_MATRIX_MCFG0)
-	.word 0x1FF
-#endif
-
-SMRDATA2:
-	.word 0
diff --git a/arch/arm/mach-at91/at91sam926x_lowlevel_init.c b/arch/arm/mach-at91/at91sam926x_lowlevel_init.c
new file mode 100644
index 0000000..b664afc
--- /dev/null
+++ b/arch/arm/mach-at91/at91sam926x_lowlevel_init.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2008 Ronetix Ilko Iliev (www.ronetix.at)
+ * Copyright (C) 2009-2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Under GPLv2
+  */
+
+#include <common.h>
+#include <asm/system.h>
+#include <asm/barebox-arm.h>
+#include <mach/hardware.h>
+#include <mach/at91_pmc.h>
+#include <mach/at91_pio.h>
+#include <mach/at91_rstc.h>
+#include <mach/at91_wdt.h>
+#include <mach/at91sam9_matrix.h>
+#include <mach/at91sam9_sdramc.h>
+#include <mach/at91sam9_smc.h>
+#include <mach/io.h>
+#include <init.h>
+
+static void inline access_sdram(void)
+{
+	writel(0x00000000, AT91_SDRAM_BASE);
+}
+
+static void inline pmc_check_mckrdy(void)
+{
+	u32 r;
+
+	do {
+		r = at91_sys_read(AT91_PMC_SR);
+	} while (!(r & AT91_PMC_MCKRDY));
+}
+
+void __naked __bare_init board_init_lowlevel(void)
+{
+	u32 r;
+	int i;
+
+	at91_sys_write(AT91_WDT_MR, CONFIG_SYS_WDTC_WDMR_VAL);
+
+	/* configure PIOx as EBI0 D[16-31] */
+#ifdef CONFIG_ARCH_AT91SAM9263
+	at91_sys_write(AT91_PIOD + PIO_PDR, CONFIG_SYS_PIOD_PDR_VAL1);
+	at91_sys_write(AT91_PIOD + PIO_PUDR, CONFIG_SYS_PIOD_PPUDR_VAL);
+	at91_sys_write(AT91_PIOD + PIO_ASR, CONFIG_SYS_PIOD_PPUDR_VAL);
+#else
+	at91_sys_write(AT91_PIOC + PIO_PDR, CONFIG_SYS_PIOC_PDR_VAL1);
+	at91_sys_write(AT91_PIOC + PIO_PUDR, CONFIG_SYS_PIOC_PPUDR_VAL);
+#endif
+
+#if defined(AT91_MATRIX_EBI0CSA)
+	at91_sys_write(AT91_MATRIX_EBI0CSA, CONFIG_SYS_MATRIX_EBI0CSA_VAL);
+#else /* AT91_MATRIX_EBICSA */
+	at91_sys_write(AT91_MATRIX_EBICSA, CONFIG_SYS_MATRIX_EBICSA_VAL);
+#endif
+
+	/* flash */
+	at91_sys_write(AT91_SMC_MODE(0), CONFIG_SYS_SMC0_MODE0_VAL);
+
+	at91_sys_write(AT91_SMC_CYCLE(0), CONFIG_SYS_SMC0_CYCLE0_VAL);
+
+	at91_sys_write(AT91_SMC_PULSE(0), CONFIG_SYS_SMC0_PULSE0_VAL);
+
+	at91_sys_write(AT91_SMC_SETUP(0), CONFIG_SYS_SMC0_SETUP0_VAL);
+
+	/*
+	 * PMC Check if the PLL is already initialized
+	 */
+	r = at91_sys_read(AT91_PMC_MCKR);
+	if (r & AT91_PMC_CSS)
+		goto end;
+
+	/*
+	 * Enable the Main Oscillator
+	 */
+	at91_sys_write(AT91_CKGR_MOR, CONFIG_SYS_MOR_VAL);
+
+	do {
+		r = at91_sys_read(AT91_PMC_SR);
+	} while (!(r & AT91_PMC_MOSCS));
+
+	/*
+	 * PLLAR: x MHz for PCK
+	 */
+	at91_sys_write(AT91_CKGR_PLLAR, CONFIG_SYS_PLLAR_VAL);
+
+	do {
+		r = at91_sys_read(AT91_PMC_SR);
+	} while (!(r & AT91_PMC_LOCKA));
+
+	/*
+	 * PCK/x = MCK Master Clock from SLOW
+	 */
+	at91_sys_write(AT91_PMC_MCKR, CONFIG_SYS_MCKR1_VAL);
+
+	pmc_check_mckrdy();
+
+	/*
+	 * PCK/x = MCK Master Clock from PLLA
+	 */
+	at91_sys_write(AT91_PMC_MCKR, CONFIG_SYS_MCKR2_VAL);
+
+	pmc_check_mckrdy();
+
+	/*
+	 * Init SDRAM
+	 */
+
+	/*
+	 * SDRAMC Check if Refresh Timer Counter is already initialized
+	 */
+	r = at91_sys_read(AT91_SDRAMC_TR);
+	if (r)
+		goto end;
+
+	/* SDRAMC_MR : Normal Mode */
+	at91_sys_write(AT91_SDRAMC_MR, AT91_SDRAMC_MODE_NORMAL);
+
+	/* SDRAMC_TR - Refresh Timer register */
+	at91_sys_write(AT91_SDRAMC_TR, CONFIG_SYS_SDRC_TR_VAL1);
+
+	/* SDRAMC_CR - Configuration register*/
+	at91_sys_write(AT91_SDRAMC_CR, CONFIG_SYS_SDRC_CR_VAL);
+
+	/* Memory Device Type */
+	at91_sys_write(AT91_SDRAMC_MDR, CONFIG_SYS_SDRC_MDR_VAL);
+
+	/* SDRAMC_MR : Precharge All */
+	at91_sys_write(AT91_SDRAMC_MR, AT91_SDRAMC_MODE_PRECHARGE);
+
+	/* access SDRAM */
+	access_sdram();
+
+	/* SDRAMC_MR : refresh */
+	at91_sys_write(AT91_SDRAMC_MR, AT91_SDRAMC_MODE_REFRESH);
+
+	/* access SDRAM 8 times */
+	for (i = 0; i < 8; i++)
+		access_sdram();
+
+	/* SDRAMC_MR : Load Mode Register */
+	at91_sys_write(AT91_SDRAMC_MR, AT91_SDRAMC_MODE_LMR);
+
+	/* access SDRAM */
+	access_sdram();
+
+	/* SDRAMC_MR : Normal Mode */
+	at91_sys_write(AT91_SDRAMC_MR, AT91_SDRAMC_MODE_NORMAL);
+
+	/* access SDRAM */
+	access_sdram();
+
+	/* SDRAMC_TR : Refresh Timer Counter */
+	at91_sys_write(AT91_SDRAMC_TR, CONFIG_SYS_SDRC_TR_VAL2);
+
+	/* access SDRAM */
+	access_sdram();
+
+	/* User reset enable*/
+	at91_sys_write(AT91_RSTC_MR, CONFIG_SYS_RSTC_RMR_VAL);
+
+#ifdef CONFIG_SYS_MATRIX_MCFG_REMAP
+	/* MATRIX_MCFG - REMAP all masters */
+	at91_sys_write(AT91_MATRIX_MCFG0, 0x1FF);
+#endif
+
+end:
+	board_init_lowlevel_return();
+}
-- 
1.7.7


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

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

* [PATCH 08/12] at91/gpio: simplify resources
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (6 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 07/12] at91sam9x: switch lowlevel init to c Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-04 13:40   ` Sascha Hauer
  2011-12-31 15:21 ` [PATCH 09/12] usb-a926x: add led support Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

drop irq id and rebase instead of of offset

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-at91/at91rm9200.c                |   12 ++++--------
 arch/arm/mach-at91/at91sam9260.c               |    9 +++------
 arch/arm/mach-at91/at91sam9261.c               |    9 +++------
 arch/arm/mach-at91/at91sam9263.c               |   15 +++++----------
 arch/arm/mach-at91/at91sam926x_lowlevel_init.c |   10 +++++-----
 arch/arm/mach-at91/at91sam9g45.c               |   15 +++++----------
 arch/arm/mach-at91/gpio.c                      |   13 ++-----------
 arch/arm/mach-at91/include/mach/at91rm9200.h   |    9 +++++----
 arch/arm/mach-at91/include/mach/at91sam9260.h  |    7 ++++---
 arch/arm/mach-at91/include/mach/at91sam9261.h  |    7 ++++---
 arch/arm/mach-at91/include/mach/at91sam9263.h  |   11 ++++++-----
 arch/arm/mach-at91/include/mach/at91sam9g45.h  |   11 ++++++-----
 arch/arm/mach-at91/include/mach/gpio.h         |    4 ----
 13 files changed, 52 insertions(+), 80 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index b902eab..5e3fdeb 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -216,20 +216,16 @@ static void __init at91rm9200_register_clocks(void)
 
 static struct at91_gpio_bank at91rm9200_gpio[] = {
 	{
-		.id		= AT91RM9200_ID_PIOA,
-		.offset		= AT91_PIOA,
+		.regbase	= IOMEM(AT91_BASE_PIOA),
 		.clock		= &pioA_clk,
 	}, {
-		.id		= AT91RM9200_ID_PIOB,
-		.offset		= AT91_PIOB,
+		.regbase	= IOMEM(AT91_BASE_PIOB),
 		.clock		= &pioB_clk,
 	}, {
-		.id		= AT91RM9200_ID_PIOC,
-		.offset		= AT91_PIOC,
+		.regbase	= IOMEM(AT91_BASE_PIOC),
 		.clock		= &pioC_clk,
 	}, {
-		.id		= AT91RM9200_ID_PIOD,
-		.offset		= AT91_PIOD,
+		.regbase	= IOMEM(AT91_BASE_PIOD),
 		.clock		= &pioD_clk,
 	}
 };
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 3af5747..cf9e511 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -223,16 +223,13 @@ static void __init at91sam9260_register_clocks(void)
 
 static struct at91_gpio_bank at91sam9260_gpio[] = {
 	{
-		.id		= AT91SAM9260_ID_PIOA,
-		.offset		= AT91_PIOA,
+		.regbase	= IOMEM(AT91_BASE_PIOA),
 		.clock		= &pioA_clk,
 	}, {
-		.id		= AT91SAM9260_ID_PIOB,
-		.offset		= AT91_PIOB,
+		.regbase	= IOMEM(AT91_BASE_PIOB),
 		.clock		= &pioB_clk,
 	}, {
-		.id		= AT91SAM9260_ID_PIOC,
-		.offset		= AT91_PIOC,
+		.regbase	= IOMEM(AT91_BASE_PIOC),
 		.clock		= &pioC_clk,
 	}
 };
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index b1e09ef..d20b250 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -216,16 +216,13 @@ static void at91sam9261_register_clocks(void)
 
 static struct at91_gpio_bank at91sam9261_gpio[] = {
 	{
-		.id		= AT91SAM9261_ID_PIOA,
-		.offset		= AT91_PIOA,
+		.regbase	= IOMEM(AT91_BASE_PIOA),
 		.clock		= &pioA_clk,
 	}, {
-		.id		= AT91SAM9261_ID_PIOB,
-		.offset		= AT91_PIOB,
+		.regbase	= IOMEM(AT91_BASE_PIOB),
 		.clock		= &pioB_clk,
 	}, {
-		.id		= AT91SAM9261_ID_PIOC,
-		.offset		= AT91_PIOC,
+		.regbase	= IOMEM(AT91_BASE_PIOC),
 		.clock		= &pioC_clk,
 	}
 };
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index eef7ad0..b3116d3 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -230,24 +230,19 @@ static void __init at91sam9263_register_clocks(void)
 
 static struct at91_gpio_bank at91sam9263_gpio[] = {
 	{
-		.id		= AT91SAM9263_ID_PIOA,
-		.offset		= AT91_PIOA,
+		.regbase	= IOMEM(AT91_BASE_PIOA),
 		.clock		= &pioA_clk,
 	}, {
-		.id		= AT91SAM9263_ID_PIOB,
-		.offset		= AT91_PIOB,
+		.regbase	= IOMEM(AT91_BASE_PIOB),
 		.clock		= &pioB_clk,
 	}, {
-		.id		= AT91SAM9263_ID_PIOCDE,
-		.offset		= AT91_PIOC,
+		.regbase	= IOMEM(AT91_BASE_PIOC),
 		.clock		= &pioCDE_clk,
 	}, {
-		.id		= AT91SAM9263_ID_PIOCDE,
-		.offset		= AT91_PIOD,
+		.regbase	= IOMEM(AT91_BASE_PIOD),
 		.clock		= &pioCDE_clk,
 	}, {
-		.id		= AT91SAM9263_ID_PIOCDE,
-		.offset		= AT91_PIOE,
+		.regbase	= IOMEM(AT91_BASE_PIOE),
 		.clock		= &pioCDE_clk,
 	}
 };
diff --git a/arch/arm/mach-at91/at91sam926x_lowlevel_init.c b/arch/arm/mach-at91/at91sam926x_lowlevel_init.c
index b664afc..211074c 100644
--- a/arch/arm/mach-at91/at91sam926x_lowlevel_init.c
+++ b/arch/arm/mach-at91/at91sam926x_lowlevel_init.c
@@ -42,12 +42,12 @@ void __naked __bare_init board_init_lowlevel(void)
 
 	/* configure PIOx as EBI0 D[16-31] */
 #ifdef CONFIG_ARCH_AT91SAM9263
-	at91_sys_write(AT91_PIOD + PIO_PDR, CONFIG_SYS_PIOD_PDR_VAL1);
-	at91_sys_write(AT91_PIOD + PIO_PUDR, CONFIG_SYS_PIOD_PPUDR_VAL);
-	at91_sys_write(AT91_PIOD + PIO_ASR, CONFIG_SYS_PIOD_PPUDR_VAL);
+	__raw_writel(CONFIG_SYS_PIOD_PDR_VAL1, AT91_BASE_PIOD + PIO_PDR);
+	__raw_writel(CONFIG_SYS_PIOD_PPUDR_VAL, AT91_BASE_PIOD + PIO_PUDR);
+	__raw_writel(CONFIG_SYS_PIOD_PPUDR_VAL, AT91_BASE_PIOD + PIO_ASR);
 #else
-	at91_sys_write(AT91_PIOC + PIO_PDR, CONFIG_SYS_PIOC_PDR_VAL1);
-	at91_sys_write(AT91_PIOC + PIO_PUDR, CONFIG_SYS_PIOC_PPUDR_VAL);
+	__raw_writel(CONFIG_SYS_PIOC_PDR_VAL1, AT91_BASE_PIOC + PIO_PDR);
+	__raw_writel(CONFIG_SYS_PIOC_PPUDR_VAL, AT91_BASE_PIOC + PIO_PUDR);
 #endif
 
 #if defined(AT91_MATRIX_EBI0CSA)
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 6b9fbc5..a6717f1 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -242,24 +242,19 @@ static void __init at91sam9g45_register_clocks(void)
 
 static struct at91_gpio_bank at91sam9g45_gpio[] = {
 	{
-		.id		= AT91SAM9G45_ID_PIOA,
-		.offset		= AT91_PIOA,
+		.regbase	= IOMEM(AT91_BASE_PIOA),
 		.clock		= &pioA_clk,
 	}, {
-		.id		= AT91SAM9G45_ID_PIOB,
-		.offset		= AT91_PIOB,
+		.regbase	= IOMEM(AT91_BASE_PIOB),
 		.clock		= &pioB_clk,
 	}, {
-		.id		= AT91SAM9G45_ID_PIOC,
-		.offset		= AT91_PIOC,
+		.regbase	= IOMEM(AT91_BASE_PIOC),
 		.clock		= &pioC_clk,
 	}, {
-		.id		= AT91SAM9G45_ID_PIODE,
-		.offset		= AT91_PIOD,
+		.regbase	= IOMEM(AT91_BASE_PIOD),
 		.clock		= &pioDE_clk,
 	}, {
-		.id		= AT91SAM9G45_ID_PIODE,
-		.offset		= AT91_PIOE,
+		.regbase	= IOMEM(AT91_BASE_PIOE),
 		.clock		= &pioDE_clk,
 	}
 };
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index c34df05..06da5af 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -235,23 +235,14 @@ EXPORT_SYMBOL(gpio_direction_output);
 
 int at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
 {
-	unsigned		i;
-	struct at91_gpio_bank	*last;
+	unsigned i;
 
 	gpio = data;
 	gpio_banks = nr_banks;
 
-	for (i = 0, last = NULL; i < nr_banks; i++, last = data, data++) {
-		data->chipbase = PIN_BASE + i * 32;
-		data->regbase = data->offset +
-			(void __iomem *)AT91_BASE_SYS;
-
+	for (i = 0; i < nr_banks; i++, data++) {
 		/* enable PIO controller's clock */
 		clk_enable(data->clock);
-
-		/* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */
-		if (last && last->id == data->id)
-			last->next = data;
 	}
 
 	return 0;
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h
index 985977f..39b1e15 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200.h
@@ -84,15 +84,16 @@
  */
 #define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)	/* Advanced Interrupt Controller */
 #define AT91_DBGU	(0xfffff200 - AT91_BASE_SYS)	/* Debug Unit */
-#define AT91_PIOA	(0xfffff400 - AT91_BASE_SYS)	/* PIO Controller A */
-#define AT91_PIOB	(0xfffff600 - AT91_BASE_SYS)	/* PIO Controller B */
-#define AT91_PIOC	(0xfffff800 - AT91_BASE_SYS)	/* PIO Controller C */
-#define AT91_PIOD	(0xfffffa00 - AT91_BASE_SYS)	/* PIO Controller D */
 #define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)	/* Power Management Controller */
 #define AT91_ST		(0xfffffd00 - AT91_BASE_SYS)	/* System Timer */
 #define AT91_RTC	(0xfffffe00 - AT91_BASE_SYS)	/* Real-Time Clock */
 #define AT91_MC		(0xffffff00 - AT91_BASE_SYS)	/* Memory Controllers */
 
+#define AT91_BASE_PIOA	0xfffff400	/* PIO Controller A */
+#define AT91_BASE_PIOB	0xfffff600	/* PIO Controller B */
+#define AT91_BASE_PIOC	0xfffff800	/* PIO Controller C */
+#define AT91_BASE_PIOD	0xfffffa00	/* PIO Controller D */
+
 #define AT91_USART0	AT91RM9200_BASE_US0
 #define AT91_USART1	AT91RM9200_BASE_US1
 #define AT91_USART2	AT91RM9200_BASE_US2
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 771e756..72dc931 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -87,9 +87,6 @@
 #define AT91_CCFG	(0xffffef10 - AT91_BASE_SYS)
 #define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
 #define AT91_DBGU	(0xfffff200 - AT91_BASE_SYS)
-#define AT91_PIOA	(0xfffff400 - AT91_BASE_SYS)
-#define AT91_PIOB	(0xfffff600 - AT91_BASE_SYS)
-#define AT91_PIOC	(0xfffff800 - AT91_BASE_SYS)
 #define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
 #define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
 #define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
@@ -98,6 +95,10 @@
 #define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
 #define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)
 
+#define AT91_BASE_PIOA	0xfffff400
+#define AT91_BASE_PIOB	0xfffff600
+#define AT91_BASE_PIOC	0xfffff800
+
 #define AT91_USART0	AT91SAM9260_BASE_US0
 #define AT91_USART1	AT91SAM9260_BASE_US1
 #define AT91_USART2	AT91SAM9260_BASE_US2
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index c863887..3be8087 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -73,9 +73,6 @@
 #define AT91_MATRIX	(0xffffee00 - AT91_BASE_SYS)
 #define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
 #define AT91_DBGU	(0xfffff200 - AT91_BASE_SYS)
-#define AT91_PIOA	(0xfffff400 - AT91_BASE_SYS)
-#define AT91_PIOB	(0xfffff600 - AT91_BASE_SYS)
-#define AT91_PIOC	(0xfffff800 - AT91_BASE_SYS)
 #define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
 #define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
 #define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
@@ -84,6 +81,10 @@
 #define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
 #define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)
 
+#define AT91_BASE_PIOA	0xfffff400
+#define AT91_BASE_PIOB	0xfffff600
+#define AT91_BASE_PIOC	0xfffff800
+
 #define AT91_USART0	AT91SAM9261_BASE_US0
 #define AT91_USART1	AT91SAM9261_BASE_US1
 #define AT91_USART2	AT91SAM9261_BASE_US2
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
index 7bab1a4..64f4fcc 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263.h
@@ -87,11 +87,6 @@
 #define AT91_CCFG	(0xffffed10 - AT91_BASE_SYS)
 #define AT91_DBGU	(0xffffee00 - AT91_BASE_SYS)
 #define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
-#define AT91_PIOA	(0xfffff200 - AT91_BASE_SYS)
-#define AT91_PIOB	(0xfffff400 - AT91_BASE_SYS)
-#define AT91_PIOC	(0xfffff600 - AT91_BASE_SYS)
-#define AT91_PIOD	(0xfffff800 - AT91_BASE_SYS)
-#define AT91_PIOE	(0xfffffa00 - AT91_BASE_SYS)
 #define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
 #define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
 #define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
@@ -101,6 +96,12 @@
 #define AT91_RTT1	(0xfffffd50 - AT91_BASE_SYS)
 #define AT91_GPBR	(0xfffffd60 - AT91_BASE_SYS)
 
+#define AT91_BASE_PIOA	0xfffff200
+#define AT91_BASE_PIOB	0xfffff400
+#define AT91_BASE_PIOC	0xfffff600
+#define AT91_BASE_PIOD	0xfffff800
+#define AT91_BASE_PIOE	0xfffffa00
+
 #define AT91_USART0	AT91SAM9263_BASE_US0
 #define AT91_USART1	AT91SAM9263_BASE_US1
 #define AT91_USART2	AT91SAM9263_BASE_US2
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h
index c5c7f49..18fa6c5 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h
@@ -97,11 +97,6 @@
 #define AT91_DMA	(0xffffec00 - AT91_BASE_SYS)
 #define AT91_DBGU	(0xffffee00 - AT91_BASE_SYS)
 #define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
-#define AT91_PIOA	(0xfffff200 - AT91_BASE_SYS)
-#define AT91_PIOB	(0xfffff400 - AT91_BASE_SYS)
-#define AT91_PIOC	(0xfffff600 - AT91_BASE_SYS)
-#define AT91_PIOD	(0xfffff800 - AT91_BASE_SYS)
-#define AT91_PIOE	(0xfffffa00 - AT91_BASE_SYS)
 #define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
 #define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
 #define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
@@ -111,6 +106,12 @@
 #define AT91_GPBR	(0xfffffd60 - AT91_BASE_SYS)
 #define AT91_RTC	(0xfffffdb0 - AT91_BASE_SYS)
 
+#define AT91_BASE_PIOA	0xfffff200
+#define AT91_BASE_PIOB	0xfffff400
+#define AT91_BASE_PIOC	0xfffff600
+#define AT91_BASE_PIOD	0xfffff800
+#define AT91_BASE_PIOE	0xfffffa00
+
 #define AT91_USART0	AT91SAM9G45_BASE_US0
 #define AT91_USART1	AT91SAM9G45_BASE_US1
 #define AT91_USART2	AT91SAM9G45_BASE_US2
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
index f3239f5..95a4bd4 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -236,11 +236,7 @@ int at91_set_gpio_value(unsigned pin, int value);
 int at91_get_gpio_value(unsigned pin);
 
 struct at91_gpio_bank {
-	unsigned chipbase;		/* bank's first GPIO number */
 	void __iomem *regbase;		/* base of register bank */
-	struct at91_gpio_bank *next;	/* bank sharing same IRQ/clock/... */
-	unsigned short id;		/* peripheral ID */
-	unsigned long offset;		/* offset from system peripheral base */
 	struct clk *clock;
 };
 
-- 
1.7.7


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

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

* [PATCH 09/12] usb-a926x: add led support
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (7 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 08/12] at91/gpio: simplify resources Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 10/12] usb-a926x: add dfu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/usb-a926x/init.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 41daab8..469d98e 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -37,6 +37,7 @@
 #include <mach/at91sam9_smc.h>
 #include <mach/sam9_smc.h>
 #include <gpio.h>
+#include <led.h>
 #include <mach/io.h>
 #include <mach/at91_pmc.h>
 #include <mach/at91_rstc.h>
@@ -182,6 +183,22 @@ static void __init ek_add_device_udc(void)
 	at91_add_device_udc(&ek_udc_data);
 }
 
+struct gpio_led led = {
+	.gpio = AT91_PIN_PB21,
+	.led = {
+		.name = "user_led",
+	},
+};
+
+static void __init ek_add_led(void)
+{
+	if (machine_is_usb_a9263())
+		led.active_low = 1;
+
+	at91_set_gpio_output(led.gpio, led.active_low);
+	led_gpio_register(&led);
+}
+
 static int usb_a9260_mem_init(void)
 {
 #ifdef CONFIG_AT91_HAVE_SRAM_128M
@@ -202,6 +219,7 @@ static int usb_a9260_devices_init(void)
 	usb_a9260_add_device_mci();
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	ek_add_device_udc();
+	ek_add_led();
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	usb_a9260_set_board_type();
-- 
1.7.7


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

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

* [PATCH 10/12] usb-a926x: add dfu support
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (8 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 09/12] usb-a926x: add led support Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 11/12] at91_udc: update vbus param only if updated Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 12/12] usb-a926x: update defconfig Jean-Christophe PLAGNIOL-VILLARD
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

detect it at boot time

if the user button is pressed 5s and the vbus is 1 start the dfu

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/usb-a926x/env/bin/init_board |   43 ++++++++++++++++++++++++++
 arch/arm/boards/usb-a926x/init.c             |    9 +++++
 2 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boards/usb-a926x/env/bin/init_board

diff --git a/arch/arm/boards/usb-a926x/env/bin/init_board b/arch/arm/boards/usb-a926x/env/bin/init_board
new file mode 100644
index 0000000..77e5c1a
--- /dev/null
+++ b/arch/arm/boards/usb-a926x/env/bin/init_board
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+button_name="dfu_bp"
+button_wait=5
+
+product_id=0x1234
+vendor_id=0x4321
+
+dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r"
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	exit
+fi
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+echo "${button_name} pressed detected wait ${button_wait}s"
+timeout -s -a ${button_wait}
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	echo "${button_name} released, normal boot"
+	exit
+fi
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+echo ""
+echo "Start DFU Mode"
+echo ""
+
+dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 469d98e..364c1ba 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -211,6 +211,14 @@ static int usb_a9260_mem_init(void)
 }
 mem_initcall(usb_a9260_mem_init);
 
+static void __init ek_add_device_button(void)
+{
+	at91_set_GPIO_periph(AT91_PIN_PB10, 1);	/* user push button, pull up enabled */
+	at91_set_deglitch(AT91_PIN_PB10, 1);
+
+	export_env_ull("dfu_button", AT91_PIN_PB10);
+}
+
 static int usb_a9260_devices_init(void)
 {
 	usb_a9260_add_device_nand();
@@ -220,6 +228,7 @@ static int usb_a9260_devices_init(void)
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	ek_add_device_udc();
 	ek_add_led();
+	ek_add_device_button();
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	usb_a9260_set_board_type();
-- 
1.7.7


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

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

* [PATCH 11/12] at91_udc: update vbus param only if updated
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (9 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 10/12] usb-a926x: add dfu support Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-12-31 15:21 ` [PATCH 12/12] usb-a926x: update defconfig Jean-Christophe PLAGNIOL-VILLARD
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/usb/gadget/at91_udc.c |   17 +++++++++++++++--
 drivers/usb/gadget/at91_udc.h |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 9277427..bb0d614 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1315,6 +1315,19 @@ static struct at91_udc controller = {
 
 static void at91_udc_irq (void *_udc);
 
+static void at91_update_vbus(struct at91_udc *udc, u32 value)
+{
+	if (value == udc->gpio_vbus_val)
+		return;
+
+	if (value)
+		dev_set_param(udc->dev, "vbus", "1");
+	else
+		dev_set_param(udc->dev, "vbus", "0");
+
+	udc->gpio_vbus_val = value;
+}
+
 int usb_gadget_poll(void)
 {
 	struct at91_udc	*udc = &controller;
@@ -1327,10 +1340,10 @@ int usb_gadget_poll(void)
 	value ^= udc->board.vbus_active_low;
 
 	if (!value) {
-		dev_set_param(udc->dev, "vbus", "0");
+		at91_update_vbus(udc, value);
 		return 0;
 	}
-	dev_set_param(udc->dev, "vbus", "1");
+	at91_update_vbus(udc, value);
 
 	value = at91_udp_read(udc, AT91_UDP_ISR) & (~(AT91_UDP_SOFINT));
 	if (value)
diff --git a/drivers/usb/gadget/at91_udc.h b/drivers/usb/gadget/at91_udc.h
index 21aaf39..e592cc5 100644
--- a/drivers/usb/gadget/at91_udc.h
+++ b/drivers/usb/gadget/at91_udc.h
@@ -128,6 +128,7 @@ struct at91_udc {
 	unsigned			selfpowered:1;
 	unsigned			active_suspend:1;
 	u8				addr;
+	u32				gpio_vbus_val;
 	struct at91_udc_data		board;
 	struct clk			*iclk, *fclk;
 	struct device_d			*dev;
-- 
1.7.7


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

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

* [PATCH 12/12] usb-a926x: update defconfig
  2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
                   ` (10 preceding siblings ...)
  2011-12-31 15:21 ` [PATCH 11/12] at91_udc: update vbus param only if updated Jean-Christophe PLAGNIOL-VILLARD
@ 2011-12-31 15:21 ` Jean-Christophe PLAGNIOL-VILLARD
  11 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-31 15:21 UTC (permalink / raw)
  To: barebox

enable led, triggers, uimage, oftree, dfu, etc...

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/configs/usb_a9260_defconfig        |   20 ++++++++++++++++----
 arch/arm/configs/usb_a9263_128mib_defconfig |   20 ++++++++++++++++----
 arch/arm/configs/usb_a9263_defconfig        |   20 ++++++++++++++++----
 arch/arm/configs/usb_a9g20_128mib_defconfig |   20 ++++++++++++++++----
 arch/arm/configs/usb_a9g20_defconfig        |   20 ++++++++++++++++----
 5 files changed, 80 insertions(+), 20 deletions(-)

diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig
index adcb603..6c6eac2 100644
--- a/arch/arm/configs/usb_a9260_defconfig
+++ b/arch/arm/configs/usb_a9260_defconfig
@@ -1,9 +1,8 @@
 CONFIG_ARCH_AT91SAM9260=y
 CONFIG_MACH_USB_A9260=y
 CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-CONFIG_MMU=y
-CONFIG_KALLSYMS=y
 CONFIG_PROMPT="USB-9G20:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -34,14 +33,19 @@ CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
-CONFIG_CMD_BOOTM_BZLIB=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -54,5 +58,13 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_ZLIB=y
diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig
index 8d5342e..0b0ad80 100644
--- a/arch/arm/configs/usb_a9263_128mib_defconfig
+++ b/arch/arm/configs/usb_a9263_128mib_defconfig
@@ -1,10 +1,9 @@
 CONFIG_ARCH_AT91SAM9263=y
 CONFIG_MACH_USB_A9263=y
 CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_AT91_HAVE_SRAM_128M=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-CONFIG_MMU=y
-CONFIG_KALLSYMS=y
 CONFIG_PROMPT="USB-9G20:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -35,14 +34,19 @@ CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
-CONFIG_CMD_BOOTM_BZLIB=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -55,5 +59,13 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_ZLIB=y
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 9f53431..168a5d1 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -1,9 +1,8 @@
 CONFIG_ARCH_AT91SAM9263=y
 CONFIG_MACH_USB_A9263=y
 CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-CONFIG_MMU=y
-CONFIG_KALLSYMS=y
 CONFIG_PROMPT="USB-9G20:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -34,14 +33,19 @@ CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
-CONFIG_CMD_BOOTM_BZLIB=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -54,5 +58,13 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_ZLIB=y
diff --git a/arch/arm/configs/usb_a9g20_128mib_defconfig b/arch/arm/configs/usb_a9g20_128mib_defconfig
index 3c0e6f7..a02002f 100644
--- a/arch/arm/configs/usb_a9g20_128mib_defconfig
+++ b/arch/arm/configs/usb_a9g20_128mib_defconfig
@@ -1,10 +1,9 @@
 CONFIG_ARCH_AT91SAM9G20=y
 CONFIG_MACH_USB_A9G20=y
 CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_AT91_HAVE_SRAM_128M=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-CONFIG_MMU=y
-CONFIG_KALLSYMS=y
 CONFIG_PROMPT="USB-9G20:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -35,14 +34,19 @@ CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
-CONFIG_CMD_BOOTM_BZLIB=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -55,5 +59,13 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_ZLIB=y
diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig
index 2bcb8eb..e4dd424 100644
--- a/arch/arm/configs/usb_a9g20_defconfig
+++ b/arch/arm/configs/usb_a9g20_defconfig
@@ -1,9 +1,8 @@
 CONFIG_ARCH_AT91SAM9G20=y
 CONFIG_MACH_USB_A9G20=y
 CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
-CONFIG_MMU=y
-CONFIG_KALLSYMS=y
 CONFIG_PROMPT="USB-9G20:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -34,14 +33,19 @@ CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
-CONFIG_CMD_BOOTM_ZLIB=y
-CONFIG_CMD_BOOTM_BZLIB=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -54,5 +58,13 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
 CONFIG_NAND=y
+# CONFIG_NAND_ECC_HW is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_ZLIB=y
-- 
1.7.7


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

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

* Re: [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled
  2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-03  9:37   ` Sascha Hauer
  2012-01-03 10:33     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-01-03  9:37 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Sat, Dec 31, 2011 at 04:21:27PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  arch/arm/boards/at91sam9260ek/init.c    |    1 +
>  arch/arm/boards/at91sam9261ek/init.c    |    1 +
>  arch/arm/boards/at91sam9263ek/init.c    |    1 +
>  arch/arm/boards/at91sam9m10g45ek/init.c |    1 +
>  arch/arm/boards/usb-a926x/init.c        |    1 +
>  5 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
> index dbd6541..b10d0dc 100644
> --- a/arch/arm/boards/at91sam9260ek/init.c
> +++ b/arch/arm/boards/at91sam9260ek/init.c
> @@ -71,6 +71,7 @@ static struct atmel_nand_data nand_pdata = {
>  #else
>  	.bus_width_16	= 0,
>  #endif
> +	.on_flash_bbt	= 1,

This field does not exist and is not added in this series, so current
next is broken on Atmel.
Maybe your branch is different from your pull request? I had to apply
these patches from the mails since I can't reach your server.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled
  2012-01-03  9:37   ` Sascha Hauer
@ 2012-01-03 10:33     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-03 10:33 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:37 Tue 03 Jan     , Sascha Hauer wrote:
> On Sat, Dec 31, 2011 at 04:21:27PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  arch/arm/boards/at91sam9260ek/init.c    |    1 +
> >  arch/arm/boards/at91sam9261ek/init.c    |    1 +
> >  arch/arm/boards/at91sam9263ek/init.c    |    1 +
> >  arch/arm/boards/at91sam9m10g45ek/init.c |    1 +
> >  arch/arm/boards/usb-a926x/init.c        |    1 +
> >  5 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
> > index dbd6541..b10d0dc 100644
> > --- a/arch/arm/boards/at91sam9260ek/init.c
> > +++ b/arch/arm/boards/at91sam9260ek/init.c
> > @@ -71,6 +71,7 @@ static struct atmel_nand_data nand_pdata = {
> >  #else
> >  	.bus_width_16	= 0,
> >  #endif
> > +	.on_flash_bbt	= 1,
> 
> This field does not exist and is not added in this series, so current
> next is broken on Atmel.
> Maybe your branch is different from your pull request? I had to apply
> these patches from the mails since I can't reach your server.
I resend the patch to the ML

Best Regards,
J.

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

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

* Re: [PATCH 08/12] at91/gpio: simplify resources
  2011-12-31 15:21 ` [PATCH 08/12] at91/gpio: simplify resources Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-04 13:40   ` Sascha Hauer
  2012-01-04 18:01     ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-04 18:05     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-01-04 13:40 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

Hi J,

On Sat, Dec 31, 2011 at 04:21:34PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> drop irq id and rebase instead of of offset
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  arch/arm/mach-at91/at91rm9200.c                |   12 ++++--------
>  arch/arm/mach-at91/at91sam9260.c               |    9 +++------
>  arch/arm/mach-at91/at91sam9261.c               |    9 +++------
>  arch/arm/mach-at91/at91sam9263.c               |   15 +++++----------
>  arch/arm/mach-at91/at91sam926x_lowlevel_init.c |   10 +++++-----
>  arch/arm/mach-at91/at91sam9g45.c               |   15 +++++----------
>  arch/arm/mach-at91/gpio.c                      |   13 ++-----------
>  arch/arm/mach-at91/include/mach/at91rm9200.h   |    9 +++++----
>  arch/arm/mach-at91/include/mach/at91sam9260.h  |    7 ++++---
>  arch/arm/mach-at91/include/mach/at91sam9261.h  |    7 ++++---
>  arch/arm/mach-at91/include/mach/at91sam9263.h  |   11 ++++++-----
>  arch/arm/mach-at91/include/mach/at91sam9g45.h  |   11 ++++++-----
>  arch/arm/mach-at91/include/mach/gpio.h         |    4 ----
>  13 files changed, 52 insertions(+), 80 deletions(-)

This breaks at91rm9200ek_defconfig which still references AT91_PIOC.
I don't know if it's worth it to keep this around anyway since the
ethernet driver seems to be broken since ages.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 05/12] at91: add sram memory devices
  2011-12-31 15:21 ` [PATCH 05/12] at91: add sram memory devices Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-04 13:42   ` Sascha Hauer
  0 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-01-04 13:42 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Sat, Dec 31, 2011 at 04:21:31PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  arch/arm/mach-at91/at91rm9200_devices.c       |    2 ++
>  arch/arm/mach-at91/at91sam9260_devices.c      |   12 ++++++++++++
>  arch/arm/mach-at91/at91sam9261_devices.c      |    7 +++++++
>  arch/arm/mach-at91/at91sam9263_devices.c      |    4 ++++
>  arch/arm/mach-at91/at91sam9g45_devices.c      |    2 ++
>  arch/arm/mach-at91/include/mach/at91sam9260.h |   10 ++++++++++
>  arch/arm/mach-at91/include/mach/at91sam9261.h |    3 +++
>  7 files changed, 40 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
> index 8c19846..7032789 100644
> --- a/arch/arm/mach-at91/at91rm9200_devices.c
> +++ b/arch/arm/mach-at91/at91rm9200_devices.c
> @@ -23,6 +23,8 @@
>  void at91_add_device_sdram(u32 size)
>  {
>  	arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
> +	add_mem_device("sram0", AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE,
> +			IORESOURCE_MEM_WRITEABLE);

This breaks the at91rm9200ek_defconfig since this file is missing a
include <sizes.h>


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 08/12] at91/gpio: simplify resources
  2012-01-04 13:40   ` Sascha Hauer
@ 2012-01-04 18:01     ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-04 18:05     ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-04 18:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 14:40 Wed 04 Jan     , Sascha Hauer wrote:
> Hi J,
> 
> On Sat, Dec 31, 2011 at 04:21:34PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > drop irq id and rebase instead of of offset
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  arch/arm/mach-at91/at91rm9200.c                |   12 ++++--------
> >  arch/arm/mach-at91/at91sam9260.c               |    9 +++------
> >  arch/arm/mach-at91/at91sam9261.c               |    9 +++------
> >  arch/arm/mach-at91/at91sam9263.c               |   15 +++++----------
> >  arch/arm/mach-at91/at91sam926x_lowlevel_init.c |   10 +++++-----
> >  arch/arm/mach-at91/at91sam9g45.c               |   15 +++++----------
> >  arch/arm/mach-at91/gpio.c                      |   13 ++-----------
> >  arch/arm/mach-at91/include/mach/at91rm9200.h   |    9 +++++----
> >  arch/arm/mach-at91/include/mach/at91sam9260.h  |    7 ++++---
> >  arch/arm/mach-at91/include/mach/at91sam9261.h  |    7 ++++---
> >  arch/arm/mach-at91/include/mach/at91sam9263.h  |   11 ++++++-----
> >  arch/arm/mach-at91/include/mach/at91sam9g45.h  |   11 ++++++-----
> >  arch/arm/mach-at91/include/mach/gpio.h         |    4 ----
> >  13 files changed, 52 insertions(+), 80 deletions(-)
> 
> This breaks at91rm9200ek_defconfig which still references AT91_PIOC.
> I don't know if it's worth it to keep this around anyway since the
> ethernet driver seems to be broken since ages.
see it too I've a fix for this

Best Regards,
J.

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

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

* Re: [PATCH 08/12] at91/gpio: simplify resources
  2012-01-04 13:40   ` Sascha Hauer
  2012-01-04 18:01     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-04 18:05     ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-04 18:05 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 14:40 Wed 04 Jan     , Sascha Hauer wrote:
> Hi J,
> 
> On Sat, Dec 31, 2011 at 04:21:34PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > drop irq id and rebase instead of of offset
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  arch/arm/mach-at91/at91rm9200.c                |   12 ++++--------
> >  arch/arm/mach-at91/at91sam9260.c               |    9 +++------
> >  arch/arm/mach-at91/at91sam9261.c               |    9 +++------
> >  arch/arm/mach-at91/at91sam9263.c               |   15 +++++----------
> >  arch/arm/mach-at91/at91sam926x_lowlevel_init.c |   10 +++++-----
> >  arch/arm/mach-at91/at91sam9g45.c               |   15 +++++----------
> >  arch/arm/mach-at91/gpio.c                      |   13 ++-----------
> >  arch/arm/mach-at91/include/mach/at91rm9200.h   |    9 +++++----
> >  arch/arm/mach-at91/include/mach/at91sam9260.h  |    7 ++++---
> >  arch/arm/mach-at91/include/mach/at91sam9261.h  |    7 ++++---
> >  arch/arm/mach-at91/include/mach/at91sam9263.h  |   11 ++++++-----
> >  arch/arm/mach-at91/include/mach/at91sam9g45.h  |   11 ++++++-----
> >  arch/arm/mach-at91/include/mach/gpio.h         |    4 ----
> >  13 files changed, 52 insertions(+), 80 deletions(-)
> 
> This breaks at91rm9200ek_defconfig which still references AT91_PIOC.
> I don't know if it's worth it to keep this around anyway since the
> ethernet driver seems to be broken since ages.
I do use it and I've a new version of the ethernet driver

need to finish to cleanup before send

Best Regards,
J.

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

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

end of thread, other threads:[~2012-01-04 18:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-31 15:16 AT91: Pull Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 01/12] atmel: reference boards and Caloa boards bbt option enabled Jean-Christophe PLAGNIOL-VILLARD
2012-01-03  9:37   ` Sascha Hauer
2012-01-03 10:33     ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 02/12] ARM: import memcpy_from/toio and memset_io from linux Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 03/12] mtd: atmel_nand: optimize read/write buffer functions Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 04/12] atmel_nand: drop dead code Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 05/12] at91: add sram memory devices Jean-Christophe PLAGNIOL-VILLARD
2012-01-04 13:42   ` Sascha Hauer
2011-12-31 15:21 ` [PATCH 06/12] at91sam9263ek: add nor partition Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 07/12] at91sam9x: switch lowlevel init to c Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 08/12] at91/gpio: simplify resources Jean-Christophe PLAGNIOL-VILLARD
2012-01-04 13:40   ` Sascha Hauer
2012-01-04 18:01     ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-04 18:05     ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 09/12] usb-a926x: add led support Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 10/12] usb-a926x: add dfu support Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 11/12] at91_udc: update vbus param only if updated Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 15:21 ` [PATCH 12/12] usb-a926x: update defconfig 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