From: Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
To: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC 1/5] omap3: add platform init code for OHCI driver
Date: Sun, 21 Mar 2010 20:26:24 +0200 [thread overview]
Message-ID: <20100321182623.GA3841@gandalf> (raw)
In-Reply-To: <1269171123-9874-2-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
On Sun, Mar 21, 2010 at 05:01:59PM +0530, Anand Gadiyar wrote:
> Add platform init code for the OMAP3 OHCI driver.
>
> Also, by default add mux-mode changes for all 6 pads for a
> given port. This needs to be tailored down depending on the
> actual port modes used.
>
> Signed-off-by: Anand Gadiyar <gadiyar-l0cyMroinI0@public.gmane.org>
> ---
> arch/arm/mach-omap2/usb-ehci.c | 131 ++++++++++++++++++++++++++++++++++
> arch/arm/plat-omap/include/plat/usb.h | 20 +++++
> 2 files changed, 151 insertions(+)
>
> Index: linux-2.6/arch/arm/mach-omap2/usb-ehci.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-omap2/usb-ehci.c
> +++ linux-2.6/arch/arm/mach-omap2/usb-ehci.c
> @@ -236,3 +236,134 @@ void __init usb_ehci_init(const struct e
>
> #endif /* CONFIG_USB_EHCI_HCD */
>
> +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
> +
> +static struct resource ohci_resources[] = {
> + {
> + .start = OMAP34XX_OHCI_BASE,
> + .end = OMAP34XX_OHCI_BASE + SZ_1K - 1,
> + .flags = IORESOURCE_MEM,
> + },
> + {
> + .start = OMAP34XX_UHH_CONFIG_BASE,
> + .end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1,
> + .flags = IORESOURCE_MEM,
> + },
> + {
> + .start = OMAP34XX_USBTLL_BASE,
> + .end = OMAP34XX_USBTLL_BASE + SZ_4K - 1,
> + .flags = IORESOURCE_MEM,
> + },
> + { /* general IRQ */
> + .start = INT_34XX_OHCI_IRQ,
> + .flags = IORESOURCE_IRQ,
> + }
> +};
> +
> +/* The dmamask must be set for OHCI to work */
> +static u64 ohci_dmamask = ~(u32)0;
DMA_BIT_MASK(32); ??
> +static void usb_release(struct device *dev)
> +{
> + /* normally not freed */
> +}
unnecessary ?
> +static struct platform_device ohci_device = {
> + .name = "ohci-omap3",
> + .id = 0,
> + .dev = {
> + .release = usb_release,
> + .dma_mask = &ohci_dmamask,
> + .coherent_dma_mask = 0xffffffff,
> + .platform_data = NULL,
static variable, doesn't need the NULL initialization.
[snip]
> +#endif /* CONFIG_USB_OHCI_HCD */
> Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
> ===================================================================
> --- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h
> +++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h
> @@ -13,6 +13,20 @@ enum ehci_hcd_omap_mode {
> EHCI_HCD_OMAP_MODE_TLL,
> };
>
> +enum ohci_omap3_port_mode {
> + OMAP_OHCI_PORT_MODE_UNUSED,
> + OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
> + OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
> + OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
> + OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
> + OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0,
> + OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM,
> + OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
> + OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
> + OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
> + OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM,
> +};
> +
> struct ehci_hcd_omap_platform_data {
> enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS];
> unsigned phy_reset:1;
> @@ -21,6 +35,10 @@ struct ehci_hcd_omap_platform_data {
> int reset_gpio_port[OMAP3_HS_USB_PORTS];
> };
>
> +struct ohci_hcd_omap_platform_data {
> + enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS];
> +};
> +
> /*-------------------------------------------------------------------------*/
>
> #define OMAP1_OTG_BASE 0xfffb0400
> @@ -55,6 +73,8 @@ extern void usb_musb_init(struct omap_mu
>
> extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata);
>
> +extern void usb_ohci_init(struct ohci_hcd_omap_platform_data *pdata);
missing const ??
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-03-21 18:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-21 11:31 [PATCH RFC 0/5] usb: ohci: introduce ohci-hcd driver for omap3 Anand Gadiyar
2010-03-21 11:31 ` [PATCH RFC 1/5] omap3: add platform init code for OHCI driver Anand Gadiyar
2010-03-21 11:32 ` [PATCH RFC 2/5] usb: ohci: introduce omap3 ohci-hcd driver Anand Gadiyar
2010-03-21 11:32 ` [PATCH RFC 3/5] usb: ohci: Add Kconfig entries for ohci-omap3 Anand Gadiyar
2010-03-21 11:32 ` [PATCH RFC 4/5] omap: 3430sdp: add ohci platform init Anand Gadiyar
[not found] ` <1269171123-9874-5-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-03-21 11:32 ` [PATCH RFC 5/5] omap: 3630sdp: " Anand Gadiyar
[not found] ` <1269171123-9874-3-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-03-21 18:43 ` [PATCH RFC 2/5] usb: ohci: introduce omap3 ohci-hcd driver Felipe Balbi
2010-03-22 6:53 ` Gadiyar, Anand
[not found] ` <5A47E75E594F054BAF48C5E4FC4B92AB03220FBD5A-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-03-23 12:27 ` Felipe Balbi
2010-03-22 16:15 ` Aguirre, Sergio
[not found] ` <1269171123-9874-2-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org>
2010-03-21 18:26 ` Felipe Balbi [this message]
2010-03-22 16:01 ` [PATCH RFC 1/5] omap3: add platform init code for OHCI driver Aguirre, Sergio
2010-03-23 9:35 ` Gadiyar, Anand
2010-03-24 8:17 ` [PATCH RFC 0/5] usb: ohci: introduce ohci-hcd driver for omap3 Gregory CLEMENT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100321182623.GA3841@gandalf \
--to=me-uirdbs8odbtmtblb0cgj/q@public.gmane.org \
--cc=gadiyar-l0cyMroinI0@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.