Commit 75ddf376 authored by Maxime Ripard's avatar Maxime Ripard Committed by Nicolas Ferre

ARM: at91: Register the poweroff driver

Register the poweroff driver in the old-style SoC definition so that the driver
is loaded and provide a shutdown hook.
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 5c0593db
...@@ -381,9 +381,24 @@ static struct platform_device rstc_device = { ...@@ -381,9 +381,24 @@ static struct platform_device rstc_device = {
.num_resources = ARRAY_SIZE(rstc_resources), .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) static void __init at91sam9260_register_devices(void)
{ {
platform_device_register(&rstc_device); platform_device_register(&rstc_device);
platform_device_register(&shdwc_device);
} }
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -340,9 +340,24 @@ static struct platform_device rstc_device = { ...@@ -340,9 +340,24 @@ static struct platform_device rstc_device = {
.num_resources = ARRAY_SIZE(rstc_resources), .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) static void __init at91sam9261_register_devices(void)
{ {
platform_device_register(&rstc_device); platform_device_register(&rstc_device);
platform_device_register(&shdwc_device);
} }
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -363,9 +363,24 @@ static struct platform_device rstc_device = { ...@@ -363,9 +363,24 @@ static struct platform_device rstc_device = {
.num_resources = ARRAY_SIZE(rstc_resources), .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) static void __init at91sam9263_register_devices(void)
{ {
platform_device_register(&rstc_device); platform_device_register(&rstc_device);
platform_device_register(&shdwc_device);
} }
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -417,9 +417,24 @@ static struct platform_device rstc_device = { ...@@ -417,9 +417,24 @@ static struct platform_device rstc_device = {
.num_resources = ARRAY_SIZE(rstc_resources), .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) static void __init at91sam9g45_register_devices(void)
{ {
platform_device_register(&rstc_device); platform_device_register(&rstc_device);
platform_device_register(&shdwc_device);
} }
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
...@@ -351,9 +351,24 @@ static struct platform_device rstc_device = { ...@@ -351,9 +351,24 @@ static struct platform_device rstc_device = {
.num_resources = ARRAY_SIZE(rstc_resources), .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) static void __init at91sam9rl_register_devices(void)
{ {
platform_device_register(&rstc_device); platform_device_register(&rstc_device);
platform_device_register(&shdwc_device);
} }
/* -------------------------------------------------------------------- /* --------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment