diff options
author | Feng Kan <fkan@apm.com> | 2015-03-06 17:53:15 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-09 06:06:19 -0400 |
commit | a508412b169d5398dc5f800147097b255c2941be (patch) | |
tree | 950919ff10993712d6d2d04142ef615009cc4468 /drivers/char/hw_random/xgene-rng.c | |
parent | 2ca87a17045194638c69be87e2430842f743b00b (diff) |
hwrng: xgene - add ACPI support for APM X-Gene RNG unit
This adds ACPI support for APM X-Gene RNG unit.
Signed-off-by: Feng Kan <fkan@apm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/xgene-rng.c')
-rw-r--r-- | drivers/char/hw_random/xgene-rng.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/char/hw_random/xgene-rng.c b/drivers/char/hw_random/xgene-rng.c index 23caa05380a8..c37cf754a985 100644 --- a/drivers/char/hw_random/xgene-rng.c +++ b/drivers/char/hw_random/xgene-rng.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/acpi.h> | ||
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/hw_random.h> | 27 | #include <linux/hw_random.h> |
@@ -310,6 +311,14 @@ static int xgene_rng_init(struct hwrng *rng) | |||
310 | return 0; | 311 | return 0; |
311 | } | 312 | } |
312 | 313 | ||
314 | #ifdef CONFIG_ACPI | ||
315 | static const struct acpi_device_id xgene_rng_acpi_match[] = { | ||
316 | { "APMC0D18", }, | ||
317 | { } | ||
318 | }; | ||
319 | MODULE_DEVICE_TABLE(acpi, xgene_rng_acpi_match); | ||
320 | #endif | ||
321 | |||
313 | static struct hwrng xgene_rng_func = { | 322 | static struct hwrng xgene_rng_func = { |
314 | .name = "xgene-rng", | 323 | .name = "xgene-rng", |
315 | .init = xgene_rng_init, | 324 | .init = xgene_rng_init, |
@@ -415,6 +424,7 @@ static struct platform_driver xgene_rng_driver = { | |||
415 | .driver = { | 424 | .driver = { |
416 | .name = "xgene-rng", | 425 | .name = "xgene-rng", |
417 | .of_match_table = xgene_rng_of_match, | 426 | .of_match_table = xgene_rng_of_match, |
427 | .acpi_match_table = ACPI_PTR(xgene_rng_acpi_match), | ||
418 | }, | 428 | }, |
419 | }; | 429 | }; |
420 | 430 | ||