diff --git a/common/state/backend_storage.c b/common/state/backend_storage.c index efe8bac..c4508a8 100644 --- a/common/state/backend_storage.c +++ b/common/state/backend_storage.c @@ -477,6 +477,7 @@ INIT_LIST_HEAD(&storage->buckets); storage->dev = dev; storage->name = storagetype; + storage->stridesize = stridesize; ret = mtd_get_meminfo(path, &meminfo); if (!ret && !(meminfo.flags & MTD_NO_ERASE)) { diff --git a/common/state/state.c b/common/state/state.c index 9f4553d..3997f81 100644 --- a/common/state/state.c +++ b/common/state/state.c @@ -370,6 +370,13 @@ } } + if (state->backend.storage.stridesize) { + ret = of_property_write_u32(new_node, "backend-stridesize", + state->backend.storage.stridesize); + if (ret) + goto out; + } + /* address-cells + size-cells */ ret = of_property_write_u32(new_node, "#address-cells", 1); if (ret) diff --git a/common/state/state.h b/common/state/state.h index cd54767..7f9651a 100644 --- a/common/state/state.h +++ b/common/state/state.h @@ -72,6 +72,8 @@ const char *name; + uint32_t stridesize; + bool readonly; };