Skip to contentSkip to conversation

tny-a926x fixes

FIXES Master New Jean-Christophe PLAGNIOL-VILLARD 2 participants 4 messages Apr 24, 2012

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

HI,

the following patch series fix the Calao tny-a926x

this is for the master branch

The following changes since commit 1d79f322f7a3bff9b6b9bde4ce7f391f0316063a:

mtd: docg3 fixes backport from Linux kernel (2012-04-17 22:02:54 +0200)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git master-fixes

for you to fetch changes up to 60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d:

tny-a926x: fix MOB-TNY-MD2 Motherboard support (2012-04-24 18:27:32 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (2):
at91: at91_register_uart use number instead of IDs
tny-a926x: fix MOB-TNY-MD2 Motherboard support

 arch/arm/boards/tny-a926x/init.c         |   38 +++--------------------------
 arch/arm/configs/tny_a9260_defconfig     |    2 +-
 arch/arm/configs/tny_a9263_defconfig     |    2 +-
 arch/arm/configs/tny_a9g20_defconfig     |    2 +-
 arch/arm/mach-at91/Kconfig               |   10 ++++++++
 arch/arm/mach-at91/at91rm9200_devices.c  |   13 +++-------
 arch/arm/mach-at91/at91sam9260_devices.c |   19 ++++----------
 arch/arm/mach-at91/at91sam9261_devices.c |   10 ++-----
 arch/arm/mach-at91/at91sam9263_devices.c |   10 ++-----
 arch/arm/mach-at91/at91sam9g45_devices.c |   13 +++-------
 10 files changed, 37 insertions(+), 82 deletions(-)

Best Regards,
J.

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

#1 lore raw

PATCH 1/2 at91: at91_register_uart use number instead of IDs

---
 arch/arm/mach-at91/at91rm9200_devices.c  |   13 ++++---------
 arch/arm/mach-at91/at91sam9260_devices.c |   19 ++++++-------------
 arch/arm/mach-at91/at91sam9261_devices.c |   10 +++-------
 arch/arm/mach-at91/at91sam9263_devices.c |   10 +++-------
 arch/arm/mach-at91/at91sam9g45_devices.c |   13 ++++---------
 5 files changed, 20 insertions(+), 45 deletions(-)
arch/arm/mach-at91/at91rm9200_devices.c +4 -9
index c380c7d..7e721e5 100644
@@ -273,27 +273,22 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 		case 0:		/* DBGU */
 			configure_dbgu_pins();
 			start = AT91_BASE_SYS + AT91_DBGU;
-			id = 0;
 			break;
-		case AT91RM9200_ID_US0:
+		case 1:
 			configure_usart0_pins(pins);
 			start = AT91RM9200_BASE_US0;
-			id = 1;
 			break;
-		case AT91RM9200_ID_US1:
+		case 2:
 			configure_usart1_pins(pins);
 			start = AT91RM9200_BASE_US1;
-			id = 2;
 			break;
-		case AT91RM9200_ID_US2:
+		case 3:
 			configure_usart2_pins(pins);
 			start = AT91RM9200_BASE_US2;
-			id = 3;
 			break;
-		case AT91RM9200_ID_US3:
+		case 4:
 			configure_usart3_pins(pins);
 			start = AT91RM9200_BASE_US3;
-			id = 4;
 			break;
 		default:
 			return NULL;
arch/arm/mach-at91/at91sam9260_devices.c +6 -13
index 23da8c1..17dbd1a 100644
@@ -290,37 +290,30 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 		case 0:		/* DBGU */
 			configure_dbgu_pins();
 			start = AT91_BASE_SYS + AT91_DBGU;
-			id = 0;
 			break;
-		case AT91SAM9260_ID_US0:
+		case 1:
 			configure_usart0_pins(pins);
 			start = AT91SAM9260_BASE_US0;
-			id = 1;
 			break;
-		case AT91SAM9260_ID_US1:
+		case 2:
 			configure_usart1_pins(pins);
 			start = AT91SAM9260_BASE_US1;
-			id = 2;
 			break;
-		case AT91SAM9260_ID_US2:
+		case 3:
 			configure_usart2_pins(pins);
 			start = AT91SAM9260_BASE_US2;
-			id = 3;
 			break;
-		case AT91SAM9260_ID_US3:
+		case 4:
 			configure_usart3_pins(pins);
 			start = AT91SAM9260_BASE_US3;
-			id = 4;
 			break;
-		case AT91SAM9260_ID_US4:
+		case 5:
 			configure_usart4_pins();
 			start = AT91SAM9260_BASE_US4;
-			id = 5;
 			break;
-		case AT91SAM9260_ID_US5:
+		case 6:
 			configure_usart5_pins();
 			start = AT91SAM9260_BASE_US5;
-			id = 6;
 			break;
 		default:
 			return NULL;
arch/arm/mach-at91/at91sam9261_devices.c +3 -7
index d4f7b5e..8a63d2a 100644
@@ -211,22 +211,18 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 		case 0:		/* DBGU */
 			configure_dbgu_pins();
 			start = AT91_BASE_SYS + AT91_DBGU;
-			id = 0;
 			break;
-		case AT91SAM9261_ID_US0:
+		case 1:
 			configure_usart0_pins(pins);
 			start = AT91SAM9261_BASE_US0;
-			id = 1;
 			break;
-		case AT91SAM9261_ID_US1:
+		case 2:
 			configure_usart1_pins(pins);
 			start = AT91SAM9261_BASE_US1;
-			id = 2;
 			break;
-		case AT91SAM9261_ID_US2:
+		case 3:
 			configure_usart2_pins(pins);
 			start = AT91SAM9261_BASE_US2;
-			id = 3;
 			break;
 		default:
 			return NULL;
arch/arm/mach-at91/at91sam9263_devices.c +3 -7
index 12d6a24..b28e9e2 100644
@@ -261,22 +261,18 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 		case 0:		/* DBGU */
 			configure_dbgu_pins();
 			start = AT91_BASE_SYS + AT91_DBGU;
-			id = 0;
 			break;
-		case AT91SAM9263_ID_US0:
+		case 1:
 			configure_usart0_pins(pins);
 			start = AT91SAM9263_BASE_US0;
-			id = 1;
 			break;
-		case AT91SAM9263_ID_US1:
+		case 2:
 			configure_usart1_pins(pins);
 			start = AT91SAM9263_BASE_US1;
-			id = 2;
 			break;
-		case AT91SAM9263_ID_US2:
+		case 3:
 			configure_usart2_pins(pins);
 			start = AT91SAM9263_BASE_US2;
-			id = 3;
 			break;
 		default:
 			return NULL;
arch/arm/mach-at91/at91sam9g45_devices.c +4 -9
index 25a8d80..ca96f58 100644
@@ -190,27 +190,22 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 		case 0:		/* DBGU */
 			configure_dbgu_pins();
 			start = AT91_BASE_SYS + AT91_DBGU;
-			id = 0;
 			break;
-		case AT91SAM9G45_ID_US0:
+		case 1:
 			configure_usart0_pins(pins);
 			start = AT91SAM9G45_BASE_US0;
-			id = 1;
 			break;
-		case AT91SAM9G45_ID_US1:
+		case 2:
 			configure_usart1_pins(pins);
 			start = AT91SAM9G45_BASE_US1;
-			id = 2;
 			break;
-		case AT91SAM9G45_ID_US2:
+		case 3:
 			configure_usart2_pins(pins);
 			start = AT91SAM9G45_BASE_US2;
-			id = 3;
 			break;
-		case AT91SAM9G45_ID_US3:
+		case 4:
 			configure_usart3_pins(pins);
 			start = AT91SAM9G45_BASE_US3;
-			id = 4;
 			break;
 		default:
 			return NULL;
Signature · 7 lines
1.7.9.1


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

PATCH 2/2 tny-a926x: fix MOB-TNY-MD2 Motherboard support

In reply to Jean-Christophe PLAGNIOL-VILLARD

The MD2 add:
- uart 2
- ethernet
- usb
- spi
- i2c

so fix just add uart and ethernet

update defconfig
always enable the motherboard and drop the SHA256 support (to fix in the 256KiB).

---
 arch/arm/boards/tny-a926x/init.c     |   38 +++------------------------------
 arch/arm/configs/tny_a9260_defconfig |    2 +-
 arch/arm/configs/tny_a9263_defconfig |    2 +-
 arch/arm/configs/tny_a9g20_defconfig |    2 +-
 arch/arm/mach-at91/Kconfig           |   10 +++++++++
 5 files changed, 17 insertions(+), 37 deletions(-)
arch/arm/boards/tny-a926x/init.c +4 -34
index 2065eae..eeaca76 100644
@@ -121,42 +121,10 @@ static struct at91_ether_platform_data macb_pdata = {
 	.phy_addr	= 0,
 };
 
-static void tny_a9260_phy_reset(void)
-{
-	unsigned long rstc;
-	struct clk *clk = clk_get(NULL, "macb_clk");
-
-	clk_enable(clk);
-
-	at91_set_gpio_input(AT91_PIN_PA14, 0);
-	at91_set_gpio_input(AT91_PIN_PA15, 0);
-	at91_set_gpio_input(AT91_PIN_PA17, 0);
-	at91_set_gpio_input(AT91_PIN_PA25, 0);
-	at91_set_gpio_input(AT91_PIN_PA26, 0);
-	at91_set_gpio_input(AT91_PIN_PA28, 0);
-
-	rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
-
-	/* Need to reset PHY -> 500ms reset */
-	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
-				     (AT91_RSTC_ERSTL & (0x0d << 8)) |
-				     AT91_RSTC_URSTEN);
-
-	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
-
-	/* Wait for end hardware reset */
-	while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
-
-	/* Restore NRST value */
-	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
-				     (rstc) |
-				     AT91_RSTC_URSTEN);
-}
-
 static void __init ek_add_device_macb(void)
 {
-	tny_a9260_phy_reset();
-	at91_add_device_eth(0, &macb_pdata);
+	if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
+		at91_add_device_eth(0, &macb_pdata);
 }
 #else
 static void __init ek_add_device_macb(void) {}
@@ -240,6 +208,8 @@ device_initcall(tny_a9260_devices_init);
 static int tny_a9260_console_init(void)
 {
 	at91_register_uart(0, 0);
+	if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
+		at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS);
 	return 0;
 }
 console_initcall(tny_a9260_console_init);
arch/arm/configs/tny_a9260_defconfig +1 -1
index 52bd7e4..2388305 100644
@@ -1,5 +1,6 @@
 CONFIG_ARCH_AT91SAM9260=y
 CONFIG_MACH_TNY_A9260=y
+CONFIG_CALAO_MOB_TNY_MD2=y
 CONFIG_AEABI=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
@@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_CMD_SHA1SUM=y
-CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
arch/arm/configs/tny_a9263_defconfig +1 -1
index 1c316c8..d1bc418 100644
@@ -1,5 +1,6 @@
 CONFIG_ARCH_AT91SAM9263=y
 CONFIG_MACH_TNY_A9263=y
+CONFIG_CALAO_MOB_TNY_MD2=y
 CONFIG_AEABI=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
@@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_CMD_SHA1SUM=y
-CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
arch/arm/configs/tny_a9g20_defconfig +1 -1
index f842382..983c68a 100644
@@ -1,5 +1,6 @@
 CONFIG_ARCH_AT91SAM9G20=y
 CONFIG_MACH_TNY_A9G20=y
+CONFIG_CALAO_MOB_TNY_MD2=y
 CONFIG_AEABI=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
@@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MD5SUM=y
 CONFIG_CMD_SHA1SUM=y
-CONFIG_CMD_SHA256SUM=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_FLASH=y
arch/arm/mach-at91/Kconfig +10 -0
index 989d3d8..1bec3e5 100644
@@ -104,6 +104,9 @@ config ARCH_BAREBOX_MAX_BARE_INIT_SIZE
 config SUPPORT_CALAO_DAB_MMX
 	bool
 
+config SUPPORT_CALAO_MOB_TNY_MD2
+	bool
+
 # ----------------------------------------------------------
 
 if ARCH_AT91RM9200
@@ -138,6 +141,7 @@ config MACH_AT91SAM9260EK
 
 config MACH_TNY_A9260
 	bool "CALAO TNY-A9260"
+	select SUPPORT_CALAO_MOB_TNY_MD2
 	help
 	  Select this if you are using a Calao Systems TNY-A9260.
 	  <http://www.calao-systems.com>
@@ -214,6 +218,7 @@ config MACH_AT91SAM9G20EK
 	  that embeds only one SD/MMC slot.
 
 config MACH_TNY_A9G20
+	select SUPPORT_CALAO_MOB_TNY_MD2
 	bool "CALAO TNY-A9G20"
 	help
 	  Select this if you are using a Calao Systems TNY-A9G20.
@@ -264,6 +269,7 @@ config MACH_PM9263
 
 config MACH_TNY_A9263
 	bool "CALAO TNY-A9263"
+	select SUPPORT_CALAO_MOB_TNY_MD2
 	help
 	  Select this if you are using a Calao Systems TNY-A9263.
 	  <http://www.calao-systems.com>
@@ -362,4 +368,8 @@ config CALAO_DAB_MMX
 	bool "DAB MMX Daughter Board support"
 	depends on SUPPORT_CALAO_DAB_MMX
 
+config CALAO_MOB_TNY_MD2
+	bool "MOB TNY MD2 Motherboard Daughter Board support"
+	depends on SUPPORT_CALAO_MOB_TNY_MD2
+
 endif
Signature · 7 lines
1.7.9.1


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

HI,

the following patch series fix the Calao tny-a926x

this is for the master branch

The following changes since commit 1d79f322f7a3bff9b6b9bde4ce7f391f0316063a:

Quoted 7 lines

mtd: docg3 fixes backport from Linux kernel (2012-04-17 22:02:54 +0200)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git master-fixes

for you to fetch changes up to 60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d:

pulled, thanks

Sascha

Quoted 28 lines

tny-a926x: fix MOB-TNY-MD2 Motherboard support (2012-04-24 18:27:32 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (2):
at91: at91_register_uart use number instead of IDs
tny-a926x: fix MOB-TNY-MD2 Motherboard support

 arch/arm/boards/tny-a926x/init.c         |   38 +++--------------------------
 arch/arm/configs/tny_a9260_defconfig     |    2 +-
 arch/arm/configs/tny_a9263_defconfig     |    2 +-
 arch/arm/configs/tny_a9g20_defconfig     |    2 +-
 arch/arm/mach-at91/Kconfig               |   10 ++++++++
 arch/arm/mach-at91/at91rm9200_devices.c  |   13 +++-------
 arch/arm/mach-at91/at91sam9260_devices.c |   19 ++++----------
 arch/arm/mach-at91/at91sam9261_devices.c |   10 ++-----
 arch/arm/mach-at91/at91sam9263_devices.c |   10 ++-----
 arch/arm/mach-at91/at91sam9g45_devices.c |   13 +++-------
 10 files changed, 37 insertions(+), 82 deletions(-)

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