summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorJuergen Beisert <juergen@kreuzholzen.de>2009-10-27 19:57:36 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-10-28 09:44:42 +0100
commit07d6c14898606c1b41ac43213ad5c59f8c120339 (patch)
tree118d8f1a9e32194f1be95572f11836518e4aef62 /board
parentb1d8803e02fb980c78779f138084bd2d5e86a0a6 (diff)
downloadbarebox-07d6c14898606c1b41ac43213ad5c59f8c120339.tar.gz
barebox-07d6c14898606c1b41ac43213ad5c59f8c120339.tar.xz
A9M2440: Generic code should support generic hardware
The generic A9M2440 comes with a CS8900 network controller at chip select 5. There are custom specific variants available without this device, but this case will be handled in a separate baseboard file. The current Linux-2.6.31 CS8900 network driver is a very poor piece of code. It needs some patches to also work with this platform. So, I add two kernel parameters to be able to use this network device also in the NFS rootfs case (to setup media and MAC). Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
Diffstat (limited to 'board')
-rw-r--r--board/a9m2440/a9m2440.c20
-rw-r--r--board/a9m2440/env/bin/boot4
2 files changed, 13 insertions, 11 deletions
diff --git a/board/a9m2440/a9m2440.c b/board/a9m2440/a9m2440.c
index c33773082d..e1f1156904 100644
--- a/board/a9m2440/a9m2440.c
+++ b/board/a9m2440/a9m2440.c
@@ -57,14 +57,14 @@ static struct device_d nand_dev = {
};
/*
- * SMSC 91C111 network controller on the baseboard
- * connected to CS line 1 and interrupt line
- * GPIO3, data width is 32 bit
+ * cs8900 network controller onboard
+ * Connected to CS line 5 + A24 and interrupt line EINT9,
+ * data width is 16 bit
*/
static struct device_d network_dev = {
- .name = "smc91c111",
- .map_base = CS1_BASE + 0x300,
- .size = 16,
+ .name = "cs8900",
+ .map_base = CS5_BASE + (1 << 24) + 0x300,
+ .size = 16,
};
static int a9m2440_devices_init(void)
@@ -140,10 +140,10 @@ static int a9m2440_devices_init(void)
/* ----------- configure the access to the outer space ---------- */
reg = readl(BWSCON);
- /* CS#1 to access the network controller */
- reg &= ~0xf0;
- reg |= 0xe0;
- writel(0x1350, BANKCON1);
+ /* CS#5 to access the network controller */
+ reg &= ~0x00f00000;
+ reg |= 0x00d00000; /* 16 bit */
+ writel(0x1f4c, BANKCON5);
/* CS#2 to the dual 16550 UART */
reg &= ~0xf00;
diff --git a/board/a9m2440/env/bin/boot b/board/a9m2440/env/bin/boot
index 37a38415db..e1673a1da1 100644
--- a/board/a9m2440/env/bin/boot
+++ b/board/a9m2440/env/bin/boot
@@ -24,7 +24,9 @@ else
bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
fi
-bootargs="$bootargs mtdparts=\"NAND 64MiB 3,3V 8-bit:$nand_parts\""
+bootargs="$bootargs mtdparts=\"NAND 32MiB 3,3V 8-bit:$nand_parts\""
+
+bootargs="$bootargs cs89x0_media=rj45 cs89x0_mac=$eth0.ethaddr"
if [ x$kernel = xnet ]; then
if [ x$ip = xdhcp ]; then