From patchwork Mon Feb 26 07:30:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin via B4 Relay X-Patchwork-Id: 206311 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1920268dyb; Sun, 25 Feb 2024 23:39:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVm0OAxN1W9gID6PETliYM8D1VkQ+/iAVvkD+JtPPylg1G7eNAjD98Ec/oNRr3Vfz6YMBmGAlp01V9JP+IYDW/zqcxBwQ== X-Google-Smtp-Source: AGHT+IHSTrSdmt5GdInweIwrgSRIGivm6pqNP3OsaweJJ9iqyJWtcSqU77uhNTlnfz/hokt0aiwO X-Received: by 2002:a05:622a:190:b0:42e:80ca:376d with SMTP id s16-20020a05622a019000b0042e80ca376dmr3031227qtw.54.1708933176048; Sun, 25 Feb 2024 23:39:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708933176; cv=pass; d=google.com; s=arc-20160816; b=VFnnhGW2EqHmRu4sBDcknmF8RNYS18IcXPgmZpUtw1f3DC2nieGOzZ8kFMc8l3Ssse GZ/TuiWPA29IZnCvvvnd485/wh1Q7W/12S6Bq8onZ0HuL119yzByMeaR/Nh/caMix1RZ SjGFOowdmDU66jG/ZncoPCLZ0h7wuvpQmMedcLS29AVzpNOvny3WD81D9OgQMSpiT/CM 8ZYwzvYJSlAbQGbFwpqwhmVOm2siF1g5zlYx3IA0UA8hLJ6mNB1JWth9s2x9UfoicZtK 3dhPhez6cRev3P59wXke610OwWYmXQtaWoGDYWY+GW7qyEEKhgIgCbwbhkW9Cq1mHlqd gYGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=eKdAvadmiWYPzChOJL6VZhW9ufiytwoE54HjS7fLPQQ=; fh=xcqyX8stj2rCgFbF5REkkx/bRsNBcsMAETII8c0bfdA=; b=q6WcJNpRXNjQI6nkCyN4wAMJjgG1XYaRw0KB3GE/uXSN3+rP1ArL9DYFdk74CV/qZP 2c/PZeeHaMz9zZGjhZrW7MFQej4Lz+9oP0P+GKN4w1ig/aFnSuTNeAO5v23vPVj1GzeG ZjstKLfIFenoiH7jNpuUSysD9IchApqkoNorJKSvmfXvQ66aFtXYCBfd+WevX2eldgSN QTlD3lbQJcAUyU+A1DN0PvUH3P47+s5dSNwZPp7Un8+zzaNXEvdO3DTa1Wvg8mhZs5nK K9Mhq81L4Rf5ymqaeWCDDJBE7zFJvnVKN4ZpLRO5sctL4sbFGuwXXSo9eQf3LtM8vTkV ApoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gpotwxGR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80668-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t14-20020ac8738e000000b0042e898298c0si730710qtp.166.2024.02.25.23.39.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 23:39:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gpotwxGR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80668-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80668-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C25E91C220C4 for ; Mon, 26 Feb 2024 07:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F280F1C29E; Mon, 26 Feb 2024 07:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gpotwxGR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0D3A1EB35; Mon, 26 Feb 2024 07:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708932685; cv=none; b=ep4x4UeyE5jiVjvfb9pNECS8MzhKWBKt4+267LBFcWvNJsXHDEJgfjH3gS4hdVB3cEc7ZI1uvwU6Q70N8Tp0gNPRdDfymAnCxpKz71v74aJvgm4p2XL2ALR6+lJO+Jash0QIFdcRlIDVTIVGLFxZ3Ig2CYOiatJ9uvWFQmjBT3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708932685; c=relaxed/simple; bh=ej941G4SwXEoXOihGj99VwXEy6Zw3bZFrs7RkXckkj8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JJnj4aKEiHwOB0pOztKWq/dR8R5oecQaQendpZajJy/WIT3aVAycRHbp8UJLoLTSjI31GR2sM9V68Yps8a/3tJxV533PXrkxIUqDkp/q6/qqmWe2ZpEOxXMtQK1N+TjLaCoOy1lDUOuR7p2BtH+6MJ0RFU+WgpCbtSWbAyr4q60= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gpotwxGR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id D1D66C4E769; Mon, 26 Feb 2024 07:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708932683; bh=ej941G4SwXEoXOihGj99VwXEy6Zw3bZFrs7RkXckkj8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=gpotwxGRYL+kJo2Zmf4Fn1DEdFiQYnzcmpfzwWARZlriyvM/LnjNHYpIZEohiRwXu RXXGbPCfXsKx5zBdWgK/13Uauj7u2VSPN9pH60p1WXjuJEH+yl62aCnNcvWPCSZDYJ DIPp4OGqsmmMkgiUGUj9/2Y25/I2my4EEpYfzxLLuroah4dCXKmbTQvYOFMuYRCgmr xcL9KIpqEf4+TW6wwPPJ+SPUE62omELZtcDrew3ed+7GmfrKi+JEjlynpg0Cb2k0AB ZoqmyQiu8/Kric8NNd3AFN2YTzreFIs55GIfHsksk1q1KfC1Te1OUrNlCnyUrWb5Ps EpVrNnSa5pVJw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDD6DC54E55; Mon, 26 Feb 2024 07:31:23 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Mon, 26 Feb 2024 10:30:30 +0300 Subject: [PATCH v8 34/38] ata: pata_ep93xx: remove legacy pinctrl use Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-ep93xx-v8-34-3136dca7238f@maquefel.me> References: <20240226-ep93xx-v8-0-3136dca7238f@maquefel.me> In-Reply-To: <20240226-ep93xx-v8-0-3136dca7238f@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , Sergey Shtylyov , Damien Le Moal , Niklas Cassel , Nikita Shubin , Linus Walleij , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Thierry Reding Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Arnd Bergmann , Andy Shevchenko X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708932678; l=5459; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=qPkB8JbiJNaB7ZMkLQj7fBfz340c+I4CkSEkmdWNtuk=; =?utf-8?q?b=3DJ+8Ektsyyfa1?= =?utf-8?q?A14vNPutzRv5ZmEK3qLnOZIbCqI8cTqKPfZ9NU4jIl9PKIFMLDVmHXRpEad3CNrR?= fqYBVdBVBB8s83SPMD4co5D4l7wzBmXIG+PUH0gSmxea8yPoXb8n X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791946313801206415 X-GMAIL-MSGID: 1791946313801206415 From: Nikita Shubin Drop legacy acquire/release since we are using pinctrl for this now. Reviewed-by: Sergey Shtylyov Acked-by: Damien Le Moal Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Nikita Shubin --- arch/arm/mach-ep93xx/core.c | 72 --------------------------------------- drivers/ata/pata_ep93xx.c | 25 ++++---------- include/linux/soc/cirrus/ep93xx.h | 4 --- 3 files changed, 6 insertions(+), 95 deletions(-) diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 4ddf1a4cba33..9c6154bb37b5 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -779,78 +779,6 @@ void __init ep93xx_register_ide(void) platform_device_register(&ep93xx_ide_device); } -int ep93xx_ide_acquire_gpio(struct platform_device *pdev) -{ - int err; - int i; - - err = gpio_request(EP93XX_GPIO_LINE_EGPIO2, dev_name(&pdev->dev)); - if (err) - return err; - err = gpio_request(EP93XX_GPIO_LINE_EGPIO15, dev_name(&pdev->dev)); - if (err) - goto fail_egpio15; - for (i = 2; i < 8; i++) { - err = gpio_request(EP93XX_GPIO_LINE_E(i), dev_name(&pdev->dev)); - if (err) - goto fail_gpio_e; - } - for (i = 4; i < 8; i++) { - err = gpio_request(EP93XX_GPIO_LINE_G(i), dev_name(&pdev->dev)); - if (err) - goto fail_gpio_g; - } - for (i = 0; i < 8; i++) { - err = gpio_request(EP93XX_GPIO_LINE_H(i), dev_name(&pdev->dev)); - if (err) - goto fail_gpio_h; - } - - /* GPIO ports E[7:2], G[7:4] and H used by IDE */ - ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_EONIDE | - EP93XX_SYSCON_DEVCFG_GONIDE | - EP93XX_SYSCON_DEVCFG_HONIDE); - return 0; - -fail_gpio_h: - for (--i; i >= 0; --i) - gpio_free(EP93XX_GPIO_LINE_H(i)); - i = 8; -fail_gpio_g: - for (--i; i >= 4; --i) - gpio_free(EP93XX_GPIO_LINE_G(i)); - i = 8; -fail_gpio_e: - for (--i; i >= 2; --i) - gpio_free(EP93XX_GPIO_LINE_E(i)); - gpio_free(EP93XX_GPIO_LINE_EGPIO15); -fail_egpio15: - gpio_free(EP93XX_GPIO_LINE_EGPIO2); - return err; -} -EXPORT_SYMBOL(ep93xx_ide_acquire_gpio); - -void ep93xx_ide_release_gpio(struct platform_device *pdev) -{ - int i; - - for (i = 2; i < 8; i++) - gpio_free(EP93XX_GPIO_LINE_E(i)); - for (i = 4; i < 8; i++) - gpio_free(EP93XX_GPIO_LINE_G(i)); - for (i = 0; i < 8; i++) - gpio_free(EP93XX_GPIO_LINE_H(i)); - gpio_free(EP93XX_GPIO_LINE_EGPIO15); - gpio_free(EP93XX_GPIO_LINE_EGPIO2); - - - /* GPIO ports E[7:2], G[7:4] and H used by GPIO */ - ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_EONIDE | - EP93XX_SYSCON_DEVCFG_GONIDE | - EP93XX_SYSCON_DEVCFG_HONIDE); -} -EXPORT_SYMBOL(ep93xx_ide_release_gpio); - /************************************************************************* * EP93xx ADC *************************************************************************/ diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 13246a92e29f..a8555f630097 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -922,28 +922,18 @@ static int ep93xx_pata_probe(struct platform_device *pdev) void __iomem *ide_base; int err; - err = ep93xx_ide_acquire_gpio(pdev); - if (err) - return err; - /* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */ irq = platform_get_irq(pdev, 0); - if (irq < 0) { - err = irq; - goto err_rel_gpio; - } + if (irq < 0) + return irq; ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); - if (IS_ERR(ide_base)) { - err = PTR_ERR(ide_base); - goto err_rel_gpio; - } + if (IS_ERR(ide_base)) + return PTR_ERR(ide_base); drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL); - if (!drv_data) { - err = -ENOMEM; - goto err_rel_gpio; - } + if (!drv_data) + return -ENOMEM; drv_data->pdev = pdev; drv_data->ide_base = ide_base; @@ -1002,8 +992,6 @@ static int ep93xx_pata_probe(struct platform_device *pdev) err_rel_dma: ep93xx_pata_release_dma(drv_data); -err_rel_gpio: - ep93xx_ide_release_gpio(pdev); return err; } @@ -1015,7 +1003,6 @@ static void ep93xx_pata_remove(struct platform_device *pdev) ata_host_detach(host); ep93xx_pata_release_dma(drv_data); ep93xx_pata_clear_regs(drv_data->ide_base); - ep93xx_ide_release_gpio(pdev); } static const struct of_device_id ep93xx_pata_of_ids[] = { diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h index f6376edc1b33..142c33a2d7db 100644 --- a/include/linux/soc/cirrus/ep93xx.h +++ b/include/linux/soc/cirrus/ep93xx.h @@ -37,15 +37,11 @@ struct ep93xx_regmap_adev { container_of((_adev), struct ep93xx_regmap_adev, adev) #ifdef CONFIG_ARCH_EP93XX -int ep93xx_ide_acquire_gpio(struct platform_device *pdev); -void ep93xx_ide_release_gpio(struct platform_device *pdev); int ep93xx_i2s_acquire(void); void ep93xx_i2s_release(void); unsigned int ep93xx_chip_revision(void); #else -static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } -static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} static inline int ep93xx_i2s_acquire(void) { return 0; } static inline void ep93xx_i2s_release(void) {} static inline unsigned int ep93xx_chip_revision(void) { return 0; }