[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1414451377-11053-5-git-send-email-alexandre.belloni@free-electrons.com>
Date: Tue, 28 Oct 2014 00:09:33 +0100
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Nicolas Ferre <nicolas.ferre@...el.com>,
Sebastian Reichel <sre@...nel.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Subject: [PATCH v2 4/8] ARM: at91: sam9g45/sam9rl: probe the ramc driver
Probe the atmel-sdramc driver from the board files, using platform_data.
Signed-off-by: Alexandre Belloni <alexandre.belloni@...e-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists