diff options
author | Luotao Fu <l.fu@pengutronix.de> | 2009-06-25 16:46:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-07-01 09:17:52 +0200 |
commit | d284206d42d96af1210cec07eccd955f1c2fe386 (patch) | |
tree | bd8f7d02d45b0d6142c9b50ab037757a0eb5ab05 | |
parent | 08d77914942b970e8e49540909b3175addb1a82e (diff) | |
download | linux-2.6-d284206d42d96af1210cec07eccd955f1c2fe386.tar.gz linux-2.6-d284206d42d96af1210cec07eccd955f1c2fe386.tar.xz |
mx2: add otg device mode platform device
add clock and device definition for otg device mode usage on mx2
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
-rw-r--r-- | arch/arm/mach-mx2/clock_imx27.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx2/devices.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-mx2/devices.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c index 80ab3b6973e..35356dda9b7 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-mx2/clock_imx27.c @@ -647,6 +647,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", usb_clk1) _REGISTER_CLOCK("mxc-ehci.2", "usb", usb_clk) _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_clk1) + _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) + _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1) _REGISTER_CLOCK("mxc-ssi.0", NULL, ssi1_clk) _REGISTER_CLOCK("mxc-ssi.1", NULL, ssi2_clk) _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index bd4fa530249..0aa6ccc3be6 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -31,6 +31,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <linux/gpio.h> +#include <linux/dma-mapping.h> #include <mach/irqs.h> #include <mach/hardware.h> @@ -634,6 +635,17 @@ struct platform_device mxc_otg = { .num_resources = ARRAY_SIZE(mxc_otg_resources), }; +struct platform_device otg_udc_device = { + .name = "fsl-usb2-udc", + .id = -1, + .dev = { + .dma_mask = &otg_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .resource = mxc_otg_resources, + .num_resources = ARRAY_SIZE(mxc_otg_resources), +}; + static struct resource mxc_ehci2_resources[] = { { .start = OTG_BASE_ADDR + 0x400, diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index b1f103474d3..6ad460b6556 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -22,6 +22,7 @@ extern struct platform_device mxc_sdhc_device0; extern struct platform_device mxc_sdhc_device1; extern struct platform_device mxc_otg; extern struct platform_device mxc_ehci2; +extern struct platform_device otg_udc_device; extern struct platform_device imx_ssi_device0; extern struct platform_device imx_ssi_device1; extern struct platform_device mxc_dam_device; |