From 23d3e7a6598066ed39771cf2030c6bbb581c7812 Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Sat, 21 Nov 2009 12:14:48 +0100 Subject: USB: MXC: Add i.MX21 specific USB host controller driver. This driver is a Full / Low speed only USB host for the i.MX21. Signed-off-by: Martin Fuzzey Signed-off-by: Greg Kroah-Hartman --- arch/arm/plat-mxc/include/mach/mx21-usbhost.h | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 arch/arm/plat-mxc/include/mach/mx21-usbhost.h (limited to 'arch/arm') diff --git a/arch/arm/plat-mxc/include/mach/mx21-usbhost.h b/arch/arm/plat-mxc/include/mach/mx21-usbhost.h new file mode 100644 index 00000000000..22d0b596262 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx21-usbhost.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 Martin Fuzzey + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __ASM_ARCH_MX21_USBH +#define __ASM_ARCH_MX21_USBH + +enum mx21_usbh_xcvr { + /* Values below as used by hardware (HWMODE register) */ + MX21_USBXCVR_TXDIF_RXDIF = 0, + MX21_USBXCVR_TXDIF_RXSE = 1, + MX21_USBXCVR_TXSE_RXDIF = 2, + MX21_USBXCVR_TXSE_RXSE = 3, +}; + +struct mx21_usbh_platform_data { + enum mx21_usbh_xcvr host_xcvr; /* tranceiver mode host 1,2 ports */ + enum mx21_usbh_xcvr otg_xcvr; /* tranceiver mode otg (as host) port */ + u16 enable_host1:1, + enable_host2:1, + enable_otg_host:1, /* enable "OTG" port (as host) */ + host1_xcverless:1, /* traceiverless host1 port */ + host1_txenoe:1, /* output enable host1 transmit enable */ + otg_ext_xcvr:1, /* external tranceiver for OTG port */ + unused:10; +}; + +#endif /* __ASM_ARCH_MX21_USBH */ -- cgit v1.2.3 From 3eb352c73c99602fd379782284ea2de1476c4f9d Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Sat, 21 Nov 2009 12:14:54 +0100 Subject: USB: MXC: use DMA_BIT_MASK macro rather than hardcoded constants. Also fixes tab/space issue causing checkpatch to complain. Signed-off-by: Martin Fuzzey Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-mx2/devices.c | 53 +++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 3d398ce09b3..4acab18bf1f 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -292,7 +293,7 @@ struct platform_device mxc_fb_device = { .num_resources = ARRAY_SIZE(mxc_fb), .resource = mxc_fb, .dev = { - .coherent_dma_mask = 0xFFFFFFFF, + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -395,17 +396,17 @@ static struct resource mxc_sdhc1_resources[] = { }, }; -static u64 mxc_sdhc1_dmamask = 0xffffffffUL; +static u64 mxc_sdhc1_dmamask = DMA_BIT_MASK(32); struct platform_device mxc_sdhc_device0 = { - .name = "mxc-mmc", - .id = 0, - .dev = { - .dma_mask = &mxc_sdhc1_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(mxc_sdhc1_resources), - .resource = mxc_sdhc1_resources, + .name = "mxc-mmc", + .id = 0, + .dev = { + .dma_mask = &mxc_sdhc1_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .num_resources = ARRAY_SIZE(mxc_sdhc1_resources), + .resource = mxc_sdhc1_resources, }; static struct resource mxc_sdhc2_resources[] = { @@ -424,17 +425,17 @@ static struct resource mxc_sdhc2_resources[] = { }, }; -static u64 mxc_sdhc2_dmamask = 0xffffffffUL; +static u64 mxc_sdhc2_dmamask = DMA_BIT_MASK(32); struct platform_device mxc_sdhc_device1 = { - .name = "mxc-mmc", - .id = 1, - .dev = { - .dma_mask = &mxc_sdhc2_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(mxc_sdhc2_resources), - .resource = mxc_sdhc2_resources, + .name = "mxc-mmc", + .id = 1, + .dev = { + .dma_mask = &mxc_sdhc2_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .num_resources = ARRAY_SIZE(mxc_sdhc2_resources), + .resource = mxc_sdhc2_resources, }; #ifdef CONFIG_MACH_MX27 @@ -450,7 +451,7 @@ static struct resource otg_resources[] = { }, }; -static u64 otg_dmamask = 0xffffffffUL; +static u64 otg_dmamask = DMA_BIT_MASK(32); /* OTG gadget device */ struct platform_device mxc_otg_udc_device = { @@ -458,7 +459,7 @@ struct platform_device mxc_otg_udc_device = { .id = -1, .dev = { .dma_mask = &otg_dmamask, - .coherent_dma_mask = 0xffffffffUL, + .coherent_dma_mask = DMA_BIT_MASK(32), }, .resource = otg_resources, .num_resources = ARRAY_SIZE(otg_resources), @@ -469,7 +470,7 @@ struct platform_device mxc_otg_host = { .name = "mxc-ehci", .id = 0, .dev = { - .coherent_dma_mask = 0xffffffff, + .coherent_dma_mask = DMA_BIT_MASK(32), .dma_mask = &otg_dmamask, }, .resource = otg_resources, @@ -478,7 +479,7 @@ struct platform_device mxc_otg_host = { /* USB host 1 */ -static u64 usbh1_dmamask = 0xffffffffUL; +static u64 usbh1_dmamask = DMA_BIT_MASK(32); static struct resource mxc_usbh1_resources[] = { { @@ -496,7 +497,7 @@ struct platform_device mxc_usbh1 = { .name = "mxc-ehci", .id = 1, .dev = { - .coherent_dma_mask = 0xffffffff, + .coherent_dma_mask = DMA_BIT_MASK(32), .dma_mask = &usbh1_dmamask, }, .resource = mxc_usbh1_resources, @@ -504,7 +505,7 @@ struct platform_device mxc_usbh1 = { }; /* USB host 2 */ -static u64 usbh2_dmamask = 0xffffffffUL; +static u64 usbh2_dmamask = DMA_BIT_MASK(32); static struct resource mxc_usbh2_resources[] = { { @@ -522,7 +523,7 @@ struct platform_device mxc_usbh2 = { .name = "mxc-ehci", .id = 2, .dev = { - .coherent_dma_mask = 0xffffffff, + .coherent_dma_mask = DMA_BIT_MASK(32), .dma_mask = &usbh2_dmamask, }, .resource = mxc_usbh2_resources, -- cgit v1.2.3 From 4e0fa90d1de10d68429afa9353e10bb9436455db Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Sat, 21 Nov 2009 12:14:58 +0100 Subject: USB: MXC: add platform resources for i.MX21 USB host controller. Signed-off-by: Martin Fuzzey Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-mx2/devices.c | 27 +++++++++++++++++++++++++++ arch/arm/mach-mx2/devices.h | 1 + 2 files changed, 28 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index 4acab18bf1f..3956d82b7c4 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -643,3 +643,30 @@ int __init mxc_register_gpios(void) { return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); } + +#ifdef CONFIG_MACH_MX21 +static struct resource mx21_usbhc_resources[] = { + { + .start = USBOTG_BASE_ADDR, + .end = USBOTG_BASE_ADDR + 0x1FFF, + .flags = IORESOURCE_MEM, + }, + { + .start = MXC_INT_USBHOST, + .end = MXC_INT_USBHOST, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device mx21_usbhc_device = { + .name = "imx21-hcd", + .id = 0, + .dev = { + .dma_mask = &mx21_usbhc_device.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .num_resources = ARRAY_SIZE(mx21_usbhc_resources), + .resource = mx21_usbhc_resources, +}; +#endif + diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 97306aa18f1..f12694b0736 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -26,5 +26,6 @@ extern struct platform_device mxc_usbh2; extern struct platform_device mxc_spi_device0; extern struct platform_device mxc_spi_device1; extern struct platform_device mxc_spi_device2; +extern struct platform_device mx21_usbhc_device; extern struct platform_device imx_ssi_device0; extern struct platform_device imx_ssi_device1; -- cgit v1.2.3 From bce54fed941e03695ab557100a4bd1e457abca42 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 5 Jan 2010 16:10:14 +0200 Subject: arm: defconfig: rx51: enable phonet and g_nokia trivial patch enabling g_nokia on rx51_defconfig. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- arch/arm/configs/rx51_defconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig index b6eeebb3176..72e27d8401e 100644 --- a/arch/arm/configs/rx51_defconfig +++ b/arch/arm/configs/rx51_defconfig @@ -445,6 +445,8 @@ CONFIG_IP_NF_FILTER=m # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set +CONFIG_PHONET=y +# CONFIG_IEEE802154 is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set @@ -1325,27 +1327,34 @@ CONFIG_USB_GADGET_SELECTED=y # CONFIG_USB_GADGET_LH7A40X is not set # CONFIG_USB_GADGET_OMAP is not set # CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_R8A66597 is not set # CONFIG_USB_GADGET_PXA27X is not set -# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set # CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set # CONFIG_USB_GADGET_M66592 is not set # CONFIG_USB_GADGET_AMD5536UDC is not set # CONFIG_USB_GADGET_FSL_QE is not set # CONFIG_USB_GADGET_CI13XXX is not set # CONFIG_USB_GADGET_NET2280 is not set # CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set # CONFIG_USB_GADGET_DUMMY_HCD is not set CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_ZERO=m # CONFIG_USB_ZERO_HNPTEST is not set +# CONFIG_USB_AUDIO is not set # CONFIG_USB_ETH is not set # CONFIG_USB_GADGETFS is not set CONFIG_USB_FILE_STORAGE=m # CONFIG_USB_FILE_STORAGE_TEST is not set +# CONFIG_USB_MASS_STORAGE is not set # CONFIG_USB_G_SERIAL is not set # CONFIG_USB_MIDI_GADGET is not set # CONFIG_USB_G_PRINTER is not set # CONFIG_USB_CDC_COMPOSITE is not set +CONFIG_USB_G_NOKIA=m +# CONFIG_USB_G_MULTI is not set # # OTG and related infrastructure -- cgit v1.2.3