From 07d6c14898606c1b41ac43213ad5c59f8c120339 Mon Sep 17 00:00:00 2001 From: Juergen Beisert Date: Tue, 27 Oct 2009 19:57:36 +0100 Subject: [PATCH] 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 --- board/a9m2440/a9m2440.c | 20 ++++++++++---------- board/a9m2440/env/bin/boot | 4 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/board/a9m2440/a9m2440.c b/board/a9m2440/a9m2440.c index c33773082..e1f115690 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 37a38415d..e1673a1da 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