Commit a508412b authored by Feng Kan's avatar Feng Kan Committed by Herbert Xu

hwrng: xgene - add ACPI support for APM X-Gene RNG unit

This adds ACPI support for APM X-Gene RNG unit.
Signed-off-by: default avatarFeng Kan <fkan@apm.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 2ca87a17
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
*/ */
#include <linux/acpi.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/hw_random.h> #include <linux/hw_random.h>
...@@ -310,6 +311,14 @@ static int xgene_rng_init(struct hwrng *rng) ...@@ -310,6 +311,14 @@ static int xgene_rng_init(struct hwrng *rng)
return 0; 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 = { static struct hwrng xgene_rng_func = {
.name = "xgene-rng", .name = "xgene-rng",
.init = xgene_rng_init, .init = xgene_rng_init,
...@@ -415,6 +424,7 @@ static struct platform_driver xgene_rng_driver = { ...@@ -415,6 +424,7 @@ static struct platform_driver xgene_rng_driver = {
.driver = { .driver = {
.name = "xgene-rng", .name = "xgene-rng",
.of_match_table = xgene_rng_of_match, .of_match_table = xgene_rng_of_match,
.acpi_match_table = ACPI_PTR(xgene_rng_acpi_match),
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment