Skip to contentSkip to conversation

AT91 update rm9200ek support and add sam9x5 support

PATCH Applied Jean-Christophe PLAGNIOL-VILLARD 2 participants 12 messages Mar 30, 2012 – Apr 2, 2012

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover AT91 update rm9200ek support and add sam9x5 support

HI,

this patch serie update the rm9200 support with

- USB OHCI
- USB Device (USB serial)
- leds

and add the basic support for the sam9x5 series

NB: the hardware ecc PMECC is not yet supported

please pull
The following changes since commit 79ea2bb5284cc4b5b28a3fa3fee6ede7304e4179:

at91rm9200ek: adjust kernel partition to be able to flash mainline kernel (2012-03-30 12:51:54 +0800)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git at91

for you to fetch changes up to bfd880f58915ae8098a6a0603e1003efc9d6feae:

AT91: at91sam9x5: add chip and board file (2012-03-30 13:00:23 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (9):
at91rm9200ek: add ohci support
at91rm9200ek: add leds support
at91rm9200ek: add usb serial support
at91rm9200ek: update defconfig
atmel_nand: add on_flash_btt option to enable bbt option
ARM: at91: add sam9x5 series CPU definition and cpu_is_xxx macro
ARM: at91: allow to pass the interface id to at91_add_device_eth
ARM: at91/pio: add new PIO3 features
AT91: at91sam9x5: add chip and board file

 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/at91rm9200ek/env/bin/init_board    |   11 +
 arch/arm/boards/at91rm9200ek/init.c                |   65 ++++-
 arch/arm/boards/at91sam9260ek/init.c               |    2 +-
 arch/arm/boards/at91sam9263ek/init.c               |    2 +-
 arch/arm/boards/at91sam9m10g45ek/init.c            |    2 +-
 arch/arm/boards/at91sam9x5ek/Makefile              |    1 +
 arch/arm/boards/at91sam9x5ek/config.h              |    6 +
 arch/arm/boards/at91sam9x5ek/env/config            |   38 +++
 arch/arm/boards/at91sam9x5ek/init.c                |  167 +++++++++++
 arch/arm/boards/dss11/init.c                       |    2 +-
 arch/arm/boards/mmccpu/init.c                      |    2 +-
 arch/arm/boards/pm9263/init.c                      |    2 +-
 arch/arm/boards/pm9g45/init.c                      |    2 +-
 arch/arm/boards/tny-a926x/init.c                   |    2 +-
 arch/arm/boards/usb-a926x/init.c                   |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig            |   18 +-
 arch/arm/configs/at91sam9x5ek_defconfig            |   69 +++++
 arch/arm/mach-at91/Kconfig                         |   25 ++
 arch/arm/mach-at91/Makefile                        |    1 +
 arch/arm/mach-at91/at91rm9200_devices.c            |    4 +-
 arch/arm/mach-at91/at91sam9260_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9263_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9g45_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9x5.c                    |  314 ++++++++++++++++++++
 arch/arm/mach-at91/at91sam9x5_devices.c            |  270 +++++++++++++++++
 arch/arm/mach-at91/clock.c                         |   82 ++++-
 arch/arm/mach-at91/gpio.c                          |  129 ++++++++-
 arch/arm/mach-at91/include/mach/at91_pio.h         |   25 ++
 arch/arm/mach-at91/include/mach/at91_pmc.h         |   68 ++++-
 arch/arm/mach-at91/include/mach/at91sam9x5.h       |  179 +++++++++++
 .../arm/mach-at91/include/mach/at91sam9x5_matrix.h |  139 +++++++++
 arch/arm/mach-at91/include/mach/board.h            |    2 +-
 arch/arm/mach-at91/include/mach/cpu.h              |   28 ++
 arch/arm/mach-at91/include/mach/gpio.h             |    6 +
 arch/arm/mach-at91/include/mach/hardware.h         |    2 +
 drivers/mtd/nand/atmel_nand.c                      |    6 +
 37 files changed, 1628 insertions(+), 58 deletions(-)
 create mode 100644 arch/arm/boards/at91rm9200ek/env/bin/init_board
 create mode 100644 arch/arm/boards/at91sam9x5ek/Makefile
 create mode 100644 arch/arm/boards/at91sam9x5ek/config.h
 create mode 100644 arch/arm/boards/at91sam9x5ek/env/config
 create mode 100644 arch/arm/boards/at91sam9x5ek/init.c
 create mode 100644 arch/arm/configs/at91sam9x5ek_defconfig
 create mode 100644 arch/arm/mach-at91/at91sam9x5.c
 create mode 100644 arch/arm/mach-at91/at91sam9x5_devices.c
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5.h
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH 1/9 at91rm9200ek: add ohci support

---
 arch/arm/boards/at91rm9200ek/init.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boards/at91rm9200ek/init.c +6 -0
index b2008a4..308c066 100644
@@ -47,6 +47,10 @@ static int at91rm9200ek_mem_init(void)
 }
 mem_initcall(at91rm9200ek_mem_init);
 
+static struct at91_usbh_data ek_usbh_data = {
+	.ports		= 2,
+};
+
 static int at91rm9200ek_devices_init(void)
 {
 	/*
@@ -58,6 +62,8 @@ static int at91rm9200ek_devices_init(void)
 	at91_add_device_eth(&ether_pdata);
 
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
+	/* USB Host */
+	at91_add_device_usbh_ohci(&ek_usbh_data);
 
 #if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD)
 	devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/9 at91rm9200ek: add leds support

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/boards/at91rm9200ek/init.c     |   38 +++++++++++++++++++++++++++++++
 arch/arm/configs/at91rm9200ek_defconfig |    5 ++++
 2 files changed, 43 insertions(+), 0 deletions(-)
arch/arm/boards/at91rm9200ek/init.c +38 -0
index 308c066..3a5da53 100644
@@ -51,6 +51,43 @@ static struct at91_usbh_data ek_usbh_data = {
 	.ports		= 2,
 };
 
+#ifdef CONFIG_LED_GPIO
+struct gpio_led ek_leds[] = {
+	{
+		.gpio		= AT91_PIN_PB0,
+		.active_low	= 1,
+		.led = {
+			.name = "green",
+		},
+	}, {
+		.gpio		= AT91_PIN_PB1,
+		.active_low	= 1,
+		.led = {
+			.name = "yellow",
+		},
+	}, {
+		.gpio		= AT91_PIN_PB2,
+		.active_low	= 1,
+		.led = {
+			.name = "red",
+		},
+	},
+};
+
+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 at91rm9200ek_devices_init(void)
 {
 	/*
@@ -64,6 +101,7 @@ static int at91rm9200ek_devices_init(void)
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
 	/* USB Host */
 	at91_add_device_usbh_ohci(&ek_usbh_data);
+	ek_device_add_leds();
 
 #if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD)
 	devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
arch/arm/configs/at91rm9200ek_defconfig +5 -0
index b514f3d..8802d5a 100644
@@ -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
@@ -51,6 +53,9 @@ CONFIG_DRIVER_CFI=y
 CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_UBI=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_FS_CRAMFS=y
 CONFIG_SHA1=y
 CONFIG_SHA256=y
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/9 at91rm9200ek: add usb serial support

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/boards/at91rm9200ek/env/bin/init_board |   11 +++++++++++
 arch/arm/boards/at91rm9200ek/init.c             |   19 +++++++++++++++++++
 arch/arm/configs/at91rm9200ek_defconfig         |    5 +++++
 3 files changed, 35 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boards/at91rm9200ek/env/bin/init_board
arch/arm/boards/at91rm9200ek/env/bin/init_board new file +11 -0
new file mode 100644
index 0000000..0d40eb4
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ $at91_udc0.vbus != 1 ]
+then
+	echo "No USB Device cable plugged, normal boot"
+	exit
+fi
+
+autoboot_timeout=16
+echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s"
+usbserial
arch/arm/boards/at91rm9200ek/init.c +19 -0
index 3a5da53..9a46ac6 100644
@@ -88,6 +88,24 @@ 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_PD4,
+	.pullup_pin	= AT91_PIN_PD5,
+};
+
+static void ek_add_device_udc(void)
+{
+	at91_add_device_udc(&ek_udc_data);
+	at91_set_multi_drive(ek_udc_data.pullup_pin, 1);	/* pullup_pin is connected to reset */
+}
+#else
+static void ek_add_device_udc(void) {}
+#endif
+
 static int at91rm9200ek_devices_init(void)
 {
 	/*
@@ -102,6 +120,7 @@ static int at91rm9200ek_devices_init(void)
 	/* USB Host */
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	ek_device_add_leds();
+	ek_add_device_udc();
 
 #if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD)
 	devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self");
arch/arm/configs/at91rm9200ek_defconfig +5 -0
index 8802d5a..d81f1ff 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_EXPERIMENTAL=y
 CONFIG_PROMPT="9200-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -7,6 +8,8 @@ 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/at91rm9200ek/env"
 CONFIG_CMD_EDIT=y
@@ -53,6 +56,8 @@ CONFIG_DRIVER_CFI=y
 CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_UBI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_TRIGGERS=y
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 4/9 at91rm9200ek: update defconfig

In reply to Jean-Christophe PLAGNIOL-VILLARD

- enable MMU
- drop MTD as we do not have nand
- use tlsf
- bootm enable initrd

---
 arch/arm/configs/at91rm9200ek_defconfig |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/configs/at91rm9200ek_defconfig +4 -4
index d81f1ff..1c56787 100644
@@ -1,5 +1,8 @@
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
 CONFIG_EXPERIMENTAL=y
+CONFIG_MALLOC_TLSF=y
 CONFIG_PROMPT="9200-EK:"
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
@@ -7,7 +10,6 @@ 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
@@ -15,7 +17,6 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91rm9200ek/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
@@ -31,6 +32,7 @@ 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_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
@@ -54,8 +56,6 @@ CONFIG_DRIVER_CFI=y
 # CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
 # CONFIG_DRIVER_CFI_BANK_WIDTH_4 is not set
 CONFIG_CFI_BUFFER_WRITE=y
-CONFIG_MTD=y
-CONFIG_UBI=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_SERIAL=y
 CONFIG_LED=y
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 5/9 atmel_nand: add on_flash_btt option to enable bbt option

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 drivers/mtd/nand/atmel_nand.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/mtd/nand/atmel_nand.c +6 -0
index 0533759..96624a1 100644
@@ -407,6 +407,12 @@ static int __init atmel_nand_probe(struct device_d *dev)
 		}
 	}
 
+	if (host->board->on_flash_bbt) {
+		printk(KERN_INFO "atmel_nand: Use On Flash BBT\n");
+		nand_chip->options |= NAND_USE_FLASH_BBT;
+	}
+
+
 	/* first scan to find the device and get the page size */
 	if (nand_scan_ident(mtd, 1)) {
 		res = -ENXIO;
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 6/9 ARM: at91: add sam9x5 series CPU definition and cpu_is_xxx macro

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/mach-at91/include/mach/cpu.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
arch/arm/mach-at91/include/mach/cpu.h +28 -0
index 3bef931..0700f21 100644
@@ -27,6 +27,7 @@
 #define ARCH_ID_AT91SAM9G45	0x819b05a0
 #define ARCH_ID_AT91SAM9G45MRL	0x819b05a2	/* aka 9G45-ES2 & non ES lots */
 #define ARCH_ID_AT91SAM9G45ES	0x819b05a1	/* 9G45-ES (Engineering Sample) */
+#define ARCH_ID_AT91SAM9X5	0x819a05a0
 #define ARCH_ID_AT91CAP9	0x039A03A0
 
 #define ARCH_ID_AT91SAM9XE128	0x329973a0
@@ -55,6 +56,12 @@ static inline unsigned long at91_cpu_fully_identify(void)
 #define ARCH_EXID_AT91SAM9G46	0x00000003
 #define ARCH_EXID_AT91SAM9G45	0x00000004
 
+#define ARCH_EXID_AT91SAM9G15	0x00000000
+#define ARCH_EXID_AT91SAM9G35	0x00000001
+#define ARCH_EXID_AT91SAM9X35	0x00000002
+#define ARCH_EXID_AT91SAM9G25	0x00000003
+#define ARCH_EXID_AT91SAM9X25	0x00000004
+
 static inline unsigned long at91_exid_identify(void)
 {
 	return at91_sys_read(AT91_DBGU_EXID);
@@ -143,6 +150,27 @@ static inline unsigned long at91cap9_rev_identify(void)
 #define cpu_is_at91sam9m11()	(0)
 #endif
 
+#ifdef CONFIG_ARCH_AT91SAM9X5
+#define cpu_is_at91sam9x5()	(at91_cpu_identify() == ARCH_ID_AT91SAM9X5)
+#define cpu_is_at91sam9g15()	(cpu_is_at91sam9x5() && \
+				(at91_exid_identify() == ARCH_EXID_AT91SAM9G15))
+#define cpu_is_at91sam9g35()	(cpu_is_at91sam9x5() && \
+				(at91_exid_identify() == ARCH_EXID_AT91SAM9G35))
+#define cpu_is_at91sam9x35()	(cpu_is_at91sam9x5() && \
+				(at91_exid_identify() == ARCH_EXID_AT91SAM9X35))
+#define cpu_is_at91sam9g25()	(cpu_is_at91sam9x5() && \
+				(at91_exid_identify() == ARCH_EXID_AT91SAM9G25))
+#define cpu_is_at91sam9x25()	(cpu_is_at91sam9x5() && \
+				(at91_exid_identify() == ARCH_EXID_AT91SAM9X25))
+#else
+#define cpu_is_at91sam9x5()	(0)
+#define cpu_is_at91sam9g15()	(0)
+#define cpu_is_at91sam9g35()	(0)
+#define cpu_is_at91sam9x35()	(0)
+#define cpu_is_at91sam9g25()	(0)
+#define cpu_is_at91sam9x25()	(0)
+#endif
+
 #ifdef CONFIG_ARCH_AT91CAP9
 #define cpu_is_at91cap9()	(at91_cpu_identify() == ARCH_ID_AT91CAP9)
 #define cpu_is_at91cap9_revB()	(at91cap9_rev_identify() == ARCH_REVISION_CAP9_B)
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

PATCH 7/9 ARM: at91: allow to pass the interface id to at91_add_device_eth

In reply to Jean-Christophe PLAGNIOL-VILLARD

On the sam9x5 series we now support 1 or 2 macb.

---
 arch/arm/boards/at91rm9200ek/init.c      |    2 +-
 arch/arm/boards/at91sam9260ek/init.c     |    2 +-
 arch/arm/boards/at91sam9263ek/init.c     |    2 +-
 arch/arm/boards/at91sam9m10g45ek/init.c  |    2 +-
 arch/arm/boards/dss11/init.c             |    2 +-
 arch/arm/boards/mmccpu/init.c            |    2 +-
 arch/arm/boards/pm9263/init.c            |    2 +-
 arch/arm/boards/pm9g45/init.c            |    2 +-
 arch/arm/boards/tny-a926x/init.c         |    2 +-
 arch/arm/boards/usb-a926x/init.c         |    2 +-
 arch/arm/mach-at91/at91rm9200_devices.c  |    4 ++--
 arch/arm/mach-at91/at91sam9260_devices.c |    4 ++--
 arch/arm/mach-at91/at91sam9263_devices.c |    4 ++--
 arch/arm/mach-at91/at91sam9g45_devices.c |    4 ++--
 arch/arm/mach-at91/include/mach/board.h  |    2 +-
 15 files changed, 19 insertions(+), 19 deletions(-)
arch/arm/boards/at91rm9200ek/init.c +1 -1
index 9a46ac6..6911447 100644
@@ -114,7 +114,7 @@ static int at91rm9200ek_devices_init(void)
 	 */
 	at91_set_gpio_output(AT91_PIN_PA23, 1);
 
-	at91_add_device_eth(&ether_pdata);
+	at91_add_device_eth(0, &ether_pdata);
 
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
 	/* USB Host */
arch/arm/boards/at91sam9260ek/init.c +1 -1
index 03abc0e..a1d3750 100644
@@ -254,7 +254,7 @@ static int at91sam9260ek_devices_init(void)
 {
 	ek_add_device_nand();
 	at91sam9260ek_phy_reset();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	at91_add_device_udc(&ek_udc_data);
 	ek_usb_add_device_mci();
arch/arm/boards/at91sam9263ek/init.c +1 -1
index 4a8d167..33b7955 100644
@@ -183,7 +183,7 @@ static int at91sam9263ek_devices_init(void)
 	at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
 
 	ek_add_device_nand();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0);
 	ek_add_device_mci();
 	ek_device_add_leds();
arch/arm/boards/at91sam9m10g45ek/init.c +1 -1
index 8371376..6011bad 100644
@@ -175,7 +175,7 @@ mem_initcall(at91sam9m10g45ek_mem_init);
 static int at91sam9m10g45ek_devices_init(void)
 {
 	ek_add_device_nand();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	ek_add_device_mci();
 	ek_device_add_leds();
 
arch/arm/boards/dss11/init.c +1 -1
index 722c0f6..950cf76 100644
@@ -131,7 +131,7 @@ static int dss11_devices_init(void)
 {
 	dss11_add_device_nand();
 	dss11_phy_reset();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	at91_add_device_mci(0, &dss11_mci_data);
 	at91_add_device_usbh_ohci(&dss11_usbh_data);
 
arch/arm/boards/mmccpu/init.c +1 -1
index 51dbf24..9d4d496 100644
@@ -60,7 +60,7 @@ static int mmccpu_devices_init(void)
 	at91_set_gpio_output(AT91_PIN_PB27, 1);
 	at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
 
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
 
 	devfs_add_partition("nor0", 0x00000, 256 * 1024, PARTITION_FIXED, "self0");
arch/arm/boards/pm9263/init.c +1 -1
index 92d7e9f..499ee46 100644
@@ -108,7 +108,7 @@ static int pm9263_devices_init(void)
 	at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
 
 	pm_add_device_nand();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	add_cfi_flash_device(0, AT91_CHIPSELECT_0, 4 * 1024 * 1024, 0);
 
 	devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self0");
arch/arm/boards/pm9g45/init.c +1 -1
index 4d3078e..9b22276 100644
@@ -138,7 +138,7 @@ static int pm9g45_devices_init(void)
 	pm_add_device_nand();
 	pm9g45_add_device_mci();
 	pm9g45_phy_init();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	pm9g45_add_device_usbh();
 
 	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
arch/arm/boards/tny-a926x/init.c +1 -1
index ad77f7b..2065eae 100644
@@ -156,7 +156,7 @@ static void tny_a9260_phy_reset(void)
 static void __init ek_add_device_macb(void)
 {
 	tny_a9260_phy_reset();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 }
 #else
 static void __init ek_add_device_macb(void) {}
arch/arm/boards/usb-a926x/init.c +1 -1
index af025b4..57609b1 100644
@@ -320,7 +320,7 @@ static int usb_a9260_devices_init(void)
 {
 	usb_a9260_add_device_nand();
 	usb_a9260_phy_reset();
-	at91_add_device_eth(&macb_pdata);
+	at91_add_device_eth(0, &macb_pdata);
 	usb_a9260_add_device_mci();
 	at91_add_device_usbh_ohci(&ek_usbh_data);
 	ek_add_device_udc();
arch/arm/mach-at91/at91rm9200_devices.c +2 -2
index bda73e6..c380c7d 100644
@@ -72,7 +72,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
  * -------------------------------------------------------------------- */
 
 #if defined(CONFIG_DRIVER_NET_AT91_ETHER)
-void __init at91_add_device_eth(struct at91_ether_platform_data *data)
+void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data)
 {
 	if (!data)
 		return;
@@ -104,7 +104,7 @@ void __init at91_add_device_eth(struct at91_ether_platform_data *data)
 			   IORESOURCE_MEM, data);
 }
 #else
-void __init at91_add_device_eth(struct at91_ether_platform_data *data) {}
+void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
 #endif
 
 /* --------------------------------------------------------------------
arch/arm/mach-at91/at91sam9260_devices.c +2 -2
index 3bdcd4f..23da8c1 100644
@@ -67,7 +67,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
 #endif
 
 #if defined(CONFIG_DRIVER_NET_MACB)
-void at91_add_device_eth(struct at91_ether_platform_data *data)
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
 {
 	if (!data)
 		return;
@@ -104,7 +104,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
 			   IORESOURCE_MEM, data);
 }
 #else
-void at91_add_device_eth(struct at91_ether_platform_data *data) {}
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
 #endif
 
 #if defined(CONFIG_NAND_ATMEL)
arch/arm/mach-at91/at91sam9263_devices.c +2 -2
index 87a1726..12d6a24 100644
@@ -75,7 +75,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
 #endif
 
 #if defined(CONFIG_DRIVER_NET_MACB)
-void at91_add_device_eth(struct at91_ether_platform_data *data)
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
 {
 	if (!data)
 		return;
@@ -106,7 +106,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
 			   IORESOURCE_MEM, data);
 }
 #else
-void at91_add_device_eth(struct at91_ether_platform_data *data) {}
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
 #endif
 
 #if defined(CONFIG_NAND_ATMEL)
arch/arm/mach-at91/at91sam9g45_devices.c +2 -2
index 6931a3f..05b197c 100644
@@ -54,7 +54,7 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data) {}
 #endif
 
 #if defined(CONFIG_DRIVER_NET_MACB)
-void at91_add_device_eth(struct at91_ether_platform_data *data)
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
 {
 	if (!data)
 		return;
@@ -86,7 +86,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
 			   IORESOURCE_MEM, data);
 }
 #else
-void at91_add_device_eth(struct at91_ether_platform_data *data) {}
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
 #endif
 
 #if defined(CONFIG_NAND_ATMEL)
arch/arm/mach-at91/include/mach/board.h +1 -1
index 9f1abc1..f45bad6 100644
@@ -70,7 +70,7 @@ struct at91_ether_platform_data {
 	int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
 };
 
-void at91_add_device_eth(struct at91_ether_platform_data *data);
+void at91_add_device_eth(int id, struct at91_ether_platform_data *data);
 
 /* SDRAM */
 void at91_add_device_sdram(u32 size);
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 8/9 ARM: at91/pio: add new PIO3 features

In reply to Jean-Christophe PLAGNIOL-VILLARD

This patch adds the support for new PIO controller found on some at91sam SOCs.
- more peripheral multiplexing
- more features to configure on a PIO (pull-down, Schmitt trigger, debouncer)

---
 arch/arm/mach-at91/gpio.c                  |  129 +++++++++++++++++++++++++++-
 arch/arm/mach-at91/include/mach/at91_pio.h |   25 ++++++
 arch/arm/mach-at91/include/mach/gpio.h     |    6 ++
 3 files changed, 158 insertions(+), 2 deletions(-)
arch/arm/mach-at91/gpio.c +127 -2
index 06da5af..ef2d20e 100644
@@ -26,11 +26,20 @@
 #include <errno.h>
 #include <io.h>
 #include <mach/gpio.h>
+#include <mach/io.h>
+#include <mach/cpu.h>
 #include <gpio.h>
 
 static int gpio_banks;
+static int cpu_has_pio3;
 static struct at91_gpio_bank *gpio;
 
+/*
+ * Functionnality can change with newer chips
+ */
+
+
+
 static inline void __iomem *pin_to_controller(unsigned pin)
 {
 	pin -= PIN_BASE;
@@ -77,7 +86,14 @@ int at91_set_A_periph(unsigned pin, int use_pullup)
 
 	__raw_writel(mask, pio + PIO_IDR);
 	__raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
-	__raw_writel(mask, pio + PIO_ASR);
+	if (cpu_has_pio3) {
+		__raw_writel(__raw_readl(pio + PIO_ABCDSR1) & ~mask,
+							pio + PIO_ABCDSR1);
+		__raw_writel(__raw_readl(pio + PIO_ABCDSR2) & ~mask,
+							pio + PIO_ABCDSR2);
+	} else {
+		__raw_writel(mask, pio + PIO_ASR);
+	}
 	__raw_writel(mask, pio + PIO_PDR);
 	return 0;
 }
@@ -96,13 +112,60 @@ int at91_set_B_periph(unsigned pin, int use_pullup)
 
 	__raw_writel(mask, pio + PIO_IDR);
 	__raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
-	__raw_writel(mask, pio + PIO_BSR);
+	if (cpu_has_pio3) {
+		__raw_writel(__raw_readl(pio + PIO_ABCDSR1) | mask,
+							pio + PIO_ABCDSR1);
+		__raw_writel(__raw_readl(pio + PIO_ABCDSR2) & ~mask,
+							pio + PIO_ABCDSR2);
+	} else {
+		__raw_writel(mask, pio + PIO_BSR);
+	}
 	__raw_writel(mask, pio + PIO_PDR);
 	return 0;
 }
 EXPORT_SYMBOL(at91_set_B_periph);
 
 /*
+ * mux the pin to the "C" internal peripheral role.
+ */
+int at91_set_C_periph(unsigned pin, int use_pullup)
+{
+	void __iomem	*pio = pin_to_controller(pin);
+	unsigned	mask = pin_to_mask(pin);
+
+	if (!pio || !cpu_has_pio3)
+		return -EINVAL;
+
+	__raw_writel(mask, pio + PIO_IDR);
+	__raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
+	__raw_writel(__raw_readl(pio + PIO_ABCDSR1) & ~mask, pio + PIO_ABCDSR1);
+	__raw_writel(__raw_readl(pio + PIO_ABCDSR2) | mask, pio + PIO_ABCDSR2);
+	__raw_writel(mask, pio + PIO_PDR);
+	return 0;
+}
+EXPORT_SYMBOL(at91_set_C_periph);
+
+/*
+ * mux the pin to the "C" internal peripheral role.
+ */
+int at91_set_D_periph(unsigned pin, int use_pullup)
+{
+	void __iomem	*pio = pin_to_controller(pin);
+	unsigned	mask = pin_to_mask(pin);
+
+	if (!pio || !cpu_has_pio3)
+		return -EINVAL;
+
+	__raw_writel(mask, pio + PIO_IDR);
+	__raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
+	__raw_writel(__raw_readl(pio + PIO_ABCDSR1) | mask, pio + PIO_ABCDSR1);
+	__raw_writel(__raw_readl(pio + PIO_ABCDSR2) | mask, pio + PIO_ABCDSR2);
+	__raw_writel(mask, pio + PIO_PDR);
+	return 0;
+}
+EXPORT_SYMBOL(at91_set_D_periph);
+
+/*
  * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
  * configure it for an input.
  */
@@ -153,12 +216,37 @@ int at91_set_deglitch(unsigned pin, int is_on)
 
 	if (!pio)
 		return -EINVAL;
+
+	if (cpu_has_pio3 && is_on)
+		__raw_writel(mask, pio + PIO_IFSCDR);
 	__raw_writel(mask, pio + (is_on ? PIO_IFER : PIO_IFDR));
 	return 0;
 }
 EXPORT_SYMBOL(at91_set_deglitch);
 
 /*
+ * enable/disable the debounce filter;
+ */
+int at91_set_debounce(unsigned pin, int is_on, int div)
+{
+	void __iomem	*pio = pin_to_controller(pin);
+	unsigned	mask = pin_to_mask(pin);
+
+	if (!pio || !cpu_has_pio3)
+		return -EINVAL;
+
+	if (is_on) {
+		__raw_writel(mask, pio + PIO_IFSCER);
+		__raw_writel(div & PIO_SCDR_DIV, pio + PIO_SCDR);
+		__raw_writel(mask, pio + PIO_IFER);
+	} else {
+		__raw_writel(mask, pio + PIO_IFDR);
+	}
+	return 0;
+}
+EXPORT_SYMBOL(at91_set_debounce);
+
+/*
  * enable/disable the multi-driver; This is only valid for output and
  * allows the output pin to run as an open collector output.
  */
@@ -176,6 +264,41 @@ int at91_set_multi_drive(unsigned pin, int is_on)
 EXPORT_SYMBOL(at91_set_multi_drive);
 
 /*
+ * enable/disable the pull-down.
+ * If pull-up already enabled while calling the function, we disable it.
+ */
+int at91_set_pulldown(unsigned pin, int is_on)
+{
+	void __iomem	*pio = pin_to_controller(pin);
+	unsigned	mask = pin_to_mask(pin);
+
+	if (!pio || !cpu_has_pio3)
+		return -EINVAL;
+
+	/* Disable pull-up anyway */
+	__raw_writel(mask, pio + PIO_PUDR);
+	__raw_writel(mask, pio + (is_on ? PIO_PPDER : PIO_PPDDR));
+	return 0;
+}
+EXPORT_SYMBOL(at91_set_pulldown);
+
+/*
+ * disable Schmitt trigger
+ */
+int at91_disable_schmitt_trig(unsigned pin)
+{
+	void __iomem	*pio = pin_to_controller(pin);
+	unsigned	mask = pin_to_mask(pin);
+
+	if (!pio || !cpu_has_pio3)
+		return -EINVAL;
+
+	__raw_writel(__raw_readl(pio + PIO_SCHMITT) | mask, pio + PIO_SCHMITT);
+	return 0;
+}
+EXPORT_SYMBOL(at91_disable_schmitt_trig);
+
+/*
  * assuming the pin is muxed as a gpio output, set its value.
  */
 int at91_set_gpio_value(unsigned pin, int value)
@@ -245,5 +368,7 @@ int at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
 		clk_enable(data->clock);
 	}
 
+	cpu_has_pio3 = cpu_is_at91sam9x5();
+
 	return 0;
 }
arch/arm/mach-at91/include/mach/at91_pio.h +25 -0
index f6ce1f9..2d80dfc 100644
@@ -40,10 +40,35 @@
 #define PIO_PUER	0x64	/* Pull-up Enable Register */
 #define PIO_PUSR	0x68	/* Pull-up Status Register */
 #define PIO_ASR		0x70	/* Peripheral A Select Register */
+#define PIO_ABCDSR1	0x70	/* Peripheral ABCD Select Register 1 [some sam9 only] */
 #define PIO_BSR		0x74	/* Peripheral B Select Register */
+#define PIO_ABCDSR2	0x74	/* Peripheral ABCD Select Register 2 [some sam9 only] */
 #define PIO_ABSR	0x78	/* AB Status Register */
+#define PIO_IFSCDR	0x80	/* Input Filter Slow Clock Disable Register */
+#define PIO_IFSCER	0x84	/* Input Filter Slow Clock Enable Register */
+#define PIO_IFSCSR	0x88	/* Input Filter Slow Clock Status Register */
+#define PIO_SCDR	0x8c	/* Slow Clock Divider Debouncing Register */
+#define		PIO_SCDR_DIV	(0x3fff <<  0)		/* Slow Clock Divider Mask */
+#define PIO_PPDDR	0x90	/* Pad Pull-down Disable Register */
+#define PIO_PPDER	0x94	/* Pad Pull-down Enable Register */
+#define PIO_PPDSR	0x98	/* Pad Pull-down Status Register */
 #define PIO_OWER	0xa0	/* Output Write Enable Register */
 #define PIO_OWDR	0xa4	/* Output Write Disable Register */
 #define PIO_OWSR	0xa8	/* Output Write Status Register */
+#define PIO_AIMER	0xb0	/* Additional Interrupt Modes Enable Register */
+#define PIO_AIMDR	0xb4	/* Additional Interrupt Modes Disable Register */
+#define PIO_AIMMR	0xb8	/* Additional Interrupt Modes Mask Register */
+#define PIO_ESR		0xc0	/* Edge Select Register */
+#define PIO_LSR		0xc4	/* Level Select Register */
+#define PIO_ELSR	0xc8	/* Edge/Level Status Register */
+#define PIO_FELLSR	0xd0	/* Falling Edge/Low Level Select Register */
+#define PIO_REHLSR	0xd4	/* Rising Edge/ High Level Select Register */
+#define PIO_FRLHSR	0xd8	/* Fall/Rise - Low/High Status Register */
+#define PIO_SCHMITT	0x100	/* Schmitt Trigger Register */
+
+#define ABCDSR_PERIPH_A	0x0
+#define ABCDSR_PERIPH_B	0x1
+#define ABCDSR_PERIPH_C	0x2
+#define ABCDSR_PERIPH_D	0x3
 
 #endif
arch/arm/mach-at91/include/mach/gpio.h +6 -0
index 95a4bd4..0f93f8d 100644
@@ -230,6 +230,12 @@ int at91_set_multi_drive(unsigned pin, int is_on);
  */
 int at91_set_gpio_value(unsigned pin, int value);
 
+extern int at91_set_C_periph(unsigned pin, int use_pullup);
+extern int at91_set_D_periph(unsigned pin, int use_pullup);
+extern int at91_set_debounce(unsigned pin, int is_on, int div);
+extern int at91_set_pulldown(unsigned pin, int is_on);
+extern int at91_disable_schmitt_trig(unsigned pin);
+
 /*
  * read the pin's value (works even if it's not muxed as a gpio).
  */
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH 9/9 AT91: at91sam9x5: add chip and board file

In reply to Jean-Christophe PLAGNIOL-VILLARD

Fow now use Soft ECC for nand util we add the PMECC.

On-chip and board related peripherals definitions. Basic implementation for VB board.

---
 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/at91sam9x5ek/Makefile              |    1 +
 arch/arm/boards/at91sam9x5ek/config.h              |    6 +
 arch/arm/boards/at91sam9x5ek/env/config            |   38 +++
 arch/arm/boards/at91sam9x5ek/init.c                |  167 +++++++++++
 arch/arm/configs/at91sam9x5ek_defconfig            |   69 +++++
 arch/arm/mach-at91/Kconfig                         |   25 ++
 arch/arm/mach-at91/Makefile                        |    1 +
 arch/arm/mach-at91/at91sam9x5.c                    |  314 ++++++++++++++++++++
 arch/arm/mach-at91/at91sam9x5_devices.c            |  270 +++++++++++++++++
 arch/arm/mach-at91/clock.c                         |   82 ++++-
 arch/arm/mach-at91/include/mach/at91_pmc.h         |   68 ++++-
 arch/arm/mach-at91/include/mach/at91sam9x5.h       |  179 +++++++++++
 .../arm/mach-at91/include/mach/at91sam9x5_matrix.h |  139 +++++++++
 arch/arm/mach-at91/include/mach/hardware.h         |    2 +
 15 files changed, 1329 insertions(+), 33 deletions(-)
 create mode 100644 arch/arm/boards/at91sam9x5ek/Makefile
 create mode 100644 arch/arm/boards/at91sam9x5ek/config.h
 create mode 100644 arch/arm/boards/at91sam9x5ek/env/config
 create mode 100644 arch/arm/boards/at91sam9x5ek/init.c
 create mode 100644 arch/arm/configs/at91sam9x5ek_defconfig
 create mode 100644 arch/arm/mach-at91/at91sam9x5.c
 create mode 100644 arch/arm/mach-at91/at91sam9x5_devices.c
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5.h
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
arch/arm/Makefile +1 -0
index bf46ca3..5299486 100644
@@ -72,6 +72,7 @@ board-$(CONFIG_MACH_AT91SAM9261EK)		:= at91sam9261ek
 board-$(CONFIG_MACH_AT91SAM9263EK)		:= at91sam9263ek
 board-$(CONFIG_MACH_AT91SAM9G10EK)		:= at91sam9261ek
 board-$(CONFIG_MACH_AT91SAM9G20EK)		:= at91sam9260ek
+board-$(CONFIG_MACH_AT91SAM9X5EK)		:= at91sam9x5ek
 board-$(CONFIG_MACH_AT91SAM9M10G45EK)		:= at91sam9m10g45ek
 board-$(CONFIG_MACH_DSS11)			:= dss11
 board-$(CONFIG_MACH_EDB9301)			:= edb93xx
arch/arm/boards/at91sam9x5ek/Makefile new file +1 -0
new file mode 100644
index 0000000..eb072c0
@@ -0,0 +1 @@
+obj-y += init.o
arch/arm/boards/at91sam9x5ek/config.h new file +6 -0
new file mode 100644
index 0000000..d971810
@@ -0,0 +1,6 @@
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define AT91_MAIN_CLOCK		12000000	/* 12 MHz crystal */
+
+#endif	/* __CONFIG_H */
arch/arm/boards/at91sam9x5ek/env/config new file +38 -0
new file mode 100644
index 0000000..cc72867
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# use 'dhcp' to do dhcp in barebox and in kernel
+# use 'none' if you want to skip kernel ip autoconfiguration
+ip=dhcp-barebox
+dhcp_vendor_id=barebox-at91sam9x5ek
+
+# or set your networking parameters here
+#eth0.ipaddr=a.b.c.d
+#eth0.netmask=a.b.c.d
+#eth0.gateway=a.b.c.d
+#eth0.serverip=a.b.c.d
+
+# can be either 'nfs', 'tftp', 'nor' or 'nand'
+kernel_loc=nfs
+# can be either 'net', 'nor', 'nand' or 'initrd'
+rootfs_loc=net
+
+# can be either 'jffs2' or 'ubifs'
+rootfs_type=ubifs
+rootfsimage=root.$rootfs_type
+
+# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
+kernelimage=zImage
+#kernelimage=uImage
+#kernelimage=Image
+#kernelimage=Image.lzo
+
+nand_device=atmel_nand
+nand_parts="256k(at91bootstrap),384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),1152k(free),6M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=5
+
+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\n# "
arch/arm/boards/at91sam9x5ek/init.c new file +167 -0

167 lines not on this page · raw message

arch/arm/configs/at91sam9x5ek_defconfig new file +69 -0

69 lines not on this page · raw message

arch/arm/mach-at91/Kconfig +25 -0
index d2bb7bc..989d3d8 100644
@@ -13,6 +13,7 @@ config BOARDINFO
 	default "Atmel at91sam9g10-ek" if MACH_AT91SAM9G10EK
 	default "Atmel at91sam9g20-ek" if MACH_AT91SAM9G20EK
 	default "Atmel at91sam9m10g45-ek" if MACH_AT91SAM9M10G45EK
+	default "Atmel at91sam9x5-ek" if MACH_AT91SAM9X5EK
 	default "Bucyrus MMC-CPU" if MACH_MMCCPU
 	default "Calao USB-A9260" if MACH_USB_A9260
 	default "Calao USB-A9263" if MACH_USB_A9263
@@ -81,6 +82,12 @@ config ARCH_AT91SAM9G45
 	select HAS_MACB
 	select AT91SAM9G45_RESET
 
+config ARCH_AT91SAM9X5
+	bool "AT91SAM9X5"
+	select CPU_ARM926T
+	select HAS_MACB
+	select AT91SAM9G45_RESET
+
 endchoice
 
 config ARCH_BAREBOX_MAX_BARE_INIT_SIZE
@@ -91,6 +98,7 @@ config ARCH_BAREBOX_MAX_BARE_INIT_SIZE
 	default 0x4000 if ARCH_AT91SAM9G20
 	default 0x3000 if ARCH_AT91SAM9G10
 	default 0xF000 if ARCH_AT91SAM9G45
+	default 0x6000 if ARCH_AT91SAM9X5
 	default 0xffffffff
 
 config SUPPORT_CALAO_DAB_MMX
@@ -294,6 +302,23 @@ endif
 
 # ----------------------------------------------------------
 
+if ARCH_AT91SAM9X5
+
+choice
+	prompt "AT91SAM9x5 Series Board Type"
+
+config MACH_AT91SAM9X5EK
+	bool "Atmel AT91SAM9x5 Series Evaluation Kit"
+	help
+	  Select this if you re using Atmel's AT91SAM9x5-EK Evaluation Kit.
+	  Supported chips are sam9g15, sam9g25, sam9x25, sam9g35 and sam9x35.
+
+endchoice
+
+endif
+
+# ----------------------------------------------------------
+
 comment "AT91 Board Options"
 
 config MTD_NAND_ATMEL_BUSWIDTH_16
arch/arm/mach-at91/Makefile +1 -0
index 219f75c..491c454 100644
@@ -15,3 +15,4 @@ obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_d
 obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
 obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
 obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
+obj-$(CONFIG_ARCH_AT91SAM9X5)	+= at91sam9x5.o at91sam926x_time.o at91sam9x5_devices.o sam9_smc.o
arch/arm/mach-at91/at91sam9x5.c new file +314 -0

314 lines not on this page · raw message

arch/arm/mach-at91/at91sam9x5_devices.c new file +270 -0

270 lines not on this page · raw message

arch/arm/mach-at91/clock.c +65 -17

177 lines not on this page · raw message

arch/arm/mach-at91/include/mach/at91_pmc.h +52 -16

117 lines not on this page · raw message

arch/arm/mach-at91/include/mach/at91sam9x5.h new file +179 -0

179 lines not on this page · raw message

arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h new file +139 -0

139 lines not on this page · raw message

arch/arm/mach-at91/include/mach/hardware.h +2 -0
index fcb1bd4..7af8803 100644
@@ -26,6 +26,8 @@
 #include <mach/at91sam9rl.h>
 #elif defined(CONFIG_ARCH_AT91SAM9G45)
 #include <mach/at91sam9g45.h>
+#elif defined(CONFIG_ARCH_AT91SAM9X5)
+#include <mach/at91sam9x5.h>
 #elif defined(CONFIG_ARCH_AT91CAP9)
 #include <mach/at91cap9.h>
 #elif defined(CONFIG_ARCH_AT91X40)
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#10 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

this patch serie update the rm9200 support with

- USB OHCI
- USB Device (USB serial)
- leds

and add the basic support for the sam9x5 series

NB: the hardware ecc PMECC is not yet supported

Quoted 8 lines

please pull
The following changes since commit 79ea2bb5284cc4b5b28a3fa3fee6ede7304e4179:

at91rm9200ek: adjust kernel partition to be able to flash mainline kernel (2012-03-30 12:51:54 +0800)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git at91

Applied, thanks.

If you send pull requests please make sure they don't contain any other patches. This pull request has the at91-fixes branch in it.

Sascha

Quoted 74 lines

for you to fetch changes up to bfd880f58915ae8098a6a0603e1003efc9d6feae:

AT91: at91sam9x5: add chip and board file (2012-03-30 13:00:23 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (9):
at91rm9200ek: add ohci support
at91rm9200ek: add leds support
at91rm9200ek: add usb serial support
at91rm9200ek: update defconfig
atmel_nand: add on_flash_btt option to enable bbt option
ARM: at91: add sam9x5 series CPU definition and cpu_is_xxx macro
ARM: at91: allow to pass the interface id to at91_add_device_eth
ARM: at91/pio: add new PIO3 features
AT91: at91sam9x5: add chip and board file

 arch/arm/Makefile                                  |    1 +
 arch/arm/boards/at91rm9200ek/env/bin/init_board    |   11 +
 arch/arm/boards/at91rm9200ek/init.c                |   65 ++++-
 arch/arm/boards/at91sam9260ek/init.c               |    2 +-
 arch/arm/boards/at91sam9263ek/init.c               |    2 +-
 arch/arm/boards/at91sam9m10g45ek/init.c            |    2 +-
 arch/arm/boards/at91sam9x5ek/Makefile              |    1 +
 arch/arm/boards/at91sam9x5ek/config.h              |    6 +
 arch/arm/boards/at91sam9x5ek/env/config            |   38 +++
 arch/arm/boards/at91sam9x5ek/init.c                |  167 +++++++++++
 arch/arm/boards/dss11/init.c                       |    2 +-
 arch/arm/boards/mmccpu/init.c                      |    2 +-
 arch/arm/boards/pm9263/init.c                      |    2 +-
 arch/arm/boards/pm9g45/init.c                      |    2 +-
 arch/arm/boards/tny-a926x/init.c                   |    2 +-
 arch/arm/boards/usb-a926x/init.c                   |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig            |   18 +-
 arch/arm/configs/at91sam9x5ek_defconfig            |   69 +++++
 arch/arm/mach-at91/Kconfig                         |   25 ++
 arch/arm/mach-at91/Makefile                        |    1 +
 arch/arm/mach-at91/at91rm9200_devices.c            |    4 +-
 arch/arm/mach-at91/at91sam9260_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9263_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9g45_devices.c           |    4 +-
 arch/arm/mach-at91/at91sam9x5.c                    |  314 ++++++++++++++++++++
 arch/arm/mach-at91/at91sam9x5_devices.c            |  270 +++++++++++++++++
 arch/arm/mach-at91/clock.c                         |   82 ++++-
 arch/arm/mach-at91/gpio.c                          |  129 ++++++++-
 arch/arm/mach-at91/include/mach/at91_pio.h         |   25 ++
 arch/arm/mach-at91/include/mach/at91_pmc.h         |   68 ++++-
 arch/arm/mach-at91/include/mach/at91sam9x5.h       |  179 +++++++++++
 .../arm/mach-at91/include/mach/at91sam9x5_matrix.h |  139 +++++++++
 arch/arm/mach-at91/include/mach/board.h            |    2 +-
 arch/arm/mach-at91/include/mach/cpu.h              |   28 ++
 arch/arm/mach-at91/include/mach/gpio.h             |    6 +
 arch/arm/mach-at91/include/mach/hardware.h         |    2 +
 drivers/mtd/nand/atmel_nand.c                      |    6 +
 37 files changed, 1628 insertions(+), 58 deletions(-)
 create mode 100644 arch/arm/boards/at91rm9200ek/env/bin/init_board
 create mode 100644 arch/arm/boards/at91sam9x5ek/Makefile
 create mode 100644 arch/arm/boards/at91sam9x5ek/config.h
 create mode 100644 arch/arm/boards/at91sam9x5ek/env/config
 create mode 100644 arch/arm/boards/at91sam9x5ek/init.c
 create mode 100644 arch/arm/configs/at91sam9x5ek_defconfig
 create mode 100644 arch/arm/mach-at91/at91sam9x5.c
 create mode 100644 arch/arm/mach-at91/at91sam9x5_devices.c
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5.h
 create mode 100644 arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#11 lore raw
Quoted 18 lines · Sascha Hauer
Quoted 17 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

this patch serie update the rm9200 support with

- USB OHCI
- USB Device (USB serial)
- leds

and add the basic support for the sam9x5 series

NB: the hardware ecc PMECC is not yet supported

please pull
The following changes since commit 79ea2bb5284cc4b5b28a3fa3fee6ede7304e4179:

at91rm9200ek: adjust kernel partition to be able to flash mainline kernel (2012-03-30 12:51:54 +0800)

Quoted 8 lines
Quoted 3 lines

are available in the git repository at:

git://git.jcrosoft.org/barebox.git at91

Applied, thanks.

If you send pull requests please make sure they don't contain any other patches. This pull request has the at91-fixes branch in it.

agreed I did it for the work on net but here this work depends on at91-fixes

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox