From: Lokesh Vutla <lokeshvutla@ti.com>
To: <linux-omap@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>, <mpm@selenic.com>,
<herbert@gondor.hengli.com.au>, <dsaxena@plexity.net>,
<linux-crypto@vger.kernel.org>, Lokesh Vutla <lokeshvutla@ti.com>
Subject: [PATCH 4/6] hwrng: OMAP: Add device tree support
Date: Mon, 5 Aug 2013 20:17:21 +0530 [thread overview]
Message-ID: <1375714043-23407-5-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1375714043-23407-1-git-send-email-lokeshvutla@ti.com>
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: Lokesh Vutla <lokeshvutla@ti.com>
---
drivers/char/hw_random/omap-rng.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 5a2ab3b..3076c9d 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -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),
--
1.7.9.5
next prev parent reply other threads:[~2013-08-05 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 14:47 [PATCH 0/6] hwrng: OMAP: Updates for OMAP RNG module Lokesh Vutla
2013-08-05 14:47 ` [PATCH 1/6] hwrng: OMAP: Use module_platform_driver macro Lokesh Vutla
2013-08-05 14:47 ` [PATCH 2/6] hwrng: OMAP: Convert to devm_kzalloc() Lokesh Vutla
2013-08-05 14:47 ` [PATCH 3/6] hwrng: OMAP: Remove duplicated function call Lokesh Vutla
2013-08-05 14:47 ` Lokesh Vutla [this message]
2013-08-05 14:47 ` [PATCH 5/6] ARM: OMAP2+: Only manually add hwmod data when DT not used Lokesh Vutla
2013-08-05 14:47 ` [PATCH 6/6] hwrng: OMAP: Add OMAP4 TRNG support Lokesh Vutla
2013-08-09 6:42 ` [PATCH 0/6] hwrng: OMAP: Updates for OMAP RNG module Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375714043-23407-5-git-send-email-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=dsaxena@plexity.net \
--cc=herbert@gondor.hengli.com.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mpm@selenic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox