aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-20 12:35:00 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-20 12:35:00 +0000
commit599cf4f524016ebd16882f7ec64e2aff325d3b82 (patch)
tree8c186144c966717fe2db431c630ff8dcdd16d91b /target/linux
parentfe2cb26703de11356d8a3089dad47a76eff9337f (diff)
downloadupstream-599cf4f524016ebd16882f7ec64e2aff325d3b82.tar.gz
upstream-599cf4f524016ebd16882f7ec64e2aff325d3b82.tar.bz2
upstream-599cf4f524016ebd16882f7ec64e2aff325d3b82.zip
Add WL-700gE support (based on work by jr)
Includes kernel/diag patch and a new target profile git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6142 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm-2.4/Makefile11
-rwxr-xr-xtarget/linux/brcm-2.4/base-files/etc/init.d/netconfig11
-rw-r--r--target/linux/brcm-2.4/config2
-rw-r--r--target/linux/brcm-2.4/patches/012-aec62xx.patch101
4 files changed, 124 insertions, 1 deletions
diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile
index 0091360c73..28ee7b9205 100644
--- a/target/linux/brcm-2.4/Makefile
+++ b/target/linux/brcm-2.4/Makefile
@@ -112,4 +112,15 @@ define Profile/WLHDD/Description
endef
$(eval $(call Profile,WLHDD))
+define Profile/WL700GE
+ NAME:=WL-700gE
+ PACKAGES:=-ppp -ppp-mod-pppoe -kmod-ipt-nathelper -iptables -dnsmasq -bridge kmod-ide-core kmod-ide-aec62xx kmod-fs-ext3 fdisk e2fsprogs
+endef
+
+define Profile/WL700GE/Description
+ Minimal package set optimized for booting the WL-700gE from flash with a writable filesystem
+ and the utilities to create a new filesystem on the HDD
+endef
+$(eval $(call Profile,WL700GE))
+
$(eval $(call BuildKernel))
diff --git a/target/linux/brcm-2.4/base-files/etc/init.d/netconfig b/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
index 7e3ebcdbf1..4cc23d233b 100755
--- a/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
@@ -101,6 +101,17 @@ start() {
c["wan_ifname"]=""
}
+ # ASUS WL-700gE
+ # These are actually same as defaults above. For some reason this script applies
+ # Generic BCM94704 settings instead so we revert to proper settings here.
+ # Hopefully someone will fix this properly soon.
+ if (model == "ASUS WL-700gE") {
+ c["lan_ifname"]="eth0.0"
+ c["wan_ifname"]="eth0.1"
+ c["vlan0ports"]="1 2 3 4 5*"
+ c["vlan1ports"]="0 5"
+ }
+
print "#### VLAN configuration "
print "config switch eth0"
p("vlan0", "vlan0ports")
diff --git a/target/linux/brcm-2.4/config b/target/linux/brcm-2.4/config
index 8ac37b10aa..91bd41ac9d 100644
--- a/target/linux/brcm-2.4/config
+++ b/target/linux/brcm-2.4/config
@@ -598,7 +598,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
# CONFIG_BLK_DEV_ADMA100 is not set
-# CONFIG_BLK_DEV_AEC62XX is not set
+CONFIG_BLK_DEV_AEC62XX=m
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
diff --git a/target/linux/brcm-2.4/patches/012-aec62xx.patch b/target/linux/brcm-2.4/patches/012-aec62xx.patch
new file mode 100644
index 0000000000..75d7d72ac5
--- /dev/null
+++ b/target/linux/brcm-2.4/patches/012-aec62xx.patch
@@ -0,0 +1,101 @@
+--- linux-2.4.34/drivers/ide/pci/aec62xx.c.old 2006-12-23 22:34:20.000000000 +0200
++++ linux-2.4.34/drivers/ide/pci/aec62xx.c 2007-01-14 12:06:05.000000000 +0200
+@@ -3,6 +3,8 @@
+ *
+ * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
+ *
++ * With Broadcom 4780 patches
++ *
+ */
+
+ #include <linux/module.h>
+@@ -329,7 +331,11 @@
+ ide_hwif_t *hwif = HWIF(drive);
+ struct hd_driveid *id = drive->id;
+
+- if ((id->capability & 1) && drive->autodma) {
++#ifndef CONFIG_BCM947XX
++ if ((id->capability & 1) && drive->autodma) {
++#else
++ if (1) {
++#endif
+ /* Consult the list of known "bad" drives */
+ if (hwif->ide_dma_bad_drive(drive))
+ goto fast_ata_pio;
+@@ -414,10 +416,60 @@
+ {
+ int bus_speed = system_bus_clock();
+
++#ifndef CONFIG_BCM947XX
+ if (dev->resource[PCI_ROM_RESOURCE].start) {
+ pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
+ printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
+ }
++#else
++ if (dev->resource[PCI_ROM_RESOURCE].start) {
++ pci_write_config_dword(dev, PCI_ROM_ADDRESS,
++ dev->resource[PCI_ROM_RESOURCE].
++ start | PCI_ROM_ADDRESS_ENABLE);
++ } else {
++ pci_write_config_dword(dev, PCI_ROM_ADDRESS,
++ dev->resource[PCI_ROM_RESOURCE].
++ start);
++ }
++
++ /* Set IDE controller parameters manually - FIXME: replace magic values */
++ {
++ byte setting;
++
++ pci_write_config_word(dev, PCI_COMMAND, 0x0007);
++ //pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x5A);
++ pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x13);
++
++ pci_write_config_byte(dev, 0x40, 0x31);
++ pci_write_config_byte(dev, 0x41, 0x31);
++ pci_write_config_byte(dev, 0x42, 0x31);
++ pci_write_config_byte(dev, 0x43, 0x31);
++ // Set IDE Command Speed
++ pci_write_config_byte(dev, 0x48, 0x31);
++
++ // Disable WriteSubSysID & PIOROM
++ pci_read_config_byte(dev, 0x49, &setting);
++ setting &= 0x07;
++ pci_write_config_byte(dev, 0x49, setting);
++
++ // Enable PCI burst & INTA & PCI memory read multiple, FIFO threshold=80
++ pci_read_config_byte(dev, 0x4A, &setting);
++ //setting = (setting & 0xFE) | 0xA8;
++ setting = (setting & 0xFE) | 0xD8;
++ setting = (setting & 0xF7);
++ pci_write_config_byte(dev, 0x4A, setting);
++
++ //pci_write_config_byte(dev, 0x4B, 0x20);
++ pci_write_config_byte(dev, 0x4B, 0x2C);
++ //pci_write_config_byte(dev, 0x4B, 0x0C);
++
++ // Set PreRead count: 512 byte
++ pci_write_config_byte(dev, 0x4C, 0);
++ pci_write_config_word(dev, 0x4D, 0x0002);
++ pci_write_config_byte(dev, 0x54, 0);
++ pci_write_config_word(dev, 0x55, 0x0002);
++ }
++#endif
+
+ #if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS)
+ aec_devs[n_aec_devs++] = dev;
+@@ -500,6 +552,7 @@
+
+ static void __init init_setup_aec6x80 (struct pci_dev *dev, ide_pci_device_t *d)
+ {
++#ifndef CONFIG_BCM947XX /* Causes OOPS on BCM4780 */
+ unsigned long bar4reg = pci_resource_start(dev, 4);
+
+ if (inb(bar4reg+2) & 0x10) {
+@@ -512,6 +565,7 @@
+ strcpy(d->name, "AEC6280R");
+ }
+
++#endif
+ ide_setup_pci_device(dev, d);
+ }
+