From 7b6e1a148f38bab62a35fc6ff22b6f2feaba445b Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 24 Sep 2018 12:51:38 +0200 Subject: Revert "backports: Remove ssb and bcma" This reverts commit 1b4e6ad4d927c7998fa578f2d29e0c4ec01a9217. Said commit broke b43 on older kernels (<3.16). Signed-off-by: Johannes Berg --- backport/Kconfig.sources | 3 +++ backport/Makefile.kernel | 2 ++ .../linux/bcma/bcma_driver_chipcommon.h | 23 --------------------- backport/defconfigs/b43 | 7 +++++++ backport/defconfigs/b43legacy | 5 +++++ backport/defconfigs/brcmsmac | 2 ++ backport/defconfigs/wifi | 6 ++++++ copy-list | 5 +++++ dependencies | 14 +++++++++++++ patches/0051-no-wakeup_path/ssb.patch | 12 +++++++++++ patches/0069-remove-of_irq/bcma.patch | 24 ++++++++++++++++++++++ 11 files changed, 80 insertions(+), 23 deletions(-) delete mode 100644 backport/backport-include/linux/bcma/bcma_driver_chipcommon.h create mode 100644 patches/0051-no-wakeup_path/ssb.patch create mode 100644 patches/0069-remove-of_irq/bcma.patch diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources index 347f1c56..5fb44780 100644 --- a/backport/Kconfig.sources +++ b/backport/Kconfig.sources @@ -7,6 +7,9 @@ source "$BACKPORT_DIR/net/mac80211/Kconfig" source "$BACKPORT_DIR/drivers/net/wireless/Kconfig" source "$BACKPORT_DIR/drivers/net/usb/Kconfig" +source "$BACKPORT_DIR/drivers/ssb/Kconfig" +source "$BACKPORT_DIR/drivers/bcma/Kconfig" + source "$BACKPORT_DIR/drivers/usb/class/Kconfig" source "$BACKPORT_DIR/drivers/staging/Kconfig" diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel index 23b26882..5c966974 100644 --- a/backport/Makefile.kernel +++ b/backport/Makefile.kernel @@ -40,6 +40,8 @@ obj-y += compat/ obj-$(CPTCFG_CFG80211) += net/wireless/ obj-$(CPTCFG_MAC80211) += net/mac80211/ obj-$(CPTCFG_WLAN) += drivers/net/wireless/ +obj-$(CPTCFG_SSB) += drivers/ssb/ +obj-$(CPTCFG_BCMA) += drivers/bcma/ obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/ obj-$(CPTCFG_USB_WDM) += drivers/usb/class/ diff --git a/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h b/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h deleted file mode 100644 index 47809853..00000000 --- a/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __BACKPORT_LINUX_BCMA_DRIVER_CC_H_ -#define __BACKPORT_LINUX_BCMA_DRIVER_CC_H_ -#include_next - -#ifndef BCMA_CC_PMU_CHIPCTL_ADDR -#define BCMA_CC_PMU_CHIPCTL_ADDR 0x0650 -#define BCMA_CC_PMU_CHIPCTL_DATA 0x0654 -#define BCMA_CC_PMU_REGCTL_ADDR 0x0658 -#define BCMA_CC_PMU_REGCTL_DATA 0x065C -#define BCMA_CC_PMU_PLLCTL_ADDR 0x0660 -#define BCMA_CC_PMU_PLLCTL_DATA 0x0664 -#endif - -#ifndef BCMA_CC_CAP_EXT_AOB_PRESENT -#define BCMA_CC_CAP_EXT_SECI_PRESENT 0x00000001 -#define BCMA_CC_CAP_EXT_GSIO_PRESENT 0x00000002 -#define BCMA_CC_CAP_EXT_GCI_PRESENT 0x00000004 -#define BCMA_CC_CAP_EXT_SECI_PUART_PRESENT 0x00000008 /* UART present */ -#define BCMA_CC_CAP_EXT_AOB_PRESENT 0x00000040 -#endif - - -#endif /* __BACKPORT_LINUX_BCMA_DRIVER_CC_H_ */ diff --git a/backport/defconfigs/b43 b/backport/defconfigs/b43 index c486ca1e..27bfb9e2 100644 --- a/backport/defconfigs/b43 +++ b/backport/defconfigs/b43 @@ -11,3 +11,10 @@ CPTCFG_B43_SDIO=y CPTCFG_B43_PHY_N=y CPTCFG_B43_PHY_LP=y CPTCFG_B43_PHY_HT=y +CPTCFG_BCMA=m +CPTCFG_BCMA_HOST_PCI=y +CPTCFG_SSB=m +CPTCFG_SSB_PCIHOST=y +CPTCFG_SSB_PCMCIAHOST=y +CPTCFG_SSB_SDIOHOST=y +CPTCFG_SSB_DRIVER_PCICORE=y diff --git a/backport/defconfigs/b43legacy b/backport/defconfigs/b43legacy index 552e13b2..71787081 100644 --- a/backport/defconfigs/b43legacy +++ b/backport/defconfigs/b43legacy @@ -6,3 +6,8 @@ CPTCFG_MAC80211_LEDS=y CPTCFG_WLAN=y CPTCFG_WLAN_VENDOR_BROADCOM=y CPTCFG_B43LEGACY=m +CPTCFG_SSB=m +CPTCFG_SSB_PCIHOST=y +CPTCFG_SSB_PCMCIAHOST=y +CPTCFG_SSB_SDIOHOST=y +CPTCFG_SSB_DRIVER_PCICORE=y diff --git a/backport/defconfigs/brcmsmac b/backport/defconfigs/brcmsmac index 20f429b6..2c2edd23 100644 --- a/backport/defconfigs/brcmsmac +++ b/backport/defconfigs/brcmsmac @@ -5,3 +5,5 @@ CPTCFG_MAC80211_LEDS=y CPTCFG_WLAN=y CPTCFG_WLAN_VENDOR_BROADCOM=y CPTCFG_BRCMSMAC=m +CPTCFG_BCMA=m +CPTCFG_BCMA_HOST_PCI=y diff --git a/backport/defconfigs/wifi b/backport/defconfigs/wifi index fb18e182..4034bb13 100644 --- a/backport/defconfigs/wifi +++ b/backport/defconfigs/wifi @@ -17,6 +17,9 @@ CPTCFG_B43=m CPTCFG_B43_PHY_HT=y CPTCFG_B43_PHY_N=y CPTCFG_B43_SDIO=y +CPTCFG_BCMA_DRIVER_GPIO=y +CPTCFG_BCMA_HOST_PCI=y +CPTCFG_BCMA=m CPTCFG_BRCMFMAC=m CPTCFG_BRCMFMAC_PCIE=y CPTCFG_BRCMFMAC_USB=y @@ -98,6 +101,9 @@ CPTCFG_RTL8723BE=m CPTCFG_RTL8821AE=m CPTCFG_RTL8XXXU=m CPTCFG_RTLWIFI=m +CPTCFG_SSB=m +CPTCFG_SSB_PCMCIAHOST=y +CPTCFG_SSB_SDIOHOST=y CPTCFG_TMD_HERMES=m CPTCFG_USB_NET_RNDIS_WLAN=m CPTCFG_USB_ZD1201=m diff --git a/copy-list b/copy-list index 9c522629..a14633aa 100644 --- a/copy-list +++ b/copy-list @@ -38,6 +38,7 @@ include/linux/mmc/sdio_ids.h include/linux/ath9k_platform.h include/linux/wl12xx.h include/linux/rndis.h +include/linux/bcm47xx_wdt.h include/linux/usb/usbnet.h include/linux/usb/cdc.h include/uapi/linux/usb/cdc.h @@ -87,6 +88,10 @@ include/linux/mpls.h include/uapi/linux/mpls.h drivers/net/wireless/ath/ +drivers/ssb/ +include/linux/ssb/ +drivers/bcma/ +include/linux/bcma/ drivers/net/wireless/cisco/ drivers/net/wireless/atmel/ drivers/net/wireless/broadcom/ diff --git a/dependencies b/dependencies index cd644df7..5918106f 100644 --- a/dependencies +++ b/dependencies @@ -31,6 +31,20 @@ QTNFMAC_PEARL_PCIE 3.13 # backported properly MWIFIEX 3.18 +BCMA_DRIVER_MIPS 3.3 +SSB_DRIVER_MIPS 3.3 +# needs GPIO stuff we didn't backport +SSB_DRIVER_GPIO 4.5 + +# the irq handler in the gpio driver uses +# irq_set_chip_and_handler_name() which gets exported starting with +# kernel 3.7. This code is only compiled if BCMA_DRIVER_GPIO and +# BCMA_HOST_SOC are set. +BCMA_HOST_SOC 3.7 + +# Uses gpiochip_get_data() +BCMA_DRIVER_GPIO 4.5 + # tracing results in compile errors ATH10K_TRACING 3.4 ATH_TRACEPOINTS 3.1 diff --git a/patches/0051-no-wakeup_path/ssb.patch b/patches/0051-no-wakeup_path/ssb.patch new file mode 100644 index 00000000..dcebbcdf --- /dev/null +++ b/patches/0051-no-wakeup_path/ssb.patch @@ -0,0 +1,12 @@ +--- a/drivers/ssb/pcihost_wrapper.c ++++ b/drivers/ssb/pcihost_wrapper.c +@@ -33,7 +33,9 @@ static int ssb_pcihost_suspend(struct de + + /* if there is a wakeup enabled child device on ssb bus, + enable pci wakeup posibility. */ ++#if LINUX_VERSION_IS_GEQ(3,2,0) + device_set_wakeup_enable(d, d->power.wakeup_path); ++#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ + + pci_prepare_to_sleep(dev); + diff --git a/patches/0069-remove-of_irq/bcma.patch b/patches/0069-remove-of_irq/bcma.patch new file mode 100644 index 00000000..b8a05ae8 --- /dev/null +++ b/patches/0069-remove-of_irq/bcma.patch @@ -0,0 +1,24 @@ +--- a/drivers/bcma/main.c ++++ b/drivers/bcma/main.c +@@ -156,6 +156,7 @@ static struct device_node *bcma_of_find_ + return NULL; + } + ++#if LINUX_VERSION_IS_GEQ(3,13,0) + static int bcma_of_irq_parse(struct device *parent, + struct bcma_device *core, + struct of_phandle_args *out_irq, int num) +@@ -195,6 +196,13 @@ static unsigned int bcma_of_get_irq(stru + + return irq_create_of_mapping(&out_irq); + } ++#else ++static unsigned int bcma_of_get_irq(struct device *parent, ++ struct bcma_device *core, int num) ++{ ++ return 0; ++} ++#endif + + static void bcma_of_fill_device(struct device *parent, + struct bcma_device *core) -- cgit v1.2.3