Skip to content

Commit b80e60e

Browse files
author
Linus Walleij
committed
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: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent cca061b commit b80e60e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/char/hw_random/ixp4xx-rng.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/init.h>
2020
#include <linux/bitops.h>
2121
#include <linux/hw_random.h>
22+
#include <linux/of.h>
2223
#include <linux/soc/ixp4xx/cpu.h>
2324

2425
#include <asm/io.h>
@@ -55,9 +56,18 @@ static int ixp4xx_rng_probe(struct platform_device *pdev)
5556
return devm_hwrng_register(dev, &ixp4xx_rng_ops);
5657
}
5758

59+
static const struct of_device_id ixp4xx_rng_of_match[] = {
60+
{
61+
.compatible = "intel,ixp46x-rng",
62+
},
63+
{},
64+
};
65+
MODULE_DEVICE_TABLE(of, ixp4xx_rng_of_match);
66+
5867
static struct platform_driver ixp4xx_rng_driver = {
5968
.driver = {
6069
.name = "ixp4xx-hwrandom",
70+
.of_match_table = ixp4xx_rng_of_match,
6171
},
6272
.probe = ixp4xx_rng_probe,
6373
};

0 commit comments

Comments
 (0)