Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
d7390430
Commit
d7390430
authored
Oct 11, 2005
by
Komal Shah
Committed by
Tony Lindgren
Oct 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ARM: OMAP: 24xx RNG
Added OMAP24xx RNG support
parent
4d527815
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
23 deletions
+30
-23
drivers/char/Kconfig
drivers/char/Kconfig
+5
-7
drivers/char/Makefile
drivers/char/Makefile
+1
-1
drivers/char/omap-rng.c
drivers/char/omap-rng.c
+24
-15
No files found.
drivers/char/Kconfig
View file @
d7390430
...
...
@@ -659,15 +659,13 @@ config HW_RANDOM
If unsure, say N.
config OMAP
16XX
_RNG
tristate "OMAP
16xx
Random Number Generator support"
depends on ARCH_OMAP16XX
config OMAP_RNG
tristate "OMAP Random Number Generator support"
depends on ARCH_OMAP16XX
|| ARCH_OMAP24XX
---help---
This driver provides kernel-side support for the Random Number
Generator hardware found on OMAP16xx multimedia processors.
To compile this driver as a module, choose M here: the
module will be called hw_random.
Generator hardware found on OMAP16xx and OMAP24xx multimedia
processors.
If unsure, say N.
...
...
drivers/char/Makefile
View file @
d7390430
...
...
@@ -75,7 +75,7 @@ obj-$(CONFIG_TOSHIBA) += toshiba.o
obj-$(CONFIG_I8K)
+=
i8k.o
obj-$(CONFIG_DS1620)
+=
ds1620.o
obj-$(CONFIG_HW_RANDOM)
+=
hw_random.o
obj-$(CONFIG_OMAP
16XX_RNG)
+=
omap16xx
-rng.o
obj-$(CONFIG_OMAP
_RNG)
+=
omap
-rng.o
obj-$(CONFIG_FTAPE)
+=
ftape/
obj-$(CONFIG_COBALT_LCD)
+=
lcd.o
obj-$(CONFIG_PPDEV)
+=
ppdev.o
...
...
drivers/char/omap
16xx
-rng.c
→
drivers/char/omap-rng.c
View file @
d7390430
/*
* drivers/char/omap
16xx
-rng.c
* drivers/char/omap-rng.c
*
* Copyright (C) 2005 Nokia Corporation
* Author: Juha Yrjl <juha.yrjola@nokia.com>
*
* OMAP16xx Random Number Generator driver
* OMAP16xx
and OMAP24xx
Random Number Generator driver
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
...
...
@@ -15,9 +15,17 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/random.h>
#include <linux/err.h>
#include <asm/io.h>
#include <asm/hardware/clock.h>
#if defined (CONFIG_ARCH_OMAP16XX)
#define RNG_BASE 0xfffe5000
#endif
#if defined (CONFIG_ARCH_OMAP24XX)
#define RNG_BASE 0x480A0000
#endif
#define RNG_OUT_REG 0x00
#define RNG_STAT_REG 0x04
#define RNG_REV_REG 0x3c
...
...
@@ -27,6 +35,8 @@
static
u32
rng_base
=
io_p2v
(
RNG_BASE
);
static
struct
clk
*
rng_ick
=
NULL
;
static
u32
rng_read_reg
(
int
reg
)
{
return
__raw_readl
(
rng_base
+
reg
);
...
...
@@ -50,10 +60,19 @@ static void rng_feed_entropy(int count)
static
int
__init
rng_init
(
void
)
{
if
(
!
cpu_is_omap16xx
())
if
(
!
cpu_is_omap16xx
()
&&
!
cpu_is_omap24xx
()
)
return
-
ENODEV
;
printk
(
"OMAP16xx Random Number Generator ver. %02x
\n
"
,
if
(
cpu_is_omap24xx
())
{
rng_ick
=
clk_get
(
NULL
,
"rng_ick"
);
if
(
IS_ERR
(
rng_ick
))
{
printk
(
KERN_ERR
"omap-rng.c: Could not get rng_ick
\n
"
);
return
PTR_ERR
(
rng_ick
);
}
clk_use
(
rng_ick
);
}
printk
(
"OMAP Random Number Generator ver. %02x
\n
"
,
rng_read_reg
(
RNG_REV_REG
));
rng_write_reg
(
RNG_MASK_REG
,
0x00000001
);
rng_feed_entropy
(
ENTROPY_WORD_COUNT
);
...
...
@@ -62,14 +81,4 @@ static int __init rng_init(void)
return
0
;
}
static
void
__exit
rng_cleanup
(
void
)
{
}
MODULE_AUTHOR
(
"Juha Yrjl"
);
MODULE_DESCRIPTION
(
"OMAP16xx H/W Random Number Generator (RNG) driver"
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
rng_init
);
module_exit
(
rng_cleanup
);
late_initcall
(
rng_init
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment