aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files/arch/mips
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-12-09 14:43:42 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-12-09 14:43:42 +0000
commit08375a2affc05c162cca67b892d27e6418222bab (patch)
treeea579a829c32df0ac35b889526aa3656d2638980 /target/linux/adm5120/files/arch/mips
parent26ab4dacaaf778c714303ab57676d847ac900c06 (diff)
downloadmaster-187ad058-08375a2affc05c162cca67b892d27e6418222bab.tar.gz
master-187ad058-08375a2affc05c162cca67b892d27e6418222bab.tar.bz2
master-187ad058-08375a2affc05c162cca67b892d27e6418222bab.zip
Setup MAC addresses for routerboards
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9682 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/arch/mips')
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c11
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/prom/routerboot.c4
2 files changed, 13 insertions, 2 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
index d81e0cf33f..1ca151412b 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
@@ -43,6 +43,8 @@
#include <adm5120_board.h>
#include <adm5120_platform.h>
#include <adm5120_cf.h>
+#include <adm5120_info.h>
+#include <prom/routerboot.h>
#define RB1XX_NAND_CHIP_DELAY 25
@@ -62,6 +64,8 @@
#define RB153_GPIO_CF_RDY ADM5120_GPIO_P1L1
#define RB153_GPIO_CF_WT ADM5120_GPIO_P0L0
+extern struct rb_hard_settings rb_hs;
+
/*--------------------------------------------------------------------------*/
static struct adm5120_pci_irq rb1xx_pci_irqs[] __initdata = {
@@ -218,7 +222,12 @@ static void rb150_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
static void __init rb1xx_mac_setup(void)
{
- /* TODO */
+ int i, j;
+
+ for (i = 0; i < rb_hs.mac_count; i++) {
+ for (j = 0; j < RB_MAC_SIZE; j++)
+ adm5120_eth_macs[i][j] = rb_hs.macs[i][j];
+ }
}
static void __init rb1xx_flash_setup(void)
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/prom/routerboot.c b/target/linux/adm5120/files/arch/mips/adm5120/prom/routerboot.c
index 47483450fd..a93382dc8a 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/prom/routerboot.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/prom/routerboot.c
@@ -27,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/string.h>
+#include <linux/module.h>
#include <asm/bootinfo.h>
#include <asm/addrspace.h>
@@ -35,7 +36,8 @@
#include <prom/routerboot.h>
#include "prom_read.h"
-static struct rb_hard_settings rb_hs;
+struct rb_hard_settings rb_hs;
+EXPORT_SYMBOL(rb_hs);
static int rb_found;
static int __init routerboot_load_hs(u8 *buf, u16 buflen)