Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4795121pxk; Wed, 30 Sep 2020 11:52:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpyveuFwyG4mIaQe+sR2xhnhJPl4FNHIyIPAt/tv0W+8kZxDu7puxtNqLmxDbxqa/9Pxwh X-Received: by 2002:aa7:c7c2:: with SMTP id o2mr4455294eds.366.1601491959620; Wed, 30 Sep 2020 11:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601491959; cv=none; d=google.com; s=arc-20160816; b=hg1VmktnMp0k2dP7J8daL5F50rewK7mzhXA62OY8ws7BrEv3mZto8cHvT+QJEMANsU Dz2EQ5mnrfK2WYxeBJuADhSGrb7DEB7CO/h1OFMzeaCcD9xYgRbhkQkxj56SxvaRzn/7 SbWFhFGAef1ewurH6hsq/neWIJg/SW01VHVZ6vFruH4GXhLGoB9IJ8GOIo7clU0FdbrQ vFulNwXBnKQvDcxFTHRcHoOBsodQMzs+5dSFrui3bRiYGsr9IgoCWAIQ13Fo7XqjyUO0 a+ILbjE1C2tiz566KkCYkO3bJ+K8IbWHLm3NozG6D/M0yMD9ZxwJrPqQ3z+MAER6vwMU 0thQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UUKy8S8Oz2GGi8+FL7wpaYVEZ/cwdZ9YvmVFwauz+s0=; b=ZzF13sAnUyqCI26Ype/cgRc8GEqSxUy/hid8Ng+DggkIRJxDWTk0ZB0lWdLmBFdwtQ ELU+XAffwhzPXekq/PxXzp1gwEJXggpD4aI+krgMBZZDUbxaBxjn1UzQi9u76ffbjI3h PwaBczaX4F5TsQzKupuFpAUTxT3U1eRqlUntiRSVqJBijKBXY/Txl55aebZ04VNZYGwL yUmCbA0djdqbf6m3smiqr9Lx8zJRUzzT1KRoujngCk/2uRfrubhWxTaJcavcmghV8KR7 cCmiMNaDXyalxKpsjxIIGc5W46rgieGiNs6EZzIURW/fGrd5EAARlAh89xWyxLyzJ+JB VCtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si1771754edm.176.2020.09.30.11.52.16; Wed, 30 Sep 2020 11:52:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729674AbgI3Ss0 (ORCPT + 99 others); Wed, 30 Sep 2020 14:48:26 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:60221 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729624AbgI3SsW (ORCPT ); Wed, 30 Sep 2020 14:48:22 -0400 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 Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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, -- 2.26.2