Re: [OpenWrt-Devel] [PATCH] Re: [lantiq] kernel 3.7 update

2012-12-16 Thread John Crispin
as always please just state what yoiu want so we can implement it 
properly instead of random hacks


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Re: [lantiq] kernel 3.7 update

2012-12-16 Thread Daniel Gimpelevich
On Sun, 2012-12-16 at 09:26 +0100, John Crispin wrote: 
 as always please just state what yoiu want so we can implement it 
 properly instead of random hacks

Here is a list of things the random hacks do:
1) Fix a typo in the internet LED name
2) Provide some useful function for the power2 LED 
3) Fix the fact that trunk fails to generate any image for the DGN3500A profile
4) Add the usbdev trigger to the Kconfig since the devtree file already uses it
5) Make the 42_athfix, when it's applicable again, apply to both flavors of 
DGN3500, not just the B
6) Assign the _correct_ LED to netdev
7) As previously stated, the bootargs code as is leaves the original bootargs 
unconditionally inaccessible, so restore the previous behavior

This time, I have refrained from stepping on anything you might
conceivably already be working on differently. You might still consider
all of the above random hacks not to be done properly and you say to
wait, but you know, one of the purposes of bringing a deck of cards on a
mountain hike is that if you're alone and start playing Solitaire, it
guarantees someone will come along and tell you which card to move
where. When that happens, you can either get annoyed and shoo them away,
or accept the input and bring the game to a sooner conclusion. Either
way, the input is still there.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Re: [lantiq] kernel 3.7 update

2012-12-15 Thread Daniel Gimpelevich
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/\: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