[OpenWrt-Devel] [RFC 2/3] kernel: owl-loader for delayed Atheros ath9k fixup
Christian Lamparter
chunkeey at googlemail.com
Thu Mar 10 06:22:23 EST 2016
On Wednesday, March 09, 2016 11:29:54 PM Martin Blumenstingl wrote:
> On Wed, Mar 9, 2016 at 6:30 PM, Christian Lamparter
> <chunkeey at googlemail.com> wrote:
> > lantiq on the other hand has copied the func from ar71xx and adapted
> > and renamed it, but kept the signature:
> > ltq_pci_ath_fixup(unsigned slot, u16 *cal_data)
> > it's in arch/mips/lantiq/xway/pci-ath-fixup.c.
> Maybe we could also move pci-ath-fixup.c to a separate package (or
> even the same as owl-loader)?
>
> Seems like there are only two differences between the lantiq and the
> ar71xx code:
> 1. pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, base); vs per-SoC
> value in ar71xx
> 2. swab32(val) when writing the caldata
Ok, if this common arch-specific pci_ath9k_fixup isn't a thing.
Then what about moving this to ath9k? As this code is duplicated
for several archs in the same way (ar71xx, bcm63xx, lantiq and
also a cut-down version can be found for mpc85xx [0]).
We simply move the platform-specific "base" into ath9k_platform_data
and pass it to the driver and have a bools to control whenever the
vals need to be swapped or not.
[0] <https://dev.openwrt.org/browser/trunk/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c#L71>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list