uboot-lantiq: danube: fix hanging lzma kernel uncompression
authorMathias Kresin <dev@kresin.me>
Fri, 5 Nov 2021 09:41:26 +0000 (10:41 +0100)
committerMathias Kresin <dev@kresin.me>
Sun, 14 Nov 2021 19:24:45 +0000 (20:24 +0100)
commitc744798cad6a13436f2ba9dd3a280cb16d315c85
tree480da6d1d0e9b87385f40e2582c8f43a2f8fd6ab
parent4b0f87729c2e3c0571663e6f882fe726fef99f74
uboot-lantiq: danube: fix hanging lzma kernel uncompression

At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the
assembly of LzmaProps_Decode. While the decission made by the compiler
looks perfect fine, it triggers some obscure hang on lantiq danube-s
v1.5 with MX29LV640EB NOR flash chips.

Only if the offset 1 is used, the hang can be observed. Using any other
offset works fine:

  lwl s0,0(a1) - s0 == 0x6d000080
  lwl s0,1(a1) - hangs
  lwl s0,2(a1) - s0 == 0x0080xxxx
  lwl s0,3(a1) - s0 == 0x80xxxxxx

It isn't clear whether it is a limitation of the flash chip, the EBU or
something else.

Force 8bit reads to prevent gcc optimizing the read with lwr/lwl
instructions.

Signed-off-by: Mathias Kresin <dev@kresin.me>
package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch [new file with mode: 0644]