Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331315
b: refs/heads/master
c: 4848d46
h: refs/heads/master
i:
  331313: 867ed31
  331311: cabc083
v: v3
  • Loading branch information
Paul Walmsley committed Sep 23, 2012
1 parent 43418b0 commit 86e82e6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 665d92fa85b5cb4c0a3f36524ac6cc8f9e3d9c2d
refs/heads/master: 4848d460a7d4b2b5b22afda16b713cb753affa12
25 changes: 25 additions & 0 deletions trunk/arch/arm/mach-omap1/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,30 @@ static inline void omap_init_uwire(void) {}
#endif


#define OMAP1_RNG_BASE 0xfffe5000

static struct resource omap1_rng_resources[] = {
{
.start = OMAP1_RNG_BASE,
.end = OMAP1_RNG_BASE + 0x4f,
.flags = IORESOURCE_MEM,
},
};

static struct platform_device omap1_rng_device = {
.name = "omap_rng",
.id = -1,
.num_resources = ARRAY_SIZE(omap1_rng_resources),
.resource = omap1_rng_resources,
};

static void omap1_init_rng(void)
{
(void) platform_device_register(&omap1_rng_device);
}

/*-------------------------------------------------------------------------*/

/*
* This gets called after board-specific INIT_MACHINE, and initializes most
* on-chip peripherals accessible on this board (except for few like USB):
Expand Down Expand Up @@ -395,6 +419,7 @@ static int __init omap1_init_devices(void)
omap_init_spi100k();
omap_init_sti();
omap_init_uwire();
omap1_init_rng();

return 0;
}
Expand Down
18 changes: 18 additions & 0 deletions trunk/arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,23 @@ static void omap_init_pmu(void)
platform_device_register(&omap_pmu_device);
}

/**
* omap_init_rng - bind the RNG hwmod to the RNG omap_device
*
* Bind the RNG hwmod to the RNG omap_device. No return value.
*/
static void omap_init_rng(void)
{
struct omap_hwmod *oh;
struct platform_device *pdev;

oh = omap_hwmod_lookup("rng");
if (!oh)
return;

pdev = omap_device_build("omap_rng", -1, oh, NULL, 0, NULL, 0, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
}

#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)

Expand Down Expand Up @@ -649,6 +666,7 @@ static int __init omap2_init_devices(void)
}
omap_init_pmu();
omap_init_sti();
omap_init_rng();
omap_init_sham();
omap_init_aes();
omap_init_vout();
Expand Down

0 comments on commit 86e82e6

Please sign in to comment.