Commit graph

268 commits

Author SHA1 Message Date
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