On Sat, 2012-12-15 at 12:10 +0100, John Crispin wrote: > On 15/12/12 12:08, Stefan Hellermann wrote: > > wow thanks! Nice update! I will try it next week on a few Fritzbox > > 7320, looks like it's almost fully supported (only DECT missing). > > > > > 7320 has limit support > * the TAPI on the 7320 is not lantiq but avm ... never looked into it > and i doubt it will work soon > * wifi eeprom is located inside the TFFS2 and we dont have a driver > working for it yet > * the eth2 is not working yet ;) > > usb and dsl work like a charm however. the wifi and ethernet stuff are > on my todo list however > > John
In addition to SPI not coming up on the Netgear, neither does PCI in sysfs, but I guess that's a WIP. Here's a few interim enhancements to look at. I already know you won't like it, but you will you hate ALL of it? Note: I'm restoring the previous behavior of the leading "-" in bootargs, so that they can be replaced or appended per-target. Signed-off-by: Daniel Gimpelevich <dan...@gimpelevich.san-francisco.ca.us> Index: target/linux/lantiq/image/DGN3500.dtsi =================================================================== --- target/linux/lantiq/image/DGN3500.dtsi (revision 34710) +++ target/linux/lantiq/image/DGN3500.dtsi (working copy) @@ -147,7 +147,7 @@ gpio-leds { compatible = "gpio-leds"; internet { - label = "inernet"; + label = "internet"; gpios = <&gpio 2 1>; }; dsl { @@ -161,7 +161,6 @@ power { label = "power"; gpios = <&gpio 34 1>; - default-state = "on"; }; power2 { label = "power2"; Index: target/linux/lantiq/image/DGN3500A.dts =================================================================== --- target/linux/lantiq/image/DGN3500A.dts (revision 0) +++ target/linux/lantiq/image/DGN3500A.dts (revision 0) @@ -0,0 +1,7 @@ +/dts-v1/; + +/include/ "DGN3500.dtsi" + +/ { + model = "DGN3500 - Netgear DGN3500"; +}; Index: target/linux/lantiq/image/Makefile =================================================================== --- target/linux/lantiq/image/Makefile (revision 34710) +++ target/linux/lantiq/image/Makefile (working copy) @@ -160,6 +160,9 @@ # AR9 +Image/BuildKernel/Profile/DGN3500A=$(call Image/BuildKernel/Template,DGN3500A) +Image/Build/Profile/DGN3500A=$(call Image/Build/$(1),$(1),DGN3500A) + Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B) Image/Build/Profile/DGN3500B=$(call Image/Build/$(1),$(1),DGN3500B) Index: target/linux/lantiq/xway/config-default =================================================================== --- target/linux/lantiq/xway/config-default (revision 34710) +++ target/linux/lantiq/xway/config-default (working copy) @@ -6,6 +6,7 @@ CONFIG_INPUT_POLLDEV=y # CONFIG_ISDN is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_USBDEV=y CONFIG_M25PXX_USE_FAST_READ=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y Index: target/linux/lantiq/base-files/lib/preinit/42_athfix =================================================================== --- target/linux/lantiq/base-files/lib/preinit/42_athfix (revision 34710) +++ target/linux/lantiq/base-files/lib/preinit/42_athfix (working copy) @@ -3,9 +3,9 @@ . /lib/functions/lantiq.sh init_atheeprom() { - local board=$(lantiq_board_name) + local board=$(lantiq_board_id) case $board in - "Netgear DGN3500B") + DGN3500*) echo "- loading eeprom -" dd if=/dev/mtd2 of=/sys/firmware/ath_eeprom bs=1k skip=60 count=4 echo 0 > /sys/bus/pci/slots/0000\:00\:0e.0/power Index: target/linux/lantiq/base-files/etc/uci-defaults/leds =================================================================== --- target/linux/lantiq/base-files/etc/uci-defaults/leds (revision 34710) +++ target/linux/lantiq/base-files/etc/uci-defaults/leds (working copy) @@ -9,7 +9,7 @@ [ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tx" [ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/dsl" ] && ucidef_set_led_netdev "dsl" "dsl" "dsl" "pppoe-wan" +[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" for a in `ls /sys/class/leds/`; do grep -q "\[none\]" /sys/class/leds/$a/trigger Index: target/linux/lantiq/base-files/etc/diag.sh =================================================================== --- target/linux/lantiq/base-files/etc/diag.sh (revision 34710) +++ target/linux/lantiq/base-files/etc/diag.sh (working copy) @@ -25,6 +25,30 @@ return } + [ -d /sys/class/leds/power2/ ] && { + + case "$1" in + preinit) + echo heartbeat >/sys/class/leds/power2/trigger + ;; + init) + echo default-on >/sys/class/leds/power/trigger + ;; + failsafe) + echo none >/sys/class/leds/power2/trigger + echo timer >/sys/class/leds/power/trigger + echo 100 >/sys/class/leds/power/delay_on + echo 100 >/sys/class/leds/power/delay_off + ;; + done) + echo none >/sys/class/leds/power/trigger + echo none >/sys/class/leds/power2/trigger + echo 1 >/sys/class/leds/power/brightness + ;; + esac + return + } + case "$1" in preinit) echo heartbeat >/sys/class/leds/power/trigger Index: target/linux/lantiq/patches-3.7/0304-cmdline.patch =================================================================== --- target/linux/lantiq/patches-3.7/0304-cmdline.patch (revision 0) +++ target/linux/lantiq/patches-3.7/0304-cmdline.patch (revision 0) @@ -0,0 +1,38 @@ +Index: linux-3.7-rc8/arch/mips/kernel/prom.c +=================================================================== +--- linux-3.7-rc8.orig/arch/mips/kernel/prom.c 2012-12-15 15:58:35.924298047 -0800 ++++ linux-3.7-rc8/arch/mips/kernel/prom.c 2012-12-15 16:32:35.918413821 -0800 +@@ -15,6 +15,7 @@ + #include <linux/bootmem.h> + #include <linux/initrd.h> + #include <linux/debugfs.h> ++#include <linux/string.h> + #include <linux/of.h> + #include <linux/of_fdt.h> + #include <linux/of_irq.h> +@@ -52,6 +53,8 @@ + + void __init early_init_devtree(void *params) + { ++ static char chosen_cmdline[COMMAND_LINE_SIZE]; ++ + /* Setup flat device-tree pointer */ + initial_boot_params = params; + +@@ -59,8 +62,14 @@ + * device-tree, including the platform type, initrd location and + * size, and more ... + */ +- of_scan_flat_dt(early_init_dt_scan_chosen, arcs_cmdline); +- ++ of_scan_flat_dt(early_init_dt_scan_chosen, chosen_cmdline); ++ if (chosen_cmdline[0] == '-') ++ strlcpy(arcs_cmdline, chosen_cmdline + 1, COMMAND_LINE_SIZE); ++ else { ++ if ((chosen_cmdline[0] != '\0') && (arcs_cmdline[0] != '\0')) ++ strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE); ++ strlcat(arcs_cmdline, chosen_cmdline, COMMAND_LINE_SIZE); ++ } + + /* Scan memory nodes */ + of_scan_flat_dt(early_init_dt_scan_root, NULL); _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel