Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4419073rdb; Fri, 15 Sep 2023 01:15:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJnfB45o7dnvWWVtvomZCV8BpslUxj+WZAlJfsJiH1jnLSoEp3kTWwEkcNT5Pp7JbGMut5 X-Received: by 2002:a05:6a21:3399:b0:154:e054:d0d1 with SMTP id yy25-20020a056a21339900b00154e054d0d1mr1179292pzb.55.1694765705799; Fri, 15 Sep 2023 01:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694765705; cv=none; d=google.com; s=arc-20160816; b=FUaF9xqJVBPVwfql4Idb3uyaDDNQ9GNJ7a5U+WP1KQkE+uQOVsJnou0lfWIm12A0k9 SUYzb6K5r+Y1gAUzal1aeJKo8WBj+/uCAoiTDHDH8auOWjKBudtBS9ZLDK6N1hRZzpmy Gn98P4ma9iH8ZK5x2LdSKSCPpO8z1ISHYwOuOsEVlBsvlYO7RLQxfeEmbQ+FiNXC5XjJ uhDXw6DpYcwHEiGIUuDWe1FkQfrFLBqqXBhQcza8Q8syNWVSeqZsaPMr3o52QYG981MP nDMkyR45jmOeGHHtpvsUEd3oGlXggy1K+uj8QTTL+c2WhlLGjHi594FXIQwpl24zl4c0 0UrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=D6j1Aa6jZMY/h3xmtgRXf6dpRb1UJ7dUkTuk4twpkQQ=; fh=pTlz6cfsIKWgNuEnZpACxYME/n36w6jJwNaXAUgVu40=; b=ZU7xYhi3vC8XodAEOFAqxontKVRgxlcg/N47O8dTZMQVNhvE1DfhDjG93HPX3c40Gu Garnl18GJPz52Fjsy1kRX/ClPDbSSttrp8jy01FyJgujfl7wOletjk1+LGhX2+CjZzL/ r88cdz/i+jt/n919h4FSprbQmZM+dTihXL+91fEIkH0XSSNI5P1WP2AH4+hUJDGXm4/q IBdwaEtLhaX37VVdL1IK59235/+9I8NXA4VmMEKKKQFiJ2w2qLpw5xWFZcSLhSlKrRdi kUmOXFxDEO36alsQAiLF5Fw78CNdyoevYYjAkZjSNGeSoeVsGMLYXLJF0nijpG176FrU C0+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vPgmoq5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b001c3a05b0b67si3111519plh.566.2023.09.15.01.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:15:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vPgmoq5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7B84F838218C; Fri, 15 Sep 2023 01:14:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233117AbjIOIN7 (ORCPT + 99 others); Fri, 15 Sep 2023 04:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233080AbjIOIMz (ORCPT ); Fri, 15 Sep 2023 04:12:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD41A2D41; Fri, 15 Sep 2023 01:12:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 64DDFC32774; Fri, 15 Sep 2023 08:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694765530; bh=p+tfRZ3pQvswdqiustDmxA1N43Os4gY9YGvnB/EY5Ho=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vPgmoq5JXp3l322/VeHyVhFKrGb7qUVL8Ys6yKEMNAZ2f2aTnVyxfNarvTsfl6khR GPjh0iQFEyAsbeuRg9FEJ0AZNpgQrpGO/8sMKgzvQIg3bSVzLPbbPcpXYvjhnLrowN wYYyEDj4jgZHBK/bKYRE1Ap5QsVZv2LquSJ3YWOkzu5rrNSnqNIzPoJ8L7X1Luq2qB V+7UMnAKmZhtNtsKsY6986X7Sl0Uz+U4ixfDrgNAqfyvMjps/brO1YL7K9eAwNCcD6 FZ9Xhp8R3L+DGLVacqodiSZWRaE4tUOJ7U4o3IXsDZP95ymj1wN/69S+XiMXCegUyJ gTwGGurFqONVQ== 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 5020EEE6446; Fri, 15 Sep 2023 08:12:10 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Fri, 15 Sep 2023 11:11:20 +0300 Subject: [PATCH v4 38/42] ata: pata_ep93xx: remove legacy pinctrl use MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230915-ep93xx-v4-38-a1d779dcec10@maquefel.me> References: <20230915-ep93xx-v4-0-a1d779dcec10@maquefel.me> In-Reply-To: <20230915-ep93xx-v4-0-a1d779dcec10@maquefel.me> To: Hartley Sweeten , Alexander Sverdlin , Russell King , Sergey Shtylyov , Damien Le Moal , Nikita Shubin , Dmitry Torokhov , Thierry Reding , Linus Walleij Cc: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Arnd Bergmann , Alexander Sverdlin X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1694765525; l=5262; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=clQMc6L/CZou9DWOlYtYYIgz0cXmxb3L8zWECLnFfFI=; =?utf-8?q?b=3DN12UH/nt/oLW?= =?utf-8?q?/ODhnWSBW1yzNMHRjkCNxZpvKAtMQpH9Y6CSwJvFlA49hqsDTQUj+sMbP8z0X5Sj?= 7Rb5AdCXCa0QRwKS33sIBueC+Zk4bXaANLI73kDYHPDOxSI8o1ev 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-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 15 Sep 2023 01:14:57 -0700 (PDT) From: Nikita Shubin Drop legacy acquire/release since we are using pinctrl for this now. Reviewed-by: Sergey Shtylyov Acked-by: Damien Le Moal 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 9afc6095d1c1..66dba9b4a6f9 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -778,78 +778,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 47686dc1fed6..bcf90e46bad4 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -928,28 +928,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; @@ -1006,8 +996,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; } @@ -1019,7 +1007,6 @@ static int 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); return 0; } diff --git a/include/linux/soc/cirrus/ep93xx.h b/include/linux/soc/cirrus/ep93xx.h index 0df0f3322487..3212a145ae0f 100644 --- a/include/linux/soc/cirrus/ep93xx.h +++ b/include/linux/soc/cirrus/ep93xx.h @@ -12,15 +12,11 @@ struct regmap; #define EP93XX_CHIP_REV_E2 7 #if defined(CONFIG_EP93XX_SOC_COMMON) -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.39.2