From: David Brownell <david-b@pacbell.net>
To: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH 1/3] ARM: OMAP: Add helper module for board specific I2C bus registration
Date: Tue, 6 Nov 2007 00:26:57 -0800 [thread overview]
Message-ID: <200711060026.57280.david-b@pacbell.net> (raw)
In-Reply-To: <20071105101917.063febb2.jarkko.nikula@nokia.com>
On Monday 05 November 2007, Jarkko Nikula wrote:
> Do Tony or someone know which boards might require above muxing changes
> so that we can get rid of that omap_i2c_mux_pins from here?
Keep it simple. If you're going to use a given i2c bus,
always have that setup routine mux it. If board-specific
code does it too, that can't hurt ... and that board code
can be removed someday.
Your latest code goes:
> +/*
> + * REVISIT: How many boards really require muxing here? It should be done
> + * by the bootloader
Erm, not as a rule. The last policy I recall being discussed
was that Linux should not trust the boot loader to have set
up pin muxing. If a product is being developed with a boot
loader which does that, fine -- resolve that by configuring
the pinmux support out of Linux. That would be an OPTION.
But in all cases, the Linux code shold include pinmux support.
That way drivers etc can be properly debugged without needing
to depend on bootloader bugfixes of any type.
> and if not, then the muxing should go into those
> + * board files. Since this is not known yet, do it here like how previous
> + * implementation was doing. However, eventually this function shall disappear + */
Again, no. This would be the hook through which Linux always
ensures muxing is done correctly. The exception would be that
you could compile out all pinmux support, using standard
conditional compilation tools (CONFIG_OMAP_MUX=n).
> +static void omap_i2c_mux_pins(int bus_id)
> +{
> + switch (bus_id) {
> + case 1:
> + if (cpu_class_is_omap1()) {
> + omap_cfg_reg(I2C_SCL);
> + omap_cfg_reg(I2C_SDA);
> + }
There should be an omap2 case here too, like
if (cpu_is_omap24xx()) {
omap_cfg_reg(M19_24XX_I2C1_SCL);
omap_cfg_reg(L15_24XX_I2C1_SDA);
}
I didn't check if that's the reset default, but again
the rule should be that Linux does *NOT* require a
fully-configuring and fully debugged boot loader to run.
If you've got such a boot loader, great -- you can disable
CONFIG_OMAP_MUX and the kernel will be somewhat smaller.
Meanwhile, not having such a boot loader should never be
a blocking factor in system development.
- Dave
> + break;
> + case 2:
> + if (cpu_is_omap24xx()) {
> + omap_cfg_reg(J15_24XX_I2C2_SCL);
> + omap_cfg_reg(H19_24XX_I2C2_SDA);
> + }
> + break;
> + }
> +}
next prev parent reply other threads:[~2007-11-06 8:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 13:46 [PATCH/RFC 0/3] I2C bus registration helper jarkko.nikula
2007-11-02 13:46 ` [PATCH 1/3] ARM: OMAP: Add helper module for board specific I2C bus registration jarkko.nikula
2007-11-02 16:22 ` David Brownell
2007-11-05 8:19 ` Jarkko Nikula
2007-11-06 8:26 ` David Brownell [this message]
2007-11-06 10:53 ` Jarkko Nikula
2007-11-06 12:51 ` Tony Lindgren
2007-11-02 13:46 ` [PATCH 2/3] ARM: OMAP: Use I2C bus registration helper jarkko.nikula
2007-11-02 16:27 ` David Brownell
2007-11-05 8:26 ` Jarkko Nikula
2007-11-05 9:56 ` David Brownell
2007-11-02 13:46 ` [PATCH 3/3] ARM: OMAP: N800: " jarkko.nikula
2007-11-05 13:15 ` [PATCH/RFC 0/3 rev 2] " Jarkko Nikula
2007-11-05 13:15 ` [PATCH 1/3] ARM: OMAP: Add helper module for board specific I2C bus registration Jarkko Nikula
2007-11-05 13:15 ` [PATCH 2/3] ARM: OMAP: Use I2C bus registration helper Jarkko Nikula
2007-11-05 13:15 ` [PATCH 3/3] ARM: OMAP: N800: " Jarkko Nikula
-- strict thread matches above, loose matches on Subject: below --
2007-11-07 10:54 [PATCH/RFC 0/3 rev 3] " Jarkko Nikula
2007-11-07 10:54 ` [PATCH 1/3] ARM: OMAP: Add helper module for board specific I2C bus registration Jarkko Nikula
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=200711060026.57280.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=jarkko.nikula@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
/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