|
From: Zach W. <zw...@su...> - 2009-11-17 13:02:50
|
On Tue, 2009-11-17 at 04:09 -0700, David Brownell wrote: > On Tuesday 17 November 2009, Zachary T Welch wrote: > > > > Add get_flash_bank_by_name (and get_nand_device_by_name) helpers > > to retrieves struct flash_bank * (struct nand_device *) given a > > driver name and an (optional) driver-specific bank index. > > To save me reading 30KB of patch ... what's the Tcl interface > to this then? The name is specified via "nand device ..." > and "flash bank ..." commands getting new parameters? If you have one bank, it uses the driver name. If you have more than one, you can add a numeric suffix to specify which instance. > Agreed that wanting to get rid of numeric IDs there too is > a good thing. I just want to get a quick handle on how this > would get used... In most cases, replace '0' with the name of the driver or controller. If you have two, refer to them as 'driver.0' and 'driver.1'. I am not saying this is the best approach, but it was easy to do and can be improved trivially. For example, it would be easy to add another patch to update the bank creation command syntax for per-bank names, checking for a match with those. --Z |