Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp205855rdb; Thu, 18 Jan 2024 00:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEASrfFpf7EedG1JRK0ctSa9KHQoMXAWaFfo5LitSsrwcXftHpiWVM8lVzuvLeEnwp08cgc X-Received: by 2002:a17:902:aa81:b0:1d5:efe9:8da1 with SMTP id d1-20020a170902aa8100b001d5efe98da1mr378789plr.101.1705567132879; Thu, 18 Jan 2024 00:38:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705567132; cv=pass; d=google.com; s=arc-20160816; b=QYofcdR3ILgrRohGm8lZ80i29lYdBsm3HSqNGSqLQEieaz5Qv78VH1tZrLATUL0A4G TNbgxOohoWa51JZ3SYrgKeySj5aYI/k0VuR9sN4HucRVryl2Rto6cofGqML4h5XVoAM1 Xpr73AJWemWNHWHnMeZF89cKD1IpfGOjWrLE/JlZGJxC8/2KwZJQF3vPgUBxQG/77f8C xszE+4OQieC9RAuFgluER7Y5Sir9dHTOiVWgB9J0vJNpaFNN4rNLefDYIhKJniD0/gks gpAskoFjmztcXC3jhZryGTo1B+pXqg5Q8IVRfHZe7fncApcVCRlt92im9PA1+Q1uk/7z 0t6w== 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=Gc+TMEcH8BV0QL9T8Ylwu5nImzCDHpRSt1khCqTdObA=; fh=UljAKmbVgWmB+nyOezu+f99pnLO9O8tG/3liJeZJyf0=; b=nNtiiYDG5GqV4gWcRuI5KDzfhJZE/ztVw+Xvq406uV8gX1s/DJeeX4mtngr0TnnsmE mA5TtV70fIRCamRTNKT/HYOkdqCBf3HJEgMHSz9ODoU3RvZpe9wIT07b637DywThV9rb Ryj4cDxE0mqThQehH+WZdXLkG4E5lka8rKq2MPtxRVEcdgrs6thureBeMjZYG5FrC402 gkvg72rIzIPtgKeYgp9f3IsfUOZokr/C0bYTrVoNo/iePGNo665s6h4S3uyYd2VVkG/K PDFOsvKYJe3ltJPtPgmTzOroAYnHqwzFN60uPnih+G76yn0VGCICslLmtxvzaARCle7a +Ecw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ly3cQlnS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t18-20020a170902d21200b001d704c26ee2si892535ply.558.2024.01.18.00.38.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:38:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ly3cQlnS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29881-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D3BC1B2692E for ; Thu, 18 Jan 2024 08:31:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62D8431752; Thu, 18 Jan 2024 08:23:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ly3cQlnS" 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 8AFE520B18; Thu, 18 Jan 2024 08:23:00 +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=1705566180; cv=none; b=cVdPMD3ni7iRWvxdE/NMuRILBKDjtCb2Wwe0xCdwH4Khic7PqQIv6gRFVh+yp1+MM3ocHtrzzp6m43KSIsXSgfnwY2budieskNNf9o5Xz9qBDr3nBe11fmWuWXSIHQeYY//B64sD7Cv+MK4kHO1Qp14i3HUfcKs0uAs61/tsR94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705566180; c=relaxed/simple; bh=9WwsBITMItklQJrOsXkyC5Z2uBAIdB41XN+G4RoUL10=; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; b=o7ttMkOcggA5o9AqbIlykmJ4W20LzQn46y3zchZVdcGAS1HBsNgkomBybBf7CdxkNjeVA2jd84LUmgL+gq7QO8M8OykpdymaahFWBqyYcwrw25jkaxx7Lj8kwiaw19TXHsY6ys+0NC8gX+OaUjxhPl+MYDufIv6m0rJXA8HCVE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ly3cQlnS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 60C07C4E74A; Thu, 18 Jan 2024 08:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705566180; bh=9WwsBITMItklQJrOsXkyC5Z2uBAIdB41XN+G4RoUL10=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ly3cQlnSsRtrFOeYLE3X+0jiXCnW48fewprPux4CvvKrHx2B3F0CTQqJsuYfjBqJg grn5nTYZvCScn+9zrzB1OdEJ1Rrw+/Tvuak3vL2pwzTyq4NPcsCGWxPwtMpio5naCq 6AbVICbSod0MlheaxIAdGfocgCYKFGqAil5HA0PUm78/yyz5CQdngLWAvW0t+SP+vU JawCwDJh5BUAF7npfyL5aUSP20+38phN+Mp84txmUNNUF/vvYtifsESi//BHwPjT2L QyWhA6Vt/6t9Brtw3yLotd5ippwSnfE3UJp/HZ+51iJ+FMPOiJyccbXpLrbfEfZyL/ fOcVSPd+IMxyQ== 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 4C8C5C47DB3; Thu, 18 Jan 2024 08:23:00 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Thu, 18 Jan 2024 11:21:18 +0300 Subject: [PATCH v7 35/39] 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240118-ep93xx-v7-35-d953846ae771@maquefel.me> References: <20240118-ep93xx-v7-0-d953846ae771@maquefel.me> In-Reply-To: <20240118-ep93xx-v7-0-d953846ae771@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , Sergey Shtylyov , Damien Le Moal , Niklas Cassel , Nikita Shubin , Linus Walleij , Andy Shevchenko , Dmitry Torokhov Cc: Thierry Reding , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Arnd Bergmann X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705566176; l=5459; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=smQqDg52j8Zk5Y6n19Hy7jlJdfoJYJf4tbxkECWJUo4=; =?utf-8?q?b=3DOFCF9QW5JJfp?= =?utf-8?q?I8KLUivCQPXHXV3JkMbWpKLgrpYAvSd0YqzZqUUzg1UWlddavJOngwYOpyOumoQ0?= 2Iy8Py9mCVDMXm3QE3+4UBkaloKvVOmlCVDN2IGY9gaT+5NgIK23 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: 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 2bc446bdea06..1ad848371cda 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -923,28 +923,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; @@ -1003,8 +993,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; } @@ -1016,7 +1004,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; } -- 2.41.0