Re: Reach out "dirty" state value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 25, 2017 at 09:08:25AM +0300, Çağlar Kilimci wrote:
> Hi Sascha,
> 
> 2017-04-25 8:51 GMT+03:00 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>:
> > Hi Çağlar,
> >
> > On Mon, Apr 24, 2017 at 11:20:47AM +0300, Çağlar Kilimci wrote:
> >> Hi all,
> >>
> >> I would like to use state framework and now I can read variables from
> >> both barebox and regular kernel space. In addition, if I can change
> >> from barebox, I can successfully read the changes from kernel space
> >> but if I change from kernel space, I could not reach out the new value
> >> from barebox. The dirty variable is set and I can see the new value
> >> from eeprom (where I store the values) but I guess there would be
> >> better way to reach out the "dirty" values. So, how can I read last
> >> value for that state variable?
> >
> > If you get outdated variables in barebox that's a bug. You are on latest
> > master, right? Do you have stridesize specified in the devicetree?
> 
> Yes, I am on the latest master. And yes, I have specified stridsize.
> Here is my of_dump of my state device:
> 
> barebox@Phytec phyCORE AM335x:/ of_dump /state
> state {
>         magic = <0x4aaef393>;
>         compatible = "barebox,state";
>         backend-type = "raw";
>         backend = <0x3f>;
>         backend-storage-type = "direct";
>         backend-stridesize = <0x10>;

The stridesize is too small. It must be at least the size of one state
instance storage space which is the size of your data (0x20) and the
size of the header (0xc), so total 0x2c. However, I recommend a bigger
value, maybe 0x40 or 0x80.
There should be an error message when the stridesize is too small.

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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux