summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/arch
diff options
context:
space:
mode:
authorsave2009-08-04 16:16:09 +0000
committersave2009-08-04 16:16:09 +0000
commitee1d8067f1d2d951aff7007e1149214fa9ba5237 (patch)
tree765d27c84aa8114de324754462d27ab2a556145a /cleopatre/linux-2.6.25.10-spc300/arch
parentc9c35f0760406568dcb2bf2f8360cd2f3c5c4f79 (diff)
[CLEO][ETHDRV]Passed MAC address and Eth mode stored in NVRAM to eth driver.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5155 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/arch')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
index 8587329302..e6cfe78a06 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
@@ -378,8 +378,24 @@ void __init spc300_add_device_uart1(void)
*/
void spc300_add_device_ethernet(void)
{
- //TODO: Manage MII/RMII/GMII pin with reg bank
- //TODO: Manage MAC address
+ //Find MAC address from NVRAM
+ memcpy(&spc300_ethernet_data.mac_addr, spc300_nvram.eth_address, sizeof(spc300_nvram.eth_address));
+
+ //Find Eth phy connection from NVRAM
+ //TODO:use NVRAM defines
+ switch((spc300_nvram.pkg_cfg & 0x000000F0)>>8)
+ {
+ case 1: //RMII
+ spc300_ethernet_data.is_rmii = 1;
+ break;
+ case 2: //GMII
+ spc300_ethernet_data.is_gmii = 1;
+ break;
+ default:
+ spc300_ethernet_data.is_mii = 1;
+ }
+
+ //Register Ethernet device
platform_device_register(&spc300_ethernet_device);
}