openwrt / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
19.6k stars 10.24k forks source link

OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions #10950

Closed Matthaiks closed 1 year ago

Matthaiks commented 1 year ago

After upgrading my Totolink X5000R from 22.03.0 to 22.03.1, I'm getting this kernel error on bootup:

Thu Oct 13 16:44:37 2022 kern.notice kernel: [    0.657173] 4 fixed-partitions partitions found on MTD device spi0.0
Thu Oct 13 16:44:37 2022 kern.err kernel: [    0.663573] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Thu Oct 13 16:44:37 2022 kern.err kernel: [    0.670873] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Thu Oct 13 16:44:37 2022 kern.err kernel: [    0.679062] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Thu Oct 13 16:44:37 2022 kern.err kernel: [    0.686407] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
Thu Oct 13 16:44:37 2022 kern.notice kernel: [    0.693986] Creating 4 MTD partitions on "spi0.0":

I guess this might be due to the kernel changes in 22.03.1:

Backport mtd dynamic partition patch
Fix possible mtd NULL pointer dereference

The router seems working fine. Is this error something to worry about?

roqueeee commented 1 year ago

Chiming in to report similar kernel errors for TP-Link EAP245 v3:

...
Thu Oct 13 16:47:40 2022 kern.notice kernel: [    0.383354] 10 fixed-partitions partitions found on MTD device spi0.0
Thu Oct 13 16:47:40 2022 kern.err kernel: [    0.390069] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
Thu Oct 13 16:47:40 2022 kern.err kernel: [    0.396918] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
Thu Oct 13 16:47:40 2022 kern.err kernel: [    0.404409] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
Thu Oct 13 16:47:40 2022 kern.err kernel: [    0.411330] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
Thu Oct 13 16:47:40 2022 kern.notice kernel: [    0.418407] Creating 10 MTD partitions on "spi0.0":
...

It appears this issue is already being discussed in #10232.

My device seems to be working fine as well. Some clarification would be nice though.

neheb commented 1 year ago

ping @Ansuel

john-tho commented 1 year ago

OF: Bad cell count for/partitions Should be harmless. See this mail on the device tree list for an explanation: https://lore.kernel.org/all/2fff1d95-c257-2756-ff63-5efe7b3c528c@gmail.com/

rmilecki commented 1 year ago

It's a harmless error as explained in the of_platform_populate() for address-less nodes (OF: Bad cell count for ...) e-mail thread discussion.

namiltd commented 4 months ago

Or maybe it was worth adding:

#address-cells = <1>;
#size-cells = <1>;

for subsequent dts(i) files containing spi nor flash definition (flash@)? For some routers this is already set and works, it turns off this unnecessary message.

raenye commented 3 months ago

See also e74219c795a03e8b9adccbb5e6a20d4566872f8a.

neheb commented 3 months ago
this is not always necessary for some nodes
in devicetree that are undergoing address translation.

so there's a different way to silence this?