All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: "ext Gadiyar, Anand" <gadiyar@ti.com>
Cc: "Balbi Felipe (Nokia-MS/Helsinki)" <felipe.balbi@nokia.com>,
	"Munegowda, Keshava" <keshava_mgowda@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [RFC] [PATCH 3/7] usb: ehci-omap: omap: Add OMAP4 support
Date: Fri, 20 Aug 2010 08:52:04 +0300	[thread overview]
Message-ID: <20100820055204.GF15196@nokia.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB0324222B50@dbde02.ent.ti.com>

Hi,

On Fri, Aug 20, 2010 at 07:47:07AM +0200, ext Gadiyar, Anand wrote:
>The differences between OMAP3 and OMAP4 are:
>- The OMAP4 has a different set of clocks which do not exist on OMAP3.
>- The register bits for configuring port modes is different

is it a different ip core or just a modification of the previous ?

>For the clock handling:
>One approach: On OMAP3, have a set of dummy clocks corresponding to the
>per-port clocks on OMAP4. Then the driver wouldn't need to know which
>SoC it is running on.
>
>Another approach:
>Have a different glue layer driver for OMAP4.
>
>For the register bit differences, we do need to know which SoC we are
>running on to be able to use the correct register bits. For this,

isn't the ehci ip revision different ? Why don't you use that instead of 
cpu_is_omap* 

>One approach:
>At the very minimum, we need a set of clocks to be enabled to be able to
>read the UHH_REVISION register, and we could use that to figure out which
>bits we need to use.

exactly

>The other approach I can think of is to have platform data tell us (I'm
>guessing this is a bad idea).

yeah, that would be bad...

>What do you think?

another approach:

make ohci and ehci play well together have an omap3-specific and one 
omap4-specific MFD-like driver that will instantiate ehci and ohci 
platform_drivers and handle clock + locking to shared address space.

then you define a set of accessor functions for registers with different 
offset that act differently depending on revision of the ip core.

Does that work ?

-- 
balbi

DefectiveByDesign.org

  reply	other threads:[~2010-08-20  5:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 23:49 [PATCH 0/7] usb: ehci: omap: Adding OMAP4 support Keshava Munegowda
2010-08-18 23:49 ` [RFC] [PATCH 1/7] usb: ehci-omap: Add the HSUSB base address Keshava Munegowda
     [not found]   ` <1282175377-2784-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-18 23:49     ` [RFC] [PATCH 2/7] usb: ehci-omap: don't execute OMAP3-specific code on non-OMAP3 Keshava Munegowda
     [not found]       ` <1282175377-2784-3-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-18 23:49         ` [RFC] [PATCH 3/7] usb: ehci-omap: omap: Add OMAP4 support Keshava Munegowda
     [not found]           ` <1282175377-2784-4-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-18 23:49             ` [RFC] [PATCH 4/7] omap: usb: ehci: IO mux mode settings for omap4 Keshava Munegowda
     [not found]               ` <1282175377-2784-5-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-18 23:49                 ` [RFC] [PATCH 5/7] omap: usb: ehci: Initialize resources " Keshava Munegowda
2010-08-18 23:49                   ` [RFC] [PATCH 6/7] usb: ehci: Introduce CONFIG_USB_EHCI_HCD_OMAP3 Keshava Munegowda
     [not found]                     ` <1282175377-2784-7-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-18 23:49                       ` [RFC] [PATCH 7/7] omap: ehci: enable the ehci port on OMAP4SDP Keshava Munegowda
2010-08-20  5:45                       ` [RFC] [PATCH 6/7] usb: ehci: Introduce CONFIG_USB_EHCI_HCD_OMAP3 Felipe Balbi
     [not found]                         ` <20100820054507.GE15196-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-08-20  5:59                           ` Gadiyar, Anand
     [not found]                             ` <5A47E75E594F054BAF48C5E4FC4B92AB0324222B65-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-08-20  6:13                               ` Felipe Balbi
2010-08-20  6:32                                 ` Gadiyar, Anand
2010-08-20  9:13                                   ` Felipe Balbi
     [not found]                                     ` <20100820091336.GC31377-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-10-20 17:30                                       ` Menon, Nishanth
2010-08-20  5:41                     ` Felipe Balbi
     [not found]                   ` <1282175377-2784-6-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2010-08-20  5:39                     ` [RFC] [PATCH 5/7] omap: usb: ehci: Initialize resources for omap4 Felipe Balbi
2010-08-20  5:38           ` [RFC] [PATCH 3/7] usb: ehci-omap: omap: Add OMAP4 support Felipe Balbi
     [not found]             ` <20100820053844.GB15196-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-08-20  5:47               ` Gadiyar, Anand
2010-08-20  5:52                 ` Felipe Balbi [this message]
2010-08-20  6:03                   ` Gadiyar, Anand
     [not found]                   ` <20100820055204.GF15196-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-08-20  6:24                     ` Gadiyar, Anand
     [not found]                 ` <5A47E75E594F054BAF48C5E4FC4B92AB0324222B50-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-08-20  6:01                   ` Shilimkar, Santosh
2010-08-20  5:35       ` [RFC] [PATCH 2/7] usb: ehci-omap: don't execute OMAP3-specific code on non-OMAP3 Felipe Balbi

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=20100820055204.GF15196@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=gadiyar@ti.com \
    --cc=keshava_mgowda@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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.