From patchwork Mon Oct 27 23:09:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 5166761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 68B369F3ED for ; Mon, 27 Oct 2014 23:12:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F73D20155 for ; Mon, 27 Oct 2014 23:12:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC6482012E for ; Mon, 27 Oct 2014 23:12:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XitQe-0003kS-P1; Mon, 27 Oct 2014 23:10:24 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XitQc-0003jY-Bz for linux-arm-kernel@bombadil.infradead.org; Mon, 27 Oct 2014 23:10:22 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XitQa-0005Ja-JR for linux-arm-kernel@lists.infradead.org; Mon, 27 Oct 2014 23:10:21 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id E87464731; Tue, 28 Oct 2014 00:10:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 9D4F546E4; Tue, 28 Oct 2014 00:10:06 +0100 (CET) From: Alexandre Belloni To: Nicolas Ferre , Sebastian Reichel Subject: [PATCH v2 4/8] ARM: at91: sam9g45/sam9rl: probe the ramc driver Date: Tue, 28 Oct 2014 00:09:33 +0100 Message-Id: <1414451377-11053-5-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414451377-11053-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1414451377-11053-1-git-send-email-alexandre.belloni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141027_191020_819609_958F0B8F X-CRM114-Status: GOOD ( 12.79 ) X-Spam-Score: -1.8 (-) Cc: Boris Brezillon , linux-pm@vger.kernel.org, Dmitry Eremin-Solenikov , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org, Alexandre Belloni , Maxime Ripard , David Woodhouse , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Probe the atmel-sdramc driver from the board files, using platform_data. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/at91sam9g45.c | 20 ++++++++++++++++++++ arch/arm/mach-at91/at91sam9rl.c | 15 +++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 405427ec05f8..202d9438e1d9 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -415,6 +415,25 @@ static struct platform_device rstc_device = { .num_resources = ARRAY_SIZE(rstc_resources), }; +static struct resource ramc_resources[] = { + [0] = { + .start = AT91SAM9G45_BASE_DDRSDRC1, + .end = AT91SAM9G45_BASE_DDRSDRC1 + SZ_512 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = AT91SAM9G45_BASE_DDRSDRC0, + .end = AT91SAM9G45_BASE_DDRSDRC0 + SZ_512 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device rstc_device = { + .name = "at91-sam9g45-ramc", + .resource = ramc_resources, + .num_resources = ARRAY_SIZE(ramc_resources), +}; + static struct resource shdwc_resources[] = { [0] = { .start = AT91SAM9G45_BASE_SHDWC, @@ -431,6 +450,7 @@ static struct platform_device shdwc_device = { static void __init at91sam9g45_register_devices(void) { + platform_device_register(&ramc_device); platform_device_register(&rstc_device); platform_device_register(&shdwc_device); } diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index f553e4ea034b..0e2cb3361b15 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -348,6 +348,20 @@ static struct platform_device rstc_device = { .num_resources = ARRAY_SIZE(rstc_resources), }; +static struct resource ramc_resources[] = { + [0] = { + .start = AT91SAM9RL_BASE_SDRAMC, + .end = AT91SAM9RL_BASE_SDRAMC + SZ_512 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device ramc_device = { + .name = "at91-sam9260-ramc", + .resource = ramc_resources, + .num_resources = ARRAY_SIZE(ramc_resources), +}; + static struct resource shdwc_resources[] = { [0] = { .start = AT91SAM9RL_BASE_SHDWC, @@ -364,6 +378,7 @@ static struct platform_device shdwc_device = { static void __init at91sam9rl_register_devices(void) { + platform_device_register(&ramc_device); platform_device_register(&rstc_device); platform_device_register(&shdwc_device); }