2 * Atheros G450 board support
4 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
5 * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
6 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published
10 * by the Free Software Foundation.
13 #include <linux/mtd/mtd.h>
14 #include <linux/mtd/partitions.h>
15 #include <asm/mach-ar71xx/ar71xx.h>
19 #include "dev-m25p80.h"
20 #include "dev-ap91-pci.h"
22 #ifdef CONFIG_MTD_PARTITIONS
23 static struct mtd_partition wzrhpg450h_partitions
[] = {
28 .mask_flags
= MTD_WRITEABLE
,
37 .mask_flags
= MTD_WRITEABLE
,
47 .name
= "user_property",
56 #endif /* CONFIG_MTD_PARTITIONS */
58 static struct flash_platform_data wzrhpg450h_flash_data
= {
59 #ifdef CONFIG_MTD_PARTITIONS
60 .parts
= wzrhpg450h_partitions
,
61 .nr_parts
= ARRAY_SIZE(wzrhpg450h_partitions
),
65 static void __init
wzrhpg450h_init(void)
67 u8
*ee
= (u8
*) KSEG1ADDR(0x1f051000);
68 u8
*mac
= (u8
*) ee
+ 2;
70 ar71xx_add_device_m25p80_multi(&wzrhpg450h_flash_data
);
72 ar71xx_add_device_mdio(0, ~BIT(0));
73 ar71xx_init_mac(ar71xx_eth0_data
.mac_addr
, mac
, 0);
74 ar71xx_eth0_data
.phy_if_mode
= PHY_INTERFACE_MODE_RGMII
;
75 ar71xx_eth0_data
.speed
= SPEED_1000
;
76 ar71xx_eth0_data
.duplex
= DUPLEX_FULL
;
77 ar71xx_eth0_data
.phy_mask
= BIT(0);
79 ar71xx_add_device_eth(0);
81 ap91_pci_init(ee
, NULL
);
84 MIPS_MACHINE(AR71XX_MACH_WZR_HP_G450H
, "WZR-HP-G450H", "Buffalo WZR-HP-G450H",