juhosg
28857571f7
generic: ar8216: reorder switch_dev specific functions
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31008 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:45 +00:00
juhosg
bc46e3f21c
generic: ar8216: use ar8216_sw_ prefix for switchdev related functions
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31007 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:42 +00:00
juhosg
76c970bba3
generic: ar8216: use switch_dev->ports in for loops
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31006 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:40 +00:00
juhosg
6db6793b7a
generic: ar8216: add read_port_status field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31005 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:39 +00:00
juhosg
c4c471bd64
generic: ar8216: add init_globals field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31004 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:36 +00:00
juhosg
30a5115c48
generic: ar8216: add caps field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31003 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:33 +00:00
juhosg
c097ab2bbd
generic: ar8216: add vtu_load_vlan field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31002 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:30 +00:00
juhosg
6934b97c4e
generic: ar8216: add vtu_flush field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31001 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:26 +00:00
juhosg
d29edcf013
generic: ar8216: add init_port field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31000 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:23 +00:00
juhosg
9aeb2624ac
generic: ar8216: add setup_port field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30999 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:19 +00:00
juhosg
f54b65f008
generic: ar8216: add hw_init field to ar8xxx_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30998 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:15 +00:00
juhosg
5e670215a9
generic: ar8216: add a separate structure for chip specific stuff
...
Also add a hw_init function into that.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30997 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:12 +00:00
juhosg
b9fa24dba2
generic: ar8216: rename chip field of struct ar8216
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30996 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:08 +00:00
juhosg
166dc561a1
generic: ar8216: move ar8216_id_chip function
...
Also remove the inline annotation.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30995 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:05 +00:00
juhosg
b7facc3842
generic: ar8216: rename ar8216_ops to ar8216_sw_ops
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30994 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 22:06:03 +00:00
nbd
a2e617077c
swconfig: use a mutex instead of a spinlock, many swconfig calls sleep
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30952 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-15 19:32:31 +00:00
nbd
b5e9c6c090
ar8216: fix a MTU related regression
...
Switch reset on AR8316 appears to clobber the MTU configuration register
and possibly other global config registers. Move global configuration
register init writes back to the reset callback.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30951 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-15 16:57:27 +00:00
juhosg
263a705cc6
ar71xx: move micrel PHY driver to the generic linux target
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30946 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-15 09:25:53 +00:00
juhosg
ab881f8a9d
generic: ar8216: merge multiple if statements in ar8216_hw_apply
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30928 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-13 17:33:12 +00:00
juhosg
86b5f9e15f
generic: ar8216: use usleep_range in ar8216_mii_{read,write}
...
msleep(1) can sleep for up to 20ms.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30885 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-11 17:19:14 +00:00
juhosg
91f1cdc854
generic: ar8216: add a helper function for writing PHY debug registers
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30884 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-11 16:49:35 +00:00
juhosg
7c3e076bdf
generic: ar8216: add lockep assertion to ar8216_rmw
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30883 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-11 16:49:33 +00:00
juhosg
4c5cdbb16b
generic: ar8216: coding style cleanup
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30857 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-08 10:21:14 +00:00
juhosg
9044daabf7
generic: ar8216: don't use static variable in ar8236_hw_init
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30856 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-08 10:21:12 +00:00
juhosg
d118a7af95
generic: ar8216: move register inititalization into hw_init
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30855 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-08 10:21:11 +00:00
juhosg
7c5576c278
generic: ar8216: set chip type directly in ar8216_id_chip
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30854 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-08 10:21:10 +00:00
juhosg
1130aa078f
generic: ar8216: simplify ar8216_config_init
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30853 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-08 10:21:08 +00:00
juhosg
823a90641e
generic: ar8216: move port initialization into a separate function
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30848 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:46 +00:00
juhosg
f7dadcb854
generic: ar8216: improve ar8216_wait_bit function
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30847 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:45 +00:00
juhosg
47f3a7dbc1
generic: ar8216: use ar8216_read_port_link to get the CPU port link parameters
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30846 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:43 +00:00
juhosg
f8b56bc9d2
generic: ar8216: use the generic get_port_link implementation
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30845 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:42 +00:00
juhosg
b1fa0c1a37
generic: rtl8367: use the generic get_port_link implementation
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30844 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:40 +00:00
juhosg
1f9f293936
generic: rtl8366s: use the generic get_port_link implementation
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30843 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:38 +00:00
juhosg
34271f8723
generic: rtl8366rb: use the generic get_port_link implementation
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30842 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:37 +00:00
juhosg
e660b7606b
generic: swconfig: add a generic get_port_link implementation
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30839 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:33 +00:00
juhosg
6977635623
generic: ar8216: use mdiobus_write in ar8236_hw_init
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30838 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:31 +00:00
juhosg
044f0f9c5a
generic: ar8216: use bus->mdio_lock directly in ar8216_mii_{read,write}
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30837 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:30 +00:00
juhosg
6ac61155e0
generic: ar8216: fix phy driver name
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30836 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-07 16:32:28 +00:00
jow
61489954f3
[generic] revert unrelated change in previous commit
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30738 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-27 09:34:31 +00:00
jow
294b1ab0fc
[generic] partly revert r30708, it breaks various arches
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30737 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-27 09:33:36 +00:00
juhosg
e2bae31171
generic: rtl8366: add rtl8366_smi_write_reg_noack helper
...
After issuing a soft reset on the RT8366{S,RB}
switch, waiting for the last acknowlegement fails
in rtl8366_smi_write_reg. Add a _noack version of
the function and use that for issuing a soft reset.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29844 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-21 22:44:09 +00:00
jow
3651d1c332
[generic] rtl8366: fix rtl8366_smi_detect() after r29677
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29732 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-13 19:17:58 +00:00
nbd
63c3f72940
ar8216: use vlan configuration for connecting ports (forced to be untagged) even with vlan_enable=0, but keep them isolated before the switch has been configured
...
this makes enable_vlan=0 practical for vlan passthrough
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29719 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-12 10:15:11 +00:00
nbd
25b268205a
ar8216: do not strip vlan tags when running with vlan_enable=0
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29718 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-12 10:15:08 +00:00
juhosg
55772106df
generic: add driver for the RTL8367R/M switches
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29678 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-07 19:36:31 +00:00
juhosg
d80f2ee46b
generic: rtl8366: preparing for RTL8367 support
...
* make clock delay configurable
* make read,write commands configurable
* use u16 for member and untag fields
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29677 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-07 19:36:30 +00:00
juhosg
d43b4effd9
generic: rtl8366_smi: add timeout message
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29676 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-07 19:36:25 +00:00
juhosg
55894a40aa
kernel: swconfig: introduce a generic switch LED trigger
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29627 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-31 15:02:30 +00:00
juhosg
9394e4a065
kernel: ar8216: add support for the AR8236 switch
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28993 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-12 14:09:52 +00:00
juhosg
63898b07cc
kernel: ar8216: move port vlan setup into a separate function
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28992 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-12 14:09:50 +00:00