mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 01/14] macb: fix mmu support
@ 2012-03-12 11:17 Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/net/macb.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index ab0d1af..48492e5 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -50,6 +50,7 @@
 #include <mach/board.h>
 #include <linux/clk.h>
 #include <linux/err.h>
+#include <asm/mmu.h>
 
 #include "macb.h"
 
@@ -118,6 +119,7 @@ static int macb_send(struct eth_device *edev, void *packet,
 	macb->tx_ring[0].ctrl = ctrl;
 	macb->tx_ring[0].addr = (ulong)packet;
 	barrier();
+	dma_flush_range((ulong) packet, (ulong)packet + length);
 	writel(MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART), macb->regs + MACB_NCR);
 
 	if (ctrl & TXBUF_UNDERRUN)
@@ -430,9 +432,9 @@ static int macb_probe(struct device_d *dev)
 	macb->miidev.parent = dev;
 	macb->flags = pdata->flags;
 
-	macb->rx_buffer = xmalloc(CFG_MACB_RX_BUFFER_SIZE);
-	macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
-	macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
+	macb->rx_buffer = dma_alloc_coherent(CFG_MACB_RX_BUFFER_SIZE);
+	macb->rx_ring = dma_alloc_coherent(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
+	macb->tx_ring = dma_alloc_coherent(sizeof(struct macb_dma_desc));
 
 	macb->regs = dev_request_mem_region(dev, 0);
 
-- 
1.7.7


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

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

* [PATCH 02/14] at91sam9263ek: add runtime nor detection
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 03/14] at91sam9263ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

most of the board does not have a nor soldered

update the nand partition table to boot from nand with bootstrap

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

diff --git a/arch/arm/boards/at91sam9263ek/env/config b/arch/arm/boards/at91sam9263ek/env/config
index e189b8e..388a939 100644
--- a/arch/arm/boards/at91sam9263ek/env/config
+++ b/arch/arm/boards/at91sam9263ek/env/config
@@ -25,10 +25,10 @@ kernelimage=uImage
 #kernelimage=Image.lzo
 
 nand_device=atmel_nand
-nand_parts="256k(barebox)ro,128k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nand=3
+nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=5
 
-nor_parts="256k(barebox),64k(bareboxenv),1536k(kernel),-(root)"
+nor_parts="256k(barebox),64k(bareboxenv),4M(kernel),-(root)"
 
 autoboot_timeout=3
 
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index d7b9afe..1c52acc 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -32,6 +32,7 @@
 #include <io.h>
 #include <asm/hardware.h>
 #include <nand.h>
+#include <sizes.h>
 #include <linux/mtd/nand.h>
 #include <mach/at91_pmc.h>
 #include <mach/board.h>
@@ -129,15 +130,19 @@ static int at91sam9263ek_devices_init(void)
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0);
 	ek_add_device_mci();
 
-#if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD)
-	devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
-	devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0");
-#elif defined(CONFIG_NAND_ATMEL)
-	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
-	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
-	dev_add_bb_dev("env_raw", "env0");
-#endif
+	if (IS_ENABLED(CONFIG_DRIVER_CFI) && cdev_by_name("nor0")) {
+		devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
+		devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0");
+	} else if (IS_ENABLED(CONFIG_NAND_ATMEL)) {
+		devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
+		dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
+		devfs_add_partition("nand0", SZ_128K, SZ_256K, PARTITION_FIXED, "self_raw");
+		dev_add_bb_dev("self_raw", "self0");
+		devfs_add_partition("nand0", SZ_256K + SZ_128K, SZ_128K, PARTITION_FIXED, "env_raw");
+		dev_add_bb_dev("env_raw", "env0");
+		devfs_add_partition("nand0", SZ_512K, SZ_128K, PARTITION_FIXED, "env_raw1");
+		dev_add_bb_dev("env_raw1", "env1");
+	}
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	armlinux_set_architecture(MACH_TYPE_AT91SAM9263EK);
-- 
1.7.7


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

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

* [PATCH 03/14] at91sam9263ek: add leds support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 04/14] at91sam9263ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9263ek/init.c     |   31 ++++++++++++++++++++++++++++++
 arch/arm/configs/at91sam9263ek_defconfig |    5 ++++
 2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index 1c52acc..42b38ba 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -107,6 +107,36 @@ static void ek_add_device_mci(void)
 static void ek_add_device_mci(void) {}
 #endif
 
+#ifdef CONFIG_LED_GPIO
+struct gpio_led ek_leds[] = {
+	{
+		.gpio		= AT91_PIN_PC29,
+		.active_low	= 1,
+		.led = {
+			.name = "ds2",
+		},
+	}, {
+		.gpio		= AT91_PIN_PB7,
+		.led = {
+			.name = "ds3",
+		},
+	},
+};
+
+static void ek_device_add_leds(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ek_leds); i++) {
+		at91_set_gpio_output(ek_leds[i].gpio, ek_leds[i].active_low);
+		led_gpio_register(&ek_leds[i]);
+	}
+	led_set_trigger(LED_TRIGGER_HEARTBEAT, &ek_leds[1].led);
+}
+#else
+static void ek_device_add_leds(void) {}
+#endif
+
 static int at91sam9263ek_mem_init(void)
 {
 	at91_add_device_sdram(64 * 1024 * 1024);
@@ -129,6 +159,7 @@ static int at91sam9263ek_devices_init(void)
 	at91_add_device_eth(&macb_pdata);
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0);
 	ek_add_device_mci();
+	ek_device_add_leds();
 
 	if (IS_ENABLED(CONFIG_DRIVER_CFI) && cdev_by_name("nor0")) {
 		devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index 308f0cd..1b4b2e3 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -27,6 +27,8 @@ CONFIG_CMD_GO=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
@@ -42,6 +44,9 @@ CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
 CONFIG_MCI=y
 CONFIG_MCI_ATMEL=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
 CONFIG_FS_FAT_LFN=y
-- 
1.7.7


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

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

* [PATCH 04/14] at91sam9263ek: add dfu and usb serial support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 03/14] at91sam9263ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 05/14] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

if left_click is pressed 5s during boot enable dfu otherwise usbserial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9263ek/env/bin/init_board |   51 ++++++++++++++++++++++
 arch/arm/boards/at91sam9263ek/init.c             |   29 ++++++++++++
 arch/arm/configs/at91sam9263ek_defconfig         |    9 +++-
 3 files changed, 86 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boards/at91sam9263ek/env/bin/init_board

diff --git a/arch/arm/boards/at91sam9263ek/env/bin/init_board b/arch/arm/boards/at91sam9263ek/env/bin/init_board
new file mode 100644
index 0000000..ae2ac7d
--- /dev/null
+++ b/arch/arm/boards/at91sam9263ek/env/bin/init_board
@@ -0,0 +1,51 @@
+#!/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"
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	autoboot_timeout=16
+	echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+	usbserial
+	exit
+fi
+
+echo "${button_name} pressed detected wait ${button_wait}s"
+timeout -s -a ${button_wait}
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	echo "${button_name} released, normal boot"
+	autoboot_timeout=16
+	echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+	usbserial
+	exit
+fi
+
+echo ""
+echo "Start DFU Mode"
+echo ""
+
+led ds2 1
+dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+led ds2 0
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index 42b38ba..4a8d167 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -137,6 +137,33 @@ static void ek_device_add_leds(void)
 static void ek_device_add_leds(void) {}
 #endif
 
+#if defined(CONFIG_USB_GADGET_DRIVER_AT91)
+/*
+ * USB Device port
+ */
+static struct at91_udc_data __initdata ek_udc_data = {
+	.vbus_pin	= AT91_PIN_PA25,
+	.pullup_pin	= -EINVAL,		/* pull-up driven by UDC */
+};
+
+static void ek_add_device_udc(void)
+{
+	at91_add_device_udc(&ek_udc_data);
+}
+#else
+static void ek_add_device_udc(void) {}
+#endif
+
+static void __init ek_add_device_buttons(void)
+{
+	at91_set_gpio_input(AT91_PIN_PC5, 1);
+	at91_set_deglitch(AT91_PIN_PC5, 1);
+	export_env_ull("dfu_button", AT91_PIN_PC5);
+	at91_set_gpio_input(AT91_PIN_PC4, 1);
+	at91_set_deglitch(AT91_PIN_PC4, 1);
+	export_env_ull("right_click", AT91_PIN_PC4);
+}
+
 static int at91sam9263ek_mem_init(void)
 {
 	at91_add_device_sdram(64 * 1024 * 1024);
@@ -160,6 +187,8 @@ static int at91sam9263ek_devices_init(void)
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0);
 	ek_add_device_mci();
 	ek_device_add_leds();
+	ek_add_device_udc();
+	ek_add_device_buttons();
 
 	if (IS_ENABLED(CONFIG_DRIVER_CFI) && cdev_by_name("nor0")) {
 		devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index 1b4b2e3..3353601 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -6,16 +6,17 @@ CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
-CONFIG_PARTITION=y
+# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
+CONFIG_CONSOLE_ACTIVATE_ALL=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9263ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
+CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_FLASH=y
@@ -37,11 +38,13 @@ CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_DRIVER_CFI=y
-CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
 CONFIG_MCI=y
 CONFIG_MCI_ATMEL=y
 CONFIG_LED=y
-- 
1.7.7


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

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

* [PATCH 05/14] at91sam9263ek: update defconfig
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 04/14] at91sam9263ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

 - set max size to 256KiB
 - enable MMU
 - bootm: enable oftree and initrd support
 - nand: drop non used hw ecc

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/configs/at91sam9263ek_defconfig |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index 3353601..f59eab9 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -1,5 +1,9 @@
 CONFIG_ARCH_AT91SAM9263=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_EXPERIMENTAL=y
+CONFIG_MALLOC_TLSF=y
 CONFIG_PROMPT="9263-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -20,11 +24,15 @@ CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MTEST=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_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_UIMAGE=y
+# 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
@@ -38,8 +46,13 @@ CONFIG_NET_TFTP=y
 CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
 CONFIG_DRIVER_CFI=y
+# CONFIG_DRIVER_CFI_INTEL is not set
 CONFIG_MTD=y
+# CONFIG_MTD_OOB_DEVICE is not set
 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
-- 
1.7.7


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

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

* [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 05/14] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 07/14] at91sam9261ek/9g10ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Update partition layout to be able to boot from nand with the bootstrap.

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

diff --git a/arch/arm/boards/at91sam9261ek/env/config b/arch/arm/boards/at91sam9261ek/env/config
index d6eeea4..9be6331 100644
--- a/arch/arm/boards/at91sam9261ek/env/config
+++ b/arch/arm/boards/at91sam9261ek/env/config
@@ -25,8 +25,8 @@ kernelimage=uImage
 #kernelimage=Image.lzo
 
 nand_device=atmel_nand
-nand_parts="256k(barebox)ro,128k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nand=3
+nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=5
 
 autoboot_timeout=3
 
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 8b192b2..2272fd6 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -30,6 +30,7 @@
 #include <io.h>
 #include <asm/hardware.h>
 #include <nand.h>
+#include <sizes.h>
 #include <linux/mtd/nand.h>
 #include <mach/at91_pmc.h>
 #include <mach/board.h>
@@ -147,10 +148,13 @@ static int at91sam9261ek_devices_init(void)
 	ek_add_device_nand();
 	ek_add_device_dm9000();
 
-	devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
+	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
+	devfs_add_partition("nand0", SZ_128K, SZ_256K, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
+	devfs_add_partition("nand0", SZ_256K + SZ_128K, SZ_128K, PARTITION_FIXED, "env_raw");
 	dev_add_bb_dev("env_raw", "env0");
+	devfs_add_partition("nand0", SZ_512K, SZ_128K, PARTITION_FIXED, "env_raw1");
+	dev_add_bb_dev("env_raw1", "env1");
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	if (machine_is_at91sam9g10ek())
-- 
1.7.7


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

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

* [PATCH 07/14] at91sam9261ek/9g10ek: add leds support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9261ek/init.c     |   38 ++++++++++++++++++++++++++++++
 arch/arm/configs/at91sam9261ek_defconfig |    5 ++++
 arch/arm/configs/at91sam9g10ek_defconfig |    5 ++++
 3 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 2272fd6..6327b59 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -39,6 +39,7 @@
 #include <mach/at91sam9_smc.h>
 #include <mach/sam9_smc.h>
 #include <dm9000.h>
+#include <led.h>
 
 static struct atmel_nand_data nand_pdata = {
 	.ale		= 22,
@@ -134,6 +135,42 @@ static void __init ek_add_device_dm9000(void)
 static void __init ek_add_device_dm9000(void) {}
 #endif /* CONFIG_DRIVER_NET_DM9K */
 
+#ifdef CONFIG_LED_GPIO
+struct gpio_led ek_leds[] = {
+	{
+		.gpio		= AT91_PIN_PA23,
+		.led = {
+			.name = "ds1",
+		},
+	}, {
+		.gpio		= AT91_PIN_PA14,
+		.active_low	= 1,
+		.led = {
+			.name = "ds7",
+		},
+	}, {
+		.gpio		= AT91_PIN_PA13,
+		.active_low	= 1,
+		.led = {
+			.name = "ds8",
+		},
+	},
+};
+
+static void ek_device_add_leds(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ek_leds); i++) {
+		at91_set_gpio_output(ek_leds[i].gpio, ek_leds[i].active_low);
+		led_gpio_register(&ek_leds[i]);
+	}
+	led_set_trigger(LED_TRIGGER_HEARTBEAT, &ek_leds[0].led);
+}
+#else
+static void ek_device_add_leds(void) {}
+#endif
+
 static int at91sam9261ek_mem_init(void)
 {
 	at91_add_device_sdram(64 * 1024 * 1024);
@@ -147,6 +184,7 @@ static int at91sam9261ek_devices_init(void)
 
 	ek_add_device_nand();
 	ek_add_device_dm9000();
+	ek_device_add_leds();
 
 	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
 	devfs_add_partition("nand0", SZ_128K, SZ_256K, PARTITION_FIXED, "self_raw");
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index b60407f..f9f0ddd 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -47,3 +49,6 @@ CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index d54e42c..d074bdc 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -28,6 +28,8 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -39,3 +41,6 @@ CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
-- 
1.7.7


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

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

* [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 07/14] at91sam9261ek/9g10ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support Jean-Christophe PLAGNIOL-VILLARD
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

if bp3 is pressed 5s during boot enable dfu otherwise usbserial

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9261ek/env/bin/init_board |   51 ++++++++++++++++++++++
 arch/arm/boards/at91sam9261ek/init.c             |   26 +++++++++++
 arch/arm/configs/at91sam9261ek_defconfig         |    6 ++-
 arch/arm/configs/at91sam9g10ek_defconfig         |    5 ++
 4 files changed, 87 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/boards/at91sam9261ek/env/bin/init_board

diff --git a/arch/arm/boards/at91sam9261ek/env/bin/init_board b/arch/arm/boards/at91sam9261ek/env/bin/init_board
new file mode 100644
index 0000000..a76a660
--- /dev/null
+++ b/arch/arm/boards/at91sam9261ek/env/bin/init_board
@@ -0,0 +1,51 @@
+#!/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"
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	autoboot_timeout=16
+	echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+	usbserial
+	exit
+fi
+
+echo "${button_name} pressed detected wait ${button_wait}s"
+timeout -s -a ${button_wait}
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+gpio_get_value ${dfu_button}
+if [ $? != 0 ]
+then
+	echo "${button_name} released, normal boot"
+	autoboot_timeout=16
+	echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+	usbserial
+	exit
+fi
+
+echo ""
+echo "Start DFU Mode"
+echo ""
+
+led ds7 1
+dfu ${dfu_config} -P ${product_id} -V ${vendor_id}
+led ds7 0
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 6327b59..2952a76 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -135,6 +135,30 @@ static void __init ek_add_device_dm9000(void)
 static void __init ek_add_device_dm9000(void) {}
 #endif /* CONFIG_DRIVER_NET_DM9K */
 
+#if defined(CONFIG_USB_GADGET_DRIVER_AT91)
+/*
+ * USB Device port
+ */
+static struct at91_udc_data __initdata ek_udc_data = {
+	.vbus_pin	= AT91_PIN_PB29,
+	.pullup_pin	= 0,
+};
+
+static void ek_add_device_udc(void)
+{
+	at91_add_device_udc(&ek_udc_data);
+}
+#else
+static void ek_add_device_udc(void) {}
+#endif
+
+static void __init ek_add_device_buttons(void)
+{
+	at91_set_gpio_input(AT91_PIN_PA27, 1);
+	at91_set_deglitch(AT91_PIN_PA27, 1);
+	export_env_ull("dfu_button", AT91_PIN_PA27);
+}
+
 #ifdef CONFIG_LED_GPIO
 struct gpio_led ek_leds[] = {
 	{
@@ -184,6 +208,8 @@ static int at91sam9261ek_devices_init(void)
 
 	ek_add_device_nand();
 	ek_add_device_dm9000();
+	ek_add_device_udc();
+	ek_add_device_buttons();
 	ek_device_add_leds();
 
 	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index f9f0ddd..3796e42 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -7,7 +7,8 @@ CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
-CONFIG_PARTITION=y
+# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
+CONFIG_CONSOLE_ACTIVATE_ALL=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
 CONFIG_CMD_EDIT=y
@@ -49,6 +50,9 @@ CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index d074bdc..0d677b0 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -6,6 +6,8 @@ CONFIG_GLOB=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_PARTITION=y
+# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
+CONFIG_CONSOLE_ACTIVATE_ALL=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
 CONFIG_CMD_EDIT=y
@@ -41,6 +43,9 @@ CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
-- 
1.7.7


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

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

* [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (6 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt Jean-Christophe PLAGNIOL-VILLARD
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9261ek/init.c     |   39 ++++++++++++++++++++++++++++++
 arch/arm/configs/at91sam9261ek_defconfig |    1 +
 arch/arm/configs/at91sam9g10ek_defconfig |    1 +
 3 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 2952a76..acc71f4 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -39,6 +39,8 @@
 #include <mach/at91sam9_smc.h>
 #include <mach/sam9_smc.h>
 #include <dm9000.h>
+#include <gpio_keys.h>
+#include <readkey.h>
 #include <led.h>
 
 static struct atmel_nand_data nand_pdata = {
@@ -152,11 +154,48 @@ static void ek_add_device_udc(void)
 static void ek_add_device_udc(void) {}
 #endif
 
+#ifdef CONFIG_KEYBOARD_GPIO
+struct gpio_keys_button keys[] = {
+	{
+		.code = KEY_UP,
+		.gpio = AT91_PIN_PA26,
+	}, {
+		.code = KEY_DOWN,
+		.gpio = AT91_PIN_PA25,
+	}, {
+		.code = KEY_ENTER,
+		.gpio = AT91_PIN_PA24,
+	},
+};
+
+struct gpio_keys_platform_data gk_pdata = {
+	.buttons = keys,
+	.nbuttons = ARRAY_SIZE(keys),
+};
+
+static void ek_add_device_keyboard_buttons(void)
+{
+	int i;
+
+	for (i = 0; i < gk_pdata.nbuttons; i++) {
+		/* user push button, pull up enabled */
+		keys[i].active_low = 1;
+		at91_set_GPIO_periph(keys[i].gpio, keys[i].active_low);
+		at91_set_deglitch(keys[i].gpio, 1);
+	}
+
+	add_gpio_keys_device(-1, &gk_pdata);
+}
+#else
+static void ek_add_device_keyboard_buttons(void) {}
+#endif
+
 static void __init ek_add_device_buttons(void)
 {
 	at91_set_gpio_input(AT91_PIN_PA27, 1);
 	at91_set_deglitch(AT91_PIN_PA27, 1);
 	export_env_ull("dfu_button", AT91_PIN_PA27);
+	ek_add_device_keyboard_buttons();
 }
 
 #ifdef CONFIG_LED_GPIO
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index 3796e42..c778f7d 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -56,3 +56,4 @@ CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
+CONFIG_KEYBOARD_GPIO=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index 0d677b0..aba7a90 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
+CONFIG_KEYBOARD_GPIO=y
-- 
1.7.7


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

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

* [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (7 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:17 ` [PATCH 11/14] at91sam9m10g45ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

 update fancy prompt to be the same as the other Atmel board
 use the same feature on 9g10ek and 9261ek

 - use tlsf
 - enable MMU
 - set max size to 256KiB
 - bootm: add initrd support
 - nand: drop non used hw ecc and oob device

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9261ek/env/config |    3 +--
 arch/arm/configs/at91sam9261ek_defconfig |   17 +++++++++++++----
 arch/arm/configs/at91sam9g10ek_defconfig |   28 ++++++++++++++++++++++------
 3 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boards/at91sam9261ek/env/config b/arch/arm/boards/at91sam9261ek/env/config
index 9be6331..de13010 100644
--- a/arch/arm/boards/at91sam9261ek/env/config
+++ b/arch/arm/boards/at91sam9261ek/env/config
@@ -33,5 +33,4 @@ autoboot_timeout=3
 bootargs="console=ttyS0,115200"
 
 # set a fancy prompt (if support is compiled in)
-PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m "
-
+PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index c778f7d..137226f 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -1,5 +1,11 @@
 CONFIG_ARCH_AT91SAM9261=y
+CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_EXPERIMENTAL=y
+CONFIG_MALLOC_TLSF=y
 CONFIG_PROMPT="9261-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -14,7 +20,6 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
@@ -26,15 +31,15 @@ CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MTEST=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_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
-CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
@@ -47,7 +52,11 @@ CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_DM9K=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
+# CONFIG_MTD_OOB_DEVICE is not set
 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
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index aba7a90..dbae4bd 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -1,11 +1,18 @@
 CONFIG_ARCH_AT91SAM9G10=y
+CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_EXPERIMENTAL=y
+CONFIG_MALLOC_TLSF=y
 CONFIG_PROMPT="9G10-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
-CONFIG_PARTITION=y
+CONFIG_MENU=y
 # CONFIG_CONSOLE_ACTIVATE_FIRST is not set
 CONFIG_CONSOLE_ACTIVATE_ALL=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
@@ -13,23 +20,26 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_PASSWD=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_CRC=y
 CONFIG_CMD_MTEST=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_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
-CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
@@ -37,10 +47,16 @@ CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_NET_PING=y
 CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_DM9K=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
+# CONFIG_MTD_OOB_DEVICE is not set
 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
-- 
1.7.7


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

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

* [PATCH 11/14] at91sam9m10g45ek: update partition layout
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (8 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:18 ` [PATCH 12/14] at91sam9m10g45ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:17 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

This will allow to boot from nand with the bootstrap.

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

diff --git a/arch/arm/boards/at91sam9m10g45ek/env/config b/arch/arm/boards/at91sam9m10g45ek/env/config
index 3dea724..9be6331 100644
--- a/arch/arm/boards/at91sam9m10g45ek/env/config
+++ b/arch/arm/boards/at91sam9m10g45ek/env/config
@@ -25,8 +25,8 @@ kernelimage=uImage
 #kernelimage=Image.lzo
 
 nand_device=atmel_nand
-nand_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nand=3
+nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=5
 
 autoboot_timeout=3
 
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index eff2769..1525795 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -33,6 +33,7 @@
 #include <io.h>
 #include <asm/hardware.h>
 #include <nand.h>
+#include <sizes.h>
 #include <linux/mtd/nand.h>
 #include <mach/at91_pmc.h>
 #include <mach/board.h>
@@ -141,10 +142,14 @@ static int at91sam9m10g45ek_devices_init(void)
 	at91_add_device_eth(&macb_pdata);
 	ek_add_device_mci();
 
-	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
+	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
+	dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
+	devfs_add_partition("nand0", SZ_128K, SZ_256K, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
+	devfs_add_partition("nand0", SZ_256K + SZ_128K, SZ_128K, PARTITION_FIXED, "env_raw");
 	dev_add_bb_dev("env_raw", "env0");
+	devfs_add_partition("nand0", SZ_512K, SZ_128K, PARTITION_FIXED, "env_raw1");
+	dev_add_bb_dev("env_raw1", "env1");
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_6 + 0x100));
 	armlinux_set_architecture(MACH_TYPE_AT91SAM9M10G45EK);
-- 
1.7.7


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

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

* [PATCH 12/14] at91sam9m10g45ek: add leds support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (9 preceding siblings ...)
  2012-03-12 11:17 ` [PATCH 11/14] at91sam9m10g45ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:18 ` [PATCH 13/14] at91sam9m10g45ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:18 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9m10g45ek/init.c     |   37 +++++++++++++++++++++++++++
 arch/arm/configs/at91sam9m10g45ek_defconfig |    5 +++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index 1525795..8371376 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -128,6 +128,42 @@ static void ek_add_device_mci(void)
 static void ek_add_device_mci(void) {}
 #endif
 
+#ifdef CONFIG_LED_GPIO
+struct gpio_led ek_leds[] = {
+	{
+		.gpio		= AT91_PIN_PD30,
+		.led = {
+			.name = "d8",
+		},
+	}, {
+		.active_low	= 1,
+		.gpio		= AT91_PIN_PD0,
+		.led = {
+			.name = "d6",
+		},
+	}, {
+		.active_low	= 1,
+		.gpio		= AT91_PIN_PD31,
+		.led = {
+			.name = "d7",
+		},
+	},
+};
+
+static void ek_device_add_leds(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ek_leds); i++) {
+		at91_set_gpio_output(ek_leds[i].gpio, ek_leds[i].active_low);
+		led_gpio_register(&ek_leds[i]);
+	}
+	led_set_trigger(LED_TRIGGER_HEARTBEAT, &ek_leds[0].led);
+}
+#else
+static void ek_device_add_leds(void) {}
+#endif
+
 static int at91sam9m10g45ek_mem_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
@@ -141,6 +177,7 @@ static int at91sam9m10g45ek_devices_init(void)
 	ek_add_device_nand();
 	at91_add_device_eth(&macb_pdata);
 	ek_add_device_mci();
+	ek_device_add_leds();
 
 	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
 	dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 548fe6c..03e6e4a 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -38,6 +38,8 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -57,5 +59,8 @@ CONFIG_UBI=y
 CONFIG_MCI=y
 CONFIG_MCI_WRITE=y
 CONFIG_MCI_ATMEL=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
-- 
1.7.7


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

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

* [PATCH 13/14] at91sam9m10g45ek: update defconfig
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (10 preceding siblings ...)
  2012-03-12 11:18 ` [PATCH 12/14] at91sam9m10g45ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-12 11:18 ` [PATCH 14/14] at91sam9260ek/9g20ek: " Jean-Christophe PLAGNIOL-VILLARD
  2012-03-13 13:37 ` [PATCH 01/14] macb: fix mmu support Sascha Hauer
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:18 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

 - use tslf
 - bootm: enable oftree and uimage support
 - enable mmu support
 - drop cfi support (no nor on the board)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/configs/at91sam9m10g45ek_defconfig |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 03e6e4a..b72e964 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -1,22 +1,25 @@
 CONFIG_ARCH_AT91SAM9G45=y
 CONFIG_MACH_AT91SAM9M10G45EK=y
+CONFIG_AEABI=y
+# CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_MALLOC_TLSF=y
 CONFIG_PROMPT="9M10G45-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
-CONFIG_PROMPT_HUSH_PS2="y"
+CONFIG_PROMPT_HUSH_PS2=">"
 CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
 CONFIG_PASSWD_SUM_SHA1=y
-CONFIG_PARTITION=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9m10g45ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
@@ -29,13 +32,19 @@ CONFIG_CMD_MEMINFO=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_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_UIMAGE=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LED=y
@@ -50,17 +59,19 @@ CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 CONFIG_DRIVER_NET_MACB=y
 # CONFIG_SPI is not set
-CONFIG_DRIVER_CFI=y
-CONFIG_CFI_BUFFER_WRITE=y
 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_MCI=y
-CONFIG_MCI_WRITE=y
+CONFIG_MCI_STARTUP=y
 CONFIG_MCI_ATMEL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
-- 
1.7.7


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

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

* [PATCH 14/14] at91sam9260ek/9g20ek: update defconfig
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (11 preceding siblings ...)
  2012-03-12 11:18 ` [PATCH 13/14] at91sam9m10g45ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-12 11:18 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-03-13 13:37 ` [PATCH 01/14] macb: fix mmu support Sascha Hauer
  13 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-12 11:18 UTC (permalink / raw)
  To: barebox, Nicolas Ferre; +Cc: Patrice VILCHEZ

 - enable MMU support
 - set max size to 256KiB

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/configs/at91sam9260ek_defconfig |    3 ++-
 arch/arm/configs/at91sam9g20ek_defconfig |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 613dd9f..c288d39 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -2,6 +2,8 @@ CONFIG_ARCH_AT91SAM9260=y
 CONFIG_AEABI=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
 CONFIG_EXPERIMENTAL=y
 CONFIG_PROMPT="9260-EK:"
 CONFIG_LONGHELP=y
@@ -17,7 +19,6 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig
index 18bd2ae..9473488 100644
--- a/arch/arm/configs/at91sam9g20ek_defconfig
+++ b/arch/arm/configs/at91sam9g20ek_defconfig
@@ -3,6 +3,8 @@ CONFIG_AT91_HAVE_2MMC=y
 CONFIG_AEABI=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
 CONFIG_EXPERIMENTAL=y
 CONFIG_PROMPT="9G20-EK:"
 CONFIG_LONGHELP=y
@@ -18,7 +20,6 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
-- 
1.7.7


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

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

* Re: [PATCH 01/14] macb: fix mmu support
  2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
                   ` (12 preceding siblings ...)
  2012-03-12 11:18 ` [PATCH 14/14] at91sam9260ek/9g20ek: " Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-13 13:37 ` Sascha Hauer
  2012-03-13 17:13   ` Jean-Christophe PLAGNIOL-VILLARD
  13 siblings, 1 reply; 16+ messages in thread
From: Sascha Hauer @ 2012-03-13 13:37 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: Patrice VILCHEZ, barebox, Nicolas Ferre

On Mon, Mar 12, 2012 at 12:17:49PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

We already have this one in master.

> ---
>  drivers/net/macb.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index ab0d1af..48492e5 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -50,6 +50,7 @@
>  #include <mach/board.h>
>  #include <linux/clk.h>
>  #include <linux/err.h>
> +#include <asm/mmu.h>
>  
>  #include "macb.h"
>  
> @@ -118,6 +119,7 @@ static int macb_send(struct eth_device *edev, void *packet,
>  	macb->tx_ring[0].ctrl = ctrl;
>  	macb->tx_ring[0].addr = (ulong)packet;
>  	barrier();
> +	dma_flush_range((ulong) packet, (ulong)packet + length);
>  	writel(MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART), macb->regs + MACB_NCR);
>  
>  	if (ctrl & TXBUF_UNDERRUN)
> @@ -430,9 +432,9 @@ static int macb_probe(struct device_d *dev)
>  	macb->miidev.parent = dev;
>  	macb->flags = pdata->flags;
>  
> -	macb->rx_buffer = xmalloc(CFG_MACB_RX_BUFFER_SIZE);
> -	macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
> -	macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
> +	macb->rx_buffer = dma_alloc_coherent(CFG_MACB_RX_BUFFER_SIZE);
> +	macb->rx_ring = dma_alloc_coherent(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
> +	macb->tx_ring = dma_alloc_coherent(sizeof(struct macb_dma_desc));
>  
>  	macb->regs = dev_request_mem_region(dev, 0);
>  
> -- 
> 1.7.7
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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] 16+ messages in thread

* Re: [PATCH 01/14] macb: fix mmu support
  2012-03-13 13:37 ` [PATCH 01/14] macb: fix mmu support Sascha Hauer
@ 2012-03-13 17:13   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 16+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-13 17:13 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Patrice VILCHEZ, barebox, Nicolas Ferre

On 14:37 Tue 13 Mar     , Sascha Hauer wrote:
> On Mon, Mar 12, 2012 at 12:17:49PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> We already have this one in master.
yeah it's the same anyway

Best Regards,
J.

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

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

end of thread, other threads:[~2012-03-13 17:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 03/14] at91sam9263ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 04/14] at91sam9263ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 05/14] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 07/14] at91sam9261ek/9g10ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 11/14] at91sam9m10g45ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 12/14] at91sam9m10g45ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 13/14] at91sam9m10g45ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 14/14] at91sam9260ek/9g20ek: " Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 13:37 ` [PATCH 01/14] macb: fix mmu support Sascha Hauer
2012-03-13 17:13   ` 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