Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331310
b: refs/heads/master
c: 4be48fd
h: refs/heads/master
v: v3
  • Loading branch information
Afzal Mohammed authored and Paul Walmsley committed Sep 23, 2012
1 parent 6b58d18 commit dd63c28
Show file tree
Hide file tree
Showing 2 changed files with 23 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: 49484a60ff665ccac2e4f2314753a21daa0c2f9e
refs/heads/master: 4be48fd53bb7620220be5677bd767cda6d9ece0f
22 changes: 22 additions & 0 deletions trunk/arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
#include <plat/cpu.h>
#include <plat/gpmc.h>
#include <plat/sdrc.h>
#include <plat/omap_device.h>

#include "soc.h"
#include "common.h"

#define DEVICE_NAME "omap-gpmc"

/* GPMC register offsets */
#define GPMC_REVISION 0x00
#define GPMC_SYSCONFIG 0x10
Expand Down Expand Up @@ -898,6 +901,25 @@ static int __init gpmc_init(void)
}
postcore_initcall(gpmc_init);

static int __init omap_gpmc_init(void)
{
struct omap_hwmod *oh;
struct platform_device *pdev;
char *oh_name = "gpmc";

oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("Could not look up %s\n", oh_name);
return -ENODEV;
}

pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
}
postcore_initcall(omap_gpmc_init);

static irqreturn_t gpmc_handle_irq(int irq, void *dev)
{
int i;
Expand Down

0 comments on commit dd63c28

Please sign in to comment.