diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-07-03 05:10:10 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-08-25 10:05:08 -0400 |
commit | d8dfa2d4e912c091c51c864af1e4b02b3bd6e9a2 (patch) | |
tree | 086785bc2e0c1a579da058a63d668add8e2c3d08 | |
parent | 65f2ce96a94d2a61fca486a48d9da30845b16d20 (diff) |
ARM: at91: Probe the reset driver
Register the reset device in the right SoCs so that the reset driver is
actually probed even in the old-style probing case.
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 | 26 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 26 |
5 files changed, 135 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 3477ba94c4c5..fd6b45a85966 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | ||
14 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
15 | 16 | ||
16 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
@@ -362,6 +363,30 @@ static void __init at91sam9260_initialize(void) | |||
362 | at91_gpio_init(at91sam9260_gpio, 3); | 363 | at91_gpio_init(at91sam9260_gpio, 3); |
363 | } | 364 | } |
364 | 365 | ||
366 | static struct resource rstc_resources[] = { | ||
367 | [0] = { | ||
368 | .start = AT91SAM9260_BASE_RSTC, | ||
369 | .end = AT91SAM9260_BASE_RSTC + SZ_16 - 1, | ||
370 | .flags = IORESOURCE_MEM, | ||
371 | }, | ||
372 | [1] = { | ||
373 | .start = AT91SAM9260_BASE_SDRAMC, | ||
374 | .end = AT91SAM9260_BASE_SDRAMC + SZ_512 - 1, | ||
375 | .flags = IORESOURCE_MEM, | ||
376 | }, | ||
377 | }; | ||
378 | |||
379 | static struct platform_device rstc_device = { | ||
380 | .name = "at91-sam9260-reset", | ||
381 | .resource = rstc_resources, | ||
382 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
383 | }; | ||
384 | |||
385 | static void __init at91sam9260_register_devices(void) | ||
386 | { | ||
387 | platform_device_register(&rstc_device); | ||
388 | } | ||
389 | |||
365 | /* -------------------------------------------------------------------- | 390 | /* -------------------------------------------------------------------- |
366 | * Interrupt initialization | 391 | * Interrupt initialization |
367 | * -------------------------------------------------------------------- */ | 392 | * -------------------------------------------------------------------- */ |
@@ -411,5 +436,6 @@ AT91_SOC_START(at91sam9260) | |||
411 | | (1 << AT91SAM9260_ID_IRQ2), | 436 | | (1 << AT91SAM9260_ID_IRQ2), |
412 | .ioremap_registers = at91sam9260_ioremap_registers, | 437 | .ioremap_registers = at91sam9260_ioremap_registers, |
413 | .register_clocks = at91sam9260_register_clocks, | 438 | .register_clocks = at91sam9260_register_clocks, |
439 | .register_devices = at91sam9260_register_devices, | ||
414 | .init = at91sam9260_initialize, | 440 | .init = at91sam9260_initialize, |
415 | AT91_SOC_END | 441 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index fb164a5d04a9..09c031676229 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | ||
14 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
15 | 16 | ||
16 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
@@ -321,6 +322,30 @@ static void __init at91sam9261_initialize(void) | |||
321 | at91_gpio_init(at91sam9261_gpio, 3); | 322 | at91_gpio_init(at91sam9261_gpio, 3); |
322 | } | 323 | } |
323 | 324 | ||
325 | static struct resource rstc_resources[] = { | ||
326 | [0] = { | ||
327 | .start = AT91SAM9261_BASE_RSTC, | ||
328 | .end = AT91SAM9261_BASE_RSTC + SZ_16 - 1, | ||
329 | .flags = IORESOURCE_MEM, | ||
330 | }, | ||
331 | [1] = { | ||
332 | .start = AT91SAM9261_BASE_SDRAMC, | ||
333 | .end = AT91SAM9261_BASE_SDRAMC + SZ_512 - 1, | ||
334 | .flags = IORESOURCE_MEM, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | static struct platform_device rstc_device = { | ||
339 | .name = "at91-sam9260-reset", | ||
340 | .resource = rstc_resources, | ||
341 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
342 | }; | ||
343 | |||
344 | static void __init at91sam9261_register_devices(void) | ||
345 | { | ||
346 | platform_device_register(&rstc_device); | ||
347 | } | ||
348 | |||
324 | /* -------------------------------------------------------------------- | 349 | /* -------------------------------------------------------------------- |
325 | * Interrupt initialization | 350 | * Interrupt initialization |
326 | * -------------------------------------------------------------------- */ | 351 | * -------------------------------------------------------------------- */ |
@@ -370,5 +395,6 @@ AT91_SOC_START(at91sam9261) | |||
370 | | (1 << AT91SAM9261_ID_IRQ2), | 395 | | (1 << AT91SAM9261_ID_IRQ2), |
371 | .ioremap_registers = at91sam9261_ioremap_registers, | 396 | .ioremap_registers = at91sam9261_ioremap_registers, |
372 | .register_clocks = at91sam9261_register_clocks, | 397 | .register_clocks = at91sam9261_register_clocks, |
398 | .register_devices = at91sam9261_register_devices, | ||
373 | .init = at91sam9261_initialize, | 399 | .init = at91sam9261_initialize, |
374 | AT91_SOC_END | 400 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 810fa5f15a51..e34ce7af5d0a 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | ||
14 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
15 | 16 | ||
16 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
@@ -344,6 +345,30 @@ static void __init at91sam9263_initialize(void) | |||
344 | at91_gpio_init(at91sam9263_gpio, 5); | 345 | at91_gpio_init(at91sam9263_gpio, 5); |
345 | } | 346 | } |
346 | 347 | ||
348 | static struct resource rstc_resources[] = { | ||
349 | [0] = { | ||
350 | .start = AT91SAM9263_BASE_RSTC, | ||
351 | .end = AT91SAM9263_BASE_RSTC + SZ_16 - 1, | ||
352 | .flags = IORESOURCE_MEM, | ||
353 | }, | ||
354 | [1] = { | ||
355 | .start = AT91SAM9263_BASE_SDRAMC0, | ||
356 | .end = AT91SAM9263_BASE_SDRAMC0 + SZ_512 - 1, | ||
357 | .flags = IORESOURCE_MEM, | ||
358 | }, | ||
359 | }; | ||
360 | |||
361 | static struct platform_device rstc_device = { | ||
362 | .name = "at91-sam9260-reset", | ||
363 | .resource = rstc_resources, | ||
364 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
365 | }; | ||
366 | |||
367 | static void __init at91sam9263_register_devices(void) | ||
368 | { | ||
369 | platform_device_register(&rstc_device); | ||
370 | } | ||
371 | |||
347 | /* -------------------------------------------------------------------- | 372 | /* -------------------------------------------------------------------- |
348 | * Interrupt initialization | 373 | * Interrupt initialization |
349 | * -------------------------------------------------------------------- */ | 374 | * -------------------------------------------------------------------- */ |
@@ -392,5 +417,6 @@ AT91_SOC_START(at91sam9263) | |||
392 | .extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1), | 417 | .extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1), |
393 | .ioremap_registers = at91sam9263_ioremap_registers, | 418 | .ioremap_registers = at91sam9263_ioremap_registers, |
394 | .register_clocks = at91sam9263_register_clocks, | 419 | .register_clocks = at91sam9263_register_clocks, |
420 | .register_devices = at91sam9263_register_devices, | ||
395 | .init = at91sam9263_initialize, | 421 | .init = at91sam9263_initialize, |
396 | AT91_SOC_END | 422 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 9d45496e4932..cc79f201abbc 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
16 | #include <linux/platform_device.h> | ||
16 | 17 | ||
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
@@ -393,6 +394,35 @@ static void __init at91sam9g45_initialize(void) | |||
393 | at91_gpio_init(at91sam9g45_gpio, 5); | 394 | at91_gpio_init(at91sam9g45_gpio, 5); |
394 | } | 395 | } |
395 | 396 | ||
397 | static struct resource rstc_resources[] = { | ||
398 | [0] = { | ||
399 | .start = AT91SAM9G45_BASE_RSTC, | ||
400 | .end = AT91SAM9G45_BASE_RSTC + SZ_16 - 1, | ||
401 | .flags = IORESOURCE_MEM, | ||
402 | }, | ||
403 | [1] = { | ||
404 | .start = AT91SAM9G45_BASE_DDRSDRC1, | ||
405 | .end = AT91SAM9G45_BASE_DDRSDRC1 + SZ_512 - 1, | ||
406 | .flags = IORESOURCE_MEM, | ||
407 | }, | ||
408 | [2] = { | ||
409 | .start = AT91SAM9G45_BASE_DDRSDRC0, | ||
410 | .end = AT91SAM9G45_BASE_DDRSDRC0 + SZ_512 - 1, | ||
411 | .flags = IORESOURCE_MEM, | ||
412 | }, | ||
413 | }; | ||
414 | |||
415 | static struct platform_device rstc_device = { | ||
416 | .name = "at91-sam9g45-reset", | ||
417 | .resource = rstc_resources, | ||
418 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
419 | }; | ||
420 | |||
421 | static void __init at91sam9g45_register_devices(void) | ||
422 | { | ||
423 | platform_device_register(&rstc_device); | ||
424 | } | ||
425 | |||
396 | /* -------------------------------------------------------------------- | 426 | /* -------------------------------------------------------------------- |
397 | * Interrupt initialization | 427 | * Interrupt initialization |
398 | * -------------------------------------------------------------------- */ | 428 | * -------------------------------------------------------------------- */ |
@@ -441,5 +471,6 @@ AT91_SOC_START(at91sam9g45) | |||
441 | .extern_irq = (1 << AT91SAM9G45_ID_IRQ0), | 471 | .extern_irq = (1 << AT91SAM9G45_ID_IRQ0), |
442 | .ioremap_registers = at91sam9g45_ioremap_registers, | 472 | .ioremap_registers = at91sam9g45_ioremap_registers, |
443 | .register_clocks = at91sam9g45_register_clocks, | 473 | .register_clocks = at91sam9g45_register_clocks, |
474 | .register_devices = at91sam9g45_register_devices, | ||
444 | .init = at91sam9g45_initialize, | 475 | .init = at91sam9g45_initialize, |
445 | AT91_SOC_END | 476 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 878d5015daab..b03053e9b440 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/platform_device.h> | ||
13 | #include <linux/clk/at91_pmc.h> | 14 | #include <linux/clk/at91_pmc.h> |
14 | 15 | ||
15 | #include <asm/proc-fns.h> | 16 | #include <asm/proc-fns.h> |
@@ -332,6 +333,30 @@ static void __init at91sam9rl_initialize(void) | |||
332 | at91_gpio_init(at91sam9rl_gpio, 4); | 333 | at91_gpio_init(at91sam9rl_gpio, 4); |
333 | } | 334 | } |
334 | 335 | ||
336 | static struct resource rstc_resources[] = { | ||
337 | [0] = { | ||
338 | .start = AT91SAM9RL_BASE_RSTC, | ||
339 | .end = AT91SAM9RL_BASE_RSTC + SZ_16 - 1, | ||
340 | .flags = IORESOURCE_MEM, | ||
341 | }, | ||
342 | [1] = { | ||
343 | .start = AT91SAM9RL_BASE_SDRAMC, | ||
344 | .end = AT91SAM9RL_BASE_SDRAMC + SZ_512 - 1, | ||
345 | .flags = IORESOURCE_MEM, | ||
346 | }, | ||
347 | }; | ||
348 | |||
349 | static struct platform_device rstc_device = { | ||
350 | .name = "at91-sam9260-reset", | ||
351 | .resource = rstc_resources, | ||
352 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
353 | }; | ||
354 | |||
355 | static void __init at91sam9rl_register_devices(void) | ||
356 | { | ||
357 | platform_device_register(&rstc_device); | ||
358 | } | ||
359 | |||
335 | /* -------------------------------------------------------------------- | 360 | /* -------------------------------------------------------------------- |
336 | * Interrupt initialization | 361 | * Interrupt initialization |
337 | * -------------------------------------------------------------------- */ | 362 | * -------------------------------------------------------------------- */ |
@@ -382,5 +407,6 @@ AT91_SOC_START(at91sam9rl) | |||
382 | #if defined(CONFIG_OLD_CLK_AT91) | 407 | #if defined(CONFIG_OLD_CLK_AT91) |
383 | .register_clocks = at91sam9rl_register_clocks, | 408 | .register_clocks = at91sam9rl_register_clocks, |
384 | #endif | 409 | #endif |
410 | .register_devices = at91sam9rl_register_devices, | ||
385 | .init = at91sam9rl_initialize, | 411 | .init = at91sam9rl_initialize, |
386 | AT91_SOC_END | 412 | AT91_SOC_END |