Thread (12 messages) flat view 12 messages, 4 authors, 2007-06-08

Re: [PATCH] Fix the LPC47M192 SuperIO on the MPC8641 HPCN

From: Andy Fleming <hidden>
Date: 2007-06-07 20:03:36

On Jun 7, 2007, at 11:35, Segher Boessenkool wrote:
quoted
quoted
Hardcoded I/O port numbers always worry me a little. I know that  
this
is
supposed to work in general, but can't you read the I/O port range
from
a device tree property?
I suppose I could create a device node for the Super I/O config
registers and use those instead of hardcoding it here.
I'd just hide it all, do this setup in the firmware,
where it belongs, and don't expose the superio config
in the device tree.

No more.  No more firmware-only initializations.  It sounds great, in  
principle, until you actually have to figure out why someone's setup  
isn't working.  I'm tired of having to see if the dts, u-boot, and  
Linux are in sync.  If Linux wants to use a device, I think it's not  
unreasonable to have it setup the device itself.  That way, Linux can  
do whatever it wants with the device, and not have to rely on U-Boot  
(or some other firmware) setting up the appropriate bits.

quoted
superio_cfg@4e {
	reg = <1 4e 2>;
	compatible = "smsc-lpc47m192-cfg";
};

I'm not sure if the name and compatible properties are appropriate
though.  Any recommendations?
"superio" and "smsc,lpc47m192" I'd say.  You also
then should link the logical devices on the superio
to the device nodes that represent those.  I'm not
sure this is all worth it, this is low-level setup
the firmware should do and everything else can treat
it as a black box.

Please...no.  What happens next is that we find a small bug that  
requires we modify U-Boot to do the initialization slightly  
differently, and then requires Linux to act slightly differently.   
And then I get emails every day from people wondering why their  
boards don't work.

Andy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help