From: jassisinghbrar@gmail.com (jassi brar)
To: linux-arm-kernel@lists.infradead.org
Subject: QUERY: How to handle SOC Configuration (Peripheral Multiplexing) in linux
Date: Mon, 15 Mar 2010 15:46:24 +0900 [thread overview]
Message-ID: <1b68c6791003142346l4da0b699h2cc40e4e7c4c23c7@mail.gmail.com> (raw)
In-Reply-To: <4B9DD46E.7060704@st.com>
On Mon, Mar 15, 2010 at 3:32 PM, Viresh KUMAR <viresh.kumar@st.com> wrote:
> On 3/15/2010 11:11 AM, jassi brar wrote:
>> On Mon, Mar 15, 2010 at 2:14 PM, Shiraz HASHIM <shiraz.hashim@st.com> wrote:
>>> Hello Jassi,
>>>
>>> On 3/15/2010 10:17 AM, jassi brar wrote:
>>>> On Mon, Mar 15, 2010 at 1:31 PM, Viresh KUMAR <viresh.kumar@st.com> wrote:
>>>>> In our SOC's (SPEArxxx), we have many peripheral sharing PL_GPIO pins and so
>>>>> only few peripherals can be selected in a configuration. This is configurable
>>>>> using a set of registers. Now the problem is to make following work:
>>>>>
>>>>> 1. How to do this selection in kernel in a simple way?
>>>>> 2. Based on this selection hardware registers needs to be configured.
>>>> Why can't you make the drivers acquire and setup the necessary pins during
>>>> probe?
>>>> Among other benefits, it enables you to use the same kernel image and device
>>>> drivers as modules -- if a GPIO can be used by two different device
>>>> controllers, you
>>>> can switch the 'mode' of the board by simple rmmod-insmod
>>>
>>> I think the problem is we cannot change the standard drivers (already in the
>>> mainline). So if the standard driver doesn't support this in its probe, then
>>> how should we manage this?
>> Though the drivers should already have done that, but still you can always
>> submit patches to improve.
>>
>>> Further these configurations are board dependent, so I think driver must be
>>> independent of this.
>> Don't really understand this. Viresh said that the SoC can configure GPIOs for
>> a controller or the other, which is quite common and is handled during probe.
>> Also, it's desirable to have one kernel image run on many machines with the
>> same SOC.
>>
> Actually, different peripherals share IO Pads (PL_GPIOs) and GPIO lines. Sending
> patch for drivers to support this doesn't look a great idea to me.
I didn't suggest your driver be GPIO specific.
A callback can be provided by platform layer(SoC specific) and the
set of GPIOs to use with a controller can be provided by the machine
layer(board specific). The driver only needs to make a call during probe time.
> Further this
> may cause problems to users, for example: User have entered a inserted a module
> and by mistake or lack of knowledge, he disables already working IP. Now with
> Kconfig concept this is taken care of at the beginning only. User can't select
> peripherals which can't be enabled simultaneously.
For a particular device only relevant modules will be loaded at boot-time.
If two mutually exclusive functionalities are possible only then
rmmod-insmod is needed -- say, AC97 or I2S audio mode.
next prev parent reply other threads:[~2010-03-15 6:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 4:31 QUERY: How to handle SOC Configuration (Peripheral Multiplexing) in linux Viresh KUMAR
2010-03-15 4:47 ` jassi brar
2010-03-15 5:14 ` Shiraz HASHIM
2010-03-15 5:41 ` jassi brar
2010-03-15 6:32 ` Viresh KUMAR
2010-03-15 6:46 ` jassi brar [this message]
2010-03-15 12:55 ` Bill Gatliff
2010-03-15 13:15 ` Russell King - ARM Linux
2010-03-15 13:22 ` Bill Gatliff
2010-03-16 2:01 ` jassi brar
2010-03-15 12:52 ` Bill Gatliff
2010-03-15 16:02 ` Armando VISCONTI
2010-03-15 16:53 ` Nicolas Pitre
2010-03-15 16:53 ` Bill Gatliff
2010-03-15 17:09 ` Mark Brown
2010-03-15 18:57 ` Tony Lindgren
2010-03-15 18:58 ` Bill Gatliff
2010-03-15 16:58 ` Russell King - ARM Linux
2010-03-15 4:57 ` Shilimkar, Santosh
2010-03-15 5:15 ` Shiraz HASHIM
2010-03-15 5:28 ` Shilimkar, Santosh
2010-03-15 6:34 ` Viresh KUMAR
2010-03-15 6:20 ` Ben Dooks
2010-03-15 6:28 ` Viresh KUMAR
2010-03-15 8:42 ` Armando VISCONTI
2010-03-15 9:09 ` Shiraz HASHIM
2010-03-15 9:37 ` jassi brar
2010-03-15 10:22 ` Shiraz HASHIM
2010-03-15 10:34 ` jassi brar
2010-03-15 10:55 ` Russell King - ARM Linux
2010-03-15 10:37 ` Russell King - ARM Linux
2010-03-15 10:10 ` Armando VISCONTI
2010-03-15 10:27 ` Shiraz HASHIM
2010-03-15 7:06 ` Viresh KUMAR
2010-03-17 16:30 ` Ben Dooks
2010-03-19 4:45 ` Viresh KUMAR
2010-03-15 17:55 ` Linus Walleij
2010-03-16 13:39 ` Shiraz HASHIM
2010-03-16 21:55 ` Linus Walleij
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=1b68c6791003142346l4da0b699h2cc40e4e7c4c23c7@mail.gmail.com \
--to=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).