[coreboot] [PATCH] [RFC] v3: CS5536 cleanup, and v3 design
c-d.hailfinger.devel.2006 at gmx.net
Fri Jul 4 00:08:36 CEST 2008
On 03.07.2008 23:58, Stefan Reinauer wrote:
> Carl-Daniel Hailfinger wrote:
>> Absolutely. The ultimate goal is to kill dev_find_pci_device completely.
>> We have a really nice device model and we should not work around it with
>> v2-style code.
> This will not always be possible, because devices have interactions.
> function setup_link_between_a_and_b:
> - Set bit X in device A
> - Set bit Y in device B
> - Poll bit Z in device A until a link between A and B is valid
> Now, you have to put that function either in device A or device B.
OK, that one is indeed valid. However, I'd like to keep the number of
dev_find_*_device calls as low as possible without compromising code
For example, if you want to establish a link between two devices,
calling the function with device pointers for both devices would make
the code readable and stuff would still work.
More information about the coreboot