提交 c903970c 编写于 作者: L Lokesh Vutla 提交者: Herbert Xu

hwrng: omap - Add device tree support

Add Device Tree suport to the omap-rng driver.
Currently, only support for OMAP2 and OMAP3 is
being added but support for OMAP4 and OMAP5 will
be added in a subsequent patch.
Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 7256c476
......@@ -24,6 +24,9 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_address.h>
#include <asm/io.h>
......@@ -104,6 +107,14 @@ static struct hwrng omap_rng_ops = {
.data_read = omap_rng_data_read,
};
#if defined(CONFIG_OF)
static const struct of_device_id omap_rng_of_match[] = {
{ .compatible = "ti,omap2-rng" },
{},
};
MODULE_DEVICE_TABLE(of, omap_rng_of_match);
#endif
static int omap_rng_probe(struct platform_device *pdev)
{
struct omap_rng_private_data *priv;
......@@ -197,6 +208,7 @@ static struct platform_driver omap_rng_driver = {
.name = "omap_rng",
.owner = THIS_MODULE,
.pm = OMAP_RNG_PM,
.of_match_table = of_match_ptr(omap_rng_of_match),
},
.probe = omap_rng_probe,
.remove = __exit_p(omap_rng_remove),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册