Message ID | 1424309105-31642-3-git-send-email-mathieu@codeaurora.org |
---|---|
State | Rejected |
Headers | show |
On 2015-02-19 12:25, Mathieu Olivari wrote: > AR8xxx driver covers all the QCA switch families. Most architectures > usually build it in the kernel, but it may be valuable for some targets > to build it as a module for more flexibility. > > Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> On what targets would this be useful, and why? - Felix
On 19.02.2015 08:57, Felix Fietkau wrote: > On 2015-02-19 12:25, Mathieu Olivari wrote: >> AR8xxx driver covers all the QCA switch families. Most architectures >> usually build it in the kernel, but it may be valuable for some targets >> to build it as a module for more flexibility. >> >> Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> > On what targets would this be useful, and why? > > - Felix > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > I saw the modular QCA switch in a russian patch series[0] for ZyXel Keenetic series - those are ramips (rt305x + mt7620). Some ramips devices have only 4M flash and seem to use very different hardware. I was cleaning up and trying to apply these changes to trunk [1] But there are some issues (language barrier, no device to test myself, image generation/incompatibilities) with my current series [2] and the ramips platform seem to require custom inits for each different phy that is attached (nonworking RT821x on ramips for chinese HG255D [3]) references: [0] http://s-trace.url.ph/files/ZyXEL_Keenetic_Series/OpenWRT/47/svn_47.diff or for browsing https://github.com/plntyk/openwrt-zyxel_keenetic/blob/master/original.mirror/svn_47.diff https://forum.openwrt.org/viewtopic.php?id=49276 [1] - https://forum.openwrt.org/viewtopic.php?id=55733 - https://forum.openwrt.org/viewtopic.php?id=55734 [2] - https://github.com/plntyk/openwrt-zyxel_keenetic/tree/master/series.v2 [3] https://forum.openwrt.org/viewtopic.php?id=55793 https://forum.openwrt.org/viewtopic.php?id=55821
The git log is a bit misleading actually. This change is more meant to provide the flexibility to enable/disable the switch driver from openwrt menu. It would make it easier if somebody wants to build a firmware for a platform which doesn't have the switch, and wants to save the space associated with it. Could be useful as well in the future, if somebody implements a switchdev/dsa based driver; having an openwrt menuconfig would facilitate disabling the swconfig based one to enable the in kernel one. Rather than modifying the kernel config to do the same. In which case, this facility would have to be enabled on a per-target basis - as it would require to remove the option from config-3.xx. I was typically thinking about doing this for ipq806x. Therefore my comment about "on certain targets" :) Thanks, Mathieu -----Original Message----- From: Felix Fietkau [mailto:nbd@openwrt.org] Sent: Wednesday, February 18, 2015 11:58 PM To: Mathieu Olivari; blogic@openwrt.org; hkallweit1@gmail.com Cc: openwrt-devel@lists.openwrt.org Subject: Re: [PATCH 2/2] kernel: Add a selectable option for ar8xxx On 2015-02-19 12:25, Mathieu Olivari wrote: > AR8xxx driver covers all the QCA switch families. Most architectures > usually build it in the kernel, but it may be valuable for some > targets to build it as a module for more flexibility. > > Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> On what targets would this be useful, and why? - Felix
diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index b5dc92f..cce1b90 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -165,6 +165,22 @@ endef $(eval $(call KernelPackage,swconfig)) +define KernelPackage/switch-ar8xxx + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Qualcomm Atheros AR82XX/AR83XX switch support + DEPENDS:=+kmod-swconfig + KCONFIG:=CONFIG_AR8XXX_PHY + FILES:=$(LINUX_DIR)/drivers/net/phy/ar8xxx.ko + AUTOLOAD:=$(call AutoLoad,42,ar8xxx) +endef + +define KernelPackage/switch-ar8xxx/description + Qualcomm atheros AR82XX/AR83XX switch support +endef + +$(eval $(call KernelPackage,switch-ar8xxx)) + + define KernelPackage/switch-ip17xx SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=IC+ IP17XX switch support
AR8xxx driver covers all the QCA switch families. Most architectures usually build it in the kernel, but it may be valuable for some targets to build it as a module for more flexibility. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)