From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>,
Sebastian Reichel <sre@kernel.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCH 4/8] ARM: at91: sam9g45/sam9rl: probe the ramc driver
Date: Tue, 21 Oct 2014 23:55:36 +0200 [thread overview]
Message-ID: <1413928540-27099-5-git-send-email-alexandre.belloni@free-electrons.com> (raw)
In-Reply-To: <1413928540-27099-1-git-send-email-alexandre.belloni@free-electrons.com>
Probe the atmel-sdramc driver from the board files, using platform_data.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
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);
}
--
1.9.1
next prev parent reply other threads:[~2014-10-21 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 21:55 [PATCH 0/8] ARM: at91: Remove mach/ includes from the reset driver Alexandre Belloni
2014-10-21 21:55 ` [PATCH 1/8] memory: atmel-sdramc: export a shutdown function Alexandre Belloni
2014-10-21 21:55 ` [PATCH 2/8] memory: atmel-sdramc: allow probing from pdata Alexandre Belloni
2014-10-21 21:55 ` [PATCH 3/8] ARM: at91: sam9: probe the RAMC driver " Alexandre Belloni
2014-10-21 21:55 ` Alexandre Belloni [this message]
2014-10-21 21:55 ` [PATCH 5/8] power: reset: at91-reset: use at91_ramc_shutdown Alexandre Belloni
2014-10-22 7:08 ` Thomas Petazzoni
2014-10-22 7:18 ` Alexandre Belloni
2014-10-21 21:55 ` [PATCH 6/8] ARM: at91: sam9: remove useless resource for rstc Alexandre Belloni
2014-10-21 21:55 ` [PATCH 7/8] ARM: at91: sam9g45/sam9rl: remove useless resources " Alexandre Belloni
2014-10-21 21:55 ` [PATCH 8/8] MAINTAINERS: add at91 power and memory entries Alexandre Belloni
2014-10-22 6:56 ` Ludovic Desroches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413928540-27099-5-git-send-email-alexandre.belloni@free-electrons.com \
--to=alexandre.belloni@free-electrons.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®