Re: powerpc_flash_init(), wtf!?
From: Vitaly Bordug <hidden>
Date: 2007-05-04 00:31:14
On Thu, 03 May 2007 22:29:13 +1000 Benjamin Herrenschmidt wrote:
quoted
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