[PATCH 2/2] powerpc: MPC85xx EDAC device driver

Arnd Bergmann arnd at arndb.de
Tue Jul 31 03:28:50 EST 2007


On Monday 30 July 2007, Dave Jiang wrote:
> Arnd Bergmann wrote:

> > I'd suggest either to integrate EDAC into the 85xx specific PCI code,
> > or to have an extra device in the device tree for this.
> 
> How about I create a platform device just for EDAC and leave the PCI of_device
> to the 85xx PCI code? That would be a lot less modification than adding a
> device for every PCI hose per DTS file.... Just a thought....

Hmm, I can see your point about not having to change all the device trees,
but if you really want to have a device for each of them, an of_device seems
more natural to me than a platform_device.

What about the other option I mentioned, handling the EDAC stuff from the
fsl_add_bridge() function?
 
> > The error handling could use some improvement here. In particular, you should
> > unregister the buses in the failure path, maybe you need to clean up other
> > parts as well.
> 
> I think I want individual "devices" work even some may fail or be missing. For
> example, even if L2 fails to register, I still want to be able to get the
> memory controller to report errors. So I really don't want to unregister
> everything that initialized properly even though some failures exists. Maybe I
> need to clean it up a little bit.

In that case, you shouldn't return failure from the module_init() function,
because that will remove the module again, while leaving the drivers
registered.

Another option might be to have separate modules, or separate initcall()
statements if the code can not be modular.

	Arnd <><



More information about the Linuxppc-dev mailing list