From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Domen Puncer" <domen.puncer@telargo.com>
Cc: linuxppc-dev@ozlabs.org, Dragos Carp <dragos.carp@toptica.com>,
dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mpc5200: psc-spi driver must not touch port_config or cdm registers
Date: Tue, 23 Oct 2007 23:27:21 -0600 [thread overview]
Message-ID: <fa686aa40710232227x7984097bk8bc55fe6cf194d63@mail.gmail.com> (raw)
In-Reply-To: <20071024050100.GA3369@nd47.coderock.org>
On 10/23/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> On 23/10/07 21:39 -0600, Grant Likely wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > port_config and the cdm are the responsibility of firmware; and if
> > firmware doesn't set it up correctly, it should be fixed up by
> > platform code on a per-board basis because it's a property of the
> > board.
> >
> > Drivers should never touch these registers. They are completely
> > unprotected and the platform may do odd things with them that the
> > driver must not interfere with.
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> >
> > Domen, Dragos; can you please check your usage of this driver. None of
> > the in-tree board ports use it as-is, but they are of course just a
> > device tree change away from being usable on the lite5200b.
>
> My test cases were just a jumper on RX-TX line.
>
> It's not even allowed to set mclken_div_pscX?
> There can be different speed devices on same SPI
> (spi_board_info->max_speed_hz).
Nope; do it in the platform code or a cdm driver. Otherwise there is
no protection against collisions on the cdm registers. The driver
could call a platform hook to fiddle with clocking, but it must not
touch it directly.
(BTW, I don't intended to push this version of the patch; I just want
to get everyone's brain juices flowing to figure out the best way to
solve it.)
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
prev parent reply other threads:[~2007-10-24 5:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 3:39 [PATCH] mpc5200: psc-spi driver must not touch port_config or cdm registers Grant Likely
2007-10-24 5:01 ` Domen Puncer
2007-10-24 5:27 ` Grant Likely [this message]
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=fa686aa40710232227x7984097bk8bc55fe6cf194d63@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=dbrownell@users.sourceforge.net \
--cc=domen.puncer@telargo.com \
--cc=dragos.carp@toptica.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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).