public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Vladimir Pantelic <pan@nt.tu-darmstadt.de>
Cc: Peter Barada <peterb@logicpd.com>,
	Philip Balister <philip@balister.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: MMC3 Overo
Date: Fri, 7 Aug 2009 12:55:31 +0300	[thread overview]
Message-ID: <20090807095528.GC2358@atomide.com> (raw)
In-Reply-To: <4A7BF2D2.7060608@nt.tu-darmstadt.de>

* Vladimir Pantelic <pan@nt.tu-darmstadt.de> [090807 12:24]:
> Tony Lindgren wrote:
>
> <snip>
>>>  Here's an idea:
>>>
>>>  1) Replace index with enum search in pin table - this breaks the
>>>  requirement that the enum list and table align - a good thing as
>>>  misalingment has bitten me multiple times when adding pins to the
>>>  current mux table.  Also, pinmux setup is done infrequently, so the
>>>  search doesn't add much overall execution time.
>>
>> Yeh something like that sounds good. We should just move the omap1
>> specific code to live in mach-omap1 and keep it as it is for now.
>>
>> You might also want to take a look at what the sh people have done:
>>
>> $ find arch/sh -name \*mux*
>>
>>>  2) Break up mux table into two parts, the "common" mux list, and a
>>>  "custom" mux list - the latter in the board file, and add a function to
>>>  add the custom mux list to mux lists searched by omap_cfg_reg().
>>>
>>>  3) Search the custom mux list first (if specified - allows replacing an
>>>  entry in the common table if hardware required differences in
>>>  termination, custom pins for GPIO, etc).
>>>
>>>  For example, on the OMAP3530, balls H18-H21 can be associated with
>>>  either UART3, or GPIOs 163-166. In the common mux list (where multiple
>>>  boards use those pins for UART3, the common mux file can have the
>>>  entries:
>>>
>>>  H18_35XX_UART3_CTS
>>>  H19_35XX_UART3_RTS
>>>  H20_35XX_UART3_RX
>>>  H21_35XX_UART_TX
>>>
>>>  that sets up the mux for those pines as a UART.  If a board wants to use
>>>  those pins instead for GPIO, then in the board file it can have a custom
>>>  mux list with:
>>>
>>>  H18_35XX_GPIO_163
>>>  H19_35XX_GPIO_164
>>>  H20_35XX_GPIO_165
>>>  H21_35XX_GPIO_166
>>>
>>>  and call into the mux code to add the custom mux list to be searched
>>>  first.
>>>
>>>  Thoughts?
>>
>> Sounds pretty good to me!
>
> but does not solve yet the "package" issue, where different omap3 packages have
> different balls connected, no? It would be ok for board files, assuming that a
> board has only one package, but what about the common code?
>
> Or are the package differences only for a few pins, in this case they could be
> "banned" from common and must live in board files..

Well we need to mux all the pins that can potentially conflict only in the
board-*.c files.

For naming, I think we should use the default mode0 name in the mux register as the
key, and then link package specific pin names to that key. The pin names are
very handy to see for debugging at least.

Another thing to consider is if we want to support dynamic muxing. That means
we need to keep the mux tables in the memory.

Or do init time muxing in board-*.c files, then re-register the pins needed for
dynamic muxing in board-*.c files. That way most of the mux data can be __initdata,
and only the pins that have been registered for dynamic muxing need to be kept
in the memory.

Regard,

Tony

  reply	other threads:[~2009-08-07  9:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 15:49 MMC3 Overo John Sarman
2009-07-30 19:23 ` John Sarman
2009-08-03  1:20   ` Paul Walmsley
2009-08-03 10:33     ` John Sarman
     [not found]       ` <52AC0DF6-BA95-421B-8C56-5F3DC62279DF@mac.com>
     [not found]         ` <bb2708720908030356p6d7b1cdegf0bd8c39a5c4ecd9@mail.gmail.com>
2009-08-03 10:57           ` Fwd: " John Sarman
2009-08-03 11:11       ` Paul Walmsley
2009-08-04 12:21     ` John Sarman
2009-08-05  8:32 ` Grazvydas Ignotas
     [not found]   ` <bb2708720908050901lbc67b1cx5a75a7667fa36fd1@mail.gmail.com>
2009-08-05 16:02     ` Fwd: " John Sarman
2009-08-05 16:25       ` Kevin Hilman
2009-08-05 16:35         ` John Sarman
2009-08-05 17:51           ` Steve Sakoman
2009-08-05 17:56             ` Gadiyar, Anand
2009-08-05 17:58             ` Kevin Hilman
2009-08-05 18:21               ` Steve Sakoman
2009-08-05 18:35                 ` Kevin Hilman
2009-08-05 18:55                   ` Philip Balister
2009-08-06  2:13                     ` Hunyue Yau
     [not found]                   ` <bb2708720908051229x49f10094w9b19b468d4bfaec8@mail.gmail.com>
2009-08-06  2:02                     ` John Sarman
2009-08-06  6:44                       ` Tony Lindgren
2009-08-06 14:30                       ` Kevin Hilman
2009-08-06 14:44                         ` Vladimir Pantelic
2009-08-06 15:16                           ` Kevin Hilman
2009-08-06 15:35                             ` Steve Sakoman
2009-08-06 15:09                         ` Philip Balister
2009-08-06 16:09                           ` Peter Barada
2009-08-07  8:21                             ` Tony Lindgren
2009-08-07  9:24                               ` Vladimir Pantelic
2009-08-07  9:55                                 ` Tony Lindgren [this message]
2009-08-07 13:24                                   ` Steve Sakoman

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=20090807095528.GC2358@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=pan@nt.tu-darmstadt.de \
    --cc=peterb@logicpd.com \
    --cc=philip@balister.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox