#define MR12_WAN_PHYMASK BIT(4)
-#define MR12_WMAC0_MAC_OFFSET 0x120c
-#define MR12_CALDATA0_OFFSET 0x1000
+#define MR12_CALDATA0_OFFSET 0x21000
static struct gpio_led MR12_leds_gpio[] __initdata = {
{
static void __init MR12_setup(void)
{
- u8 *mac = (u8 *) KSEG1ADDR(0xbfff0000);
-
+ u8 *mac = (u8 *) KSEG1ADDR(0xbffd0000);
+ u8 wlan_mac[ETH_ALEN];
+
ath79_register_mdio(0,0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ARRAY_SIZE(MR12_gpio_keys),
MR12_gpio_keys);
- ap91_pci_init(mac + MR12_CALDATA0_OFFSET,
- mac + MR12_WMAC0_MAC_OFFSET);
-
+ ath79_init_mac(wlan_mac, mac, 1);
+ ap91_pci_init(mac + MR12_CALDATA0_OFFSET, wlan_mac);
}
-MIPS_MACHINE(ATH79_MACH_MR12, "MR12", "Meraki MR12", MR12_setup);
\ No newline at end of file
+MIPS_MACHINE(ATH79_MACH_MR12, "MR12", "Meraki MR12", MR12_setup);
#define MR16_WAN_PHYMASK BIT(0)
-#define MR16_WMAC0_MAC_OFFSET 0x120c
-#define MR16_WMAC1_MAC_OFFSET 0x520c
-#define MR16_CALDATA0_OFFSET 0x1000
-#define MR16_CALDATA1_OFFSET 0x5000
+#define MR16_CALDATA0_OFFSET 0x21000
+#define MR16_CALDATA1_OFFSET 0x25000
static struct gpio_led MR16_leds_gpio[] __initdata = {
{
static void __init MR16_setup(void)
{
- u8 *mac = (u8 *) KSEG1ADDR(0xbfff0000);
-
+ u8 *mac = (u8 *) KSEG1ADDR(0xbffd0000);
+ u8 wlan0_mac[ETH_ALEN];
+ u8 wlan1_mac[ETH_ALEN];
+
ath79_register_mdio(0,0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ARRAY_SIZE(MR16_gpio_keys),
MR16_gpio_keys);
- ap94_pci_init(mac + MR16_CALDATA0_OFFSET,
- mac + MR16_WMAC0_MAC_OFFSET,
- mac + MR16_CALDATA1_OFFSET,
- mac + MR16_WMAC1_MAC_OFFSET);
+ ath79_init_mac(wlan0_mac, mac, 1);
+ ath79_init_mac(wlan1_mac, mac, 2);
+ ap94_pci_init(mac + MR16_CALDATA0_OFFSET, wlan0_mac,
+ mac + MR16_CALDATA1_OFFSET, wlan1_mac);
}
-MIPS_MACHINE(ATH79_MACH_MR16, "MR16", "Meraki MR16", MR16_setup);
\ No newline at end of file
+MIPS_MACHINE(ATH79_MACH_MR16, "MR16", "Meraki MR16", MR16_setup);
DEVICE_TITLE := Meraki MR12
DEVICE_PACKAGES := kmod-spi-gpio
BOARDNAME = MR12
- IMAGE_SIZE = 15744k
- MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware)
+ IMAGE_SIZE = 15680k
+ MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
IMAGE/kernel.bin = append-kernel
IMAGE/rootfs.bin = append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
DEVICE_TITLE := Meraki MR16
DEVICE_PACKAGES := kmod-spi-gpio
BOARDNAME = MR16
- IMAGE_SIZE = 15744k
- MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware)
+ IMAGE_SIZE = 15680k
+ MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
IMAGE/kernel.bin = append-kernel
IMAGE/rootfs.bin = append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)