Skip to content

Commit

Permalink
hwrng: xgene - add ACPI support for APM X-Gene RNG unit
Browse files Browse the repository at this point in the history
This adds ACPI support for APM X-Gene RNG unit.

Signed-off-by: Feng Kan <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
apmsw authored and herbertx committed Mar 9, 2015
1 parent 2ca87a1 commit a508412
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/char/hw_random/xgene-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*
*/

#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/hw_random.h>
Expand Down Expand Up @@ -310,6 +311,14 @@ static int xgene_rng_init(struct hwrng *rng)
return 0;
}

#ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_rng_acpi_match[] = {
{ "APMC0D18", },
{ }
};
MODULE_DEVICE_TABLE(acpi, xgene_rng_acpi_match);
#endif

static struct hwrng xgene_rng_func = {
.name = "xgene-rng",
.init = xgene_rng_init,
Expand Down Expand Up @@ -415,6 +424,7 @@ static struct platform_driver xgene_rng_driver = {
.driver = {
.name = "xgene-rng",
.of_match_table = xgene_rng_of_match,
.acpi_match_table = ACPI_PTR(xgene_rng_acpi_match),
},
};

Expand Down

0 comments on commit a508412

Please sign in to comment.