From patchwork Tue Oct 21 21:55:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 5128551 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B470BC11AC for ; Tue, 21 Oct 2014 21:58:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8B382021F for ; Tue, 21 Oct 2014 21:58:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1231F20176 for ; Tue, 21 Oct 2014 21:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933458AbaJUV6N (ORCPT ); Tue, 21 Oct 2014 17:58:13 -0400 Received: from down.free-electrons.com ([37.187.137.238]:52079 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933746AbaJUV4K (ORCPT ); Tue, 21 Oct 2014 17:56:10 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 4F2C35006; Tue, 21 Oct 2014 23:56:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 F1E725002; Tue, 21 Oct 2014 23:56:09 +0200 (CEST) From: Alexandre Belloni To: Nicolas Ferre , Sebastian Reichel Cc: Jean-Christophe Plagniol-Villard , Dmitry Eremin-Solenikov , David Woodhouse , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Alexandre Belloni Subject: [PATCH 4/8] ARM: at91: sam9g45/sam9rl: probe the ramc driver Date: Tue, 21 Oct 2014 23:55:36 +0200 Message-Id: <1413928540-27099-5-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413928540-27099-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1413928540-27099-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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); }