Commit b80e60eb authored by Linus Walleij's avatar Linus Walleij

hw_random: ixp4xx: Add OF support

This makes the hardware random number generator found in
the IXP46x SoCs probe from the device tree.

Cc: Deepak Saxena <dsaxena@plexity.net>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent cca061b0
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/hw_random.h> #include <linux/hw_random.h>
#include <linux/of.h>
#include <linux/soc/ixp4xx/cpu.h> #include <linux/soc/ixp4xx/cpu.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -55,9 +56,18 @@ static int ixp4xx_rng_probe(struct platform_device *pdev) ...@@ -55,9 +56,18 @@ static int ixp4xx_rng_probe(struct platform_device *pdev)
return devm_hwrng_register(dev, &ixp4xx_rng_ops); return devm_hwrng_register(dev, &ixp4xx_rng_ops);
} }
static const struct of_device_id ixp4xx_rng_of_match[] = {
{
.compatible = "intel,ixp46x-rng",
},
{},
};
MODULE_DEVICE_TABLE(of, ixp4xx_rng_of_match);
static struct platform_driver ixp4xx_rng_driver = { static struct platform_driver ixp4xx_rng_driver = {
.driver = { .driver = {
.name = "ixp4xx-hwrandom", .name = "ixp4xx-hwrandom",
.of_match_table = ixp4xx_rng_of_match,
}, },
.probe = ixp4xx_rng_probe, .probe = ixp4xx_rng_probe,
}; };
......
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