[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa686aa40710232227x7984097bk8bc55fe6cf194d63@mail.gmail.com>
Date: Tue, 23 Oct 2007 23:27:21 -0600
From: "Grant Likely" <grant.likely@...retlab.ca>
To: "Domen Puncer" <domen.puncer@...argo.com>
Cc: "Dragos Carp" <dragos.carp@...tica.com>,
linux-kernel@...r.kernel.org, dbrownell@...rs.sourceforge.net,
linuxppc-dev@...abs.org
Subject: Re: [PATCH] mpc5200: psc-spi driver must not touch port_config or cdm registers
On 10/23/07, Domen Puncer <domen.puncer@...argo.com> wrote:
> On 23/10/07 21:39 -0600, Grant Likely wrote:
> > From: Grant Likely <grant.likely@...retlab.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@...retlab.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@...retlab.ca
(403) 399-0195
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists