#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/gpio.h>
#include <asm/bootinfo.h>
-#include <linux/gpio.h>
#include <asm/mach-adm5120/adm5120_info.h>
#include <asm/mach-adm5120/adm5120_board.h>
#include <asm/mach-adm5120/adm5120_platform.h>
#include <asm/mach-adm5120/adm5120_irq.h>
+#include <asm/mach-adm5120/prom/myloader.h>
+
+#include "compex.h"
+
#define COMPEX_GPIO_DEV_MASK (1 << ADM5120_GPIO_PIN5)
static void switch_bank_gpio5(unsigned bank)
}
}
+void __init compex_mac_setup(void)
+{
+ int i, j;
+
+ if (!myloader_present())
+ return;
+
+ for (i = 0; i < 6; i++)
+ for (j = 0; j < 6; j++)
+ adm5120_eth_macs[i][j] = myloader_info.macs[i][j];
+}
+
void __init compex_generic_setup(void)
{
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
adm5120_add_device_flash(0);
adm5120_add_device_gpio(COMPEX_GPIO_DEV_MASK);
+
+ compex_mac_setup();
}
struct mylo_system_params *sysp;
struct mylo_board_params *boardp;
struct mylo_partition_table *parts;
+ int i;
if (myloader_found)
goto out;
myloader_info.svid = le32_to_cpu(sysp->svid);
myloader_info.sdid = le32_to_cpu(sysp->sdid);
+ for (i = 0; i < MYLO_ETHADDR_COUNT; i++) {
+ int j;
+ for (j = 0; j < 6; j++)
+ myloader_info.macs[i][j] = boardp->addr[i].mac[j];
+ }
+
myloader_found = 1;
out: