2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
14 #include <linux/module.h>
15 #include <linux/kernel.h>
16 #include <linux/types.h>
17 #include <linux/errno.h>
18 #include <linux/init.h>
20 #include <linux/irq.h>
21 #include <linux/err.h>
22 #include <linux/platform_device.h>
23 #include <linux/delay.h>
24 #include <linux/fsl_devices.h>
25 #include <linux/usb/fsl_xcvr.h>
27 #include <asm/system.h>
28 #include <asm/mcfsim.h>
30 #define USB_OTGREGS_BASE MCF_REG32(0xFC0B0000)
31 #define INT_USB (64 + 64 + 47) /* INTC1:47 16.2.9.1 */
32 #define INT_UOCSR (64 + 64 + 53) /* INTC1:53 16.2.9.1 */
34 struct platform_device *otg_host_device;
36 extern struct platform_device *host_pdev_register(struct resource *res,
38 struct fsl_usb2_platform_data
41 extern int usbotg_init(struct platform_device *pdev);
42 extern void usbotg_uninit(struct fsl_usb2_platform_data *pdata);
43 extern struct fsl_usb2_platform_data mxc_otg_config;
48 static struct resource otg_host_resources[] = {
50 .start = (u32) (&USB_OTGREGS_BASE),
51 .end = (u32) (&USB_OTGREGS_BASE + 0x1ff),
52 .flags = IORESOURCE_MEM,
56 .flags = IORESOURCE_IRQ,
60 static int __init otg_host_init(void)
62 otg_host_device = host_pdev_register(otg_host_resources,
63 ARRAY_SIZE(otg_host_resources),
68 subsys_initcall(otg_host_init);