From patchwork Wed Aug 3 23:43:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1663502 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FWDNFwjA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LypNz6r7xz9sFs for ; Thu, 4 Aug 2022 09:44:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3312C84513; Thu, 4 Aug 2022 01:44:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FWDNFwjA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 02F3A845D1; Thu, 4 Aug 2022 01:44:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 21BC084566 for ; Thu, 4 Aug 2022 01:44:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=judge.packham@gmail.com Received: by mail-pf1-x430.google.com with SMTP id 130so10029757pfv.13 for ; Wed, 03 Aug 2022 16:44:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=jB8uyrmCfNm7VNUSxWD9jzpmZOHdaBGbI/INLGtme1I=; b=FWDNFwjAHbad57lOn3jQhNDnSiwMFO55/6kyHnaQy7uiEfpTdWeYpCBnNLiX2tmWNX 6VjCdvZ/f87EZuRoVh88j/Bsv9inuXDEJOUJ9rMqkTW5aHXZUyKP7t4Y2kx2C2wuCYnc X9bcvtGlceBbAy/mzI/DL42UzhZHSUewjF3QsMdlztn81HX0Qm782B5zlbWn7wU3rIU1 gesfmL6oQUaaXamnbJaxUD1CCNJg/zwPjcHgvJXpaabf+LLDYZ+xBEkTFg5ek0N6LSu6 Gf2p9ZH8yJuM9nvD6K4bMFFNy5X2CnAkfWQRVU+6qTyevkwujBIEXYR7NlyweS4P/U9o g7Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=jB8uyrmCfNm7VNUSxWD9jzpmZOHdaBGbI/INLGtme1I=; b=qBSEWZ5hElNagEsLWwu6Qc0tQq4+VeGnmT6vFHrOe1NG2XKUZNoXZSDq1FpN+ccw41 PB+36c50q8daIeqTf0bmylSIHZkKguK5AWU5WRvilXm+mWA9oGYANDzPTQ+fJb82mYM3 FQpklw56aBKfLEdt6wBJYcWDGRvpsMi4UOnhMAveJqqee/y2kSeFlPG3kkEGNHzqbaly 4zl/XWlU6VPY9u2BHW6Os5ps1/5nXEq2DvsY1w4z0MoYryoiBmCKbwzwdySKdCLcaE9Z 8TZqmctkRu09JbltpMrwQDthSDxHf3rwMGJxXcBGGQ4GOdIgahkEW3IkzBYNZRLw8sRE 09eQ== X-Gm-Message-State: ACgBeo28TWrcThSz4eNlIsgDmOhYwHEXeifJZ0rq5PkuepPfSVX7VgPY yAHeJpfQMg0j+FBZWF+wuXHPJjvv0pXJzzso X-Google-Smtp-Source: AA6agR4BgU0eGaASkD6OCtyJiE+VnRA2z2IZkutDTkv36IfiJomyNQaTZD6n+syPRgSFe+MLtmUtbQ== X-Received: by 2002:a05:6a00:1249:b0:52e:f8c:be46 with SMTP id u9-20020a056a00124900b0052e0f8cbe46mr6857603pfi.5.1659570257643; Wed, 03 Aug 2022 16:44:17 -0700 (PDT) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:c438:8b97:a371:7f07]) by smtp.gmail.com with ESMTPSA id u13-20020a170902e80d00b0016397da033csm2606366plg.62.2022.08.03.16.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 16:44:16 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Cc: Chris Packham , Andrew Jeffery , Heiko Schocher , Michal Simek , Oleksandr Suvorov , =?utf-8?q?Pali_Roh=C3=A1?= =?utf-8?q?r?= , Simon Glass , T Karthik Reddy Subject: [PATCH] gpio: Remove mvgpio driver Date: Thu, 4 Aug 2022 11:43:57 +1200 Message-Id: <20220803234357.21457-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The last user of this driver was removed in commit dee08b1999e2 ("arm: Remove gplugd board"). Remove the unused driver. Signed-off-by: Chris Packham Acked-by: Pali Rohár --- drivers/gpio/Makefile | 1 - drivers/gpio/mvgpio.c | 97 ------------------------------------------- drivers/gpio/mvgpio.h | 53 ----------------------- 3 files changed, 151 deletions(-) delete mode 100644 drivers/gpio/mvgpio.c delete mode 100644 drivers/gpio/mvgpio.h diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 219f37e0e434..39762fa06ce9 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -24,7 +24,6 @@ obj-$(CONFIG_INTEL_BROADWELL_GPIO) += intel_broadwell_gpio.o obj-$(CONFIG_IPROC_GPIO) += iproc_gpio.o obj-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o obj-$(CONFIG_KONA_GPIO) += kona_gpio.o -obj-$(CONFIG_MARVELL_GPIO) += mvgpio.o obj-$(CONFIG_MCP230XX_GPIO) += mcp230xx_gpio.o obj-$(CONFIG_MXC_GPIO) += mxc_gpio.o obj-$(CONFIG_MXS_GPIO) += mxs_gpio.o diff --git a/drivers/gpio/mvgpio.c b/drivers/gpio/mvgpio.c deleted file mode 100644 index 12e7197daf7b..000000000000 --- a/drivers/gpio/mvgpio.c +++ /dev/null @@ -1,97 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2011 - * eInfochips Ltd. - * Written-by: Ajay Bhargav - * - * (C) Copyright 2010 - * Marvell Semiconductor - */ - -#include -#include -#include -#include -#include "mvgpio.h" -#include - -#ifndef MV_MAX_GPIO -#define MV_MAX_GPIO 128 -#endif - -int gpio_request(unsigned gpio, const char *label) -{ - if (gpio >= MV_MAX_GPIO) { - printf("%s: Invalid GPIO requested %d\n", __func__, gpio); - return -1; - } - return 0; -} - -int gpio_free(unsigned gpio) -{ - return 0; -} - -int gpio_direction_input(unsigned gpio) -{ - struct gpio_reg *gpio_reg_bank; - - if (gpio >= MV_MAX_GPIO) { - printf("%s: Invalid GPIO %d\n", __func__, gpio); - return -1; - } - - gpio_reg_bank = get_gpio_base(GPIO_TO_REG(gpio)); - writel(GPIO_TO_BIT(gpio), &gpio_reg_bank->gcdr); - return 0; -} - -int gpio_direction_output(unsigned gpio, int value) -{ - struct gpio_reg *gpio_reg_bank; - - if (gpio >= MV_MAX_GPIO) { - printf("%s: Invalid GPIO %d\n", __func__, gpio); - return -1; - } - - gpio_reg_bank = get_gpio_base(GPIO_TO_REG(gpio)); - writel(GPIO_TO_BIT(gpio), &gpio_reg_bank->gsdr); - gpio_set_value(gpio, value); - return 0; -} - -int gpio_get_value(unsigned gpio) -{ - struct gpio_reg *gpio_reg_bank; - u32 gpio_val; - - if (gpio >= MV_MAX_GPIO) { - printf("%s: Invalid GPIO %d\n", __func__, gpio); - return -1; - } - - gpio_reg_bank = get_gpio_base(GPIO_TO_REG(gpio)); - gpio_val = readl(&gpio_reg_bank->gplr); - - return GPIO_VAL(gpio, gpio_val); -} - -int gpio_set_value(unsigned gpio, int value) -{ - struct gpio_reg *gpio_reg_bank; - - if (gpio >= MV_MAX_GPIO) { - printf("%s: Invalid GPIO %d\n", __func__, gpio); - return -1; - } - - gpio_reg_bank = get_gpio_base(GPIO_TO_REG(gpio)); - if (value) - writel(GPIO_TO_BIT(gpio), &gpio_reg_bank->gpsr); - else - writel(GPIO_TO_BIT(gpio), &gpio_reg_bank->gpcr); - - return 0; -} diff --git a/drivers/gpio/mvgpio.h b/drivers/gpio/mvgpio.h deleted file mode 100644 index d68c48e63737..000000000000 --- a/drivers/gpio/mvgpio.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2011 - * eInfochips Ltd. - * Written-by: Ajay Bhargav - * - * (C) Copyright 2010 - * Marvell Semiconductor - */ - -#ifndef __MVGPIO_H__ -#define __MVGPIO_H__ - -#include - -/* - * GPIO Register map for Marvell SOCs - */ -struct gpio_reg { - u32 gplr; /* Pin Level Register - 0x0000 */ - u32 pad0[2]; - u32 gpdr; /* Pin Direction Register - 0x000C */ - u32 pad1[2]; - u32 gpsr; /* Pin Output Set Register - 0x0018 */ - u32 pad2[2]; - u32 gpcr; /* Pin Output Clear Register - 0x0024 */ - u32 pad3[2]; - u32 grer; /* Rising-Edge Detect Enable Register - 0x0030 */ - u32 pad4[2]; - u32 gfer; /* Falling-Edge Detect Enable Register - 0x003C */ - u32 pad5[2]; - u32 gedr; /* Edge Detect Status Register - 0x0048 */ - u32 pad6[2]; - u32 gsdr; /* Bitwise Set of GPIO Direction Register - 0x0054 */ - u32 pad7[2]; - u32 gcdr; /* Bitwise Clear of GPIO Direction Register - 0x0060 */ - u32 pad8[2]; - u32 gsrer; /* Bitwise Set of Rising-Edge Detect Enable - Register - 0x006C */ - u32 pad9[2]; - u32 gcrer; /* Bitwise Clear of Rising-Edge Detect Enable - Register - 0x0078 */ - u32 pad10[2]; - u32 gsfer; /* Bitwise Set of Falling-Edge Detect Enable - Register - 0x0084 */ - u32 pad11[2]; - u32 gcfer; /* Bitwise Clear of Falling-Edge Detect Enable - Register - 0x0090 */ - u32 pad12[2]; - u32 apmask; /* Bitwise Mask of Edge Detect Register - 0x009C */ -}; - -#endif /* __MVGPIO_H__ */