OSDN Git Service

rt2x00: rt2800lib: add support for RT3352 with 20MHz crystal
authorDaniel Golle <daniel@makrotopia.org>
Fri, 20 Jan 2017 13:28:25 +0000 (14:28 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 28 Jan 2017 07:03:45 +0000 (09:03 +0200)
commit5c4412e0728063583ec971323f8256e8005a32b6
tree1b5fb249b6db699d5e22b09c699f18c64f1738f8
parent34db70b92faed22f59fdc1dba766e8cb6248fe9e
rt2x00: rt2800lib: add support for RT3352 with 20MHz crystal

On Rt3352 the driver needs to know the frequency of an external
crystal which can be either 40 MHz (as on all other WiSoCs until now)
or 20 MHz.
Get the clock attached by ramips WiSoC platform code which probes
SYSC_REG_SYSCFG (added by John Crispin in commit 6ac8579b96e3b) and
introduce a new flag clk_is_20mhz in struct hw_mode_spec to make the
driver aware and use either 40 MHz or 20 MHz specific rf_vals on those
WiSoC platforms.
The introduced support for boards with a 20 MHz crystal is also needed
for RT5350.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c