[U-Boot] [PATCH 03/11] DM: add block controller core

Marek Vasut marex at denx.de
Fri Sep 21 17:39:21 CEST 2012


Dear Pavel Herrmann,

[...]

> > Can't the old driver just have a compat section in them? Like I did with
> > serial stuff:
> > 
> > 1) rename the internal functions to ${driver}_${function_name} from pure
> > ${function_name} and introduce section which behaves as a wrapper
> > (implement ${function_name} calling ${driver}_${function_name} ).
> > 2) Add your DM goo, implement #ifdef around it so either the compat
> > section or DM section is enabled.
> 
> I actually did something of this sort, see [4/11], with less touching.
> 
> the problem is that while SATA drivers are easy to convert, IDE ones are
> not. I would actually propose to do a ide_legacy driver (mostly out of the
> code currently in common/cmd_ide.c), and keep it as the only option until
> IDE dies completely.

IDE will be around for a LONG time.

You introduce that CONFIG_SYS_SATA_LEGACY for no reason, if you did it as said 
above, simple CONFIG_DM would suffice as the drivers would be intacts with DM 
disabled. Note the compiler will opt-out these proxy calls.

Besides, with this approach of yours, you need to enable SATA_LEGACY for every 
single board now, introducing a lot of churn into the patches and if it's not 
defined, every board using SATA is broken, right?

> > How does that work? It's much cleaner.
> > 
> > > Pavel Herrmann
> > 
> > Best regards,
> > Marek Vasut

Best regards,
Marek Vasut


More information about the U-Boot mailing list