diff options
Diffstat (limited to 'arch/arm/mach-omap2/hdq1w.c')
| -rw-r--r-- | arch/arm/mach-omap2/hdq1w.c | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c index 297ebe03f09..f78b4a16195 100644 --- a/arch/arm/mach-omap2/hdq1w.c +++ b/arch/arm/mach-omap2/hdq1w.c @@ -22,13 +22,18 @@ * 02110-1301 USA */ -#include <plat/omap_hwmod.h> -#include <plat/hdq1w.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/err.h> +#include <linux/platform_device.h> -#include "common.h" +#include "soc.h" +#include "omap_hwmod.h" +#include "omap_device.h" +#include "hdq1w.h" -/* Maximum microseconds to wait for OMAP module to softreset */ -#define MAX_MODULE_SOFTRESET_WAIT 10000 +#include "prm.h" +#include "common.h" /** * omap_hdq1w_reset - reset the OMAP HDQ1W module @@ -70,3 +75,25 @@ int omap_hdq1w_reset(struct omap_hwmod *oh) return 0; } + +#ifndef CONFIG_OF +static int __init omap_init_hdq(void) +{ + int id = -1; + struct platform_device *pdev; + struct omap_hwmod *oh; + char *oh_name = "hdq1w"; + char *devname = "omap_hdq"; + + oh = omap_hwmod_lookup(oh_name); + if (!oh) + return 0; + + pdev = omap_device_build(devname, id, oh, NULL, 0); + WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n", + devname, oh->name); + + return 0; +} +omap_arch_initcall(omap_init_hdq); +#endif |
