State Framework and dtb

Sascha Hauer s.hauer at pengutronix.de
Tue Apr 4 23:01:30 PDT 2017


On Tue, Apr 04, 2017 at 11:48:09AM +0100, Ian Abbott wrote:
> On 04/04/17 11:27, Çağlar Kilimci wrote:
> > Hey,
> > 
> > 2017-04-04 11:04 GMT+03:00 Jan Remmet <J.Remmet at phytec.de>:
> > > On Mon, Apr 03, 2017 at 11:59:50PM +0300, Çağlar Kilimci wrote:
> > > > Hello,
> > > > 
> > > > 2017-03-31 16:00 GMT+03:00 Sascha Hauer <s.hauer at pengutronix.de>:
> > > > > On Fri, Mar 31, 2017 at 02:41:19PM +0300, Çağlar Kilimci wrote:
> > > > > > Hey,
> > > > > > 
> > > > > > 
> > > > > > I tried but got the same result and then I would like to apply your
> > > > > > serious patch series of the state framework but release that our
> > > > > > working branch is 2016.07 so could not apply patches. Let me update
> > > > > > barebox and apply those patches. Are those based on master branch
> > > > > > right?  Or, which branch do you recommend to work on?
> > > > > 
> > > > > The patches are based on master, yes. Anyway, you seem to have a problem
> > > > > in getting your changes in the dts file to the running barebox. Please
> > > > > try to add some nodes/properties to your dts file and verify that a
> > > > > of_dump shows these nodes. Before that is the case it's not worth to
> > > > > look any further.
> > > > 
> > > > Finally, I updated and patched the code and now I can see state at 0
> > > > device in the of_dump:
> > > >         state at 0 {
> > > >                 magic = <0x27031977>;
> > > >                 compatible = "barebox,state";
> > > >                 backend-type = "raw";
> > > >                 backend = <0x42>;
> > > >                 foo {
> > > >                         reg = <0x0 0x4>;
> > > >                         type = "uint32";
> > > >                         default = <0x0>;
> > > >                 };
> > > >                 bar {
> > > >                         reg = <0x10 0x4>;
> > > >                         type = "enum32";
> > > >                         names = "baz", "qux";
> > > >                         default = <0x1>;
> > > >                 };
> > > >         };
> > > 
> > > Here a working example for barebox 2016.11.0 so there may be changes with the
> > > actual state cleanup patches
> > > 
> > > +       state2: state_socket {
> > > +               magic = <0x456ef363>;
> > > +               compatible = "barebox,state";
> > > +               backend-type = "raw";
> > > +               backend = &eeprom;
> > 
> > I changed to:
> > backend = <&eeprom>;
> > then it works :)
> > barebox at Phytec phyCORE AM335x:/ state
> > registered state instances:
> > state_socket         (backend: raw, path: /dev/eeprom0)
> 
> Won't that use the whole EEPROM rather than a partition thereof? According
> to the documentation, you can use:
> 
> 		backend = <&eeprom>, "partname:state";
> 
> assuming the partition has `label = "state";`.

I removed this from the documentation in the big state patch series I
sent, because it was broken already. It should be backend = <&eeprom> or
backend = <&eeprom_state>, assuming eeprom_state is a phandle to a
fixed-partition on the EEPROM.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list