linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH v7 3/3] [POWERPC] MPC832x_RDB: update dts to use SPI1in QE, register mmc_spi stub
Date: Wed, 5 Sep 2007 15:40:23 +0400	[thread overview]
Message-ID: <20070905114023.GA4072@localhost.localdomain> (raw)
In-Reply-To: <20070904182028.GC18280@ld0162-tx32.am.freescale.net>

On Tue, Sep 04, 2007 at 01:20:28PM -0500, Scott Wood wrote:
> On Tue, Sep 04, 2007 at 02:47:50PM +0400, Anton Vorontsov wrote:
> > > _and system GPIOs_ :-)
> > 
> > Yup, firmware should set up gpios, to make initial kernel boot.
> 
> No, it should set all pins and similar setup-once type initialization
> that is board-specific rather than device-specific -- there's no reason
> for the kernel to need to care about that sort of thing.
> 
> > After that, kernel can and should manage GPIOs. Few examples.
> > 
> > Say units (like USB or SPI) can work in very different modes. And
> > it's okay if user want to change device mode in the runtime.
> 
> This is a special case that warrants kernel involvement.  It should not
> be used as justification for the bootloader leaving pins unconfigured in
> the majority of cases where it does not make sense to change them at
> runtime.
> 
> > Another example, power management - if some unit temporarily unused,
> > to save power GPIOs should be set up differently. Say if SPI unit
> > turned off (unused just now), it's wise to bring their dedicated
> > GPIOs to "power saving" state (be it output0/1 or input, it
> > depends).
> 
> The kernel is of course welcome to do so -- and this may be a valid
> reason to attach pin information to specific device nodes, if it actually
> saves a non-negligible amount of power -- but it's not a reason to force
> the kernel to have to care by not setting things up in the firmware.

Well, I might agree here. But to me it seems unnatural that I have to
upgrade bootloader to use SPI -- I can already boot the kernel.

Bootloader's duties are finished when kernel booted. And if already
running kernel is unable to do something, it's not bootloader's fault
anymore, but kernel's itself. At least I like to think so. Maybe I'm
wrong, yet not sure. ;-)

And from the practical point of view, upgrading bootloader is much
more error-prone and risky for the users without proper rescue tools
and knowledge. Kernel is easier to deploy after bug-fixing (and
wrongly set up GPIO pin is a bug). That's why I tend to like "dumb
and simple" bootloaders and do not hang up too much duties on it.

Anyhow, all above is just my own preference, I'm not arguing at
all, because personally I'm fine with any option, be it dts, board
file, device driver's file, the bootloader, or all at once. ;-)

> -Scott

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

  parent reply	other threads:[~2007-09-05 11:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 13:45 [PATCH v4 0/2] SPI support for fsl_soc and mpc832x_rdb Anton Vorontsov
2007-08-21 13:47 ` [PATCH v4 1/2] [POWERPC] fsl_soc: add support for fsl_spi Anton Vorontsov
2007-08-21 13:47 ` [PATCH v4 2/2] [POWERPC] MPC832x_RDB: update dts to use SPI1 in QE, register mmc_spi stub Anton Vorontsov
2007-08-21 15:27 ` [PATCH v5 0/2] SPI support for fsl_soc and mpc832x_rdb Anton Vorontsov
2007-08-21 15:29   ` [PATCH v5 1/2] [POWERPC] fsl_soc: add support for fsl_spi Anton Vorontsov
2007-08-22 14:24     ` Kumar Gala
2007-08-21 15:29   ` [PATCH v5 2/2] [POWERPC] MPC832x_RDB: update dts to use SPI1 in QE, register mmc_spi stub Anton Vorontsov
2007-08-22 14:25     ` Kumar Gala
2007-08-22 14:22   ` [PATCH v5 0/2] SPI support for fsl_soc and mpc832x_rdb Kumar Gala
2007-08-22 14:54     ` [PATCH v6 " Anton Vorontsov
2007-08-22 14:57       ` [PATCH v6 1/2] [POWERPC] fsl_soc: add support for fsl_spi Anton Vorontsov
2007-08-23  3:24         ` Stephen Rothwell
2007-08-23 11:33           ` [PATCH v7 0/3] " Anton Vorontsov
2007-08-23 11:35             ` [PATCH v7 1/3] [POWERPC] QE lib: extern par_io_config_pin and par_io_data_set funcs Anton Vorontsov
2007-08-23 11:35             ` [PATCH v7 2/3] [POWERPC] fsl_soc: add support for fsl_spi Anton Vorontsov
2007-08-23 11:36             ` [PATCH v7 3/3] [POWERPC] MPC832x_RDB: update dts to use SPI1 in QE, register mmc_spi stub Anton Vorontsov
2007-08-30 21:06               ` Timur Tabi
2007-08-31 13:50                 ` [PATCH v7 3/3] [POWERPC] MPC832x_RDB: update dts to use SPI1in " Li Yang-r58472
2007-09-01 23:59                   ` Segher Boessenkool
2007-09-03 13:55                     ` Timur Tabi
2007-09-03 15:13                       ` Anton Vorontsov
2007-09-03 23:17                         ` Segher Boessenkool
2007-09-04 10:47                           ` Anton Vorontsov
2007-09-04 18:20                             ` Scott Wood
2007-09-04 20:15                               ` Vitaly Bordug
2007-09-05 11:40                               ` Anton Vorontsov [this message]
2007-09-05 13:21                                 ` Scott Wood
2007-09-07  1:15                                   ` David Gibson
2007-09-07  1:28                                     ` Timur Tabi
2007-09-06 14:25                                 ` Segher Boessenkool
2007-09-06 14:19                             ` Segher Boessenkool
2007-09-06 14:35                               ` Timur Tabi
2007-09-03 23:12                       ` Segher Boessenkool
2007-09-04  3:16                         ` Timur Tabi
2007-09-06 14:13                           ` Segher Boessenkool
2007-09-06 14:19                             ` Scott Wood
2007-09-06 14:29                               ` Segher Boessenkool
2007-09-07  3:37                             ` David Gibson
2007-08-22 14:57       ` [PATCH v6 2/2] [POWERPC] MPC832x_RDB: update dts to use SPI1 in " Anton Vorontsov
2007-08-22 15:01       ` [PATCH v6 0/2] SPI support for fsl_soc and mpc832x_rdb Kumar Gala
2007-08-22 15:13         ` Anton Vorontsov

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=20070905114023.GA4072@localhost.localdomain \
    --to=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    --cc=timur@freescale.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;
as well as URLs for NNTP newsgroup(s).