[OpenWrt-Devel] [PATCH] brcm47xx: don't create named switch_vlan sections

2014-07-25 Thread Rafał Miłecki
It doesn't seem to be used anywhere, it's incompatible with other
targets and can be confusing. People may think they need to update
section name every time they change VLAN ID (well, even I was doing
that).

Signed-off-by: Rafał Miłecki zaj...@gmail.com
---
 target/linux/brcm47xx/base-files/etc/init.d/netconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig 
b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
index 193d433..1890cd0 100755
--- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
@@ -218,11 +218,9 @@ start() {
[ -n $cfg ]  uci rename network.$cfg=eth0
[ -n $vlan1ports ]  {
cfg=`ucidef_add_switch_vlan $switchname 1 
$vlan1ports`
-   [ -n $cfg ]  uci rename network.$cfg=eth0_1
}
[ -n $vlan2ports ]  {
cfg=`ucidef_add_switch_vlan $switchname 2 
$vlan2ports`
-   [ -n $cfg ]  uci rename network.$cfg=eth0_2
}
}
 
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] uClibc

2014-07-25 Thread smilebef
/lib/ld-uClibc.so.0: No such file or directory


Hallo guys,

have any body a idee for the dependency entry?

Is there some were a list with the names of the hole ammount of
librarys?


Thanks guy.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH]ramips:support Lenovo AC1200 Wireless router

2014-07-25 Thread Roman Yeryomin
On 25 July 2014 04:20, Lintel Huang lintel.hu...@gmail.com wrote:
 No problem,why not? please give me address then I express it.

You've put it into the case with
lan_mac=$(mtd_get_mac_binary factory 4)
This means
mtd-mac-address = factory 0x4;
in dts will do the job.

 to Roman:
 My  boards 's GiGa Phy has three type,ICplus IP10001+, Marvell 88E5211
 ,RealTek RTL8211E,so I select it.

Your board has all 3 PHYs? That sounds... unbelievable.

Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [mpc83xx] add menuconfig-option for rb333 and rb600

2014-07-25 Thread Claudio Thomas
Hi, as reaction of the following email:
 
On 15.07.2014 15:05, Claudio Thomas wrote:
 Subject: [OpenWrt-Devel] When to use Target Profile or Subtarget

 Hi,
 I'm adapting the Freescale MPC83xx platform, so that multiple devices
 can be selected.
 Actually the following boards are in use, but hard-coded over files or
 file-patches and not selectable be menuconfig
 - RouterBOARD 333
 - RouterBOARD 600
 This makes it unnecessary difficult to add new devices...
...I've wrote the in the subject mentioned patch (2014-07-21 15:48:12).
Is there a reason why the patch is not committed yet?
Should I change anything, like make only one profile for rb333+rb600 or
is the coding style not as whiched?

I would be glad to adapt the patch to be conform to the needs of OpenWrt.
My goal is, that I would like to add the following boards:
http://www.xmodus-systems.de/en/terminals/routers.html
But to add them, it is necessary that the compilation of the kernelnames
dtbImage.rb600 dtbImage.rb333 needs to be conditional. Actually they
are unconditional.

So, I'm glad to hear your comments what I could make better ob my
changes or maybe also, why I should not change it at all.

Best regards,
Claudio
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [mpc83xx] add menuconfig-option for rb333 and rb600

2014-07-25 Thread Imre Kaloz

Hi,

On Fri, 25 Jul 2014 11:34:49 +0200, Claudio Thomas c...@xmodus-systems.de 
wrote:


Hi, as reaction of the following email:
On 15.07.2014 15:05, Claudio Thomas wrote:

Subject: [OpenWrt-Devel] When to use Target Profile or Subtarget

Hi,
I'm adapting the Freescale MPC83xx platform, so that multiple devices
can be selected.
Actually the following boards are in use, but hard-coded over files or
file-patches and not selectable be menuconfig
- RouterBOARD 333
- RouterBOARD 600
This makes it unnecessary difficult to add new devices...

...I've wrote the in the subject mentioned patch (2014-07-21 15:48:12).
Is there a reason why the patch is not committed yet?
Should I change anything, like make only one profile for rb333+rb600 or
is the coding style not as whiched?

I would be glad to adapt the patch to be conform to the needs of OpenWrt.
My goal is, that I would like to add the following boards:
http://www.xmodus-systems.de/en/terminals/routers.html
But to add them, it is necessary that the compilation of the kernelnames
dtbImage.rb600 dtbImage.rb333 needs to be conditional. Actually they
are unconditional.

So, I'm glad to hear your comments what I could make better ob my
changes or maybe also, why I should not change it at all.


I see no technical reason why would it be required to make them conditional nor 
why would it be difficult to add new devices - so what are your problems?


Best regards,

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


Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1

2014-07-25 Thread Saverio Proto
Hello John,

there will be no release branch here ?
http://git.openwrt.org/

thanks

Saverio


2014-07-14 11:12 GMT+02:00 John Crispin j...@phrozen.org:

 The OpenWrt developers are proud to announce the first release
 candidate of OpenWrt Barrier Breaker.
   ___ __
  |   |.-.-.-.|  |  |  |..|  |_
  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
  |___||   __|_|__|__||||__|  ||
   |__| W I R E L E S S   F R E E D O M
  -
  BARRIER BREAKER (14.07 RC1)
  -
   * 1/2 oz Galliano Pour all ingredients into
   * 4 oz cold Coffeean irish coffee mug filled
   * 1 1/2 oz Dark Rum   with crushed ice. Stir.
   * 2 tsp. Creme de Cacao
  -

 http://downloads.openwrt.org/barrier_breaker/14.07-rc1/

 ** Highlights since Attitude Adjustment **
 Default configuration and images

 * Linux kernel updated to version 3.10

 * Procd: new preinit, init, hotplug and event system written in C

 * Native IPv6-support
 - RA  DHCPv6+PD client and server
 - Local prefix allocation  source-restricted routes
   (multihoming)

 * Filesystem improvements
 - Added support for sysupgrade on NAND-flash
 - Added support for filesystem snapshot and rollback
 - Rewritten mounting system in C for rootfs and block devices

 * UCI configuration improvements
 - Support for testing configuration and rollback to working
   last working state
 - Unified change trigger system to restart services on-demand
 - Added a data validation layer

 * Networking improvements
 - Netifd now handles setup and configuration reload of
   wireless interfaces
 - Added reworked event support to allow obsoleting network
   hotplug-scripts
 - Added support for dynamic firewall rules and zones
 - Added support for transparent multicast to unicast
   translation for bridges
 - Various other fixes and improvements


 Additional highlights selectable in the package feeds or SDK
 * Extended IPv6-support
 - Added DS-Lite support and improved 6to4, 6in4 and 6rd-support
 - Experimental support for Lightweight 4over6, MAP-E and MAP-T
 - Draft-support for self-managing home networks (HNCP)

 * rpcd: new JSONRPC over HTTP-frontend for remote access to ubus

 * mdns: new lightweight mdns daemon (work in progress)

 * Initial support for the musl C standard library

 * Support for QMI-based 3g/4g modems

 * Support for DNSSEC validation

 * Added architecture for package signing and SHA256 hashing

 * ... and many more cool things

 Package feed reorganization
 For quite a while already we are not very satisfied with the quality
 of the packages-feed. To address this, we decided to do a fresh start
 on GitHub. The new feed https://github.com/openwrt/packages should be
 used from now on and package maintainers are asked to move their
 packages there. For the final release we will still build the old
 packages feed but it will be necessary to enable it manually in the
 opkg package list to be usable. All current feeds should not have any
 dependencies on the old.packages feed. Currently a few packages still
 fail, mainly due to these cross feed dependencies. We will contact the
 respective maintainers to help resolve these issues for RC2.


 New build servers
 We would like to express our gratitude to Imagination Technology for
 funding the 2 build servers that we used for the release.


 Whats next ?
 We aim at releasing Chaos Calmer (CC) before the end of the year. The
 CC release will use 3.14 or a newer LTS kernel as baseline.


 Have fun!
 The OpenWrt developer team
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [mpc83xx] add menuconfig-option for rb333 and rb600

2014-07-25 Thread Claudio Thomas
On 25.07.2014 12:25, Imre Kaloz wrote:
 Hi,

 On Fri, 25 Jul 2014 11:34:49 +0200, Claudio Thomas
 c...@xmodus-systems.de wrote:

 Hi, as reaction of the following email:
 On 15.07.2014 15:05, Claudio Thomas wrote:
 Subject: [OpenWrt-Devel] When to use Target Profile or Subtarget

 Hi,
 I'm adapting the Freescale MPC83xx platform, so that multiple devices
 can be selected.
 Actually the following boards are in use, but hard-coded over files or
 file-patches and not selectable be menuconfig
 - RouterBOARD 333
 - RouterBOARD 600
 This makes it unnecessary difficult to add new devices...
 ...I've wrote the in the subject mentioned patch (2014-07-21 15:48:12).
 Is there a reason why the patch is not committed yet?
 Should I change anything, like make only one profile for rb333+rb600 or
 is the coding style not as whiched?

 I would be glad to adapt the patch to be conform to the needs of
 OpenWrt.
 My goal is, that I would like to add the following boards:
 http://www.xmodus-systems.de/en/terminals/routers.html
 But to add them, it is necessary that the compilation of the kernelnames
 dtbImage.rb600 dtbImage.rb333 needs to be conditional. Actually they
 are unconditional.

 So, I'm glad to hear your comments what I could make better ob my
 changes or maybe also, why I should not change it at all.

 I see no technical reason why would it be required to make them
 conditional nor why would it be difficult to add new devices - so what
 are your problems?
Hm, maybe the problem it's in me :-) and I'm to new to the openwrt project.

The last time I've checked the compilation with included dtbImage.rb600
dtbImage.rb333 I were still running in compilation errors. This are
already several month ago (r37942). The workaround at that time was to
simple remove them from the Makefiles. The point is, that the board
needs a different kernel and also a different package set. So my
conclusion at that time was that if I already need a new target and
profile I should encapsulate those kernelnames also in a profile. And
this was my approach now: at first to encapsulate those kernelnames,
than add a new target with profile definition, so that a clean (step by
step) integration of the need changes could be done.

Your Answer, that you don't see a technical reason for a conditional...
makes me assume that the conclusion was wrong and that there must be a
better way or that there is an error in the changes/implementations.

I'm going to re-analyse the problem, so that I can give you a better
answer to what are the problems that occur when both kernelnames exist
in the makefile.

Thank you for your time and consideration,
Claudio
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1

2014-07-25 Thread John Crispin
Hi,

we did rc1 and rc2 in trunk as we were fixing stuff.

rc2 is almost ready, i already have the trunk built, the IB worked for
all targets this time after our fixes. i am about to start one of the
builder on old.packages and the other builder on all the other feeds.
once that is done and rc2 is online we will most likely fork the
release branch and only backport fixes from there on.

John

On 25/07/2014 14:09, Saverio Proto wrote:
 Hello John,
 
 there will be no release branch here ? http://git.openwrt.org/
 
 thanks
 
 Saverio
 
 
 2014-07-14 11:12 GMT+02:00 John Crispin j...@phrozen.org:
 
 The OpenWrt developers are proud to announce the first release 
 candidate of OpenWrt Barrier Breaker. ___
 __ |   |.-.-.-.|  |  |  |..|
 |_ |   -   ||  _  |  -__| ||  |  |  ||   _||   _| |___||
 __|_|__|__||||__|  || |__| W I R E L E S S   F R
 E E D O M - 
 BARRIER BREAKER (14.07 RC1) 
 - * 1/2 oz
 Galliano Pour all ingredients into * 4 oz cold Coffee
 an irish coffee mug filled * 1 1/2 oz Dark Rum   with crushed
 ice. Stir. * 2 tsp. Creme de Cacao 
 -
 
 http://downloads.openwrt.org/barrier_breaker/14.07-rc1/
 
 ** Highlights since Attitude Adjustment ** Default configuration
 and images
 
 * Linux kernel updated to version 3.10
 
 * Procd: new preinit, init, hotplug and event system written in
 C
 
 * Native IPv6-support - RA  DHCPv6+PD client and server - Local
 prefix allocation  source-restricted routes (multihoming)
 
 * Filesystem improvements - Added support for sysupgrade on
 NAND-flash - Added support for filesystem snapshot and rollback -
 Rewritten mounting system in C for rootfs and block devices
 
 * UCI configuration improvements - Support for testing
 configuration and rollback to working last working state -
 Unified change trigger system to restart services on-demand -
 Added a data validation layer
 
 * Networking improvements - Netifd now handles setup and
 configuration reload of wireless interfaces - Added reworked
 event support to allow obsoleting network hotplug-scripts - Added
 support for dynamic firewall rules and zones - Added support for
 transparent multicast to unicast translation for bridges -
 Various other fixes and improvements
 
 
 Additional highlights selectable in the package feeds or SDK *
 Extended IPv6-support - Added DS-Lite support and improved 6to4,
 6in4 and 6rd-support - Experimental support for Lightweight
 4over6, MAP-E and MAP-T - Draft-support for self-managing home
 networks (HNCP)
 
 * rpcd: new JSONRPC over HTTP-frontend for remote access to ubus
 
 * mdns: new lightweight mdns daemon (work in progress)
 
 * Initial support for the musl C standard library
 
 * Support for QMI-based 3g/4g modems
 
 * Support for DNSSEC validation
 
 * Added architecture for package signing and SHA256 hashing
 
 * ... and many more cool things
 
 Package feed reorganization For quite a while already we are not
 very satisfied with the quality of the packages-feed. To address
 this, we decided to do a fresh start on GitHub. The new feed
 https://github.com/openwrt/packages should be used from now on
 and package maintainers are asked to move their packages there.
 For the final release we will still build the old packages feed
 but it will be necessary to enable it manually in the opkg
 package list to be usable. All current feeds should not have any 
 dependencies on the old.packages feed. Currently a few packages
 still fail, mainly due to these cross feed dependencies. We will
 contact the respective maintainers to help resolve these issues
 for RC2.
 
 
 New build servers We would like to express our gratitude to
 Imagination Technology for funding the 2 build servers that we
 used for the release.
 
 
 Whats next ? We aim at releasing Chaos Calmer (CC) before the end
 of the year. The CC release will use 3.14 or a newer LTS kernel
 as baseline.
 
 
 Have fun! The OpenWrt developer team 
 ___ openwrt-devel
 mailing list openwrt-devel@lists.openwrt.org 
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 ___ openwrt-devel
 mailing list openwrt-devel@lists.openwrt.org 
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1

2014-07-25 Thread Aaron Z
Will Nano and WiFiDog be in RC2? They are in trunk, but were not included in 
RC1.

Aaron Z

- Original Message -
 From: John Crispin j...@phrozen.org
 To: openwrt-devel@lists.openwrt.org
 Sent: Friday, July 25, 2014 9:57:52 AM
 Subject: Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1
 
 Hi,
 
 we did rc1 and rc2 in trunk as we were fixing stuff.
 
 rc2 is almost ready, i already have the trunk built, the IB worked
 for
 all targets this time after our fixes. i am about to start one of the
 builder on old.packages and the other builder on all the other feeds.
 once that is done and rc2 is online we will most likely fork the
 release branch and only backport fixes from there on.
 
   John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1

2014-07-25 Thread John Crispin


On 25/07/2014 16:36, Aaron Z wrote:
 Will Nano and WiFiDog be in RC2? They are in trunk, but were not
 included in RC1.
 
 Aaron Z
 

Hi,

they are not in trunk and hence were not in rc1 :)

the old.packages feed and the maintained feeds will all be in rc2

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


Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1

2014-07-25 Thread John Crispin


On 25/07/2014 17:36, Aaron Z wrote:
 - Original Message - On Friday, July 25, 2014 10:44:42 AM
 John Crispin j...@phrozen.org wrote:
 Subject: Re: [OpenWrt-Devel] Barrier Breaker 14.07-rc1 they are
 not in trunk and hence were not in rc1 :) the old.packages feed
 and the maintained feeds will all be in rc2
 I must be confused then. I was going by the fact that they still
 show up in the trunk snapshots: 
 http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/nano_2.3.6-1_ar71xx.ipk

 
http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/wifidog_20130917-440445db60b0c3aff528ea703a828b0567293387_ar71xx.ipk
 
 Is there another place where I should be looking for trunk
 snapshots?
 
 Aaron Z ___ 
 openwrt-devel mailing list openwrt-devel@lists.openwrt.org 
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 

Hi,

ok, sorry i get it ... there is a collision of meaning of trunk. i
meant that nano is in a feed and not in the main subversion
repository. we only built the main repo for rc1 as too many feeds
packages still failed.

anyhow as of rc2 you will see all the packages you are used to.

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


[OpenWrt-Devel] [PATCH 00/23] add 3.14 kernel support for ar71xx

2014-07-25 Thread Zhao, Gang
Tested on a tp-link wr703n, all seem okay.

The last patch fix spi ath79 fast read should be backported to
3.10(barrier breaker), it will be sent separately.

The boot log:
root@OpenWrt:/# dmesg 
[0.00] Linux version 3.14.12 (zhao@hello.world) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r41595) ) #1 Sat Jul 26 09:43:28 CST 2014
[0.00] MyLoader: sysp=388dd517, boardp=04505212, parts=7709ac36
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 00019374 (MIPS 24Kc)
[0.00] SoC: Atheros AR9330 rev 1
[0.00] Determined physical RAM map:
[0.00]  memory: 0200 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x01ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x01ff]
[0.00] On node 0 totalpages: 8192
[0.00] free_area_init_node: node 0, pgdat 80334420, node_mem_map 
8100
[0.00]   Normal zone: 64 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 8192 pages, LIFO batch:0
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 
bytes
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 8128
[0.00] Kernel command line:  board=TL-WR703N console=ttyATH0,115200 
rootfstype=squashfs,jffs2 noinitrd
[0.00] PID hash table entries: 128 (order: -3, 512 bytes)
[0.00] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[0.00] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 28652K/32768K available (2363K kernel code, 122K rwdata, 
496K rodata, 208K init, 187K bss, 4116K reserved)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] NR_IRQS:51
[0.00] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, 
Ref:25.000MHz
[0.00] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[0.08] pid_max: default: 32768 minimum: 301
[0.08] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.09] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.10] NET: Registered protocol family 16
[0.10] MIPS: machine is TP-LINK TL-WR703N v1
[0.36] bio: create slab bio-0 at 0
[0.37] Switched to clocksource MIPS
[0.37] NET: Registered protocol family 2
[0.38] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[0.38] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.39] TCP: Hash tables configured (established 1024 bind 1024)
[0.39] TCP: reno registered
[0.40] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.40] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.41] NET: Registered protocol family 1
[0.41] PCI: CLS 0 bytes, default 32
[0.42] futex hash table entries: 256 (order: -1, 3072 bytes)
[0.44] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.44] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.46] msgmni has been set to 55
[0.46] io scheduler noop registered
[0.46] io scheduler deadline registered (default)
[0.47] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[0.47] ar933x-uart: ttyATH0 at MMIO 0x1802 (irq = 11, base_baud = 
1562500) is a AR933X UART
[0.48] console [ttyATH0] enabled
[0.49] bootconsole [early0] disabled
[0.50] m25p80 spi0.0: found s25sl032p, expected m25p80
[0.51] m25p80 spi0.0: s25sl032p (4096 Kbytes)
[0.51] 5 tp-link partitions found on MTD device spi0.0
[0.52] Creating 5 MTD partitions on spi0.0:
[0.52] 0x-0x0002 : u-boot
[0.53] 0x0002-0x0012aa2c : kernel
[0.53] mtd: partition kernel must either start or end on erase block 
boundary or be smaller than an erase block -- forcing read-only
[0.55] 0x0012aa2c-0x003f : rootfs
[0.55] mtd: partition rootfs must either start or end on erase block 
boundary or be smaller than an erase block -- forcing read-only
[0.56] mtd: device 2 (rootfs) set to be root filesystem
[0.57] 1 squashfs-split partitions found on MTD device rootfs
[0.57] 0x002f-0x003f : rootfs_data
[0.58] 0x003f-0x0040 : art
[0.59] 0x0002-0x003f : firmware
[0.61] libphy: ag71xx_mdio: probed
[  

[OpenWrt-Devel] [PATCH 02/23] ar71xx: remove unneeded patches

2014-07-25 Thread Zhao, Gang
Already applied in upstream.

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...S-ath79-don-t-hardwire-cpu_has_dsp-2-to-0.patch | 31 --
 ...simplify-platform_get_resource_byname-dev.patch | 70 -
 ...r933x_uart-convert-to-use-devm_-functions.patch | 72 --
 ...h79-wdt-avoid-spurious-restarts-on-AR934x.patch | 48 ---
 4 files changed, 221 deletions(-)
 delete mode 100644 
target/linux/ar71xx/patches-3.14/100-MIPS-ath79-don-t-hardwire-cpu_has_dsp-2-to-0.patch
 delete mode 100644 
target/linux/ar71xx/patches-3.14/101-MIPS-ath79-simplify-platform_get_resource_byname-dev.patch
 delete mode 100644 
target/linux/ar71xx/patches-3.14/103-tty-ar933x_uart-convert-to-use-devm_-functions.patch
 delete mode 100644 
target/linux/ar71xx/patches-3.14/104-watchdog-ath79-wdt-avoid-spurious-restarts-on-AR934x.patch

diff --git 
a/target/linux/ar71xx/patches-3.14/100-MIPS-ath79-don-t-hardwire-cpu_has_dsp-2-to-0.patch
 
b/target/linux/ar71xx/patches-3.14/100-MIPS-ath79-don-t-hardwire-cpu_has_dsp-2-to-0.patch
deleted file mode 100644
index ecced79..000
--- 
a/target/linux/ar71xx/patches-3.14/100-MIPS-ath79-don-t-hardwire-cpu_has_dsp-2-to-0.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From c9da75bfa6cd7a47f5b2a1d183d34c165a06dd1a Mon Sep 17 00:00:00 2001
-From: Gabor Juhos juh...@openwrt.org
-Date: Thu, 22 Aug 2013 11:15:18 +0200
-Subject: [PATCH] MIPS: ath79: don't hardwire cpu_has_dsp{2} to 0
-
-The ath79 code supports various SoCs which are using either a 24Kc
-or a 74Kc core. The 74Kc core has DSP support, so don't hardwire
-the values to zero.
-
-Commit 00dc5ce2a653a332190aa29b2e1f3bceaa7d5b8d (MIPS: ath79: don't
-hardcode the unavailability of the DSP ASE) has fixed this already,
-but that change got reverted by 475032564ed96c94c085e3e7a90e07d150a7cec9
-(MIPS: Hardwire detection of DSP ASE Rev 2 for systems, as required.)
-
-Reported-by: Helmut Schaa helmut.sc...@googlemail.com
-Signed-off-by: Gabor Juhos juh...@openwrt.org

- arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h |2 --
- 1 file changed, 2 deletions(-)
-
 a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
-+++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
-@@ -42,8 +42,6 @@
- #define cpu_has_mips64r1  0
- #define cpu_has_mips64r2  0
- 
--#define cpu_has_dsp   0
--#define cpu_has_dsp2  0
- #define cpu_has_mipsmt0
- 
- #define cpu_has_64bits0
diff --git 
a/target/linux/ar71xx/patches-3.14/101-MIPS-ath79-simplify-platform_get_resource_byname-dev.patch
 
b/target/linux/ar71xx/patches-3.14/101-MIPS-ath79-simplify-platform_get_resource_byname-dev.patch
deleted file mode 100644
index 04e2a25..000
--- 
a/target/linux/ar71xx/patches-3.14/101-MIPS-ath79-simplify-platform_get_resource_byname-dev.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 59a93f8909b8ab5d61e024e8b3771fdf94a774f0 Mon Sep 17 00:00:00 2001
-From: Julia Lawall julia.law...@lip6.fr
-Date: Mon, 19 Aug 2013 10:51:56 +0200
-Subject: [PATCH] MIPS: ath79: simplify 
platform_get_resource_byname/devm_ioremap_resource
-
-Remove unneeded error handling on the result of a call to
-platform_get_resource_byname when the value is passed to devm_ioremap_resource.
-
-A simplified version of the semantic patch that makes this change is as
-follows: (http://coccinelle.lip6.fr/)
-
-// smpl
-@@
-expression pdev,res,e,e1;
-expression ret != 0;
-identifier l;
-@@
-
-  res = platform_get_resource_byname(...);
-- if (res == NULL) { ... \(goto l;\|return ret;\) }
-  e = devm_ioremap_resource(e1, res);
-// /smpl
-
-Signed-off-by: Julia Lawall julia.law...@lip6.fr
-Acked-by: Gabor Juhos juh...@openwrt.org

- arch/mips/pci/pci-ar71xx.c |3 ---
- arch/mips/pci/pci-ar724x.c |9 -
- 2 files changed, 12 deletions(-)
-
 a/arch/mips/pci/pci-ar71xx.c
-+++ b/arch/mips/pci/pci-ar71xx.c
-@@ -363,9 +363,6 @@ static int ar71xx_pci_probe(struct platf
-   spin_lock_init(apc-lock);
- 
-   res = platform_get_resource_byname(pdev, IORESOURCE_MEM, cfg_base);
--  if (!res)
--  return -EINVAL;
--
-   apc-cfg_base = devm_ioremap_resource(pdev-dev, res);
-   if (IS_ERR(apc-cfg_base))
-   return PTR_ERR(apc-cfg_base);
 a/arch/mips/pci/pci-ar724x.c
-+++ b/arch/mips/pci/pci-ar724x.c
-@@ -362,25 +362,16 @@ static int ar724x_pci_probe(struct platf
-   return -ENOMEM;
- 
-   res = platform_get_resource_byname(pdev, IORESOURCE_MEM, ctrl_base);
--  if (!res)
--  return -EINVAL;
--
-   apc-ctrl_base = devm_ioremap_resource(pdev-dev, res);
-   if (IS_ERR(apc-ctrl_base))
-   return PTR_ERR(apc-ctrl_base);
- 
-   res = platform_get_resource_byname(pdev, IORESOURCE_MEM, cfg_base);
--  if (!res)
--  return -EINVAL;
--
-   apc-devcfg_base = devm_ioremap_resource(pdev-dev, res);
-   if (IS_ERR(apc-devcfg_base))
-   return PTR_ERR(apc-devcfg_base);
- 
-  

[OpenWrt-Devel] [PATCH 05/23] ar71xx: refresh 406-mtd-m25p80-allow-to-specify-max-read-size.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...mtd-m25p80-allow-to-specify-max-read-size.patch | 27 ++
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
 
b/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
index ecf8110..5b9fa5b 100644
--- 
a/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
+++ 
b/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
@@ -1,26 +1,27 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -93,6 +93,7 @@ struct m25p {
-   u8  erase_opcode;
+@@ -115,6 +115,7 @@ struct m25p {
+   u8  program_opcode;
u8  *command;
-   boolfast_read;
+   enum read_type  flash_read;
 +  size_t  max_read_len;
  };
  
  static inline struct m25p *mtd_to_m25p(struct mtd_info *mtd)
-@@ -344,6 +345,7 @@ static int m25p80_read(struct mtd_info *
-   struct spi_transfer t[2];
+@@ -517,6 +518,7 @@ static int m25p80_read(struct mtd_info *
struct spi_message m;
uint8_t opcode;
+   int dummy;
 +  loff_t ofs;
  
pr_debug(%s: %s from 0x%08x, len %zd\n, dev_name(flash-spi-dev),
__func__, (u32)from, len);
-@@ -359,19 +361,10 @@ static int m25p80_read(struct mtd_info *
-   t[0].len = m25p_cmdsz(flash) + (flash-fast_read ? 1 : 0);
+@@ -534,29 +536,51 @@ static int m25p80_read(struct mtd_info *
+   t[0].len = m25p_cmdsz(flash) + dummy;
spi_message_add_tail(t[0], m);
  
 -  t[1].rx_buf = buf;
+-  t[1].rx_nbits = m25p80_rx_nbits(flash);
 -  t[1].len = len;
spi_message_add_tail(t[1], m);
  
@@ -33,12 +34,8 @@
 -  return 1;
 -  }
 -
-   /* FIXME switch to OPCODE_FAST_READ.  It's required for higher
-* clocks; and at this writing, every chip this driver handles
-* supports that opcode.
-@@ -380,13 +373,43 @@ static int m25p80_read(struct mtd_info *
/* Set up the write data buffer. */
-   opcode = flash-fast_read ? OPCODE_FAST_READ : OPCODE_NORM_READ;
+   opcode = flash-read_opcode;
flash-command[0] = opcode;
 -  m25p_addr2cmd(flash, from, flash-command);
 +  ofs = 0;
@@ -60,6 +57,7 @@
 +  readlen = len;
 +
 +  t[1].rx_buf = buf + ofs;
++  t[1].rx_nbits = m25p80_rx_nbits(flash);
 +  t[1].len = readlen;
 +
 +  m25p_addr2cmd(flash, from + ofs, flash-command);
@@ -74,8 +72,7 @@
 +  return 1;
 +  }
  
--  *retlen = m.actual_length - m25p_cmdsz(flash) -
--  (flash-fast_read ? 1 : 0);
+-  *retlen = m.actual_length - m25p_cmdsz(flash) - dummy;
 +  ofs += done;
 +  len -= done;
 +  }
@@ -84,7 +81,7 @@
mutex_unlock(flash-lock);
  
return 0;
-@@ -1022,6 +1045,12 @@ static int m25p_probe(struct spi_device
+@@ -1193,6 +1217,12 @@ static int m25p_probe(struct spi_device
flash-mtd._unlock = m25p80_unlock;
}
  
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/23] ar71xx: refresh 409-mtd-rb4xx_nand_driver.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 target/linux/ar71xx/patches-3.14/409-mtd-rb4xx_nand_driver.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.14/409-mtd-rb4xx_nand_driver.patch 
b/target/linux/ar71xx/patches-3.14/409-mtd-rb4xx_nand_driver.patch
index e8ea200..2c5b6d5 100644
--- a/target/linux/ar71xx/patches-3.14/409-mtd-rb4xx_nand_driver.patch
+++ b/target/linux/ar71xx/patches-3.14/409-mtd-rb4xx_nand_driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/nand/Kconfig
 +++ b/drivers/mtd/nand/Kconfig
-@@ -544,4 +544,8 @@ config MTD_NAND_XWAY
+@@ -510,4 +510,8 @@ config MTD_NAND_XWAY
  Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is 
attached
  to the External Bus Unit (EBU).
  
@@ -16,6 +16,6 @@
  obj-$(CONFIG_MTD_NAND_TMIO)   += tmio_nand.o
  obj-$(CONFIG_MTD_NAND_PLATFORM)   += plat_nand.o
 +obj-$(CONFIG_MTD_NAND_RB4XX)  += rb4xx_nand.o
- obj-$(CONFIG_MTD_ALAUDA)  += alauda.o
  obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
  obj-$(CONFIG_MTD_NAND_ORION)  += orion_nand.o
+ obj-$(CONFIG_MTD_NAND_FSL_ELBC)   += fsl_elbc_nand.o
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 04/23] ar71xx: refresh 206-spi-ath79-make-chipselect-logic-more-flexible.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...pi-ath79-make-chipselect-logic-more-flexible.patch | 19 +--
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/206-spi-ath79-make-chipselect-logic-more-flexible.patch
 
b/target/linux/ar71xx/patches-3.14/206-spi-ath79-make-chipselect-logic-more-flexible.patch
index b57dd5d..064382f 100644
--- 
a/target/linux/ar71xx/patches-3.14/206-spi-ath79-make-chipselect-logic-more-flexible.patch
+++ 
b/target/linux/ar71xx/patches-3.14/206-spi-ath79-make-chipselect-logic-more-flexible.patch
@@ -270,17 +270,7 @@ Signed-off-by: Gabor Juhos juh...@openwrt.org
}
  }
  
-@@ -155,6 +178,9 @@ static int ath79_spi_setup(struct spi_de
- {
-   int status = 0;
- 
-+  if (spi-controller_data == NULL)
-+  return -EINVAL;
-+
-   if (spi-bits_per_word  32)
-   return -EINVAL;
- 
-@@ -215,6 +241,10 @@ static int ath79_spi_probe(struct platfo
+@@ -212,6 +235,10 @@ static int ath79_spi_probe(struct platfo
unsigned long rate;
int ret;
  
@@ -291,12 +281,13 @@ Signed-off-by: Gabor Juhos juh...@openwrt.org
master = spi_alloc_master(pdev-dev, sizeof(*sp));
if (master == NULL) {
dev_err(pdev-dev, failed to allocate spi master\n);
-@@ -224,14 +254,10 @@ static int ath79_spi_probe(struct platfo
+@@ -221,15 +248,11 @@ static int ath79_spi_probe(struct platfo
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
  
--  pdata = pdev-dev.platform_data;
+-  pdata = dev_get_platdata(pdev-dev);
 -
+   master-bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
master-setup = ath79_spi_setup;
master-cleanup = ath79_spi_cleanup;
 -  if (pdata) {
@@ -306,5 +297,5 @@ Signed-off-by: Gabor Juhos juh...@openwrt.org
 +  master-bus_num = pdata-bus_num;
 +  master-num_chipselect = pdata-num_chipselect;
  
-   sp-bitbang.master = spi_master_get(master);
+   sp-bitbang.master = master;
sp-bitbang.chipselect = ath79_spi_chipselect;
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 03/23] ar71xx: remove patch 424-net-phy-add-phy_mmd_read_write-functions.patch

2014-07-25 Thread Zhao, Gang
Function phy_{read,write}_mmd defined but not used in this patch
series. Besides, upstream has defined a funcion the same name. Remove
this patch to avoid double defination.

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...-net-phy-add-phy_mmd_read_write-functions.patch | 40 --
 1 file changed, 40 deletions(-)
 delete mode 100644 
target/linux/ar71xx/patches-3.14/424-net-phy-add-phy_mmd_read_write-functions.patch

diff --git 
a/target/linux/ar71xx/patches-3.14/424-net-phy-add-phy_mmd_read_write-functions.patch
 
b/target/linux/ar71xx/patches-3.14/424-net-phy-add-phy_mmd_read_write-functions.patch
deleted file mode 100644
index 961a65b..000
--- 
a/target/linux/ar71xx/patches-3.14/424-net-phy-add-phy_mmd_read_write-functions.patch
+++ /dev/null
@@ -1,40 +0,0 @@
 a/drivers/net/phy/phy.c
-+++ b/drivers/net/phy/phy.c
-@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct
-   return ret;
- }
- 
-+int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr)
-+{
-+  return phy_read_mmd_indirect(phydev-bus, prtad, devad, phydev-addr);
-+}
-+EXPORT_SYMBOL(phy_read_mmd);
-+
- /**
-  * phy_write_mmd_indirect - writes data to the MMD registers
-  * @bus: the target MII bus
-@@ -1034,6 +1040,12 @@ static void phy_write_mmd_indirect(struc
-   bus-write(bus, addr, MII_MMD_DATA, data);
- }
- 
-+void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data)
-+{
-+  phy_write_mmd_indirect(phydev-bus, prtad, devad, phydev-addr, data);
-+}
-+EXPORT_SYMBOL(phy_write_mmd);
-+
- /**
-  * phy_init_eee - init and check the EEE feature
-  * @phydev: target phy_device struct
 a/include/linux/phy.h
-+++ b/include/linux/phy.h
-@@ -580,6 +580,9 @@ int phy_register_fixup_for_uid(u32 phy_u
-   int (*run)(struct phy_device *));
- int phy_scan_fixups(struct phy_device *phydev);
- 
-+int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr);
-+void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data);
-+
- int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
- int phy_get_eee_err(struct phy_device *phydev);
- int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data);
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 07/23] ar71xx: refresh patches-3.14/410-mtd-rb750-nand-driver.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 target/linux/ar71xx/patches-3.14/410-mtd-rb750-nand-driver.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.14/410-mtd-rb750-nand-driver.patch 
b/target/linux/ar71xx/patches-3.14/410-mtd-rb750-nand-driver.patch
index bf84807..a031f4b 100644
--- a/target/linux/ar71xx/patches-3.14/410-mtd-rb750-nand-driver.patch
+++ b/target/linux/ar71xx/patches-3.14/410-mtd-rb750-nand-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/nand/Kconfig
 +++ b/drivers/mtd/nand/Kconfig
-@@ -548,4 +548,8 @@ config MTD_NAND_RB4XX
+@@ -514,4 +514,8 @@ config MTD_NAND_RB4XX
tristate NAND flash driver for RouterBoard 4xx series
depends on MTD_NAND  ATH79_MACH_RB4XX
  
@@ -16,6 +16,6 @@
  obj-$(CONFIG_MTD_NAND_PLATFORM)   += plat_nand.o
  obj-$(CONFIG_MTD_NAND_RB4XX)  += rb4xx_nand.o
 +obj-$(CONFIG_MTD_NAND_RB750)  += rb750_nand.o
- obj-$(CONFIG_MTD_ALAUDA)  += alauda.o
  obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
  obj-$(CONFIG_MTD_NAND_ORION)  += orion_nand.o
+ obj-$(CONFIG_MTD_NAND_FSL_ELBC)   += fsl_elbc_nand.o
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 09/23] ar71xx: refresh 425-net-phy-at803x-allow-to-configure-via-pdata.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...t-phy-at803x-allow-to-configure-via-pdata.patch | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/425-net-phy-at803x-allow-to-configure-via-pdata.patch
 
b/target/linux/ar71xx/patches-3.14/425-net-phy-at803x-allow-to-configure-via-pdata.patch
index 788653f..ffaceca 100644
--- 
a/target/linux/ar71xx/patches-3.14/425-net-phy-at803x-allow-to-configure-via-pdata.patch
+++ 
b/target/linux/ar71xx/patches-3.14/425-net-phy-at803x-allow-to-configure-via-pdata.patch
@@ -13,9 +13,9 @@
  
  #define AT803X_INTR_ENABLE0x12
  #define AT803X_INTR_STATUS0x13
-@@ -28,10 +30,61 @@
- #define AT803X_MMD_ACCESS_CONTROL_DATA0x0E
- #define AT803X_FUNC_DATA  0x4003
+@@ -32,10 +34,61 @@
+ #define AT803X_DEBUG_SYSTEM_MODE_CTRL 0x05
+ #define AT803X_DEBUG_RGMII_TX_CLK_DLY BIT(8)
  
 +#define AT803X_PCS_SMART_EEE_CTRL30x805D
 +
@@ -72,11 +72,11 @@
 +  at803x_dbg_reg_rmw(phydev, reg, clear, 0);
 +}
 +
- static void at803x_set_wol_mac_addr(struct phy_device *phydev)
+ static int at803x_set_wol(struct phy_device *phydev,
+ struct ethtool_wolinfo *wol)
  {
-   struct net_device *ndev = phydev-attached_dev;
-@@ -62,8 +115,16 @@ static void at803x_set_wol_mac_addr(stru
-   }
+@@ -139,8 +192,16 @@ static int at803x_resume(struct phy_devi
+   return 0;
  }
  
 +static void at803x_disable_smarteee(struct phy_device *phydev)
@@ -90,11 +90,11 @@
  {
 +  struct at803x_platform_data *pdata;
int val;
+   int ret;
u32 features;
-   int status;
-@@ -105,6 +166,26 @@ static int at803x_config_init(struct phy
-   status = phy_write(phydev, AT803X_INTR_ENABLE, AT803X_WOL_ENABLE);
-   status = phy_read(phydev, AT803X_INTR_STATUS);
+@@ -188,6 +249,26 @@ static int at803x_config_init(struct phy
+   return ret;
+   }
  
 +  pdata = dev_get_platdata(phydev-dev);
 +  if (pdata) {
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 10/23] ar71xx: refresh 431-spi-add-various-flags.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../ar71xx/patches-3.14/431-spi-add-various-flags.patch| 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.14/431-spi-add-various-flags.patch 
b/target/linux/ar71xx/patches-3.14/431-spi-add-various-flags.patch
index dca3366..2c1bc8e 100644
--- a/target/linux/ar71xx/patches-3.14/431-spi-add-various-flags.patch
+++ b/target/linux/ar71xx/patches-3.14/431-spi-add-various-flags.patch
@@ -1,15 +1,15 @@
 --- a/include/linux/spi/spi.h
 +++ b/include/linux/spi/spi.h
-@@ -519,6 +519,8 @@ struct spi_transfer {
-   dma_addr_t  rx_dma;
- 
+@@ -583,6 +583,8 @@ struct spi_transfer {
unsignedcs_change:1;
+   unsignedtx_nbits:3;
+   unsignedrx_nbits:3;
 +  unsignedverify:1;
 +  unsignedfast_write:1;
-   u8  bits_per_word;
-   u16 delay_usecs;
-   u32 speed_hz;
-@@ -560,6 +562,7 @@ struct spi_message {
+ #define   SPI_NBITS_SINGLE0x01 /* 1bit transfer */
+ #define   SPI_NBITS_DUAL  0x02 /* 2bits transfer */
+ #define   SPI_NBITS_QUAD  0x04 /* 4bits transfer */
+@@ -627,6 +629,7 @@ struct spi_message {
struct spi_device   *spi;
  
unsignedis_dma_mapped:1;
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 11/23] ar71xx: refresh 450-gpio-nxp-74hc153-gpio-chip-driver.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../ar71xx/patches-3.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch 
b/target/linux/ar71xx/patches-3.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch
index eb13b87..54db1e8 100644
--- 
a/target/linux/ar71xx/patches-3.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch
+++ 
b/target/linux/ar71xx/patches-3.14/450-gpio-nxp-74hc153-gpio-chip-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -717,4 +717,12 @@ config GPIO_VIPERBOARD
+@@ -834,4 +834,12 @@ config GPIO_VIPERBOARD
River Tech's viperboard.h for detailed meaning
of the module parameters.
  
@@ -15,11 +15,11 @@
  endif
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -50,6 +50,7 @@ obj-$(CONFIG_GPIO_MSM_V2)+= gpio-msm-v2
+@@ -56,6 +56,7 @@ obj-$(CONFIG_GPIO_MSM_V2)+= gpio-msm-v2
  obj-$(CONFIG_GPIO_MVEBU)+= gpio-mvebu.o
  obj-$(CONFIG_GPIO_MXC)+= gpio-mxc.o
  obj-$(CONFIG_GPIO_MXS)+= gpio-mxs.o
 +obj-$(CONFIG_GPIO_NXP_74HC153)+= gpio-nxp-74hc153.o
+ obj-$(CONFIG_GPIO_OCTEON) += gpio-octeon.o
  obj-$(CONFIG_ARCH_OMAP)   += gpio-omap.o
  obj-$(CONFIG_GPIO_PCA953X)+= gpio-pca953x.o
- obj-$(CONFIG_GPIO_PCF857X)+= gpio-pcf857x.o
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 12/23] ar71xx: refresh 451-gpio-74x164-improve-platform-device-support.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...io-74x164-improve-platform-device-support.patch | 64 ++
 1 file changed, 30 insertions(+), 34 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/451-gpio-74x164-improve-platform-device-support.patch
 
b/target/linux/ar71xx/patches-3.14/451-gpio-74x164-improve-platform-device-support.patch
index b19bb85..ed95f5e 100644
--- 
a/target/linux/ar71xx/patches-3.14/451-gpio-74x164-improve-platform-device-support.patch
+++ 
b/target/linux/ar71xx/patches-3.14/451-gpio-74x164-improve-platform-device-support.patch
@@ -1,38 +1,33 @@
 --- a/drivers/gpio/gpio-74x164.c
 +++ b/drivers/gpio/gpio-74x164.c
-@@ -109,10 +109,14 @@ static int gen_74x164_probe(struct spi_d
+@@ -107,8 +107,18 @@ static int gen_74x164_direction_output(s
+ static int gen_74x164_probe(struct spi_device *spi)
  {
struct gen_74x164_chip *chip;
-   struct gen_74x164_chip_platform_data *pdata;
++  struct gen_74x164_chip_platform_data *pdata;
 +  struct device_node *np;
int ret;
  
--  if (!spi-dev.of_node) {
--  dev_err(spi-dev, No device tree data available.\n);
 +  pdata = spi-dev.platform_data;
 +  np = spi-dev.of_node;
 +
 +  if (!np  !pdata) {
 +  dev_err(spi-dev, No configuration data available.\n);
-   return -EINVAL;
-   }
- 
-@@ -129,7 +133,6 @@ static int gen_74x164_probe(struct spi_d
-   if (!chip)
-   return -ENOMEM;
- 
--  pdata = spi-dev.platform_data;
-   if (pdata  pdata-base)
-   chip-gpio_chip.base = pdata-base;
-   else
-@@ -146,12 +149,19 @@ static int gen_74x164_probe(struct spi_d
-   chip-gpio_chip.get = gen_74x164_get_value;
++  return -EINVAL;
++  }
++
+   /*
+* bits_per_word cannot be configured in platform data
+*/
+@@ -130,18 +140,27 @@ static int gen_74x164_probe(struct spi_d
chip-gpio_chip.set = gen_74x164_set_value;
+   chip-gpio_chip.base = -1;
  
--  if (of_property_read_u32(spi-dev.of_node, registers-number, 
chip-registers)) {
--  dev_err(spi-dev, Missing registers-number property in the 
DT.\n);
--  ret = -EINVAL;
--  goto exit_destroy;
+-  if (of_property_read_u32(spi-dev.of_node, registers-number,
+-   chip-registers)) {
+-  dev_err(spi-dev,
+-  Missing registers-number property in the DT.\n);
+-  return -EINVAL;
 +  if (np) {
 +  if (of_property_read_u32(spi-dev.of_node, registers-number, 
chip-registers)) {
 +  dev_err(spi-dev, Missing registers-number property 
in the DT.\n);
@@ -48,27 +43,28 @@
 +
chip-gpio_chip.ngpio = GEN_74X164_NUMBER_GPIOS * chip-registers;
chip-buffer = devm_kzalloc(spi-dev, chip-registers, GFP_KERNEL);
-   if (!chip-buffer) {
-@@ -159,6 +169,9 @@ static int gen_74x164_probe(struct spi_d
-   goto exit_destroy;
-   }
+   if (!chip-buffer)
+   return -ENOMEM;
  
 +  if (pdata  pdata-init_data)
 +  memcpy(chip-buffer, pdata-init_data, chip-registers);
 +
-   chip-gpio_chip.can_sleep = 1;
+   chip-gpio_chip.can_sleep = true;
chip-gpio_chip.dev = spi-dev;
chip-gpio_chip.owner = THIS_MODULE;
 a/include/linux/spi/74x164.h
+--- /dev/null
 +++ b/include/linux/spi/74x164.h
-@@ -4,6 +4,10 @@
- struct gen_74x164_chip_platform_data {
-   /* number assigned to the first GPIO */
-   unsignedbase;
+@@ -0,0 +1,13 @@
++#ifndef LINUX_SPI_74X164_H
++#define LINUX_SPI_74X164_H
++
++struct gen_74x164_chip_platform_data {
++  /* number assigned to the first GPIO */
++  unsignedbase;
 +  /* number of chained registers */
 +  unsignednum_registers;
 +  /* address of a buffer containing initial data */
 +  u8  *init_data;
- };
- 
- #endif
++};
++
++#endif
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 13/23] ar71xx: refresh 452-gpio-add-gpio-latch-driver.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../ar71xx/patches-3.14/452-gpio-add-gpio-latch-driver.patch   | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/452-gpio-add-gpio-latch-driver.patch 
b/target/linux/ar71xx/patches-3.14/452-gpio-add-gpio-latch-driver.patch
index 79ef548..3029874 100644
--- a/target/linux/ar71xx/patches-3.14/452-gpio-add-gpio-latch-driver.patch
+++ b/target/linux/ar71xx/patches-3.14/452-gpio-add-gpio-latch-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -725,4 +725,9 @@ config GPIO_NXP_74HC153
+@@ -842,4 +842,9 @@ config GPIO_NXP_74HC153
  Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
  provides a GPIO interface supporting input mode only.
  
@@ -12,11 +12,11 @@
  endif
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -31,6 +31,7 @@ obj-$(CONFIG_GPIO_IT8761E)   += gpio-it876
- obj-$(CONFIG_GPIO_JANZ_TTL)   += gpio-janz-ttl.o
+@@ -35,6 +35,7 @@ obj-$(CONFIG_GPIO_JANZ_TTL)  += gpio-janz
+ obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o
  obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o
- obj-$(CONFIG_GPIO_LANGWELL)   += gpio-langwell.o
+ obj-$(CONFIG_GPIO_INTEL_MID)  += gpio-intel-mid.o
 +obj-$(CONFIG_GPIO_LATCH)  += gpio-latch.o
+ obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o
  obj-$(CONFIG_ARCH_LPC32XX)+= gpio-lpc32xx.o
  obj-$(CONFIG_GPIO_LYNXPOINT)  += gpio-lynxpoint.o
- obj-$(CONFIG_GPIO_MAX730X)+= gpio-max730x.o
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 14/23] ar71xx: refresh 462-mtd-m25p80-set-spi-transfer-type.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../462-mtd-m25p80-set-spi-transfer-type.patch  | 21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/462-mtd-m25p80-set-spi-transfer-type.patch 
b/target/linux/ar71xx/patches-3.14/462-mtd-m25p80-set-spi-transfer-type.patch
index e1ceb66..39ca013 100644
--- 
a/target/linux/ar71xx/patches-3.14/462-mtd-m25p80-set-spi-transfer-type.patch
+++ 
b/target/linux/ar71xx/patches-3.14/462-mtd-m25p80-set-spi-transfer-type.patch
@@ -1,15 +1,18 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -357,10 +357,12 @@ static int m25p80_read(struct mtd_info *
-* OPCODE_FAST_READ (if available) is faster.
-* Should add 1 byte DUMMY_BYTE.
-*/
+@@ -532,6 +532,7 @@ static int m25p80_read(struct mtd_info *
+   return -EINVAL;
+   }
+ 
 +  t[0].type = SPI_TRANSFER_FLASH_READ_CMD;
t[0].tx_buf = flash-command;
-   t[0].len = m25p_cmdsz(flash) + (flash-fast_read ? 1 : 0);
+   t[0].len = m25p_cmdsz(flash) + dummy;
spi_message_add_tail(t[0], m);
+@@ -561,6 +562,7 @@ static int m25p80_read(struct mtd_info *
+   else
+   readlen = len;
  
-+  t[1].type = SPI_TRANSFER_FLASH_READ_DATA;
-   spi_message_add_tail(t[1], m);
- 
-   mutex_lock(flash-lock);
++  t[1].type = SPI_TRANSFER_FLASH_READ_DATA;
+   t[1].rx_buf = buf + ofs;
+   t[1].rx_nbits = m25p80_rx_nbits(flash);
+   t[1].len = readlen;
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 17/23] ar71xx: refresh 609-MIPS-ath79-ap136-fixes.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 target/linux/ar71xx/patches-3.14/609-MIPS-ath79-ap136-fixes.patch | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.14/609-MIPS-ath79-ap136-fixes.patch 
b/target/linux/ar71xx/patches-3.14/609-MIPS-ath79-ap136-fixes.patch
index 4309712..ef0ae9a 100644
--- a/target/linux/ar71xx/patches-3.14/609-MIPS-ath79-ap136-fixes.patch
+++ b/target/linux/ar71xx/patches-3.14/609-MIPS-ath79-ap136-fixes.patch
@@ -86,7 +86,7 @@
.gpio   = AP136_GPIO_LED_USB,
.active_low = 1,
}
-@@ -98,65 +106,152 @@ static struct gpio_keys_button ap136_gpi
+@@ -98,65 +106,151 @@ static struct gpio_keys_button ap136_gpi
},
  };
  
@@ -156,10 +156,9 @@
 -#ifdef CONFIG_PCI
 -static struct ath9k_platform_data ap136_ath9k_data;
 +  ath79_register_mdio(0, 0x0);
++  ath79_init_mac(ath79_eth0_data.mac_addr, art + AP136_MAC0_OFFSET, 0);
  
 -static int ap136_pci_plat_dev_init(struct pci_dev *dev)
-+  ath79_init_mac(ath79_eth0_data.mac_addr, art + AP136_MAC0_OFFSET, 0);
-+
 +  mdiobus_register_board_info(ap136_mdio0_info,
 +  ARRAY_SIZE(ap136_mdio0_info));
 +
@@ -232,7 +231,7 @@
 +  ap136_common_setup();
  }
 -#else
--static inline void ap136_pci_init(void) {}
+-static inline void ap136_pci_init(u8 *eeprom) {}
 -#endif /* CONFIG_PCI */
  
 -static void __init ap136_setup(void)
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 15/23] ar71xx: refresh 463-spi-ath79-add-fast-flash-read.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../patches-3.14/463-spi-ath79-add-fast-flash-read.patch   | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/463-spi-ath79-add-fast-flash-read.patch 
b/target/linux/ar71xx/patches-3.14/463-spi-ath79-add-fast-flash-read.patch
index e861644..62d52d2 100644
--- a/target/linux/ar71xx/patches-3.14/463-spi-ath79-add-fast-flash-read.patch
+++ b/target/linux/ar71xx/patches-3.14/463-spi-ath79-add-fast-flash-read.patch
@@ -34,7 +34,7 @@
  }
  
  static void ath79_spi_disable(struct ath79_spi *sp)
-@@ -232,6 +239,110 @@ static u32 ath79_spi_txrx_mode0(struct s
+@@ -226,6 +233,110 @@ static u32 ath79_spi_txrx_mode0(struct s
return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS);
  }
  
@@ -145,17 +145,17 @@
  static int ath79_spi_probe(struct platform_device *pdev)
  {
struct spi_master *master;
-@@ -254,6 +365,8 @@ static int ath79_spi_probe(struct platfo
+@@ -248,6 +359,8 @@ static int ath79_spi_probe(struct platfo
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
  
 +  sp-state = ATH79_SPI_STATE_WAIT_CMD;
 +
+   master-bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
master-setup = ath79_spi_setup;
master-cleanup = ath79_spi_cleanup;
-   master-bus_num = pdata-bus_num;
-@@ -262,7 +375,7 @@ static int ath79_spi_probe(struct platfo
-   sp-bitbang.master = spi_master_get(master);
+@@ -257,7 +370,7 @@ static int ath79_spi_probe(struct platfo
+   sp-bitbang.master = master;
sp-bitbang.chipselect = ath79_spi_chipselect;
sp-bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0;
 -  sp-bitbang.setup_transfer = spi_bitbang_setup_transfer;
@@ -163,9 +163,9 @@
sp-bitbang.flags = SPI_CS_HIGH;
  
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-@@ -287,7 +400,8 @@ static int ath79_spi_probe(struct platfo
+@@ -282,7 +395,8 @@ static int ath79_spi_probe(struct platfo
if (ret)
-   goto err_clk_put;
+   goto err_put_master;
  
 -  rate = DIV_ROUND_UP(clk_get_rate(sp-clk), MHZ);
 +  sp-ahb_rate = clk_get_rate(sp-clk);
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 18/23] ar71xx: refresh 902-unaligned_access_hacks.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../patches-3.14/902-unaligned_access_hacks.patch  | 149 ++---
 1 file changed, 68 insertions(+), 81 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.14/902-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-3.14/902-unaligned_access_hacks.patch
index 17c6be7..fd3ec47 100644
--- a/target/linux/ar71xx/patches-3.14/902-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-3.14/902-unaligned_access_hacks.patch
@@ -167,7 +167,7 @@
  #define UDP_CORK  1   /* Never send partially complete segments */
 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
 +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
-@@ -40,8 +40,8 @@ static bool ipv4_pkt_to_tuple(const stru
+@@ -41,8 +41,8 @@ static bool ipv4_pkt_to_tuple(const stru
if (ap == NULL)
return false;
  
@@ -191,18 +191,18 @@
  /*
 --- a/include/uapi/linux/in6.h
 +++ b/include/uapi/linux/in6.h
-@@ -36,7 +36,7 @@ struct in6_addr {
- #define s6_addr   in6_u.u6_addr8
+@@ -42,7 +42,7 @@ struct in6_addr {
  #define s6_addr16 in6_u.u6_addr16
  #define s6_addr32 in6_u.u6_addr32
+ #endif
 -};
 +} __attribute__((packed, aligned(2)));
+ #endif /* __UAPI_DEF_IN6_ADDR */
  
- struct sockaddr_in6 {
-   unsigned short int  sin6_family;/* AF_INET6 */
+ #if __UAPI_DEF_SOCKADDR_IN6
 --- a/net/ipv6/af_inet6.c
 +++ b/net/ipv6/af_inet6.c
-@@ -60,6 +60,7 @@
+@@ -62,6 +62,7 @@
  #endif
  
  #include asm/uaccess.h
@@ -210,26 +210,31 @@
  #include linux/mroute6.h
  
  MODULE_AUTHOR(Cast of dozens);
-@@ -687,7 +688,7 @@ bool ipv6_opt_accepted(const struct sock
+@@ -679,11 +680,12 @@ bool ipv6_opt_accepted(const struct sock
+ {
+   const struct ipv6_pinfo *np = inet6_sk(sk);
+   const struct inet6_skb_parm *opt = IP6CB(skb);
++  unsigned char *header = skb_network_header(skb);
+ 
+   if (np-rxopt.all) {
if ((opt-hop  (np-rxopt.bits.hopopts ||
  np-rxopt.bits.ohopopts)) ||
-   ((IPV6_FLOWINFO_MASK 
--*(__be32 *)skb_network_header(skb)) 
-+net_hdr_word(skb_network_header(skb))) 
+-  (ip6_flowinfo((struct ipv6hdr *) skb_network_header(skb)) 
++  (ip6_flowinfo((struct ipv6hdr *)net_hdr_word(header)) 
 np-rxopt.bits.rxflow) ||
(opt-srcrt  (np-rxopt.bits.srcrt ||
 np-rxopt.bits.osrcrt)) ||
 --- a/net/ipv6/tcp_ipv6.c
 +++ b/net/ipv6/tcp_ipv6.c
-@@ -64,6 +64,7 @@
- #include net/secure_seq.h
+@@ -65,6 +65,7 @@
  #include net/tcp_memcontrol.h
+ #include net/busy_poll.h
  
 +#include asm/unaligned.h
  #include asm/uaccess.h
  
  #include linux/proc_fs.h
-@@ -763,10 +764,10 @@ static void tcp_v6_send_response(struct
+@@ -771,10 +772,10 @@ static void tcp_v6_send_response(struct
topt = (__be32 *)(t1 + 1);
  
if (tsecr) {
@@ -246,17 +251,17 @@
  #ifdef CONFIG_TCP_MD5SIG
 --- a/include/linux/ipv6.h
 +++ b/include/linux/ipv6.h
-@@ -4,6 +4,7 @@
- #include uapi/linux/ipv6.h
+@@ -5,6 +5,7 @@
  
  #define ipv6_optlen(p)  (((p)-hdrlen+1)  3)
+ #define ipv6_authlen(p) (((p)-hdrlen+2)  2)
 +
  /*
   * This structure contains configuration options per IPv6 link.
   */
 --- a/net/ipv6/datagram.c
 +++ b/net/ipv6/datagram.c
-@@ -365,7 +365,7 @@ int ipv6_recv_error(struct sock *sk, str
+@@ -373,7 +373,7 @@ int ipv6_recv_error(struct sock *sk, str
ipv6_iface_scope_id(sin-sin6_addr,
IP6CB(skb)-iif);
} else {
@@ -265,7 +270,7 @@
   sin-sin6_addr);
sin-sin6_scope_id = 0;
}
-@@ -691,12 +691,12 @@ int ip6_datagram_send_ctl(struct net *ne
+@@ -722,12 +722,12 @@ int ip6_datagram_send_ctl(struct net *ne
}
  
if (fl6-flowlabelIPV6_FLOWINFO_MASK) {
@@ -282,7 +287,7 @@
case IPV6_2292HOPOPTS:
 --- a/net/ipv6/ip6_gre.c
 +++ b/net/ipv6/ip6_gre.c
-@@ -391,7 +391,7 @@ static void ip6gre_err(struct sk_buff *s
+@@ -389,7 +389,7 @@ static void ip6gre_err(struct sk_buff *s
  
t = ip6gre_tunnel_lookup(skb-dev, ipv6h-daddr, ipv6h-saddr,
flags  GRE_KEY ?
@@ -291,7 +296,7 @@
p[1]);
if (t == NULL)
return;
-@@ -483,11 +483,11 @@ static int ip6gre_rcv(struct sk_buff *sk
+@@ -481,11 +481,11 @@ static int ip6gre_rcv(struct sk_buff *sk
offset += 4;
}
if (flagsGRE_KEY) {
@@ -321,22 +326,22 @@
 -  fl6.flowlabel |= (*(__be32 *) ipv6h  IPV6_TCLASS_MASK);
 +  fl6.flowlabel |= net_hdr_word(ipv6h)  IPV6_TCLASS_MASK;
if (t-parms.flags  IP6_TNL_F_USE_ORIG_FLOWLABEL)
--  fl6.flowlabel |= (*(__be32 *) ipv6h  

[OpenWrt-Devel] [PATCH 16/23] ar71xx: refresh 490-usb-ehci-add-quirks-for-qca-socs.patch

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../490-usb-ehci-add-quirks-for-qca-socs.patch   | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/490-usb-ehci-add-quirks-for-qca-socs.patch 
b/target/linux/ar71xx/patches-3.14/490-usb-ehci-add-quirks-for-qca-socs.patch
index fcbf51b..0e89b5f 100644
--- 
a/target/linux/ar71xx/patches-3.14/490-usb-ehci-add-quirks-for-qca-socs.patch
+++ 
b/target/linux/ar71xx/patches-3.14/490-usb-ehci-add-quirks-for-qca-socs.patch
@@ -1,6 +1,6 @@
 --- a/drivers/usb/host/ehci-hcd.c
 +++ b/drivers/usb/host/ehci-hcd.c
-@@ -249,6 +249,37 @@ static int ehci_reset (struct ehci_hcd *
+@@ -252,6 +252,37 @@ static int ehci_reset (struct ehci_hcd *
command |= CMD_RESET;
dbg_cmd (ehci, reset, command);
ehci_writel(ehci, command, ehci-regs-command);
@@ -37,10 +37,10 @@
 +
ehci-rh_state = EHCI_RH_HALTED;
ehci-next_statechange = jiffies;
-   retval = handshake (ehci, ehci-regs-command,
+   retval = ehci_handshake(ehci, ehci-regs-command,
 --- a/drivers/usb/host/ehci.h
 +++ b/drivers/usb/host/ehci.h
-@@ -202,6 +202,10 @@ struct ehci_hcd { /* one per controlle
+@@ -227,6 +227,10 @@ struct ehci_hcd { /* one per controlle
unsignedneed_oc_pp_cycle:1; /* MPC834X port power */
unsignedimx28_write_fix:1; /* For Freescale i.MX28 */
unsignedignore_oc:1;
@@ -53,7 +53,7 @@
#define OHCI_CTRL_HCFS  (3  6)
 --- a/include/linux/usb/ehci_pdriver.h
 +++ b/include/linux/usb/ehci_pdriver.h
-@@ -43,6 +43,8 @@ struct usb_ehci_pdata {
+@@ -46,6 +46,8 @@ struct usb_ehci_pdata {
unsignedbig_endian_mmio:1;
unsignedno_io_watchdog:1;
unsignedignore_oc:1;
@@ -62,10 +62,10 @@
  
/* Turn on all power and clocks */
int (*power_on)(struct platform_device *pdev);
-@@ -51,6 +53,7 @@ struct usb_ehci_pdata {
-   /* Turn on only VBUS suspend power and hotplug detection,
+@@ -55,6 +57,7 @@ struct usb_ehci_pdata {
 * turn off everything else */
void (*power_suspend)(struct platform_device *pdev);
+   int (*pre_setup)(struct usb_hcd *hcd);
 +  void (*reset_notifier)(struct platform_device *pdev);
  };
  
@@ -97,5 +97,5 @@
 +  if (pdata-reset_notifier)
 +  ehci-reset_notifier = ehci_platform_reset_notifier;
  
-   ehci-caps = hcd-regs + pdata-caps_offset;
-   retval = ehci_setup(hcd);
+   if (pdata-pre_setup) {
+   retval = pdata-pre_setup(hcd);
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 19/23] ar71xx: update config

2014-07-25 Thread Zhao, Gang
Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 target/linux/ar71xx/config-3.14 | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index aa5eb7e..3f7570b 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -3,12 +3,13 @@ CONFIG_AG71XX_AR8216_SUPPORT=y
 # CONFIG_AG71XX_DEBUG is not set
 # CONFIG_AG71XX_DEBUG_FS is not set
 CONFIG_AR8216_PHY=y
-CONFIG_AR8216_PHY_LEDS=y
 CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
 CONFIG_ARCH_DISCARD_MEMBLOCK=y
 CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
@@ -128,6 +129,7 @@ CONFIG_ATH79_PCI_ATH9K_FIXUP=y
 CONFIG_ATH79_WDT=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
+CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE=rootfstype=squashfs,jffs2 noinitrd
 CONFIG_CMDLINE_BOOL=y
@@ -146,6 +148,7 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_EARLY_PRINTK=y
+# CONFIG_EARLY_PRINTK_8250 is not set
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
@@ -153,6 +156,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_IO=y
 CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_NET_UTILS=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GPIOLIB=y
@@ -168,10 +172,14 @@ CONFIG_HAS_IOPORT=y
 # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
 CONFIG_HAVE_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
 # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
+CONFIG_HAVE_CC_STACKPROTECTOR=y
 CONFIG_HAVE_CLK=y
+CONFIG_HAVE_CONTEXT_TRACKING=y
 CONFIG_HAVE_C_RECORDMCOUNT=y
 CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
 CONFIG_HAVE_DMA_API_DEBUG=y
 CONFIG_HAVE_DMA_ATTRS=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -180,7 +188,6 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-CONFIG_HAVE_GENERIC_HARDIRQS=y
 CONFIG_HAVE_IDE=y
 CONFIG_HAVE_KVM=y
 CONFIG_HAVE_MEMBLOCK=y
@@ -189,6 +196,7 @@ CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_I2C=y
@@ -206,7 +214,6 @@ CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_LEDS_GPIO=y
 # CONFIG_LEDS_WNDR3700_USB is not set
-# CONFIG_M25PXX_USE_FAST_READ is not set
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MICREL_PHY=y
@@ -215,6 +222,8 @@ CONFIG_MIPS=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_MACHINE=y
 CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_O32_FP64_SUPPORT is not set
+# CONFIG_MLX5_CORE is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
@@ -242,6 +251,7 @@ CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MV88E6060=y
 CONFIG_NET_DSA_MV88E6063=y
 CONFIG_NET_DSA_TAG_TRAILER=y
+CONFIG_NET_RX_BUSY_POLL=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PCI=y
@@ -286,7 +296,6 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_UIDGID_CONVERTED=y
-CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_SUPPORT=y
+# CONFIG_ZBUD is not set
 CONFIG_ZONE_DMA_FLAG=0
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 22/23] ar71xx: modify file mach-alfa-ap96.c

2014-07-25 Thread Zhao, Gang
From: Zhao, Gang gamer...@gmail.com

Related upstream changes: v3.12-rc1~69^2~23 (mmc: mmc_spi: Remove
platform data .get_cd() and .get_ro() callbacks) and
v3.12-rc1~21^2~25 (mmc: mmc_spi: Support CD/RO GPIOs).

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 target/linux/ar71xx/files-3.14/arch/mips/ath79/mach-alfa-ap96.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/target/linux/ar71xx/files-3.14/arch/mips/ath79/mach-alfa-ap96.c 
b/target/linux/ar71xx/files-3.14/arch/mips/ath79/mach-alfa-ap96.c
index 15abb08..f7cd6ae 100644
--- a/target/linux/ar71xx/files-3.14/arch/mips/ath79/mach-alfa-ap96.c
+++ b/target/linux/ar71xx/files-3.14/arch/mips/ath79/mach-alfa-ap96.c
@@ -48,13 +48,10 @@ static struct gpio_keys_button alfa_ap96_gpio_keys[] 
__initdata = {
}
 };
 
-static int alfa_ap96_mmc_get_cd(struct device *dev)
-{
-return !gpio_get_value(ALFA_AP96_GPIO_MICROSD_CD);
-}
-
 static struct mmc_spi_platform_data alfa_ap96_mmc_data = {
-   .get_cd = alfa_ap96_mmc_get_cd,
+   .flags  = MMC_SPI_USE_CD_GPIO,
+   .cd_gpio= ALFA_AP96_GPIO_MICROSD_CD,
+   .cd_debounce= 1,
.caps   = MMC_CAP_NEEDS_POLL,
.ocr_mask   = MMC_VDD_32_33 | MMC_VDD_33_34,
 };
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 20/23] ar71xx: modify patch 707-MIPS-ath79-add-support-for-QCA953x-SoC.patch

2014-07-25 Thread Zhao, Gang
From: Zhao, Gang gamer...@gmail.com

Commit v3.12-rc1~21^2~25(MIPS: ath79: Switch to the clkdev framework)
switched to clkdev framework, so the static variables like
ath79_ref_clk are gone. Make needed changes to address this.

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 45 +-
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
 
b/target/linux/ar71xx/patches-3.14/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
index 00458d2..7adc0eb 100644
--- 
a/target/linux/ar71xx/patches-3.14/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
+++ 
b/target/linux/ar71xx/patches-3.14/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
@@ -44,21 +44,25 @@ meaning of the bits CPUCLK_FROM_CPUPLL and 
DDRCLK_FROM_DDRPLL is reversed.
  config ATH79_NVRAM
 --- a/arch/mips/ath79/clock.c
 +++ b/arch/mips/ath79/clock.c
-@@ -295,6 +295,82 @@ static void __init ar934x_clocks_init(vo
+@@ -295,6 +295,91 @@ static void __init ar934x_clocks_init(vo
iounmap(dpll_base);
  }
  
 +static void __init qca953x_clocks_init(void)
 +{
++  unsigned long ref_rate;
++  unsigned long cpu_rate;
++  unsigned long ddr_rate;
++  unsigned long ahb_rate;
 +  u32 pll, out_div, ref_div, nint, frac, clk_ctrl, postdiv;
 +  u32 cpu_pll, ddr_pll;
 +  u32 bootstrap;
 +
 +  bootstrap = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
 +  if (bootstrap  QCA953X_BOOTSTRAP_REF_CLK_40)
-+  ath79_ref_clk.rate = 40 * 1000 * 1000;
++  ref_rate = 40 * 1000 * 1000;
 +  else
-+  ath79_ref_clk.rate = 25 * 1000 * 1000;
++  ref_rate = 25 * 1000 * 1000;
 +
 +  pll = ath79_pll_rr(QCA953X_PLL_CPU_CONFIG_REG);
 +  out_div = (pll  QCA953X_PLL_CPU_CONFIG_OUTDIV_SHIFT) 
@@ -70,8 +74,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL 
is reversed.
 +  frac = (pll  QCA953X_PLL_CPU_CONFIG_NFRAC_SHIFT) 
 + QCA953X_PLL_CPU_CONFIG_NFRAC_MASK;
 +
-+  cpu_pll = nint * ath79_ref_clk.rate / ref_div;
-+  cpu_pll += frac * (ath79_ref_clk.rate  6) / ref_div;
++  cpu_pll = nint * ref_rate / ref_div;
++  cpu_pll += frac * (ref_rate  6) / ref_div;
 +  cpu_pll /= (1  out_div);
 +
 +  pll = ath79_pll_rr(QCA953X_PLL_DDR_CONFIG_REG);
@@ -84,8 +88,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL 
is reversed.
 +  frac = (pll  QCA953X_PLL_DDR_CONFIG_NFRAC_SHIFT) 
 + QCA953X_PLL_DDR_CONFIG_NFRAC_MASK;
 +
-+  ddr_pll = nint * ath79_ref_clk.rate / ref_div;
-+  ddr_pll += frac * (ath79_ref_clk.rate  6) / (ref_div  4);
++  ddr_pll = nint * ref_rate / ref_div;
++  ddr_pll += frac * (ref_rate  6) / (ref_div  4);
 +  ddr_pll /= (1  out_div);
 +
 +  clk_ctrl = ath79_pll_rr(QCA953X_PLL_CLK_CTRL_REG);
@@ -94,34 +98,39 @@ meaning of the bits CPUCLK_FROM_CPUPLL and 
DDRCLK_FROM_DDRPLL is reversed.
 +QCA953X_PLL_CLK_CTRL_CPU_POST_DIV_MASK;
 +
 +  if (clk_ctrl  QCA953X_PLL_CLK_CTRL_CPU_PLL_BYPASS)
-+  ath79_cpu_clk.rate = ath79_ref_clk.rate;
++  cpu_rate = ref_rate;
 +  else if (clk_ctrl  QCA953X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL)
-+  ath79_cpu_clk.rate = cpu_pll / (postdiv + 1);
++  cpu_rate = cpu_pll / (postdiv + 1);
 +  else
-+  ath79_cpu_clk.rate = ddr_pll / (postdiv + 1);
++  cpu_rate = ddr_pll / (postdiv + 1);
 +
 +  postdiv = (clk_ctrl  QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT) 
 +QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_MASK;
 +
 +  if (clk_ctrl  QCA953X_PLL_CLK_CTRL_DDR_PLL_BYPASS)
-+  ath79_ddr_clk.rate = ath79_ref_clk.rate;
++  ddr_rate = ref_rate;
 +  else if (clk_ctrl  QCA953X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL)
-+  ath79_ddr_clk.rate = ddr_pll / (postdiv + 1);
++  ddr_rate = ddr_pll / (postdiv + 1);
 +  else
-+  ath79_ddr_clk.rate = cpu_pll / (postdiv + 1);
++  ddr_rate = cpu_pll / (postdiv + 1);
 +
 +  postdiv = (clk_ctrl  QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT) 
 +QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_MASK;
 +
 +  if (clk_ctrl  QCA953X_PLL_CLK_CTRL_AHB_PLL_BYPASS)
-+  ath79_ahb_clk.rate = ath79_ref_clk.rate;
++  ahb_rate = ref_rate;
 +  else if (clk_ctrl  QCA953X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL)
-+  ath79_ahb_clk.rate = ddr_pll / (postdiv + 1);
++  ahb_rate = ddr_pll / (postdiv + 1);
 +  else
-+  ath79_ahb_clk.rate = cpu_pll / (postdiv + 1);
++  ahb_rate = cpu_pll / (postdiv + 1);
 +
-+  ath79_wdt_clk.rate = ath79_ref_clk.rate;
-+  ath79_uart_clk.rate = ath79_ref_clk.rate;
++  ath79_add_sys_clkdev(ref, ref_rate);
++  ath79_add_sys_clkdev(cpu, cpu_rate);
++  ath79_add_sys_clkdev(ddr, ddr_rate);
++  

[OpenWrt-Devel] [PATCH 21/23] ar71xx: modify patch 406-mtd-m25p80-allow-to-specify-max-read-size.patch

2014-07-25 Thread Zhao, Gang
From: Zhao, Gang gamer...@gmail.com

Related upstream change: v3.14-rc1~65^2~150 (drivers: mtd: m25p80:
convert bool read check into an enum).

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
 
b/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
index 5b9fa5b..d229b7f 100644
--- 
a/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
+++ 
b/target/linux/ar71xx/patches-3.14/406-mtd-m25p80-allow-to-specify-max-read-size.patch
@@ -66,7 +66,7 @@
  
 -  spi_sync(flash-spi, m);
 +  done = m.actual_length - m25p_cmdsz(flash) -
-+ (flash-fast_read ? 1 : 0);
++ dummy;
 +  if (done != readlen) {
 +  mutex_unlock(flash-lock);
 +  return 1;
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 23/23] ar71xx: fix spi ath79 fast read

2014-07-25 Thread Zhao, Gang
Fast read adds a dummy byte in tx buffer if the transfer type is
SPI_TRANSFER_FLASH_READ_CMD. The dummy byte should be ignored when
calculating read address. This is done by adding a bool variable dummy
in struct spi_transfer to indicate whether this transfer includes the
dummy byte.

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../464-spi-ath79-fix-fast-flash-read.patch| 34 ++
 1 file changed, 34 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-3.14/464-spi-ath79-fix-fast-flash-read.patch

diff --git 
a/target/linux/ar71xx/patches-3.14/464-spi-ath79-fix-fast-flash-read.patch 
b/target/linux/ar71xx/patches-3.14/464-spi-ath79-fix-fast-flash-read.patch
new file mode 100644
index 000..9c7b93e
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.14/464-spi-ath79-fix-fast-flash-read.patch
@@ -0,0 +1,34 @@
+--- a/drivers/mtd/devices/m25p80.c
 b/drivers/mtd/devices/m25p80.c
+@@ -530,6 +530,8 @@ static int m25p80_read(struct mtd_info *
+   if (dummy  0) {
+   dev_err(flash-spi-dev, No valid read command supported\n);
+   return -EINVAL;
++  } else if (dummy == 1) {
++  t[0].dummy = true;
+   }
+ 
+   t[0].type = SPI_TRANSFER_FLASH_READ_CMD;
+--- a/drivers/spi/spi-ath79.c
 b/drivers/spi/spi-ath79.c
+@@ -262,6 +262,10 @@ static int ath79_spi_do_read_flash_cmd(s
+   sp-read_addr = 0;
+ 
+   len = t-len - 1;
++
++  if (t-dummy)
++  len -= 1;
++
+   p = t-tx_buf;
+ 
+   while (len--) {
+--- a/include/linux/spi/spi.h
 b/include/linux/spi/spi.h
+@@ -598,6 +598,7 @@ struct spi_transfer {
+   u16 delay_usecs;
+   u32 speed_hz;
+   enum spi_transfer_type type;
++  bool dummy;
+ 
+   struct list_head transfer_list;
+ };
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: fix spi ath79 fast read (for 3.10 kernel)

2014-07-25 Thread Zhao, Gang
Fast read adds a dummy byte in tx buffer if the transfer type is
SPI_TRANSFER_FLASH_READ_CMD. The dummy byte should be ignored when
calculating read address. This is done by adding a bool variable dummy
in struct spi_transfer to indicate whether this transfer includes the
dummy byte.

Signed-off-by: Zhao, Gang gang.zhao...@gmail.com
---
 .../464-spi-ath79-fix-fast-flash-read.patch| 36 ++
 1 file changed, 36 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-3.10/464-spi-ath79-fix-fast-flash-read.patch

diff --git 
a/target/linux/ar71xx/patches-3.10/464-spi-ath79-fix-fast-flash-read.patch 
b/target/linux/ar71xx/patches-3.10/464-spi-ath79-fix-fast-flash-read.patch
new file mode 100644
index 000..6567755
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/464-spi-ath79-fix-fast-flash-read.patch
@@ -0,0 +1,36 @@
+--- a/drivers/mtd/devices/m25p80.c
 b/drivers/mtd/devices/m25p80.c
+@@ -360,6 +360,10 @@ static int m25p80_read(struct mtd_info *
+   t[0].type = SPI_TRANSFER_FLASH_READ_CMD;
+   t[0].tx_buf = flash-command;
+   t[0].len = m25p_cmdsz(flash) + (flash-fast_read ? 1 : 0);
++
++  if (flash-fast_read)
++  t[0].dummy = true;
++
+   spi_message_add_tail(t[0], m);
+ 
+   t[1].type = SPI_TRANSFER_FLASH_READ_DATA;
+--- a/drivers/spi/spi-ath79.c
 b/drivers/spi/spi-ath79.c
+@@ -268,6 +268,10 @@ static int ath79_spi_do_read_flash_cmd(s
+   sp-read_addr = 0;
+ 
+   len = t-len - 1;
++
++  if (t-dummy)
++  len -= 1;
++
+   p = t-tx_buf;
+ 
+   while (len--) {
+--- a/include/linux/spi/spi.h
 b/include/linux/spi/spi.h
+@@ -531,6 +531,7 @@ struct spi_transfer {
+   u16 delay_usecs;
+   u32 speed_hz;
+   enum spi_transfer_type type;
++  bool dummy;
+ 
+   struct list_head transfer_list;
+ };
-- 
1.9.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 00/23] add 3.14 kernel support for ar71xx

2014-07-25 Thread Zhao, Gang
On Sat, 2014-07-26 at 10:48:35 +0800, Zhao, Gang wrote:
 Tested on a tp-link wr703n, all seem okay.

Oh, it seems there are some problems about the phy, all network cards
are unusable :-( Will investigate it later. At least this patch set made
a bootable kernel...

 The last patch fix spi ath79 fast read should be backported to
 3.10(barrier breaker), it will be sent separately.

 The boot log:
 root@OpenWrt:/# dmesg 
 [0.00] Linux version 3.14.12 (zhao@hello.world) (gcc version 4.8.3 
 (OpenWrt/Linaro GCC 4.8-2014.04 r41595) ) #1 Sat Jul 26 09:43:28 CST 2014
 [0.00] MyLoader: sysp=388dd517, boardp=04505212, parts=7709ac36
 [0.00] bootconsole [early0] enabled
 [0.00] CPU0 revision is: 00019374 (MIPS 24Kc)
 [0.00] SoC: Atheros AR9330 rev 1
 [0.00] Determined physical RAM map:
 [0.00]  memory: 0200 @  (usable)
 [0.00] Initrd not found or empty - disabling initrd
 [0.00] Zone ranges:
 [0.00]   Normal   [mem 0x-0x01ff]
 [0.00] Movable zone start for each node
 [0.00] Early memory node ranges
 [0.00]   node   0: [mem 0x-0x01ff]
 [0.00] On node 0 totalpages: 8192
 [0.00] free_area_init_node: node 0, pgdat 80334420, node_mem_map 
 8100
 [0.00]   Normal zone: 64 pages used for memmap
 [0.00]   Normal zone: 0 pages reserved
 [0.00]   Normal zone: 8192 pages, LIFO batch:0
 [0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
 [0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 
 32 bytes
 [0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
 [0.00] pcpu-alloc: [0] 0 
 [0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
 pages: 8128
 [0.00] Kernel command line:  board=TL-WR703N console=ttyATH0,115200 
 rootfstype=squashfs,jffs2 noinitrd
 [0.00] PID hash table entries: 128 (order: -3, 512 bytes)
 [0.00] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
 [0.00] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
 [0.00] Writing ErrCtl register=
 [0.00] Readback ErrCtl register=
 [0.00] Memory: 28652K/32768K available (2363K kernel code, 122K 
 rwdata, 496K rodata, 208K init, 187K bss, 4116K reserved)
 [0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 [0.00] NR_IRQS:51
 [0.00] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, 
 Ref:25.000MHz
 [0.00] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
 [0.08] pid_max: default: 32768 minimum: 301
 [0.08] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
 [0.09] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 
 bytes)
 [0.10] NET: Registered protocol family 16
 [0.10] MIPS: machine is TP-LINK TL-WR703N v1
 [0.36] bio: create slab bio-0 at 0
 [0.37] Switched to clocksource MIPS
 [0.37] NET: Registered protocol family 2
 [0.38] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
 [0.38] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 [0.39] TCP: Hash tables configured (established 1024 bind 1024)
 [0.39] TCP: reno registered
 [0.40] UDP hash table entries: 256 (order: 0, 4096 bytes)
 [0.40] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 [0.41] NET: Registered protocol family 1
 [0.41] PCI: CLS 0 bytes, default 32
 [0.42] futex hash table entries: 256 (order: -1, 3072 bytes)
 [0.44] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 [0.44] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
 (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 [0.46] msgmni has been set to 55
 [0.46] io scheduler noop registered
 [0.46] io scheduler deadline registered (default)
 [0.47] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
 [0.47] ar933x-uart: ttyATH0 at MMIO 0x1802 (irq = 11, base_baud = 
 1562500) is a AR933X UART
 [0.48] console [ttyATH0] enabled
 [0.49] bootconsole [early0] disabled
 [0.50] m25p80 spi0.0: found s25sl032p, expected m25p80
 [0.51] m25p80 spi0.0: s25sl032p (4096 Kbytes)
 [0.51] 5 tp-link partitions found on MTD device spi0.0
 [0.52] Creating 5 MTD partitions on spi0.0:
 [0.52] 0x-0x0002 : u-boot
 [0.53] 0x0002-0x0012aa2c : kernel
 [0.53] mtd: partition kernel must either start or end on erase 
 block boundary or be smaller than an erase block -- forcing read-only
 [0.55] 0x0012aa2c-0x003f : rootfs
 [0.55] mtd: partition rootfs must either start or end on erase 
 block boundary or be smaller than an erase block -- forcing read-only
 [0.56] mtd: device 2 

[OpenWrt-Devel] [PATCH] ramips: fix vlan configuration for asiarf avm003

2014-07-25 Thread Russell Senior

The earlier r41797 change was missing this part, to enable the right
vlan configuration.

Signed-off-by: Russell Senior russ...@personaltelco.net
---
 target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b372893..85337c2 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -107,6 +107,7 @@ ramips_setup_interfaces()
;;
 
awm002-evb | \
+   awm003-evb | \
argus-atp52b | \
dir-645 | \
f5d8235-v1 | \
-- 
2.0.0



-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel