From patchwork Wed Sep 30 18:48:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 11810045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4DB5618 for ; Wed, 30 Sep 2020 18:48:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 644A820708 for ; Wed, 30 Sep 2020 18:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bTFVnR18" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 644A820708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xED04HBwlnw07xQOHXnq3VFGSsYfsInwrbN9g64dLyQ=; b=bTFVnR18ZINmBA9UgRtyx3mHf u3ThMQq8pmcUTqYpz8TobGiS6Rj06IIybIpCLujYXcbfHmBVB00O2ECpGgDIFr+CISTFSjWHa2YN+ /3Iere9O3sCWCSJC9nfRpzPJHU3WXNeeY9rCVHKh4yRAu8lye6wxoWx1UaSRpG7ClPQKPDOJthgaK 3t0Ac+YmP6cL6rp9VzgMkrbGUuhtep90rTnI1jdMjVxb+IpIuRRC727X+1bhr4jW7SAAJxuCu7lnZ DziAtzewz0HZJuYm0v7R2gJdcLZVdcDdtAUfiVmYPQKSyCT47Ik1ysMqm9vhGbl6gnm4jfvwysNHf tiKiQAoww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNh9N-00064P-03; Wed, 30 Sep 2020 18:48:25 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNh9K-00063O-LP for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 18:48:23 +0000 Received: from localhost (lfbn-lyo-1-1908-165.w90-65.abo.wanadoo.fr [90.65.88.165]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 3A5B9240002; Wed, 30 Sep 2020 18:48:17 +0000 (UTC) From: Alexandre Belloni To: Dominik Brodowski , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches Subject: [PATCH 2/2] pcmcia: at91_cf: remove platform data support Date: Wed, 30 Sep 2020 20:48:03 +0200 Message-Id: <20200930184804.3127757-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200930184804.3127757-1-alexandre.belloni@bootlin.com> References: <20200930184804.3127757-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_144822_818518_7F70BA38 X-CRM114-Status: GOOD ( 17.00 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.230 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [217.70.178.230 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Board file support has been removed for at91rm9200 back in 2014, make the CF driver DT only. Signed-off-by: Alexandre Belloni --- drivers/pcmcia/Kconfig | 1 + drivers/pcmcia/at91_cf.c | 38 ++++++++------------------------------ 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 82d10b6661c7..884023e88345 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -258,6 +258,7 @@ config OMAP_CF config AT91_CF tristate "AT91 CompactFlash Controller" depends on PCI + depends on OF depends on PCMCIA && ARCH_AT91 help Say Y here to support the CompactFlash controller on AT91 chips. diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 1d59c7240a09..1fde1735df8c 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -220,16 +220,18 @@ static struct pccard_operations at91_cf_ops = { /*--------------------------------------------------------------------------*/ -#if defined(CONFIG_OF) static const struct of_device_id at91_cf_dt_ids[] = { { .compatible = "atmel,at91rm9200-cf" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, at91_cf_dt_ids); -static int at91_cf_dt_init(struct platform_device *pdev) +static int at91_cf_probe(struct platform_device *pdev) { - struct at91_cf_data *board; + struct at91_cf_socket *cf; + struct at91_cf_data *board; + struct resource *io; + int status; board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL); if (!board) @@ -240,33 +242,9 @@ static int at91_cf_dt_init(struct platform_device *pdev) board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2); board->rst_pin = of_get_gpio(pdev->dev.of_node, 3); - pdev->dev.platform_data = board; - mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc"); - - return PTR_ERR_OR_ZERO(mc); -} -#else -static int at91_cf_dt_init(struct platform_device *pdev) -{ - return -ENODEV; -} -#endif - -static int at91_cf_probe(struct platform_device *pdev) -{ - struct at91_cf_socket *cf; - struct at91_cf_data *board = pdev->dev.platform_data; - struct resource *io; - int status; - - if (!board) { - status = at91_cf_dt_init(pdev); - if (status) - return status; - - board = pdev->dev.platform_data; - } + if (IS_ERR(mc)) + return PTR_ERR(mc); if (!gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin)) return -ENODEV; @@ -410,7 +388,7 @@ static int at91_cf_resume(struct platform_device *pdev) static struct platform_driver at91_cf_driver = { .driver = { .name = "at91_cf", - .of_match_table = of_match_ptr(at91_cf_dt_ids), + .of_match_table = at91_cf_dt_ids, }, .probe = at91_cf_probe, .remove = at91_cf_remove,