diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index c3dfb1b3b1e3..2d6d57f7ba8a 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1095,6 +1095,34 @@ static void __init at91_add_device_rtt(void) | |||
1095 | 1095 | ||
1096 | 1096 | ||
1097 | /* -------------------------------------------------------------------- | 1097 | /* -------------------------------------------------------------------- |
1098 | * TRNG | ||
1099 | * -------------------------------------------------------------------- */ | ||
1100 | |||
1101 | #if defined(CONFIG_HW_RANDOM_ATMEL) || defined(CONFIG_HW_RANDOM_ATMEL_MODULE) | ||
1102 | static struct resource trng_resources[] = { | ||
1103 | { | ||
1104 | .start = AT91SAM9G45_BASE_TRNG, | ||
1105 | .end = AT91SAM9G45_BASE_TRNG + SZ_16K - 1, | ||
1106 | .flags = IORESOURCE_MEM, | ||
1107 | }, | ||
1108 | }; | ||
1109 | |||
1110 | static struct platform_device at91sam9g45_trng_device = { | ||
1111 | .name = "atmel-trng", | ||
1112 | .id = -1, | ||
1113 | .resource = trng_resources, | ||
1114 | .num_resources = ARRAY_SIZE(trng_resources), | ||
1115 | }; | ||
1116 | |||
1117 | static void __init at91_add_device_trng(void) | ||
1118 | { | ||
1119 | platform_device_register(&at91sam9g45_trng_device); | ||
1120 | } | ||
1121 | #else | ||
1122 | static void __init at91_add_device_trng(void) {} | ||
1123 | #endif | ||
1124 | |||
1125 | /* -------------------------------------------------------------------- | ||
1098 | * Watchdog | 1126 | * Watchdog |
1099 | * -------------------------------------------------------------------- */ | 1127 | * -------------------------------------------------------------------- */ |
1100 | 1128 | ||
@@ -1583,6 +1611,7 @@ static int __init at91_add_standard_devices(void) | |||
1583 | at91_add_device_hdmac(); | 1611 | at91_add_device_hdmac(); |
1584 | at91_add_device_rtc(); | 1612 | at91_add_device_rtc(); |
1585 | at91_add_device_rtt(); | 1613 | at91_add_device_rtt(); |
1614 | at91_add_device_trng(); | ||
1586 | at91_add_device_watchdog(); | 1615 | at91_add_device_watchdog(); |
1587 | at91_add_device_tc(); | 1616 | at91_add_device_tc(); |
1588 | return 0; | 1617 | return 0; |