Merge Official Source
This commit is contained in:
commit
5a0732011c
@ -42,9 +42,6 @@ netgear,wndap660)
|
||||
netgear,wndr4700)
|
||||
ucidef_set_led_switch "wan_green" "WAN (green)" "wndr4700:green:wan" "switch0" "0x20"
|
||||
ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx"
|
||||
ucidef_set_led_usbport "usb3" "USB3" "wndr4700:blue:usb" "usb2-port1" "usb2-port2" "usb3-port1" "usb3-port2"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "wndr4700:blue:wlan" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "wndr4700:blue:wlan" "phy1tpt"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@ -7,27 +7,9 @@
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"pci_wmac0.eeprom")
|
||||
case $board in
|
||||
netgear,wndr4700)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
||||
if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
|
||||
caldata_extract_ubi "caldata" 0x5000 0x1000
|
||||
else
|
||||
caldata_extract "wifi_data" 0x5000 0x1000
|
||||
ath9k_patch_mac $(mtd_get_mac_binary wifi_data 0xc)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"pci_wmac1.eeprom")
|
||||
case $board in
|
||||
netgear,wndr4700)
|
||||
"ath9k-eeprom-pci-0000:43:00.0.bin")
|
||||
case $board in
|
||||
netgear,wndr4700)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
||||
if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
|
||||
@ -42,4 +24,22 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"ath9k-eeprom-pci-0000:44:00.0.bin")
|
||||
case $board in
|
||||
netgear,wndr4700)
|
||||
. /lib/upgrade/nand.sh
|
||||
|
||||
if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
|
||||
caldata_extract_ubi "caldata" 0x5000 0x1000
|
||||
else
|
||||
caldata_extract "wifi_data" 0x5000 0x1000
|
||||
ath9k_patch_mac $(mtd_get_mac_binary wifi_data 0xc)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -334,7 +334,6 @@ CONFIG_VDSO32=y
|
||||
# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
|
||||
# CONFIG_WARP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WNDR4700 is not set
|
||||
# CONFIG_XILINX_SYSACE is not set
|
||||
# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
|
||||
@ -1,24 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Device Tree for Bluestone (APM821xx) board.
|
||||
*
|
||||
* Copyright (c) 2010, Applied Micro Circuits Corporation
|
||||
* Author: Tirumala R Marri <tmarri@apm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <dt-bindings/dma/dw-dmac.h>
|
||||
@ -40,7 +25,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
CPU00: cpu@0 {
|
||||
CPU0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
model = "PowerPC,apm82181";
|
||||
reg = <0x00000000>;
|
||||
@ -170,7 +155,7 @@
|
||||
dcr-reg = <0x240 0x009>;
|
||||
interrupts = <0x1a IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-parent = <&UIC2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
TRNG: trng@110000 {
|
||||
@ -306,6 +291,8 @@
|
||||
reg = <0xef600800 0x00000014>;
|
||||
interrupt-parent = <&UIC0>;
|
||||
interrupts = <0x03 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -407,6 +394,8 @@
|
||||
dmas = <&AHBDMA0 0 0 1>;
|
||||
dma-names = "sata-dma";
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
SATA1: sata@bffd1800 {
|
||||
@ -417,6 +406,8 @@
|
||||
dmas = <&AHBDMA0 1 0 2>;
|
||||
dma-names = "sata-dma";
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
MSI: ppc4xx-msi@c10000000 {
|
||||
@ -457,7 +448,8 @@
|
||||
dcr-reg = <0x100 0x020>;
|
||||
sdr-base = <0x300>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
/*
|
||||
* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000>,
|
||||
@ -470,7 +462,8 @@
|
||||
/* This drives busses 0x40 to 0x7f */
|
||||
bus-range = <0x40 0x7f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
/*
|
||||
* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Device Tree Source for Meraki MR24 (Ikarem)
|
||||
*
|
||||
* Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
|
||||
*
|
||||
* Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -182,6 +179,57 @@
|
||||
|
||||
&PCIE0 {
|
||||
status = "okay";
|
||||
/*
|
||||
* relevant lspci topology:
|
||||
*
|
||||
* -+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
|
||||
* +-03.0-[44]----00.0
|
||||
*
|
||||
*/
|
||||
|
||||
bridge@64,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@65,0 {
|
||||
/* IDT PES3T3 PCI Express Switch */
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00410000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@66,2 {
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00421000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@67,0 {
|
||||
/* Atheros AR9380 2.4GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00430000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
bridge@66,3 {
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00421800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@68,0 {
|
||||
/* Atheros AR9380 5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00440000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&MSI {
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Device Tree Source for Meraki MX60/MX60W (Buckminster)
|
||||
*
|
||||
* Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
|
||||
*
|
||||
* Based on Cisco Meraki DTS extracted from release wired-12-217818
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -175,6 +172,25 @@
|
||||
&PCIE0 {
|
||||
/* Leave this enabled as u-boot on the MX60 will disable it for us */
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
* relevant lspci topology:
|
||||
*
|
||||
* -+-[0000:40]---00.0-[41-7f]----00.0
|
||||
*/
|
||||
|
||||
bridge@64,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@65,0 {
|
||||
/* Atheros AR9380 2.4/5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00410000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&MSI {
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
/*
|
||||
* Device Tree Source for Netgear WNDAP620
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
@ -26,3 +20,24 @@
|
||||
gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&PCIE0 {
|
||||
/*
|
||||
* relevant lspci topology:
|
||||
*
|
||||
* -+-[0000:40]---00.0-[41-7f]----00.0
|
||||
*/
|
||||
|
||||
bridge@64,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@65,0 {
|
||||
/* Atheros AR9380 5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00410000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
/*
|
||||
* Device Tree Source for Netgear WNDAP660
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
@ -36,3 +30,57 @@
|
||||
gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&PCIE0 {
|
||||
/*
|
||||
* relevant lspci topology:
|
||||
*
|
||||
* -+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
|
||||
* +-03.0-[44]----00.0
|
||||
*
|
||||
*/
|
||||
|
||||
bridge@64,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@65,0 {
|
||||
/* IDT PES3T3 PCI Express Switch */
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00410000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@66,2 {
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00421000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@67,0 {
|
||||
/* Atheros AR9380 2.4/5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00430000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
bridge@66,3 {
|
||||
compatible = "pci111d,8039";
|
||||
reg = <0x00421800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@68,0 {
|
||||
/* Atheros AR9380 2.4/5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00440000 0 0 0 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Device Tree Source for Netgear WNDAP620 and WNDAP660
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include "apm82181.dtsi"
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Device Tree Source for Netgear WNDR4700/WNDR4720 Series
|
||||
*
|
||||
* Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -15,7 +12,7 @@
|
||||
|
||||
/ {
|
||||
model = "Netgear WNDR4700/WNDR4720 Series";
|
||||
compatible = "netgear,wndr4700";
|
||||
compatible = "netgear,wndr4700", "apm,bluestone";
|
||||
|
||||
aliases {
|
||||
serial0 = &UART0;
|
||||
@ -381,6 +378,9 @@
|
||||
usb-blue {
|
||||
label = "wndr4700:blue:usb";
|
||||
gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&usb2_port 1>, <&usb2_port 2>,
|
||||
<&usb3_port 1>, <&usb3_port 2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
logo-white {
|
||||
@ -412,12 +412,103 @@
|
||||
wlan-blue {
|
||||
label = "wndr4700:blue:wlan";
|
||||
gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&PCIE0 {
|
||||
status = "okay";
|
||||
|
||||
/*
|
||||
* relevant lspci topology:
|
||||
*
|
||||
* -+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
|
||||
* +-03.0-[44]----00.0
|
||||
* \-04.0-[45]----00.0
|
||||
*
|
||||
*/
|
||||
|
||||
bridge@64,0 {
|
||||
reg = <0x00400000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@65,0 {
|
||||
/* IDT PES4T4 PCI Express Switch */
|
||||
compatible = "pci111d,803a";
|
||||
reg = <0x00410000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
bridge@66,2 {
|
||||
compatible = "pci111d,803a";
|
||||
reg = <0x00421000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi0: wifi@67,0 {
|
||||
/* Atheros AR9380 5GHz */
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x00430000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
/* wifi CAL & MAC is stored in nvram */
|
||||
|
||||
/*
|
||||
* Because this was such a pain.
|
||||
* Here's the full device path:
|
||||
* pci0000:40/0000:40:00.0/0000:41:00.0/0000:42:02.0/0000:43:00.0
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
bridge@66,3 {
|
||||
compatible = "pci111d,803a";
|
||||
reg = <0x00421800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi1: wifi@68,0 {
|
||||
/* Atheros AR9381 2.4GHz */
|
||||
compatible = "pci168c,0033";
|
||||
reg = <0x00440000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
/* wifi CAL & MAC is stored in nvram */
|
||||
};
|
||||
};
|
||||
|
||||
bridge@66,4 {
|
||||
compatible = "pci111d,803a";
|
||||
reg = <0x00422000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
usb1: usb@69,0 {
|
||||
/* Renesas uPD720202 */
|
||||
compatible = "pci1912,0015";
|
||||
reg = <0x00450000 0 0 0 0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
usb2_port: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <1>;
|
||||
};
|
||||
|
||||
usb3_port: port@2 {
|
||||
reg = <2>;
|
||||
#trigger-source-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&MSI {
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
|
||||
* (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved.
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Netgear Centria N900 WNDR4700/WNDR4720 platform support
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This implemention is based on the simple platform support for the
|
||||
* PowerPC 44x chips.
|
||||
*/
|
||||
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/pci-bridge.h>
|
||||
#include <asm/ppc4xx.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/udbg.h>
|
||||
#include <asm/uic.h>
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ath9k_platform.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
static const struct of_device_id ppc44x_of_bus[] __initconst = {
|
||||
{ .compatible = "ibm,plb4", },
|
||||
{ .compatible = "ibm,opb", },
|
||||
{ .compatible = "ibm,ebc", },
|
||||
{ .compatible = "simple-bus", },
|
||||
{},
|
||||
};
|
||||
|
||||
static int __init ppc44x_device_probe(void)
|
||||
{
|
||||
of_platform_bus_probe(NULL, ppc44x_of_bus, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
machine_device_initcall(wndr4700, ppc44x_device_probe);
|
||||
|
||||
static char *board[] __initdata = {
|
||||
"netgear,wndr4700",
|
||||
};
|
||||
|
||||
static int __init ppc44x_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
int i = 0;
|
||||
|
||||
pcie_bus_config = PCIE_BUS_PEER2PEER; /* force 128 Byte MPS */
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(board); i++) {
|
||||
if (of_flat_dt_is_compatible(root, board[i])) {
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC); /* PCI_PROBE_ONLY */
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
define_machine(wndr4700) {
|
||||
.name = "WNDR4700 Platform",
|
||||
.probe = ppc44x_probe,
|
||||
.progress = udbg_progress,
|
||||
.init_IRQ = uic_init_tree,
|
||||
.get_irq = uic_get_irq,
|
||||
.restart = ppc4xx_reset_system,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
};
|
||||
|
||||
static struct ath9k_platform_data ar9380_wmac0_data = {
|
||||
.led_pin = -1,
|
||||
.eeprom_name = "pci_wmac1.eeprom",
|
||||
};
|
||||
static struct ath9k_platform_data ar9580_wmac1_data = {
|
||||
.led_pin = -1,
|
||||
.eeprom_name = "pci_wmac0.eeprom",
|
||||
};
|
||||
|
||||
static int __init wndr4700_ath9k_eeprom_load(void)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
dev = pci_get_device(PCI_VENDOR_ID_ATHEROS, 0x0030, NULL);
|
||||
if (dev)
|
||||
dev->dev.platform_data = &ar9380_wmac0_data;
|
||||
|
||||
dev = pci_get_device(PCI_VENDOR_ID_ATHEROS, 0x0033, NULL);
|
||||
if (dev)
|
||||
dev->dev.platform_data = &ar9580_wmac1_data;
|
||||
|
||||
return 0;
|
||||
}
|
||||
machine_device_initcall(wndr4700, wndr4700_ath9k_eeprom_load);
|
||||
@ -48,5 +48,4 @@ CONFIG_SENSORS_LM90=y
|
||||
CONFIG_SENSORS_TC654=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_LEDS=y
|
||||
CONFIG_WNDR4700=y
|
||||
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
--- a/arch/powerpc/platforms/44x/Makefile
|
||||
+++ b/arch/powerpc/platforms/44x/Makefile
|
||||
@@ -4,6 +4,7 @@ ifneq ($(CONFIG_PPC4xx_CPM),y)
|
||||
obj-y += idle.o
|
||||
endif
|
||||
obj-$(CONFIG_PPC44x_SIMPLE) += ppc44x_simple.o
|
||||
+obj-$(CONFIG_WNDR4700) += wndr4700.o
|
||||
obj-$(CONFIG_EBONY) += ebony.o
|
||||
obj-$(CONFIG_SAM440EP) += sam440ep.o
|
||||
obj-$(CONFIG_WARP) += warp.o
|
||||
--- a/arch/powerpc/platforms/44x/Kconfig
|
||||
+++ b/arch/powerpc/platforms/44x/Kconfig
|
||||
@@ -243,6 +243,19 @@ config ICON
|
||||
help
|
||||
This option enables support for the AMCC PPC440SPe evaluation board.
|
||||
|
||||
+config WNDR4700
|
||||
+ bool "WNDR4700"
|
||||
+ depends on 44x
|
||||
+ default n
|
||||
+ select APM821xx
|
||||
+ select PCI_MSI
|
||||
+ select PPC4xx_MSI
|
||||
+ select PPC4xx_PCI_EXPRESS
|
||||
+ select IBM_EMAC_RGMII
|
||||
+ select 460EX
|
||||
+ help
|
||||
+ This option enables support for the Netgear WNDR4700/WNDR4720 board.
|
||||
+
|
||||
config XILINX_VIRTEX440_GENERIC_BOARD
|
||||
bool "Generic Xilinx Virtex 5 FXT board support"
|
||||
depends on 44x
|
||||
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /lib/adjust_network.sh ] && {
|
||||
. /lib/adjust_network.sh
|
||||
|
||||
adjust_eth_queue
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=11
|
||||
STOP=98
|
||||
|
||||
adjust_smp_affinity() {
|
||||
test -f /lib/adjust_network.sh && {
|
||||
. /lib/adjust_network.sh
|
||||
|
||||
adjust_eth_queue
|
||||
adjust_edma_smp_affinity
|
||||
adjust_radio_smp_affinity
|
||||
}
|
||||
}
|
||||
|
||||
boot() {
|
||||
adjust_smp_affinity
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# This script sets auto_recovery to "yes" and resets the boot counter to 0.
|
||||
# As a golden rule, this should be the latest script to run at boot. For a
|
||||
# developer snapshot, it is fine to set auto_recovery here. But for a stable
|
||||
# release, this script must in fact turn off auto_recovery.
|
||||
#
|
||||
# Why? Because the custom sysupgrade script for the device will turn on
|
||||
# auto_recovery to "yes". And it's the job of this script to set the
|
||||
# boot boot_count to 0 and then disable auto_recovery, as that condition
|
||||
# means that the stable release went well.
|
||||
#
|
||||
# I have to repeat: this script should be changed for stable releases.
|
||||
|
||||
START=99
|
||||
boot() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case $(board_name) in
|
||||
linksys,ea6350v3)
|
||||
# make sure auto_recovery in uboot is always on
|
||||
IS_AUTO_RECOVERY="$(fw_printenv -n auto_recovery)"
|
||||
if [ "$IS_AUTO_RECOVERY" != "yes" ] ; then
|
||||
fw_setenv auto_recovery yes
|
||||
echo "Linksys EA6350v3: fw_setenv: auto_recovery has been set to yes"
|
||||
fi
|
||||
# reset the boot counter
|
||||
fw_setenv boot_count 0
|
||||
mtd resetbc s_env
|
||||
echo "Linksys EA6350v3: boot counter has been reset"
|
||||
echo "Linksys EA6350v3: boot_part=$(fw_printenv -n boot_part)"
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
#!/bin/sh
|
||||
# this scripts is used for adjust cpu's choice of interrupts.
|
||||
#
|
||||
|
||||
################################################
|
||||
# Adjust smp_affinity of edma
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# execute only once on start-up.
|
||||
################################################
|
||||
adjust_edma_smp_affinity() {
|
||||
grep -q edma_eth_ /proc/interrupts || return 0
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local cpu=0
|
||||
local tx_irq_num
|
||||
|
||||
for tx_num in `seq 0 1 15` ; do
|
||||
cpu=`printf "%x" $((1<<((tx_num/4+0)%nr)))`
|
||||
tx_irq_num=`grep -m1 edma_eth_tx$tx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$tx_irq_num" ] && echo $cpu > /proc/irq/$tx_irq_num/smp_affinity
|
||||
done
|
||||
|
||||
for rx_num in `seq 0 1 7` ; do
|
||||
cpu=`printf "%x" $((1<<((rx_num/2)%nr)))`
|
||||
rx_irq_num=`grep -m1 edma_eth_rx$rx_num /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$rx_irq_num" ] && echo $cpu > /proc/irq/$rx_irq_num/smp_affinity
|
||||
done
|
||||
}
|
||||
|
||||
################################################
|
||||
# Adjust smp_affinity of ath10k for 2G and 5G
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# execute only once on start-up.
|
||||
################################################
|
||||
adjust_radio_smp_affinity() {
|
||||
local irqs="`grep -E 'ath10k' /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`"
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local idx=2
|
||||
|
||||
for irq in $irqs; do
|
||||
cpu=`printf "%x" $((1<<((idx)%nr)))`
|
||||
echo $cpu > /proc/irq/$irq/smp_affinity
|
||||
idx=$((idx+1))
|
||||
done
|
||||
}
|
||||
|
||||
################################################
|
||||
# Adjust queue of eth
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
# Remark:
|
||||
# Each network reboot needs to be executed.
|
||||
################################################
|
||||
adjust_eth_queue() {
|
||||
local nr=`cat /proc/cpuinfo | grep processor | wc -l`
|
||||
local idx=0
|
||||
|
||||
for epath in /sys/class/net/eth[0-9]*; do
|
||||
test -e $epath || break
|
||||
echo $epath | grep -q "\." && continue
|
||||
eth=`basename $epath`
|
||||
idx=0
|
||||
for exps in /sys/class/net/$eth/queues/rx-[0-9]*/rps_cpus; do
|
||||
test -e $exps || break
|
||||
cpu=`printf "%x" $((1<<((idx+1)%nr)))`
|
||||
idx=$((idx+1))
|
||||
echo $cpu > $exps
|
||||
echo 256 > `dirname $exps`/rps_flow_cnt
|
||||
done
|
||||
which ethtool >/dev/null 2>&1 && ethtool -K $eth gro off
|
||||
done
|
||||
|
||||
echo 1024 > /proc/sys/net/core/rps_sock_flow_entries
|
||||
}
|
||||
@ -67,7 +67,6 @@ CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_QCOM=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
|
||||
@ -68,6 +68,10 @@ define Device/shuttle_kd20
|
||||
DEVICE_VENDOR := Shuttle
|
||||
DEVICE_MODEL := KD20
|
||||
SUPPORTED_DEVICES += kd20
|
||||
KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-factory
|
||||
KERNEL_INITRAMFS_SUFFIX := .tar.gz
|
||||
KERNEL_INITRAMFS = kernel-bin | append-dtb | uImage none | omninas-factory | \
|
||||
encrypt-3des sohmuntitnlaes
|
||||
DEVICE_PACKAGES := kmod-usb2-oxnas kmod-usb3 kmod-usb-ledtrig-usbport \
|
||||
kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper kmod-hwmon-drivetemp \
|
||||
kmod-hwmon-gpiofan kmod-ata-oxnas-sata kmod-md-mod kmod-md-raid0 \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user