From 3b0517bbd301fe4b6e842550402f7b200b2ab774 Mon Sep 17 00:00:00 2001 From: Evgeniy Paltsev Date: Wed, 4 May 2022 17:46:25 +0400 Subject: [PATCH] ARC: HSDK: remove pinmux_hsdk driver Pinmux is depricated (see #39740) and shouldn't be used anymore Signed-off-by: Evgeniy Paltsev Signed-off-by: Eugeniy Paltsev --- CODEOWNERS | 1 - drivers/pinmux/CMakeLists.txt | 1 - drivers/pinmux/Kconfig | 2 - drivers/pinmux/Kconfig.hsdk | 8 -- drivers/pinmux/pinmux_hsdk.c | 76 ------------------- .../pinctrl/snps,creg-gpio-mux-hsdk.yaml | 17 ----- 6 files changed, 105 deletions(-) delete mode 100644 drivers/pinmux/Kconfig.hsdk delete mode 100644 drivers/pinmux/pinmux_hsdk.c delete mode 100644 dts/bindings/pinctrl/snps,creg-gpio-mux-hsdk.yaml diff --git a/CODEOWNERS b/CODEOWNERS index ef9be0747bc704..0edd11fcd4e25a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -336,7 +336,6 @@ /drivers/peci/ @albertofloyd @franciscomunoz @sjvasanth1 /drivers/pinctrl/ @gmarull /drivers/pinctrl/*esp32* @glaubermaroto -/drivers/pinmux/*hsdk* @iriszzw /drivers/pinmux/*it8xxx2* @ite /drivers/pm_cpu_ops/ @carlocaione /drivers/power_domain/ @ceolin diff --git a/drivers/pinmux/CMakeLists.txt b/drivers/pinmux/CMakeLists.txt index c6d8389819d366..5f94a64566f102 100644 --- a/drivers/pinmux/CMakeLists.txt +++ b/drivers/pinmux/CMakeLists.txt @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # Board initialization -zephyr_sources_ifdef(CONFIG_PINMUX_HSDK pinmux_hsdk.c) zephyr_sources_ifdef(CONFIG_PINMUX_INTEL_S1000 pinmux_intel_s1000.c) zephyr_sources_ifdef(CONFIG_PINMUX_LPC11U6X pinmux_lpc11u6x.c) zephyr_sources_ifdef(CONFIG_PINMUX_MCUX pinmux_mcux.c) diff --git a/drivers/pinmux/Kconfig b/drivers/pinmux/Kconfig index 4a3df42d2cbc5f..dbe1693c068d8c 100644 --- a/drivers/pinmux/Kconfig +++ b/drivers/pinmux/Kconfig @@ -26,8 +26,6 @@ config PINMUX_INIT_PRIORITY source "drivers/pinmux/Kconfig.beetle" -source "drivers/pinmux/Kconfig.hsdk" - source "drivers/pinmux/Kconfig.intel_s1000" source "drivers/pinmux/Kconfig.lpc11u6x" diff --git a/drivers/pinmux/Kconfig.hsdk b/drivers/pinmux/Kconfig.hsdk deleted file mode 100644 index 3176eb8a4ee8de..00000000000000 --- a/drivers/pinmux/Kconfig.hsdk +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2019 Synopsys, Inc. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -config PINMUX_HSDK - bool "ARC HSDK I/O pin mux driver" - depends on SOC_ARC_HSDK - help - Enable driver for ARC HSDK I/O pin mux. diff --git a/drivers/pinmux/pinmux_hsdk.c b/drivers/pinmux/pinmux_hsdk.c deleted file mode 100644 index 6751ce2b7dc000..00000000000000 --- a/drivers/pinmux/pinmux_hsdk.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2019 Synopsys, Inc. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define DT_DRV_COMPAT snps_creg_gpio_mux_hsdk - -#include -#include -#include -#include - -#define creg_gpio_mux_reg (*(volatile uint32_t *)DT_INST_REG_ADDR(0)) - -void _arc_sync(void) -{ - __asm__ volatile("sync"); -} - -static int pinmux_hsdk_set(const struct device *dev, uint32_t pin, - uint32_t func) -{ - - if (func >= HSDK_PINMUX_FUNS || pin >= HSDK_PINMUX_SELS) - return -EINVAL; - - creg_gpio_mux_reg &= ~(0x07U << (pin * 3)); - creg_gpio_mux_reg |= (func << (pin * 3)); - - _arc_sync(); - - return 0; -} - -static int pinmux_hsdk_get(const struct device *dev, uint32_t pin, - uint32_t *func) -{ - - if (pin >= HSDK_PINMUX_SELS || func == NULL) - return -EINVAL; - - *func = (creg_gpio_mux_reg >> (pin * 3)) & 0x07U; - - return 0; -} - -static int pinmux_hsdk_pullup(const struct device *dev, uint32_t pin, - uint8_t func) -{ - return -ENOTSUP; -} - -static int pinmux_hsdk_input(const struct device *dev, uint32_t pin, - uint8_t func) -{ - return -ENOTSUP; -} - -static int pinmux_hsdk_init(const struct device *dev) -{ - ARG_UNUSED(dev); - return 0; -} - -static const struct pinmux_driver_api pinmux_hsdk_driver_api = { - .set = pinmux_hsdk_set, - .get = pinmux_hsdk_get, - .pullup = pinmux_hsdk_pullup, - .input = pinmux_hsdk_input, -}; - -DEVICE_DT_INST_DEFINE(0, - &pinmux_hsdk_init, NULL, NULL, NULL, - PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, - &pinmux_hsdk_driver_api); diff --git a/dts/bindings/pinctrl/snps,creg-gpio-mux-hsdk.yaml b/dts/bindings/pinctrl/snps,creg-gpio-mux-hsdk.yaml deleted file mode 100644 index ce428a91db1e30..00000000000000 --- a/dts/bindings/pinctrl/snps,creg-gpio-mux-hsdk.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2021, Linaro Limited -# SPDX-License-Identifier: Apache-2.0 - -description: | - Synopsys CREG HSDK GPIO pin mux - -compatible: "snps,creg-gpio-mux-hsdk" - -include: base.yaml - -properties: - reg: - required: true - -pinmux-cells: - - pin - - function