ar71xx: Revert "added board support for compex wpj558"

This reverts commit f7873071561d82e75ba2dc46433a2982fef8ac6f.

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44245 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
John Crispin 2015-02-02 10:32:04 +00:00
parent d5add0371f
commit 1c45ec1021
13 changed files with 9 additions and 254 deletions

View File

@ -288,9 +288,6 @@ get_status_led() {
wp543)
status_led="wp543:green:diag"
;;
wpj558)
status_led="wpj558:green:sig3"
;;
wrt400n)
status_led="wrt400n:blue:wps"
;;

View File

@ -359,13 +359,6 @@ wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
wpj558)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "5 6t"
ucidef_add_switch_vlan "switch0" "2" "1 6t"
;;
ap121 |\
ap121-mini |\
ap96 |\

View File

@ -747,9 +747,6 @@ ar71xx_board_detect() {
*WP543)
name="wp543"
;;
*WPJ558)
name="wpj558"
;;
*WPE72)
name="wpe72"
;;

View File

@ -408,7 +408,6 @@ platform_check_image() {
ja76pf | \
ja76pf2 | \
jwap003 | \
wpj558 | \
wp543 | \
wpe72)
[ "$magic" != "4349" ] && {
@ -457,7 +456,6 @@ platform_do_upgrade() {
jwap003)
platform_do_upgrade_combined "$ARGV"
;;
wpj558|\
wp543|\
wpe72)
platform_do_upgrade_compex "$ARGV"

View File

@ -130,7 +130,6 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
CONFIG_ATH79_MACH_WNR2200=y
CONFIG_ATH79_MACH_WP543=y
CONFIG_ATH79_MACH_WPE72=y
CONFIG_ATH79_MACH_WPJ558=y
CONFIG_ATH79_MACH_WRT160NL=y
CONFIG_ATH79_MACH_WRT400N=y
CONFIG_ATH79_MACH_WZR_450HP2=y

View File

@ -1,187 +0,0 @@
/*
* Compex WPJ558 board support
*
* Copyright (c) 2012 Qualcomm Atheros
* Copyright (c) 2012 Gabor Juhos <juhosg@openwrt.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#include <linux/pci.h>
#include <linux/phy.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include "common.h"
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-spi.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"
#include "pci.h"
#define WPJ558_GPIO_LED_SIG1 14
#define WPJ558_GPIO_LED_SIG2 15
#define WPJ558_GPIO_LED_SIG3 22
#define WPJ558_GPIO_LED_SIG4 23
#define WPJ558_GPIO_BUZZER 4
#define WPJ558_GPIO_BTN_RESET 17
#define WPJ558_KEYS_POLL_INTERVAL 20 /* msecs */
#define WPJ558_KEYS_DEBOUNCE_INTERVAL (3 * WPJ558_KEYS_POLL_INTERVAL)
#define WPJ558_MAC0_OFFSET 0x10
#define WPJ558_MAC1_OFFSET 0x18
#define WPJ558_WMAC_CALDATA_OFFSET 0x1000
#define WPJ558_PCIE_CALDATA_OFFSET 0x5000
#define WPJ558_ART_SIZE 0x8000
#if 0
static char *art_buf;
#endif
static struct gpio_led wpj558_leds_gpio[] __initdata = {
{
.name = "wpj558:red:sig1",
.gpio = WPJ558_GPIO_LED_SIG1,
.active_low = 1,
},
{
.name = "wpj558:yellow:sig2",
.gpio = WPJ558_GPIO_LED_SIG2,
.active_low = 1,
},
{
.name = "wpj558:green:sig3",
.gpio = WPJ558_GPIO_LED_SIG3,
.active_low = 1,
},
{
.name = "wpj558:green:sig4",
.gpio = WPJ558_GPIO_LED_SIG4,
.active_low = 1,
},
{
.name = "wpj558:buzzer",
.gpio = WPJ558_GPIO_BUZZER,
.active_low = 0,
}
};
static struct gpio_keys_button wpj558_gpio_keys[] __initdata = {
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = WPJ558_KEYS_DEBOUNCE_INTERVAL,
.gpio = WPJ558_GPIO_BTN_RESET,
.active_low = 1,
},
};
static struct ar8327_pad_cfg wpj558_ar8327_pad0_cfg = {
.mode = AR8327_PAD_MAC_SGMII,
.sgmii_delay_en = true,
};
static struct ar8327_pad_cfg wpj558_ar8327_pad6_cfg = {
.mode = AR8327_PAD_MAC_RGMII,
.txclk_delay_en = true,
.rxclk_delay_en = true,
.txclk_delay_sel = AR8327_CLK_DELAY_SEL1,
.rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
};
static struct ar8327_platform_data wpj558_ar8327_data = {
.pad0_cfg = &wpj558_ar8327_pad0_cfg,
.pad6_cfg = &wpj558_ar8327_pad6_cfg,
.port0_cfg = {
.force_link = 1,
.speed = AR8327_PORT_SPEED_1000,
.duplex = 1,
.txpause = 1,
.rxpause = 1,
},
.port6_cfg = {
.force_link = 1,
.speed = AR8327_PORT_SPEED_1000,
.duplex = 1,
.txpause = 1,
.rxpause = 1,
},
};
static struct mdio_board_info wpj558_mdio0_info[] = {
{
.bus_id = "ag71xx-mdio.0",
.phy_addr = 0,
.platform_data = &wpj558_ar8327_data,
},
};
static void __init wpj558_setup(void)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000);
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
u8 tmpmac[ETH_ALEN];
ath79_register_m25p80(NULL);
ath79_register_leds_gpio(-1, ARRAY_SIZE(wpj558_leds_gpio),
wpj558_leds_gpio);
ath79_register_gpio_keys_polled(-1, WPJ558_KEYS_POLL_INTERVAL,
ARRAY_SIZE(wpj558_gpio_keys),
wpj558_gpio_keys);
ath79_init_mac(tmpmac, mac, -1);
ath79_register_wmac(art + WPJ558_WMAC_CALDATA_OFFSET, tmpmac);
ath79_register_pci();
mdiobus_register_board_info(wpj558_mdio0_info,
ARRAY_SIZE(wpj558_mdio0_info));
ath79_register_mdio(0, 0x0);
ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
/* GMAC0 is connected to an AR8327 switch */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
ath79_eth0_data.phy_mask = BIT(0);
ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
ath79_eth0_pll_data.pll_1000 = 0x56000000;
ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ558_MAC0_OFFSET, 0);
ath79_register_eth(0);
/* GMAC1 is connected to the SGMII interface */
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
ath79_eth1_data.speed = SPEED_1000;
ath79_eth1_data.duplex = DUPLEX_FULL;
ath79_eth1_pll_data.pll_1000 = 0x03000101;
ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ558_MAC1_OFFSET, 0);
ath79_register_eth(1);
ath79_register_usb();
}
MIPS_MACHINE(ATH79_MACH_WPJ558, "WPJ558", "Compex WPJ558", wpj558_setup);

View File

@ -26,16 +26,3 @@ define Profile/WPE72/Description
endef
$(eval $(call Profile,WPE72))
define Profile/WPJ558
NAME:=Compex WPJ558
PACKAGES:=kmod-ath10k pciutils
endef
define Profile/WPJ558/Description
Package set optimized for the Compex WPJ558 board.
endef
$(eval $(call Profile,WPJ558))

View File

@ -687,13 +687,10 @@ Image/Build/MyLoader/initramfs=$(call PatchKernel/initramfs,$(2),$(3))
define Image/Build/MyLoader
$(eval fwsize=$(shell echo $$(($(4)-0x30000-4*64*1024))))
$(eval fwimage=$(KDIR_TMP)/$(2)-$(5)-firmware.bin)
$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).bin.lzma,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
if [ -e "$(fwimage)" ]; then \
$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-p0x680000:0x160000:al:0x80060000:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
-p0x050000:0x630000:::rootfs:$(KDIR)/root.$(1) \
-p0x7e0000:0x010000 \
-p0x7f0000:0x010000 \
-p0x00030000:0:al:0x80060000:firmware:$(fwimage) \
$(call imgname,$(1),$(2))-$(5)-factory.img; \
echo -n "" > $(KDIR_TMP)/empty.bin; \
sh $(TOPDIR)/scripts/combined-image.sh \
@ -1321,9 +1318,6 @@ $(eval $(call SingleProfile,MyLoader,64k,WPE72_4M,wpe72,,ttyS0,115200,0x400000,4
$(eval $(call SingleProfile,MyLoader,64k,WPE72_8M,wpe72,,ttyS0,115200,0x800000,8M))
$(eval $(call SingleProfile,MyLoader,64k,WPE72_16M,wpe72,,ttyS0,115200,0x1000000,16M))
$(eval $(call SingleProfile,MyLoader,64k,WPJ558_8M,wpj558,WPJ558,ttyS0,115200,0x800000,8M))
$(eval $(call SingleProfile,MyLoader,64k,WPJ558_16M,wpj558,WPJ558,ttyS0,115200,0x1000000,16M))
$(eval $(call SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303033,WNR2000V3,"" NA,))
$(eval $(call SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,ttyS0,115200,$$(wnr2000v4_mtdlayout),0x32303034,WNR2000V4,"" NA,))
$(eval $(call SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,WNR2200,"" NA,))
@ -1505,7 +1499,6 @@ $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
$(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
$(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
$(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
$(eval $(call MultiProfile,WPJ558,WPJ558_8M WPJ558_16M))
$(eval $(call MultiProfile,Minimal,$(SINGLE_PROFILES)))
$(eval $(call MultiProfile,Madwifi,EAP7660D UBNTRS UBNTRSPRO UBNTLSSR71 WP543))

View File

@ -8,7 +8,7 @@
#include "common.h"
@@ -69,6 +70,40 @@ static const char * __init ath79_prom_fi
@@ -69,6 +70,37 @@ static const char * __init ath79_prom_fi
return ret;
}
@ -29,9 +29,6 @@
+ case DEVID_COMPEX_WPE72:
+ ath79_prom_append_cmdline("board", "WPE72");
+ break;
+ case DEVID_COMPEX_WPJ558:
+ ath79_prom_append_cmdline("board", "WPJ558");
+ break;
+ default:
+ pr_warn("prom: unknown device id: %x\n", mylo->did);
+ return 0;

View File

@ -1,6 +1,6 @@
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
@@ -16,22 +16,147 @@
@@ -16,22 +16,146 @@
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@ -136,7 +136,6 @@
+ ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */
+ ATH79_MACH_WP543, /* Compex WP543 */
+ ATH79_MACH_WPE72, /* Compex WPE72 */
+ ATH79_MACH_WPJ558, /* Compex WPJ558 */
+ ATH79_MACH_WRT160NL, /* Linksys WRT160NL */
+ ATH79_MACH_WRT400N, /* Linksys WRT400N */
+ ATH79_MACH_WZR_HP_AG300H, /* Buffalo WZR-HP-AG300H */
@ -212,7 +211,7 @@
config ATH79_MACH_AP121
bool "Atheros AP121 reference board"
select SOC_AR933X
@@ -11,62 +66,754 @@ config ATH79_MACH_AP121
@@ -11,62 +66,743 @@ config ATH79_MACH_AP121
select ATH79_DEV_M25P80
select ATH79_DEV_USB
select ATH79_DEV_WMAC
@ -417,17 +416,6 @@
+ select ATH79_DEV_USB
+ select MYLOADER
+
+config ATH79_MACH_WPJ558
+ bool "Compex WPJ558 board support"
+ select SOC_QCA955X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+ select MYLOADER
+
+config ATH79_MACH_DIR_505_A1
+ bool "D-Link DIR-505-A1 support"
+ select SOC_AR933X
@ -995,7 +983,7 @@
config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM/UniFi boards"
@@ -83,6 +830,65 @@ config ATH79_MACH_UBNT_XM
@@ -83,6 +819,65 @@ config ATH79_MACH_UBNT_XM
Say 'Y' here if you want your kernel to support the
Ubiquiti Networks XM (rev 1.0) board.
@ -1061,7 +1049,7 @@
endmenu
config SOC_AR71XX
@@ -132,7 +938,10 @@ config ATH79_DEV_DSA
@@ -132,7 +927,10 @@ config ATH79_DEV_DSA
config ATH79_DEV_ETH
def_bool n
@ -1073,7 +1061,7 @@
def_bool n
config ATH79_DEV_GPIO_BUTTONS
@@ -164,4 +973,7 @@ config ATH79_PCI_ATH9K_FIXUP
@@ -164,4 +962,7 @@ config ATH79_PCI_ATH9K_FIXUP
config ATH79_ROUTERBOOT
def_bool n
@ -1083,7 +1071,7 @@
endif
--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
@@ -38,9 +49,92 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
@@ -38,9 +38,91 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
#
# Machines
#
@ -1167,7 +1155,6 @@
+obj-$(CONFIG_ATH79_MACH_WNR2200) += mach-wnr2200.o
+obj-$(CONFIG_ATH79_MACH_WP543) += mach-wp543.o
+obj-$(CONFIG_ATH79_MACH_WPE72) += mach-wpe72.o
+obj-$(CONFIG_ATH79_MACH_WPJ558) += mach-wpj558.o
+obj-$(CONFIG_ATH79_MACH_WRT160NL) += mach-wrt160nl.o
+obj-$(CONFIG_ATH79_MACH_WRT400N) += mach-wrt400n.o
+obj-$(CONFIG_ATH79_MACH_WZR_HP_G300NH) += mach-wzr-hp-g300nh.o

View File

@ -37,7 +37,6 @@
/* Devices based on the Atheros AR71xx */
#define DEVID_COMPEX_WP543 0x0640
#define DEVID_COMPEX_WPE72 0x0672
#define DEVID_COMPEX_WPJ558 0x0688
/* Devices based on the IXP422 */
#define DEVID_COMPEX_WP18 0x047E

View File

@ -157,9 +157,6 @@ struct cpx_board boards[] = {
CPX_BOARD_AR71XX(DEVID_COMPEX_WPE72, 8,
"WPE72", "Compex WPE72",
"BareBoard"),
CPX_BOARD_AR71XX(DEVID_COMPEX_WPJ558, 8,
"WPJ558", "Compex WPJ558",
"BareBoard"),
CPX_BOARD_AR23XX(DEVID_COMPEX_NP25G, 4,
"NP25G", "Compex NetPassage 25G",

View File

@ -64,8 +64,6 @@
#define DEVID_COMPEX_WP543 0x0640
#define DEVID_COMPEX_WPE72 0x0672
#define DEVID_COMPEX_WPJ558 0x0688
/* Devices based on the IXP422 */
#define DEVID_COMPEX_WP18 0x047E
#define DEVID_COMPEX_NP18A 0x0489