summaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2009-06-02 23:54:22 +0900
committerRalf Baechle <ralf@linux-mips.org>2009-06-17 11:06:27 +0100
commit923e3819005e60449ed6c9c8a86fd8e5cd9e6d77 (patch)
tree6771d45baadf1b627bd0c02b693052e516a26fa4 /arch/mips/txx9
parent049a947c611a19523eaaf193f698b897a62d0593 (diff)
downloadop-kernel-dev-923e3819005e60449ed6c9c8a86fd8e5cd9e6d77.zip
op-kernel-dev-923e3819005e60449ed6c9c8a86fd8e5cd9e6d77.tar.gz
MIPS: TXx9: Add TX4939 RNG support
Add platform support for RNG of TX4939 SoC. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9')
-rw-r--r--arch/mips/txx9/generic/setup_tx4939.c17
-rw-r--r--arch/mips/txx9/rbtx4939/setup.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c
index df13a89..3dc19f4 100644
--- a/arch/mips/txx9/generic/setup_tx4939.c
+++ b/arch/mips/txx9/generic/setup_tx4939.c
@@ -500,6 +500,23 @@ void __init tx4939_sramc_init(void)
txx9_sramc_init(&tx4939_sram_resource);
}
+void __init tx4939_rng_init(void)
+{
+ static struct resource res = {
+ .start = TX4939_RNG_REG & 0xfffffffffULL,
+ .end = (TX4939_RNG_REG & 0xfffffffffULL) + 0x30 - 1,
+ .flags = IORESOURCE_MEM,
+ };
+ static struct platform_device pdev = {
+ .name = "tx4939-rng",
+ .id = -1,
+ .num_resources = 1,
+ .resource = &res,
+ };
+
+ platform_device_register(&pdev);
+}
+
static void __init tx4939_stop_unused_modules(void)
{
__u64 pcfg, rst = 0, ckd = 0;
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c
index b919696..c033ffe 100644
--- a/arch/mips/txx9/rbtx4939/setup.c
+++ b/arch/mips/txx9/rbtx4939/setup.c
@@ -502,6 +502,7 @@ static void __init rbtx4939_device_init(void)
tx4939_aclc_init();
platform_device_register_simple("txx9aclc-generic", -1, NULL, 0);
tx4939_sramc_init();
+ tx4939_rng_init();
}
static void __init rbtx4939_setup(void)
OpenPOWER on IntegriCloud