ARM: at91: Register the poweroff driver
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 3 Jul 2014 12:39:43 +0000 (14:39 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 25 Aug 2014 14:25:28 +0000 (16:25 +0200)
Register the poweroff driver in the old-style SoC definition so that the driver
is loaded and provide a shutdown hook.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c

index 00e4e5bb452f9990235c0242daeb6343638be995..601f2c708767159c81e07e18d3d18daeb7b7b171 100644 (file)
@@ -381,9 +381,24 @@ static struct platform_device rstc_device = {
        .num_resources  = ARRAY_SIZE(rstc_resources),
 };
 
+static struct resource shdwc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9260_BASE_SHDWC,
+               .end    = AT91SAM9260_BASE_SHDWC + SZ_16 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device shdwc_device = {
+       .name           = "at91-poweroff",
+       .resource       = shdwc_resources,
+       .num_resources  = ARRAY_SIZE(shdwc_resources),
+};
+
 static void __init at91sam9260_register_devices(void)
 {
        platform_device_register(&rstc_device);
+       platform_device_register(&shdwc_device);
 }
 
 /* --------------------------------------------------------------------
index 43db1bdf885d3fa6d23dcc1d59260cde2e1d7afe..5e8ac0d271b88a042373443221c3aba6b1833960 100644 (file)
@@ -340,9 +340,24 @@ static struct platform_device rstc_device = {
        .num_resources  = ARRAY_SIZE(rstc_resources),
 };
 
+static struct resource shdwc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9261_BASE_SHDWC,
+               .end    = AT91SAM9261_BASE_SHDWC + SZ_16 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device shdwc_device = {
+       .name           = "at91-poweroff",
+       .resource       = shdwc_resources,
+       .num_resources  = ARRAY_SIZE(shdwc_resources),
+};
+
 static void __init at91sam9261_register_devices(void)
 {
        platform_device_register(&rstc_device);
+       platform_device_register(&shdwc_device);
 }
 
 /* --------------------------------------------------------------------
index 358e762f0c07998f4cbc6ec08a90df641505cac0..bcc8b04d3cfb2de63df80a0832cb7f9ddf61c422 100644 (file)
@@ -363,9 +363,24 @@ static struct platform_device rstc_device = {
        .num_resources  = ARRAY_SIZE(rstc_resources),
 };
 
+static struct resource shdwc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9263_BASE_SHDWC,
+               .end    = AT91SAM9263_BASE_SHDWC + SZ_16 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device shdwc_device = {
+       .name           = "at91-poweroff",
+       .resource       = shdwc_resources,
+       .num_resources  = ARRAY_SIZE(shdwc_resources),
+};
+
 static void __init at91sam9263_register_devices(void)
 {
        platform_device_register(&rstc_device);
+       platform_device_register(&shdwc_device);
 }
 
 /* --------------------------------------------------------------------
index 9b55b7dc12c2425a6d3a07c63fdb1f9e563ced67..665d378877a395c1997853b88eaf2f29c44ac369 100644 (file)
@@ -417,9 +417,24 @@ static struct platform_device rstc_device = {
        .num_resources  = ARRAY_SIZE(rstc_resources),
 };
 
+static struct resource shdwc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9G45_BASE_SHDWC,
+               .end    = AT91SAM9G45_BASE_SHDWC + SZ_16 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device shdwc_device = {
+       .name           = "at91-poweroff",
+       .resource       = shdwc_resources,
+       .num_resources  = ARRAY_SIZE(shdwc_resources),
+};
+
 static void __init at91sam9g45_register_devices(void)
 {
        platform_device_register(&rstc_device);
+       platform_device_register(&shdwc_device);
 }
 
 /* --------------------------------------------------------------------
index d43d28ee8eaf0604e78d4cfe357f1c8fc335b51b..5a18a76ac9e3daa4430835eb50414f4eb1d12294 100644 (file)
@@ -351,9 +351,24 @@ static struct platform_device rstc_device = {
        .num_resources  = ARRAY_SIZE(rstc_resources),
 };
 
+static struct resource shdwc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9RL_BASE_SHDWC,
+               .end    = AT91SAM9RL_BASE_SHDWC + SZ_16 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device shdwc_device = {
+       .name           = "at91-poweroff",
+       .resource       = shdwc_resources,
+       .num_resources  = ARRAY_SIZE(shdwc_resources),
+};
+
 static void __init at91sam9rl_register_devices(void)
 {
        platform_device_register(&rstc_device);
+       platform_device_register(&shdwc_device);
 }
 
 /* --------------------------------------------------------------------
This page took 0.027043 seconds and 5 git commands to generate.