From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 01 May 2009 09:33:55 +0200 Subject: [U-Boot] [PATCH 1/8] Add simple hwconfig infrastructure In-Reply-To: <20090430231220.GA17546@oksana.dev.rtsoft.ru> References: <20090429214819.GA346@oksana.dev.rtsoft.ru> <20090429215000.GA1092@oksana.dev.rtsoft.ru> <20090430223154.9FDFB83420E8@gemini.denx.de> <20090430231220.GA17546@oksana.dev.rtsoft.ru> Message-ID: <20090501073355.74BB383420E8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Anton, In message <20090430231220.GA17546@oksana.dev.rtsoft.ru> you wrote: > > > Suggestion: instead of > > > > set hwconfig dr_usb,dr_usb_mode:peripheral,dr_usb_phy_type:ulpi > > > > use: > > > > set hwconfig dr_usb:mode=peripheral,phy_type=ulpi > > > > What do you think? > > At first sight this looks great. But where should we stop? at a semicolon :-) i. e. something like this: set hwconfig dr_usb:mode=peripheral,phy_type=ulpi;next_option:on;other_option:off > I wonder if we want multi-level nesting capability, i.e. > > dr_usb { > mode = peripheral; > phy { > type = ulpi; > clock = 48; > }; > }; I don't think we should go that far. > Or we can stop at one nesting level capability, just as you > describe. Your suggestion is quite easy to implement, but > full fledged parser is needed for the most generic case. I think this should remain what it was introduced as: a *simple* hwconfig infrastructure. If you need more capabilities, then we should just use existing code: use a device tree. OK, then you have to provide the information in a separate flash sector instead of the environment, but in the long run this is the way to go anyway - if you do it right you will need just a single copy of the device tree for both U-Boot and Linux. So if you need something small and *simple* now, then use hwconfig, but without all theoretically possible bells and whistles; if you need the full-blown thing, trhen use a device tree. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I've seen it. It's rubbish." - Marvin the Paranoid Android