From nobody Thu Feb 12 09:21:23 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3BEACD37BD for ; Sat, 16 Sep 2023 09:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238680AbjIPJME (ORCPT ); Sat, 16 Sep 2023 05:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237290AbjIPJLl (ORCPT ); Sat, 16 Sep 2023 05:11:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7ABC173B; Sat, 16 Sep 2023 02:11:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB14AC433C7; Sat, 16 Sep 2023 09:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694855495; bh=zxWRKx6qcJqNX0nIAEXQQKlcB3+IREcOJx11K9aTCFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NUUy2ASHBy00tqqzciqnGjjgz0DPJwWQG1rx5x28KmfI2BjAUZkYJXRo9cSG9zkCE eLWtrpCVfKQbjCrZ8ANyZ+9WlNXU8MgME5fQfyBBOCfXb+rx8t3dTPmL/8RvSf4+Qi P4WGfeyY8jgtcrSLnOuXVS9lupXW7JPWPkyd3Yhfvra3LovGA2KGgs9fKh/Xv6T6Sw VO1UHw/uQLl0yFySWAROQ/qS2WjAGWjIIodu59SkMstJbWP+8ermfIbpKwBNq0LTDD hqMTLcBnFgJTR31kyFE1VJbwGwgjDHWz3MxDtPsMdOsbV1rgi7eQ6tUNMmMh23KH/u fxrtC1uud5U5w== From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Greg KH , Wolfram Sang , Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [RFC PATCH 1/2] MIPS: AR7: remove VLYNQ init Date: Sat, 16 Sep 2023 11:11:23 +0200 Message-Id: <20230916091125.3221-2-wsa@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230916091125.3221-1-wsa@kernel.org> References: <20230916091125.3221-1-wsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Wolfram Sang VLYNQ bus support is going to be removed from the Kernel because there has never been a vlynq_driver in the tree since 2009. So, it doesn't make sense to setup a bus controller when it is not going to be accessed. Remove the VLYNQ init code to remove the bus driver later. Signed-off-by: Wolfram Sang Acked-by: Greg Kroah-Hartman --- arch/mips/Kconfig | 1 - arch/mips/ar7/platform.c | 193 +-------------------------- arch/mips/include/asm/mach-ar7/ar7.h | 1 - 3 files changed, 1 insertion(+), 194 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index bc8421859006..0e8aff7355fb 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -219,7 +219,6 @@ config AR7 select SYS_SUPPORTS_MIPS16 select SYS_SUPPORTS_ZBOOT_UART16550 select GPIOLIB - select VLYNQ help Support for the Texas Instruments AR7 System-on-a-Chip family: TNETD7100, 7200 and 7300. diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 215149a85d83..b23dd74ca40e 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -27,156 +26,6 @@ #include #include =20 -/*************************************************************************= **** - * VLYNQ Bus - *************************************************************************= ***/ -struct plat_vlynq_data { - struct plat_vlynq_ops ops; - int gpio_bit; - int reset_bit; -}; - -static int vlynq_on(struct vlynq_device *dev) -{ - int ret; - struct plat_vlynq_data *pdata =3D dev->dev.platform_data; - - ret =3D gpio_request(pdata->gpio_bit, "vlynq"); - if (ret) - goto out; - - ar7_device_reset(pdata->reset_bit); - - ret =3D ar7_gpio_disable(pdata->gpio_bit); - if (ret) - goto out_enabled; - - ret =3D ar7_gpio_enable(pdata->gpio_bit); - if (ret) - goto out_enabled; - - ret =3D gpio_direction_output(pdata->gpio_bit, 0); - if (ret) - goto out_gpio_enabled; - - msleep(50); - - gpio_set_value(pdata->gpio_bit, 1); - - msleep(50); - - return 0; - -out_gpio_enabled: - ar7_gpio_disable(pdata->gpio_bit); -out_enabled: - ar7_device_disable(pdata->reset_bit); - gpio_free(pdata->gpio_bit); -out: - return ret; -} - -static void vlynq_off(struct vlynq_device *dev) -{ - struct plat_vlynq_data *pdata =3D dev->dev.platform_data; - - ar7_gpio_disable(pdata->gpio_bit); - gpio_free(pdata->gpio_bit); - ar7_device_disable(pdata->reset_bit); -} - -static struct resource vlynq_low_res[] =3D { - { - .name =3D "regs", - .flags =3D IORESOURCE_MEM, - .start =3D AR7_REGS_VLYNQ0, - .end =3D AR7_REGS_VLYNQ0 + 0xff, - }, - { - .name =3D "irq", - .flags =3D IORESOURCE_IRQ, - .start =3D 29, - .end =3D 29, - }, - { - .name =3D "mem", - .flags =3D IORESOURCE_MEM, - .start =3D 0x04000000, - .end =3D 0x04ffffff, - }, - { - .name =3D "devirq", - .flags =3D IORESOURCE_IRQ, - .start =3D 80, - .end =3D 111, - }, -}; - -static struct resource vlynq_high_res[] =3D { - { - .name =3D "regs", - .flags =3D IORESOURCE_MEM, - .start =3D AR7_REGS_VLYNQ1, - .end =3D AR7_REGS_VLYNQ1 + 0xff, - }, - { - .name =3D "irq", - .flags =3D IORESOURCE_IRQ, - .start =3D 33, - .end =3D 33, - }, - { - .name =3D "mem", - .flags =3D IORESOURCE_MEM, - .start =3D 0x0c000000, - .end =3D 0x0cffffff, - }, - { - .name =3D "devirq", - .flags =3D IORESOURCE_IRQ, - .start =3D 112, - .end =3D 143, - }, -}; - -static struct plat_vlynq_data vlynq_low_data =3D { - .ops =3D { - .on =3D vlynq_on, - .off =3D vlynq_off, - }, - .reset_bit =3D 20, - .gpio_bit =3D 18, -}; - -static struct plat_vlynq_data vlynq_high_data =3D { - .ops =3D { - .on =3D vlynq_on, - .off =3D vlynq_off, - }, - .reset_bit =3D 16, - .gpio_bit =3D 19, -}; - -static struct platform_device vlynq_low =3D { - .id =3D 0, - .name =3D "vlynq", - .dev =3D { - .platform_data =3D &vlynq_low_data, - }, - .resource =3D vlynq_low_res, - .num_resources =3D ARRAY_SIZE(vlynq_low_res), -}; - -static struct platform_device vlynq_high =3D { - .id =3D 1, - .name =3D "vlynq", - .dev =3D { - .platform_data =3D &vlynq_high_data, - }, - .resource =3D vlynq_high_res, - .num_resources =3D ARRAY_SIZE(vlynq_high_res), -}; - /*************************************************************************= **** * Flash *************************************************************************= ***/ @@ -592,34 +441,6 @@ static int __init ar7_register_uarts(void) =20 static void __init titan_fixup_devices(void) { - /* Set vlynq0 data */ - vlynq_low_data.reset_bit =3D 15; - vlynq_low_data.gpio_bit =3D 14; - - /* Set vlynq1 data */ - vlynq_high_data.reset_bit =3D 16; - vlynq_high_data.gpio_bit =3D 7; - - /* Set vlynq0 resources */ - vlynq_low_res[0].start =3D TITAN_REGS_VLYNQ0; - vlynq_low_res[0].end =3D TITAN_REGS_VLYNQ0 + 0xff; - vlynq_low_res[1].start =3D 33; - vlynq_low_res[1].end =3D 33; - vlynq_low_res[2].start =3D 0x0c000000; - vlynq_low_res[2].end =3D 0x0fffffff; - vlynq_low_res[3].start =3D 80; - vlynq_low_res[3].end =3D 111; - - /* Set vlynq1 resources */ - vlynq_high_res[0].start =3D TITAN_REGS_VLYNQ1; - vlynq_high_res[0].end =3D TITAN_REGS_VLYNQ1 + 0xff; - vlynq_high_res[1].start =3D 34; - vlynq_high_res[1].end =3D 34; - vlynq_high_res[2].start =3D 0x40000000; - vlynq_high_res[2].end =3D 0x43ffffff; - vlynq_high_res[3].start =3D 112; - vlynq_high_res[3].end =3D 143; - /* Set cpmac0 data */ cpmac_low_data.phy_mask =3D 0x40000000; =20 @@ -656,18 +477,6 @@ static int __init ar7_register_devices(void) if (ar7_is_titan()) titan_fixup_devices(); =20 - ar7_device_disable(vlynq_low_data.reset_bit); - res =3D platform_device_register(&vlynq_low); - if (res) - pr_warn("unable to register vlynq-low: %d\n", res); - - if (ar7_has_high_vlynq()) { - ar7_device_disable(vlynq_high_data.reset_bit); - res =3D platform_device_register(&vlynq_high); - if (res) - pr_warn("unable to register vlynq-high: %d\n", res); - } - if (ar7_has_high_cpmac()) { res =3D fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); @@ -706,7 +515,7 @@ static int __init ar7_register_devices(void) val =3D readl(bootcr); iounmap(bootcr); if (val & AR7_WDT_HW_ENA) { - if (ar7_has_high_vlynq()) + if (ar7_has_high_cpmac()) ar7_wdt_res.start =3D UR8_REGS_WDT; else ar7_wdt_res.start =3D AR7_REGS_WDT; diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/m= ach-ar7/ar7.h index 1e8621a6afa3..faa6a15503d6 100644 --- a/arch/mips/include/asm/mach-ar7/ar7.h +++ b/arch/mips/include/asm/mach-ar7/ar7.h @@ -142,7 +142,6 @@ static inline int ar7_has_high_cpmac(void) return -ENXIO; } } -#define ar7_has_high_vlynq ar7_has_high_cpmac #define ar7_has_second_uart ar7_has_high_cpmac =20 static inline void ar7_device_enable(u32 bit) --=20 2.35.1 From nobody Thu Feb 12 09:21:23 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1DB4CD37BC for ; Sat, 16 Sep 2023 09:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238810AbjIPJMG (ORCPT ); Sat, 16 Sep 2023 05:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237947AbjIPJLp (ORCPT ); Sat, 16 Sep 2023 05:11:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AD2173C for ; Sat, 16 Sep 2023 02:11:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34B56C433C8; Sat, 16 Sep 2023 09:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694855499; bh=covprlx2zu7EStEAq1dkZceiipg+g+xBDyRtgZg9lEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L20Zf8ShTCrxx+h6ckh03Od5+HOYHYbXqncrkJFqcHhMf9IrBOY8fGUP42lmwZ8hg +G68JIxSWkJsBBX5C+H8XG84fNggO1Xd9HeIFddmEarKb+almvYUrq+QPAscJPy7Y+ ZJnlCfgb8qXzGMGbhN0lIJhBmiToMaL7ftQJkb3YYY/ZfJm1nO1Pj48Yi++ke1Toye QHRhiZU6m+MbTyEqctSauNs/Td80++HpiH1UAypN0HYsbET1CqRyu3QmBMa6b17yq0 IdZ7RgYG5mTRGTWuqX10IzfF9CEBeEJolpaPYvdHps1I4CKZY1nkXS73+GVSy95iMV zojbBd90U/DSw== From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Greg KH , Wolfram Sang Subject: [RFC PATCH 2/2] vlynq: remove bus driver Date: Sat, 16 Sep 2023 11:11:24 +0200 Message-Id: <20230916091125.3221-3-wsa@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230916091125.3221-1-wsa@kernel.org> References: <20230916091125.3221-1-wsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Wolfram Sang There are no users with a vlynq_driver in the Kernel tree. So, remove the bus driver which hardly has seen any activity since 2009. It was even marked EXPERIMENTAL as long as that symbol existed. OpenWRT had some out-of-tree drivers which they probably intended to upport, but AR7 devices are not supported anymore because they are "stuck with Kernel 3.18" [1]. So, this code can go nowadays. [1] https://openwrt.org/docs/techref/targets/ar7 Signed-off-by: Wolfram Sang Acked-by: Greg Kroah-Hartman --- MAINTAINERS | 7 - drivers/Kconfig | 2 - drivers/Makefile | 1 - drivers/vlynq/Kconfig | 21 -- drivers/vlynq/Makefile | 6 - drivers/vlynq/vlynq.c | 799 ----------------------------------------- include/linux/vlynq.h | 149 -------- 7 files changed, 985 deletions(-) delete mode 100644 drivers/vlynq/Kconfig delete mode 100644 drivers/vlynq/Makefile delete mode 100644 drivers/vlynq/vlynq.c delete mode 100644 include/linux/vlynq.h diff --git a/MAINTAINERS b/MAINTAINERS index 90f13281d297..02b83539a5ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22962,13 +22962,6 @@ W: https://linuxtv.org T: git git://linuxtv.org/media_tree.git F: drivers/media/test-drivers/vivid/* =20 -VLYNQ BUS -M: Florian Fainelli -L: openwrt-devel@lists.openwrt.org (subscribers-only) -S: Maintained -F: drivers/vlynq/vlynq.c -F: include/linux/vlynq.h - VM SOCKETS (AF_VSOCK) M: Stefano Garzarella L: virtualization@lists.linux-foundation.org diff --git a/drivers/Kconfig b/drivers/Kconfig index efb66e25fa2d..9c8b82ddebfe 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -135,8 +135,6 @@ source "drivers/uio/Kconfig" =20 source "drivers/vfio/Kconfig" =20 -source "drivers/vlynq/Kconfig" - source "drivers/virt/Kconfig" =20 source "drivers/virtio/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index cb0afca2e4a0..2ec0005bb840 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -151,7 +151,6 @@ obj-$(CONFIG_BCMA) +=3D bcma/ obj-$(CONFIG_VHOST_RING) +=3D vhost/ obj-$(CONFIG_VHOST_IOTLB) +=3D vhost/ obj-$(CONFIG_VHOST) +=3D vhost/ -obj-$(CONFIG_VLYNQ) +=3D vlynq/ obj-$(CONFIG_GREYBUS) +=3D greybus/ obj-$(CONFIG_COMEDI) +=3D comedi/ obj-$(CONFIG_STAGING) +=3D staging/ diff --git a/drivers/vlynq/Kconfig b/drivers/vlynq/Kconfig deleted file mode 100644 index e7f9492a0b04..000000000000 diff --git a/drivers/vlynq/Makefile b/drivers/vlynq/Makefile deleted file mode 100644 index d9ce5b2b5ce0..000000000000 diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c deleted file mode 100644 index 4af6615808cc..000000000000 diff --git a/include/linux/vlynq.h b/include/linux/vlynq.h deleted file mode 100644 index e9c0cd36c48a..000000000000 --=20 2.35.1