Re[2]: Regression on latest barebox

Alexander Shiyan shc_work at mail.ru
Mon Oct 8 05:58:02 EDT 2012


Mon, 8 Oct 2012 11:45:08 +0200 от Sascha Hauer <s.hauer at pengutronix.de>:

> On Mon, Oct 08, 2012 at 01:23:54PM +0400, Alexander Shiyan wrote:
> > Hello.
> > Latest master sources have a regression due migrate to use platform_device_register functions.
> > Now I cannot register cfi_flash device which resides at 0x0, because it have conflicts with "mem"
> > command which have same start address.
> 
> This is because of this quite bogus check in platform_device_register:
> 
> 	if (dev->resource->start == new_device->resource->start) {
> 		return -EBUSY;
> 	}
> 
> The correct way would be to check whether the regions overlap, not
> whether the start addresses match. With this the whole patch wouldn't
> work anymore because everything would conflict with the iomem resource.
> 
> I have no good idea atm except making /dev/mem a non driver.
Or we can provide virtual bus ("system" for example) for /dev/mem device.


More information about the barebox mailing list