diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-07-03 08:39:43 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-08-25 10:25:28 -0400 |
commit | 75ddf376d1aeac04688efc5c806f8a4baa995474 (patch) | |
tree | 1d11c31d3832ca1ddb05af46b435b32edab34fcd | |
parent | 5c0593db802c8a9da15216615e466fd4e729df6f (diff) |
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: 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>
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 15 |
5 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 00e4e5bb452f..601f2c708767 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -381,9 +381,24 @@ static struct platform_device rstc_device = { | |||
381 | .num_resources = ARRAY_SIZE(rstc_resources), | 381 | .num_resources = ARRAY_SIZE(rstc_resources), |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static struct resource shdwc_resources[] = { | ||
385 | [0] = { | ||
386 | .start = AT91SAM9260_BASE_SHDWC, | ||
387 | .end = AT91SAM9260_BASE_SHDWC + SZ_16 - 1, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, | ||
390 | }; | ||
391 | |||
392 | static struct platform_device shdwc_device = { | ||
393 | .name = "at91-poweroff", | ||
394 | .resource = shdwc_resources, | ||
395 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
396 | }; | ||
397 | |||
384 | static void __init at91sam9260_register_devices(void) | 398 | static void __init at91sam9260_register_devices(void) |
385 | { | 399 | { |
386 | platform_device_register(&rstc_device); | 400 | platform_device_register(&rstc_device); |
401 | platform_device_register(&shdwc_device); | ||
387 | } | 402 | } |
388 | 403 | ||
389 | /* -------------------------------------------------------------------- | 404 | /* -------------------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 43db1bdf885d..5e8ac0d271b8 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -340,9 +340,24 @@ static struct platform_device rstc_device = { | |||
340 | .num_resources = ARRAY_SIZE(rstc_resources), | 340 | .num_resources = ARRAY_SIZE(rstc_resources), |
341 | }; | 341 | }; |
342 | 342 | ||
343 | static struct resource shdwc_resources[] = { | ||
344 | [0] = { | ||
345 | .start = AT91SAM9261_BASE_SHDWC, | ||
346 | .end = AT91SAM9261_BASE_SHDWC + SZ_16 - 1, | ||
347 | .flags = IORESOURCE_MEM, | ||
348 | }, | ||
349 | }; | ||
350 | |||
351 | static struct platform_device shdwc_device = { | ||
352 | .name = "at91-poweroff", | ||
353 | .resource = shdwc_resources, | ||
354 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
355 | }; | ||
356 | |||
343 | static void __init at91sam9261_register_devices(void) | 357 | static void __init at91sam9261_register_devices(void) |
344 | { | 358 | { |
345 | platform_device_register(&rstc_device); | 359 | platform_device_register(&rstc_device); |
360 | platform_device_register(&shdwc_device); | ||
346 | } | 361 | } |
347 | 362 | ||
348 | /* -------------------------------------------------------------------- | 363 | /* -------------------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 358e762f0c07..bcc8b04d3cfb 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -363,9 +363,24 @@ static struct platform_device rstc_device = { | |||
363 | .num_resources = ARRAY_SIZE(rstc_resources), | 363 | .num_resources = ARRAY_SIZE(rstc_resources), |
364 | }; | 364 | }; |
365 | 365 | ||
366 | static struct resource shdwc_resources[] = { | ||
367 | [0] = { | ||
368 | .start = AT91SAM9263_BASE_SHDWC, | ||
369 | .end = AT91SAM9263_BASE_SHDWC + SZ_16 - 1, | ||
370 | .flags = IORESOURCE_MEM, | ||
371 | }, | ||
372 | }; | ||
373 | |||
374 | static struct platform_device shdwc_device = { | ||
375 | .name = "at91-poweroff", | ||
376 | .resource = shdwc_resources, | ||
377 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
378 | }; | ||
379 | |||
366 | static void __init at91sam9263_register_devices(void) | 380 | static void __init at91sam9263_register_devices(void) |
367 | { | 381 | { |
368 | platform_device_register(&rstc_device); | 382 | platform_device_register(&rstc_device); |
383 | platform_device_register(&shdwc_device); | ||
369 | } | 384 | } |
370 | 385 | ||
371 | /* -------------------------------------------------------------------- | 386 | /* -------------------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 9b55b7dc12c2..665d378877a3 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -417,9 +417,24 @@ static struct platform_device rstc_device = { | |||
417 | .num_resources = ARRAY_SIZE(rstc_resources), | 417 | .num_resources = ARRAY_SIZE(rstc_resources), |
418 | }; | 418 | }; |
419 | 419 | ||
420 | static struct resource shdwc_resources[] = { | ||
421 | [0] = { | ||
422 | .start = AT91SAM9G45_BASE_SHDWC, | ||
423 | .end = AT91SAM9G45_BASE_SHDWC + SZ_16 - 1, | ||
424 | .flags = IORESOURCE_MEM, | ||
425 | }, | ||
426 | }; | ||
427 | |||
428 | static struct platform_device shdwc_device = { | ||
429 | .name = "at91-poweroff", | ||
430 | .resource = shdwc_resources, | ||
431 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
432 | }; | ||
433 | |||
420 | static void __init at91sam9g45_register_devices(void) | 434 | static void __init at91sam9g45_register_devices(void) |
421 | { | 435 | { |
422 | platform_device_register(&rstc_device); | 436 | platform_device_register(&rstc_device); |
437 | platform_device_register(&shdwc_device); | ||
423 | } | 438 | } |
424 | 439 | ||
425 | /* -------------------------------------------------------------------- | 440 | /* -------------------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index d43d28ee8eaf..5a18a76ac9e3 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -351,9 +351,24 @@ static struct platform_device rstc_device = { | |||
351 | .num_resources = ARRAY_SIZE(rstc_resources), | 351 | .num_resources = ARRAY_SIZE(rstc_resources), |
352 | }; | 352 | }; |
353 | 353 | ||
354 | static struct resource shdwc_resources[] = { | ||
355 | [0] = { | ||
356 | .start = AT91SAM9RL_BASE_SHDWC, | ||
357 | .end = AT91SAM9RL_BASE_SHDWC + SZ_16 - 1, | ||
358 | .flags = IORESOURCE_MEM, | ||
359 | }, | ||
360 | }; | ||
361 | |||
362 | static struct platform_device shdwc_device = { | ||
363 | .name = "at91-poweroff", | ||
364 | .resource = shdwc_resources, | ||
365 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
366 | }; | ||
367 | |||
354 | static void __init at91sam9rl_register_devices(void) | 368 | static void __init at91sam9rl_register_devices(void) |
355 | { | 369 | { |
356 | platform_device_register(&rstc_device); | 370 | platform_device_register(&rstc_device); |
371 | platform_device_register(&shdwc_device); | ||
357 | } | 372 | } |
358 | 373 | ||
359 | /* -------------------------------------------------------------------- | 374 | /* -------------------------------------------------------------------- |