bcm53xx: switch back to standalone ASM entry flushing cache
authorRafał Miłecki <rafal@milecki.pl>
Fri, 22 Jul 2016 15:26:33 +0000 (17:26 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 19 Aug 2016 09:38:44 +0000 (11:38 +0200)
commit5e885c09c625c22d2995d477ef6cc8ee7595a817
treec8efeb4bfa4ab69745d6b21c9357fe01de9a4719
parentd22ae5e888f4905ba843670181587bf201e1b14d
bcm53xx: switch back to standalone ASM entry flushing cache

Over a year ago in a commit ac96a1665ac7 ("bcm53xx: update Disable MMU
and Dcache during decompression") we switched to Florian's patch for
workarounding CFE bug. The main difference was using a part of existing
__armv7_mmu_cache_flush instead of implementing flushing separately.

This worked well for Northstar devices but doesn't work for BCM53573 as
these devices simply don't start booting with Florian's patch. It's
because of the ldmfd ASM instruction in the __armv7_mmu_cache_flush.

So this commit switches back to using standalone implementation. This
time instead of copying Broadcom's copy of cache-v7.S, we just make a
copy of the original file on our own. Unfortunately we can't cross-dir
compile cache-v7.S from ../../mm/ as that one also adds __INITDATA with
define_cache_functions v7 which would just trigger
> Error: unrecognized/unsupported machine ID (r1 = 0x0000007f).

The only real change Broadcom did in copied .S file was modifying mcr
instruction to use c6 instead of c14. It isn't clear to me if we really
need it, but let's use it for now.

By the way we also update commit message of the
[PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression

This makes kernel booting on BCM53573 successfully.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm53xx/files/arch/arm/boot/compressed/cache-v7-min.S [new file with mode: 0644]
target/linux/bcm53xx/patches-4.4/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-4.4/300-ARM-BCM5301X-Disable-MMU-and-Dcache-for-decompression.patch [deleted file]