From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] tny-a926x: fix MOB-TNY-MD2 Motherboard support
Date: Tue, 24 Apr 2012 12:15:21 +0200 [thread overview]
Message-ID: <1335262521-26145-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20120424100916.GX20601@game.jcrosoft.org>
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).
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
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(-)
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index 2065eae..eeaca76 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -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);
diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig
index 52bd7e4..2388305 100644
--- a/arch/arm/configs/tny_a9260_defconfig
+++ b/arch/arm/configs/tny_a9260_defconfig
@@ -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
diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig
index 1c316c8..d1bc418 100644
--- a/arch/arm/configs/tny_a9263_defconfig
+++ b/arch/arm/configs/tny_a9263_defconfig
@@ -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
diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig
index f842382..983c68a 100644
--- a/arch/arm/configs/tny_a9g20_defconfig
+++ b/arch/arm/configs/tny_a9g20_defconfig
@@ -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
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 989d3d8..1bec3e5 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -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
--
1.7.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-04-24 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 10:09 [FIXES Master] tny-a926x fixes Jean-Christophe PLAGNIOL-VILLARD
2012-04-24 10:15 ` [PATCH 1/2] at91: at91_register_uart use number instead of IDs Jean-Christophe PLAGNIOL-VILLARD
2012-04-24 10:15 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-04-24 13:20 ` [FIXES Master] tny-a926x fixes Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335262521-26145-2-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox