[PATCH 10/11] Add MPC8360EMDS board support
vbordug at ru.mvista.com
Thu Oct 5 10:16:22 EST 2006
On Thu, 5 Oct 2006 10:03:34 +1000
Paul Mackerras wrote:
> Benjamin Herrenschmidt writes:
> > > It's the 'or not' part that I am worried about. Things like
> > > you mention above make sense. I'm starting to worry about
> > > some of this other stuff, and the bscr example is what
> > > woke me up :-) I think that's an example of things that
> > > should be considered not necessary.
> > I haven't looked at this specific example. I'll try to have a look
> > later. I jumped into the discussion pointed by somebody else :)
> That one was interesting - the bcsr was being referenced from an
> ethernet driver that looked to me like it would be useful on any board
> based on an 836x chip (I think). Yet it was claimed that the bcsr was
> so specific and unique to each board that there was no point putting
> it in the device tree - which implies that we would have to have a
> separate lump of code in the tree to drive it for every single
> board. :P I asked why the ethernet driver was accessing it directly
> if that was the case, but didn't get an answer (well, only an indirect
> answer in that the bcsr access code got removed from the ethernet
Well that's because accessing bcsr in generic code is just odd. Yes, there are some places with
such a stuff still. bcsr is something like a sw jumper to enable/disable stuff, configure things, etc.
which may vary up to the hw design even if it's following the reference closely.
It's unique across the boards, and should be touched in BSP code only to keep the base sane.
Such a thing in the eth driver directly was sort of "nice" because takes care of enabling network "physically"
on board. For the same aim, I used to have board-specific callback to set up some bits if needed(speaking about
fs_enet/ppc). IOW, upon network driver init, it triggers callback function (passed in there via platform data) that's intended to do the bsp setup (or may be unset if nothing needed). In powerpc, only sane solution seems to be Dan's proposed
feature_call thing. I wish I'd have some time for that ...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: not available
More information about the Linuxppc-dev