powerpc_flash_init(), wtf!?

Vitaly Bordug vitb at kernel.crashing.org
Fri May 4 10:30:56 EST 2007


On Thu, 03 May 2007 22:29:13 +1000
Benjamin Herrenschmidt wrote:

> 
> >     It doesn't seem a flexible enough approach. We could continue
> > using platform devices then.
> 
> The problem is trivial enough tho... who ends up creating an
> of_platform_device for that rom node ... to be picked up by the
> driver.
> 
> Creating of_platform devices is platform code responsibility... either
> by calling of_platform_bus_probe() (or whatever I called it ...) to
> generate them from known bus type or by creating them directly, that
> doesn't matter, that's still platform code business.
> 
Still, there is code duplication problem.

So, assuming we'd need 6 lines of code to do it properly in platform code,
we may face  tens of different targets that require exactly the same process to 
provide mtd of_devices stuff.

The hard part of it is apparently how the respective flash space should be remapped
(b/c it is depending on HW design), but since we really care only about things that may be
encoded into device tree, there is really an option to utilize devtree power and effectiveness,
I think.


-- 
Sincerely, Vitaly




More information about the Linuxppc-dev mailing list