Commit graph

458 commits

Author SHA1 Message Date
Felix Fietkau
2f9b042d69 ar8216: Inline function ar8xxx_create_mii
Inline function ar8xxx_create_mii.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43743
2014-12-18 11:28:47 +00:00
Felix Fietkau
2289c7a010 ar8216: Remove read/write/rmw member functions from ar8xxx_priv
Remove read/write/rmw member functions from ar8xxx_priv

There seems to be no real benefit of the ar8xxx_priv member functions
read/write/rmw as one implementation exists for each of them only.
Especially ar8xxx_mii_rmw is assigned to priv->rmw first and then
mapped to ar8xxx_rmw.
Rename the ar8xxx_mii_.. functions to ar8xxx_.. and use them directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43742
2014-12-18 11:28:39 +00:00
Felix Fietkau
45a494b808 ar8216: Create helpers mii_read32 / mii_write32 for 32 bit MII ops
Create helpers mii_read32 / mii_write32 for 32 bit MII ops.
Rename r3 variable to page in ar8xxx_mii_write to make it consistent
with the other ar8xxx_mii_xxxx functions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43741
2014-12-18 11:28:34 +00:00
Felix Fietkau
0e7f844c66 ar8216: Factor out chip-specific parameters from ar8xxx_probe_switch
Factor out chip-specific parameters from ar8xxx_probe_switch.
Move the ar8xxx_chip definitions after the swops definitions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43740
2014-12-18 11:28:28 +00:00
Felix Fietkau
054767cebc ar8216: remove unused function parameter in ar8327_led_register
Remove unused function parameter in ar8327_led_register.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43739
2014-12-18 11:28:20 +00:00
Felix Fietkau
5b16fd1bf8 ar8216: enable cpu port to receive arp and broadcast frames for ar8236
Signed-off-by: Weijie Gao <hackpascal@gmail.com>

SVN-Revision: 43668
2014-12-12 16:23:29 +00:00
John Crispin
9b5f583906 kernel: add driver for Marvell 88E6171 switch
This is a swconfig driver for the Marvell 88E6171 switch,
which is a 7-port GigE switch with two CPU ports and 64
802.1q VLANs.

Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 43486
2014-12-01 21:30:35 +00:00
John Crispin
ecd27db757 ar8216: factor out reg_port_stats_base parameters to ar8xxx_chip
Factor out reg_port_stats_base parameters to ar8xxx_chip.
Remove related chip_is_... checks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43471
2014-12-01 16:15:08 +00:00
John Crispin
ae15531bd2 ar8216: factor out mii_lo_first to ar8xxx_chip
Factor out mii_lo_first to ar8xxx_chip.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43470
2014-12-01 16:15:02 +00:00
John Crispin
ea9324f3d3 ar8216: factor out chip-specific data structures from ar8xxx_priv
Factor out chip-specific data structures from ar8xxx_priv.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43469
2014-12-01 16:14:54 +00:00
John Crispin
a3b651635f ar8216: factor out set_mirror_regs to ar8xxx_chip
Factor out set_mirror_regs to ar8xxx_chip.
Remove related chip_is_... checks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43468
2014-12-01 16:14:43 +00:00
John Crispin
b82a08f5b6 ar8216: factor out mib_func to ar8xxx_chip
Factor out mib_func to ar8xxx_chip. Remove related chip_is_... checks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43467
2014-12-01 16:14:39 +00:00
John Crispin
af003867b1 ar8216: factor out info whether switch should be configured at probe stage to ar8xxx_chip
Factor out info whether switch should be configured at probe stage
to ar8xxx_chip. Remove related chip_is_... checks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43466
2014-12-01 16:14:32 +00:00
Felix Fietkau
14db2826ad ar8216: suppress PHY reset for linux 3.14
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43410
2014-11-27 18:26:06 +00:00
Felix Fietkau
35902404fc ar8216: Fix issue with autoneg being disabled under 3.14, revert 43332
Patch reverts 43332 which seems to cause issues with VLAN functionality.
Add a specific check to check whether ANEG is still enabled and re-enable
it if necessary. Disable generic phy soft reset for kernel >=3.16.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43356
2014-11-24 09:33:48 +00:00
Felix Fietkau
c9340fd8a9 ar8216: Use generic hw_init from ar8236 for ar8216 too
We should make sure that also for ar8216 hw gets initialized.
For ar8216 hw_init is a dummy currently. The hw_init used for ar8236
should be generic enough to be usable with ar8216 too.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43334
2014-11-20 15:19:15 +00:00
Felix Fietkau
0178b516a2 ar8216: simplify PHY fixup/init
Move the PHY fixup call to the PHY init loop.
Use ar8xxx_has_gige in the PHY init instead of passing the gigE
capability via function parameter.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43333
2014-11-20 15:19:04 +00:00
Felix Fietkau
43e3e88379 ar8216: use genphy_config_aneg also for PHY 0
Kernel 3.14 introduced a switch reset in phy_init_hw in drivers/net/phy
causing BMCR_ANENABLE to get cleared.

Due to the fact that ar8xxx_phy_config_aneg does nothing for
PHY 0 autonegatiation support remains disabled.
This can cause ports to operate at 10MBit/half-duplex only.

Fix this by calling genphy_config_aneg for PHY 0 too as
genphy_config_aneg sets BMCR_ANENABLE if it's not yet set.
Fixes: ticket 17800

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43332
2014-11-19 20:18:01 +00:00
Felix Fietkau
898712f43f ar8216: factor out PHY init code into a generic function
PHY init code in the switch-specific hw_init functions is mainly
identical. Factor it out into a generic ar8xxx_phy_init function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43331
2014-11-19 20:17:52 +00:00
Felix Fietkau
20baeb5595 ar8216: introduce fixup_phys callback in ar8xxx_chip
Move phy fixup code from the chip-specific hw_init functions into a
fixup_phys callback.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43330
2014-11-19 20:17:43 +00:00
Felix Fietkau
37fefea79b ar8216: after a switch reset poll until BCMR_RESET is cleared
Currently there is a fixed 1000ms wait time after the switch was reset.
Most if not all switches need much less time to perform a reset.
Therefore replace the fixed wait time with polling for BMCR_RESET to
be cleared.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43329
2014-11-19 20:17:37 +00:00
Felix Fietkau
6dcdc2bb05 ar8216: introduce global constant for number of PHYs
All supported switches have 5 PHYs. Currently partially 5 is hardcoded
and partially switch-specific constants exist.
Replace them with a global constant.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43328
2014-11-19 20:17:30 +00:00
John Crispin
76a54a424c ar8216: fix "unused variable" compiler warning
Most likely a copy & paste error when deriving ar8327_sw_set_ports
from ar8xxx_sw_set_ports.
Remove unused variable.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 43273
2014-11-14 17:06:09 +00:00
John Crispin
2c72ffc154 ar71xx: add support for Netgear WNR2000v4
Signed-off-by: Michaël Burtin <mburtin@gmail.com>

SVN-Revision: 43173
2014-11-03 20:20:56 +00:00
John Crispin
62107ff367 swconfig: last vs tail
sorry .....

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43107
2014-10-29 19:24:16 +00:00
John Crispin
ab5d70e046 swconfig: "swconfig list" shows devices in reverse order
Boards that have more than one swconfig enabled switch will show the devices in
reverse order when call swconfig list. Fix this by using list_add_tail().

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43106
2014-10-29 18:51:06 +00:00
Felix Fietkau
156b296b20 ar8216: set the pvid based on runtime state instead of port number to fix learning with enable_vlan = 0
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42753
2014-10-02 20:00:41 +00:00
Felix Fietkau
38a8f5ae63 ar71xx: ar8216: tagged+untagged on ar8327 (#12181)
This allows tagged and untagged traffic together on the same port on ar8327
switch devices.

I looked at the first attempt to do this in r40777 (ar71xx: Fix tagged+untagged
operation on AR8327N (#12181)). I also set the vlan and port egress policies
like that change. But I change vlan_tagged in an less intrusive way. The
tagged/untagged decision is now based on the following rules:
- if vid != pvid then traffic is always tagged
- if vid == pvid then vlan_tagged stores if the traffic should be tagged

Tested on TP-Link WDR-3600 (ar8327N).

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>

SVN-Revision: 42653
2014-09-23 10:19:58 +00:00
Felix Fietkau
1c675ee9be ar71xx: ar8216: move policies, pvid to setup_port
This moves ingress, egress policy and pvid decisions to setup_port methods.
They arenow device type dependent.

This allows policy changes on only one device type which is needed to allow
tagged + untagged operation on ar8327.

Tested on TP-LINK WDR-3600 (ar8327N).

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>

SVN-Revision: 42652
2014-09-23 10:18:38 +00:00
John Crispin
c9813699b6 kernel: add own Kconfig for OpenWrt mtdsplit drivers
There are pretty many OpenWrt patches against mtd subsystem resulting
in a bit of mess and growing maintenance cost.
My idea is to use an extra "mtdsplit" directory with OpenWrt specific
files (including Kconfig).
This is the first step to achieve this. This patch adds a "mtdsplit"
directory with Kconfig and replaces 4 patches with a single one.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 42287
2014-08-25 16:30:44 +00:00
John Crispin
de5fd0a189 ar8216: add new phyid 0x004dd043 (ar8326)
Used in ubiquity nanostation xw boards

SVN-Revision: 41635
2014-07-14 07:38:39 +00:00
Felix Fietkau
a17a58e310 ar8216: disable EEE by default on AR8327 to fix stability issues (#14597)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41577
2014-07-10 21:11:02 +00:00
Hauke Mehrtens
ed0dc1c97e b53: hardcode reset GPIO for Linksys WRT300N 1.1
According to the thread https://forum.openwrt.org/viewtopic.php?id=48281
b53 uses GPIO 7:
[    4.470000] b53_common: [DBG] b53_switch_reset_gpio using 7
and causes device to self-reboot. GPIO 8 was found in CFE boot log:
"Reset switch via GPIO 8 ..."

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 41526
2014-07-06 11:40:51 +00:00
Hauke Mehrtens
286ff7e322 adm6996: the GPIO interface for the adm6996l does not support switch statistics.
This patch deactivates the statistics, adds a missing lock
initialization and fixes a waring.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41511
2014-07-05 12:13:56 +00:00
Imre Kaloz
e1de4e27c1 coding style cleanups, drop old kernel support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41293
2014-06-21 10:00:07 +00:00
Jo-Philipp Wich
f6e7074924 Revert "ar71xx: Fix tagged+untagged operation on AR8327N (#12181)"
Revert the tagged + untagged rework for now due to regressions in
vlan setup on certain AR83xx switches.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 40842
2014-05-24 17:04:12 +00:00
Felix Fietkau
8513629e3e mac80211: update to wireless-testing 2014-05-19
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40800
2014-05-20 09:35:17 +00:00
Jo-Philipp Wich
443b2dfe3c ar71xx: Fix tagged+untagged operation on AR8327N (#12181)
Replace the global "vlan_tagged" variable with an array storing the
tagging state per vlan.

The code was taken from #12181, tested and cleaned up by Saverio Proto
with additional bug fixes supplied by Álvaro Fernández.

Tested-by: Jo-Philipp Wich <jow@openwrt.org>
Signed-off-by: Saverio Proto <zioproto@gmail.com>
Signed-off-by: Álvaro Fernández <noltari@gmail.com>

SVN-Revision: 40777
2014-05-19 15:48:18 +00:00
Hauke Mehrtens
100e795bcc kernel: fix warning in swconfig.c with kernel 3.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 40733
2014-05-08 21:52:19 +00:00
Hauke Mehrtens
c09007c1af kernel/generic: modify mtd related patches for 3.14
Function register_mtd_parser always returned 0 (at least since v3.3)
before being changed to return void in v3.14-rc1~65^2~93 (mtd: make
register_mtd_parser return void), so it's not needed to check the
return value of this function. Also add __init flag to caller.

This fix compile errors in 3.14 kernel like:
drivers/mtd/mtdsplit_seama.c: In function 'mtdsplit_seama_init':
drivers/mtd/mtdsplit_seama.c:99:2: error: void value not ignored as it ought to be
  return register_mtd_parser(&mtdsplit_seama_parser);
  ^

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 40731
2014-05-08 21:51:36 +00:00
John Crispin
1b96cf30a9 linux/generic: add MIB counters and port status to ADM6996 switch
This patch adds port status information and MIB counters to the ADM6996
switch driver.

The driver supports also the older ADM6996L-variant, but I'm not able to
test this patch on that chip. According to the datasheet the same
registers exist there as well, so I think it should work, but any
feedback is appreciated.

Signed-off-by: Matti Laakso <malaakso at elisanet.fi>

SVN-Revision: 40542
2014-04-22 08:08:02 +00:00
John Crispin
3972b47458 revert: kernel: rtl8306: fix max pvid & remove port isolation
apparently this one was nt a good idea to merge

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40330
2014-03-30 10:04:55 +00:00
John Crispin
deba38f2a7 kernel: rtl8306: fix vlan support on lantiq ar9 p2601hnfx
If the CPU port is not forced up, the link, at least on this board, is lost after
changes are applied. This makes sure that the link is restored. Regression tests
should confirm it doesn't break other boards.

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40305
2014-03-30 09:15:16 +00:00
John Crispin
72cdb34ae8 kernel: rtl8306: fix max pvid & remove port isolation
- hide port pvid - vlan index relation
- switch initialises with vlans disabled so port isolation is not used
- remove special treatment of cpu port

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40304
2014-03-30 09:15:11 +00:00
John Crispin
6a72dc4082 kernel: rtl8306: cosmetic changes for swconfig
Changes to:
- show the correct "enable_vlan" value under "Global attributes"
- show tagged ports under "Vlan: ports"
- use get_port_link method to report link status

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40303
2014-03-30 09:15:07 +00:00
Jonas Gorski
c1f397e1e1 b53: Make b53_switch_init static
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Patchwork: http://patchwork.openwrt.org/patch/4869/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 39683
2014-02-22 11:16:58 +00:00
Jonas Gorski
9eb60826f2 b53: Add BCM53128 switch support
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Patchwork: http://patchwork.openwrt.org/patch/4867/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 39682
2014-02-22 11:16:56 +00:00
Luka Perkov
cde033f918 kernel: rtl8306: update reset function
Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 39589
2014-02-15 22:54:35 +00:00
Gabor Juhos
7c137c187f ar71xx: swconfig: use the local helper to set LED brightness on link down
Use the 'swconfig_trig_set_brightness' function to set
the brightness value of the LED when the link goes down.
This ensures that the last brighness value is saved into
a local variable which is used to track the actual LED
status.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39402
2014-01-26 16:46:21 +00:00
Gabor Juhos
89d60314e7 kernel/3.1x: add split code for LZMA compressed kernel based firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39387
2014-01-24 17:14:59 +00:00
Gabor Juhos
e89476e0a8 Revert "kernel: create firmware partition from MyLoader partition parser"
This reverts r38197.

The automatically created firmware partition includes
the partition_table partition. Apart from the partition
table, this partition contains sensitive data on some
Compex devices which data can be destroyed when the
firmware partition gets modified. Revert the change to
prevent that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39382
2014-01-24 08:48:10 +00:00
Zoltan Herpai
f3c07b8621 modules: swconfig.c: update the error path on 3.13, and behave nicely with return
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 39360
2014-01-21 14:43:50 +00:00
Zoltan Herpai
4d26250db1 modules: update swconfig.c to compile on 3.13 (compile-tested)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 39359
2014-01-21 14:24:45 +00:00
Jonas Gorski
d5b4292032 kernel: ocf: add missing dependency for hifn driver
The HIFN driver is a PCI driver, thus requires PCI support to be enabled
to compile. Therefore let it depend on PCI..

Should fix mvebu builds.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 39357
2014-01-21 12:11:18 +00:00
Hauke Mehrtens
1f4e6394ed b53: use drvdata to store driver data
we should not abuse the platform_data pointer.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 39354
2014-01-20 20:01:22 +00:00
Hauke Mehrtens
de266cd1c1 b53: make b53_switch_reset_gpio() static
SVN-Revision: 39353
2014-01-20 19:07:18 +00:00
Gabor Juhos
0056ac55af generic: ar8216: add custom LED support for the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39338
2014-01-20 10:22:56 +00:00
Gabor Juhos
15d41de1eb generic: ar8216: allow to use chip specific cleanup callback
It will be used for AR8327.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39337
2014-01-20 10:22:55 +00:00
Gabor Juhos
c7652f1f9e generic: ar8216: add optimized rmw operation
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39336
2014-01-20 10:22:54 +00:00
Gabor Juhos
0601b5f404 kernel: define RB_ID_HW_OPTIONS in include/linux/routerboot.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39090
2013-12-16 10:11:00 +00:00
Gabor Juhos
7e3644d3cf kernel: update yaffs code
Use the latest version of the yaffs code. Fetched from the
yaffs2 git tree and it is based on the following commit:

  commit bc76682d93955cfb33051beb503ad9f8a5450578
  Merge: 3a8580e ffa781d
  Author: Charles Manning <cdhmanning@gmail.com>
  Date:   Thu Jul 11 17:46:25 2013 +1200

      Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39084
2013-12-16 07:51:19 +00:00
Gabor Juhos
aeaff0090c generic: ar8216: Enable jumbo frames on AR8327 by default
This patch enables jumbo frames on AR8327 switch by default.
I have tested it on TP-Link TL-WDR3600.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39076
2013-12-15 22:18:04 +00:00
Felix Fietkau
7a260c3620 ath9k: merge initval and tx gain table updates, calibration fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39001
2013-12-08 14:48:30 +00:00
Gabor Juhos
c378d5e953 generic: ar8216: add AR8337N switch support
This patch is needed to use the switch inside the Sitecom WLR-8100;
it was unusable and detected as Generic-Phy before.

since ar8337 is behaving like ar8327
generally do the same thing
see: https://forum.openwrt.org/viewtopic.php?pid=214218#p214218
forward-ported to trunk

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
Patchwork: http://patchwork.openwrt.org/patch/4469/
[juhosg: merge chip_is_ar83[23]7 statements in ar8xxx_phy_config_init]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38952
2013-11-29 20:18:48 +00:00
Gabor Juhos
74a353f64f generic: ar8216: remove trailing whitespaces
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38951
2013-11-29 20:18:46 +00:00
Hauke Mehrtens
0cdab0237d kernel: b53: fix untagged shift for BCM5365
The BCM5365 needs a shift of 7 bits and not 6 bits like the BCM5325 for
the untagged ports.

Thank you Russell for reporting this and testing the patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38793
2013-11-13 18:04:39 +00:00
Hauke Mehrtens
72b47e69c4 kernel: b53: add initial support for switches in BCM5301X
This is also known as BCM470{7,8,9}.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38712
2013-11-10 23:29:59 +00:00
Hauke Mehrtens
7a82667372 kernel: adm6996: add support for ADM6996L and GPIO interface
This patch makes it possible to use adm6996.c on first generation
BCM47XX devices with ADM switches.
The GPIO bit banging protocol implementation was copied from the old
switch driver and adapted to this driver and changed to the mainline
kernel GPIO interface.
The ADM6996L is different from the ADM6996M which is supported, for
both specs are available in the Internet.

This was tested on a WRT54GS version 1.0, thank you Dirk Neukirchen for
the device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38698
2013-11-09 19:27:27 +00:00
Gabor Juhos
2f27f5d404 generic: mtdsplit_uimage: add uImage magic for the WRN2200 board
Should fix boot failure on the WNR2200 boards.
Compile tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38594
2013-10-30 06:51:01 +00:00
Florian Fainelli
857a7a0124 kernel: make swconfig checkpath compliant
Fix the warnings and errors reported by checkpatch on swconfig.c

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 38523
2013-10-24 00:25:52 +00:00
Hauke Mehrtens
53a2c19c69 kernel: b53: add switch name into printk when it fails.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38307
2013-10-06 22:35:28 +00:00
Hauke Mehrtens
c75a970337 kernel: b53: add Register Access Bridge Registers (SRAB) interface
The SRAB interface is used on BCM4707 and BCM5301X SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38198
2013-09-25 21:44:28 +00:00
Gabor Juhos
fc79d210e0 kernel: create firmware partition from MyLoader partition parser
This is in preparation for sysupgrade support for Compex devices.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38197
2013-09-25 20:13:12 +00:00
Gabor Juhos
2e62ff9320 kernel/3.10: add partition parser for Seama firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38114
2013-09-21 17:56:18 +00:00
Gabor Juhos
2f2ed5c5c1 kernel/3.10: add partition parser for uImage firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38113
2013-09-21 17:56:09 +00:00
Gabor Juhos
98db90576c kernel/3.10: add default partition name defines to mtdsplit.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38112
2013-09-21 17:56:01 +00:00
Gabor Juhos
61c39f923b kernel/3.10: add more helpers to the mtdsplit code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38111
2013-09-21 17:55:54 +00:00
Gabor Juhos
daec7ad768 kernel/3.10: add separate rootfs partition parser
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38110
2013-09-21 17:55:49 +00:00
Gabor Juhos
d89bea92b3 kernel/3.10: move squashfs check from rootfs split code into a separate file
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38109
2013-09-21 17:55:44 +00:00
Hauke Mehrtens
f5989e7f59 kernel: b53: detect revision of BCM5325
The revision is stored in a different register than it is in other
Broadcom switches.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37995
2013-09-15 13:30:49 +00:00
Hauke Mehrtens
49d7c57fd1 kernel: b53: fix vlan write for BCM5325 revison 3+
These switches are integrated in some recent BCM53XX and BCM47XX SoCs
like the BCM53572.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37994
2013-09-15 13:29:14 +00:00
Hauke Mehrtens
cde1d53625 kernel: b53: use hard coded switch reset gpio on some boards.
The Linksys wrt310n v1 does not have a robo_reset config variable in
nvram, but GPIO Pin 8 is the pin needed for resetting the external
switch, Linksys hard coded it into their source code.

Thank you Devastator for testing.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37988
2013-09-14 16:17:36 +00:00
Hauke Mehrtens
2da56b4ebc kernel: b53: add soft reset for BCM539x switches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37987
2013-09-14 16:14:02 +00:00
Jonas Gorski
4b0655500a kernel: b53: support phy ids for BCM5365
BCM5365 (and probably other older variants) use a different phy id, so
the phy driver never attached for them.
Fix this by adding the appropriate phy id to the fixup and the phy
driver.

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37906
2013-09-05 20:30:34 +00:00
Hauke Mehrtens
4eced13a37 kernel: b53: allow access the MIB counters on BCM5365
b53_no_ops has no elements and b53_port_ops has one element, this makes
the code access some random memory when trying to access the mib
counter functions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37895
2013-09-04 16:15:10 +00:00
Gabor Juhos
0950922925 generic: remove linux version checks from myloader.c
The myloader partition parser code uses ifdef wrappers
to make the code usable on kernels below version 3.2.
All targets are using kernel 3.3 at least so the wraper
is not needed. Remove that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 37880
2013-09-02 16:33:13 +00:00
Luka Perkov
4f679c1775 kernel: drop dead pwm code
The files have last been used with 2.6.x kernel.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37810
2013-08-18 01:25:41 +00:00
Luka Perkov
a2dccb958c kernel: drop dead glamo code
The code is not used since the s3c24xx target was removed.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37809
2013-08-18 01:25:40 +00:00
Felix Fietkau
8b8875b305 ocf: switch MODULE_LICENSE from BSD to "Dual BSD/GPL" to make the kernel recognize modules as GPL-compatible
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37769
2013-08-14 08:52:19 +00:00
Felix Fietkau
e5fd991c6c rtl8367: add support for configuring the VLAN FID
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37760
2013-08-12 17:25:25 +00:00
Jonas Gorski
3e9ad14992 kernel: ocf: add missing kernel dependencies
OCF_CRYPTOSOFT uses both symbols form crypto_hash and crypto_blkcipher,
so let it select these through kernel config.

Fixes the following build error:

ERROR: "crypto_alloc_ahash" [crypto/ocf/cryptosoft.ko] undefined!
ERROR: "crypto_ahash_digest" [crypto/ocf/cryptosoft.ko] undefined!
ERROR: "crypto_ahash_setkey" [crypto/ocf/cryptosoft.ko] undefined!
make[6]: *** [__modpost] Error 1
make[5]: *** [modules] Error 2

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37652
2013-08-01 23:04:42 +00:00
Hauke Mehrtens
8966b86067 kernel: b53: use devm_gpio_request_one() to request gpio
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37648
2013-08-01 20:46:56 +00:00
Hauke Mehrtens
e1127aca07 kernel: b53: add support for GPIO reset
This is needed for some switches used on bcm47xx SoCs like the one on the Asus RT-N66U.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37645
2013-08-01 19:05:34 +00:00
John Crispin
4176b6fdd3 strict_strtoul is obsolete, use kstrtoul instead
based on http://patchwork.openwrt.org/patch/3827/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37562
2013-07-27 09:23:18 +00:00
Lars-Peter Clausen
8fc44d1f5f kernel: Remove gpio-pwm patches
There is no platform using the gpio-pwm driver, yet these patches break the
generic PWM framework that is in upstream. So just remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

SVN-Revision: 37490
2013-07-21 11:43:16 +00:00
Jonas Gorski
29954b9ffc kernel: remove gpio_buttons
It hasn't been buildable for a long time, and there are no users of it
anymore left as all of them have been switched to the upstream accepted
version.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37436
2013-07-19 13:20:41 +00:00
Hauke Mehrtens
f8d55e7541 brcm47xx: use b53 phy driver for the switch in kernel 3.10
This makes it possible to use swconfig to controll the switch.

This was tested with devices using b43 and bgmac.
This was not tested on devices using tg3.
This does not support the adm switch used in some very old devices.

SVN-Revision: 37304
2013-07-14 14:11:17 +00:00
Gabor Juhos
d187e3c32e generic: add port mirroring/monitoring capability to rtl8366rb switch
This patch adds swlib attributes to the RTL8366RB switch/PHY found in the
TL-WR1043ND router that allow to mirror ethernet packets to a monitor port.

Signed-off-by: Colin Leitner <colin.leitner@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36847
2013-06-04 13:25:52 +00:00
Gabor Juhos
a1f91282b4 generic: ar8216: allow to specify SGMII config via platform data
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36798
2013-05-30 17:38:26 +00:00
Gabor Juhos
c170d3c3e4 generic: ar8216: add get_port_link callback
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36797
2013-05-30 17:38:22 +00:00
Gabor Juhos
8e56b1e742 generic: ar8216: show chip revision in the kernel log
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36791
2013-05-30 16:25:14 +00:00
Luka Perkov
0998065a53 generic: ar8216: add port mirroring
Tested on Buffalo WZR-600DHP with ar8316 switch. Commands used to mirror both
RX and TX traffic from LAN port 1 to LAN port 4:

$ swconfig dev switch0 set enable_mirror_rx 1
$ swconfig dev switch0 set enable_mirror_tx 1
$ swconfig dev switch0 set mirror_monitor_port 4
$ swconfig dev switch0 set mirror_source_port 1

Signed-off-by: Colin Leitner <colin.leitner@googlemail.com>
Tested-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 36713
2013-05-24 13:10:22 +00:00
Felix Fietkau
2c5a5d8736 kernel: add missing PHY ID for an AR8327 switch variant
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36630
2013-05-13 19:13:27 +00:00
Hauke Mehrtens
0b161c6f9e kernel: b53: use correct oops for bcm5365 switch
SVN-Revision: 36589
2013-05-09 20:01:58 +00:00
Jonas Gorski
a33dd13c98 kernel: add missing bcma defines and header file for bcrmfmac
Fixes build failure when having kmod-mmc and brcmfmac selected.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 36468
2013-04-28 11:10:42 +00:00
John Crispin
4664e21293 generic: fix rtl8366_smi compile warning
drivers/net/phy/rtl8366_smi.c: In function 'rtl8366_sw_set_vlan_ports':
drivers/net/phy/rtl8366_smi.c:1125:6: warning: 'pvid' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36442
2013-04-25 19:03:29 +00:00
John Crispin
10f432ba9d fix rtl8366s OF binding
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36323
2013-04-12 18:56:05 +00:00
John Crispin
fb47fd0d6b unbreak portmapping - typo fix
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36293
2013-04-09 14:39:01 +00:00
John Crispin
fff58a5801 allow loading port maps from OF
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36283
2013-04-09 14:19:09 +00:00
Gabor Juhos
747b795b56 generic: rtl8367: add compatible string with vendor prefix
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36230
2013-04-06 17:19:31 +00:00
Gabor Juhos
f5d8d80ca9 generic: rtl8367b: fix rtl8367b_extif_init_of
* disable external interface if its property is not present
* show an error message if the extif property is not valid
* use proper error values intead of -1
* fix memory leak
* wrap long lines

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36229
2013-04-06 17:03:09 +00:00
Gabor Juhos
38bd9b4337 generic: rtl8367: allow to load extif config from OF
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36220
2013-04-06 12:37:36 +00:00
Gabor Juhos
585d19d168 generic: rtl8367: fix a typo in MODULE_DEVICE_TABLE macro
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36219
2013-04-06 12:37:34 +00:00
Gabor Juhos
68c931c637 generic: rtl8367: add vendor prefix to the compatible string
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36218
2013-04-06 12:37:32 +00:00
John Crispin
1105bd2897 add OF support to rtl8367b driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36159
2013-04-03 09:58:33 +00:00
Gabor Juhos
72253b9073 generic: ar8216: start AR8327 switch from the probe routine
The AR8327 switch gets its configuration from platform
data or from the device-tree. This allows to start it
from the probe routine. Doing so makes it usable with
ethernet drivers which only connects to the PHY device
when the ethernet interface is opened.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36050
2013-03-15 16:06:28 +00:00
Gabor Juhos
5503686f69 generic: ar8216: add ar8xxx_start helper
Move switch starting code into a separate function.
This makes it usable from other places.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36049
2013-03-15 16:06:25 +00:00
Gabor Juhos
7ba6a8d8e8 generic: ar8216: add OF configuration support for AR8327
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36047
2013-03-15 15:50:08 +00:00
Gabor Juhos
ee12b1b7d5 generic: ar8216: separate platform_data based AR8327 code
Move platform_data specific configuration code
into a separate routine. Do it in preparation
for the upcoming OF support.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36046
2013-03-15 15:50:05 +00:00
Gabor Juhos
d88f66ae21 generic: ar8216: don't use platform_data in ar8327_init_port
Fetch the PORT_STATUS values in ar8327_hw_init and
store those in a private data stucture for later use.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36045
2013-03-15 15:50:02 +00:00
Gabor Juhos
9d3f70d503 generic: ar8216: move the ar8327_get_port_init_status function
It will be used in ar8327_probe routine.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36044
2013-03-15 15:50:00 +00:00
Gabor Juhos
17d735fc46 generic: ar8216: simplify and rename ar8327_config_port
Return with the PORT_STATUS register value instead of
writing that directly into the corresponding register.
Also rename the function to ar8327_get_port_init_status.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36043
2013-03-15 15:49:57 +00:00
Gabor Juhos
3fee1bddbe generic: ar8216: remove superfluous pdata checks
The presence of the platform data is already verified in
ar8327_hw_init, and the driver does not start without that
anyway.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36042
2013-03-15 15:49:55 +00:00
Jonas Gorski
3010a0b616 generic: b53: clear SM_SW_FWD_MODE unconditionally when enabling VLAN
Setting this bit stops BCM53125 (bgmac actually) from receiving any
packets. This bit is cleared conditionally in b53_switch_reset and it
seems the same is done in bcmrobo.c which never sets that bit again.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 35723
2013-02-21 11:45:38 +00:00
Jonas Gorski
23e71c56ba generic: b53: remove empty spaces
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 35722
2013-02-21 11:45:36 +00:00
Gabor Juhos
451dd745bd generic: ar8216: cleanup function/variable names
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35642
2013-02-17 12:48:25 +00:00
Gabor Juhos
51996304c4 generic: ar8216: rename struct ar8216_priv to ar8xxx_priv
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35641
2013-02-17 12:48:23 +00:00
Gabor Juhos
f35c369710 generic: ar8216: move PHY4 RGMII workaround code out of the loop
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35603
2013-02-14 14:55:40 +00:00
Gabor Juhos
d64888ffc0 generic: ar8216: register the switch from the probe routine
Currently the switch gets registered when an ethernet
driver connects to a PHY of the switch. This method does
not work with the ethernet drivers which are connecting
to the PHY from their ndo_open callback. With those
ethernet drivers, the driver tries to register the switch
each time when the etherned device is opened and this causes
a deadlock.

Move the switch registration into the probe routine to fix
this problem.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35602
2013-02-14 14:01:24 +00:00
Gabor Juhos
9525a075c1 ar8216: remove superfluous code from ar8216_config_init
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35562
2013-02-11 16:57:31 +00:00
Gabor Juhos
9c86d268eb generic: ar8216: don't use ethernet device name in register_switch
The switches are accessed via an MDIO bus. Set the alias
to the name of the MDIO bus, and show that in the message
along with the name of the switch switch device.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35560
2013-02-11 16:11:31 +00:00
Gabor Juhos
3f3eba88f6 generic: ar8216: reuse the private data from ar8216_probe
The private data of the switch is already
allocated in ar8216_priv, assign that to
each PHY on the same MDIO bus. Also remove
the redundant code from ar8216_config_init.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35559
2013-02-11 16:11:30 +00:00
Gabor Juhos
1afb759b35 generic: ar8216: use phydev instead of pdev everywhere
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35555
2013-02-11 13:25:43 +00:00
Gabor Juhos
0b1fe07e8e generic: ar8216: use pr_* macros for kernel messages
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35554
2013-02-11 13:14:00 +00:00
Gabor Juhos
eea297884e generic: ar8216: fix PHY features setup
Sujith says:

This commit breaks the WAN port on my AP96 - DHCP fails.
Reverting it fixes the issue.

  commit b67cc3a0cdd02973610d4d5a63226d1c44841e94
  Author: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
  Date:   Fri Feb 8 09:13:18 2013 +0000

    generic: ar8216: simplify phy features setup

    Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

    git-svn-id: svn://svn.openwrt.org/openwrt/trunk@355183c298f89-4303-0410-b956-a3cf2f4a3e73

This change restores the previous behaviour and moves
the code into the ar8216_probe function.

Reported-by: Sujith Manoharan <sujith@msujith.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Tested-by: Sujith Manoharan <sujith@msujith.org>

SVN-Revision: 35549
2013-02-11 10:05:35 +00:00
Gabor Juhos
617076c613 generic: ar8216: add ar8xxx_probe_switch helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35547
2013-02-10 19:02:01 +00:00
Gabor Juhos
98b13e39ac generic: ar8216: rename ar8xxx_mib_cleanup to ar8xxx_mib_stop
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35546
2013-02-10 18:42:08 +00:00
Gabor Juhos
f97170a720 generic: ar8216: free mib counters from ar8xxx_free
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35545
2013-02-10 18:42:07 +00:00
Gabor Juhos
7924e517af generic: ar8216: add ar8xxx_free helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35544
2013-02-10 18:42:05 +00:00
Gabor Juhos
77b3c551c4 generic: ar8216: add ar8xxx_create{,mii} helpers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35543
2013-02-10 18:42:04 +00:00
Gabor Juhos
5f70b1db2a generic: ar8216: remove redundant phy address check
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35542
2013-02-10 18:38:12 +00:00
Gabor Juhos
14fd37258b generic: ar8216: only set phy_ptr if packet mangling is used
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35541
2013-02-10 18:38:10 +00:00
Gabor Juhos
393163b098 generic: ar8216: add defines for the AR8316 POSTRIP register
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35539
2013-02-10 13:18:48 +00:00
Gabor Juhos
5ed480598d generic: ar8216: don't probe the chip multiple times
It is only needed when the private data is allocated.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35538
2013-02-10 13:05:15 +00:00
Gabor Juhos
774da6c7a4 generic: ar8216: add sanity check to ar8216_probe
Verify that the mdio bus has PHY devices with
a supported PHY ID at address 0-4.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35537
2013-02-10 13:05:14 +00:00
Gabor Juhos
4720c75cf7 generic: ar8216: skip probe on unused PHY addresses
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35536
2013-02-10 13:05:12 +00:00
Jonas Gorski
eedc3554fe generic: b53: fix reverted error check in probe
b53_switch_detect returns value returned by b53_read8, which is 0 for
success. So fail (and return error) only if b53_switch_detect returned
something else than 0. This fixes supported and advertising being zeros
for MDIO access.

Cc: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 35534
2013-02-10 12:31:36 +00:00
Gabor Juhos
de123c4409 generic: ar8216: move sleep out of the loop
It is enough to sleep once after ANEG is enabled on
all PHYs. This reduces boot time on boards with
AR8316 switch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35532
2013-02-09 13:26:04 +00:00
Gabor Juhos
aa04441904 generic: ar8216: simplify phy features setup
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35518
2013-02-08 09:13:18 +00:00
Gabor Juhos
9c1f95a416 generic: ar8216: don't use mdio bus specific functions in ar8216_id_chip
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35517
2013-02-08 09:13:14 +00:00