summaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79/clock.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2016-05-11 00:50:03 +0200
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 15:30:25 +0200
commit8f4703aa4df758def78e9a39cc5d1ff73c3ef51f (patch)
treeaa0b9a748a012065c48978b482dc9abdff1734df /arch/mips/ath79/clock.c
parentb47208091291ea2990b69eb59c72d04c7161303e (diff)
downloadop-kernel-dev-8f4703aa4df758def78e9a39cc5d1ff73c3ef51f.zip
op-kernel-dev-8f4703aa4df758def78e9a39cc5d1ff73c3ef51f.tar.gz
MIPS: Octeon: detect and fix byte swapped initramfs
Octeon machines support running in little endian mode. U-Boot usually runs in big endian-mode. Therefore the initramfs is loaded in big endian mode, and the kernel later tries to access it in little endian mode. This patch fixes that by detecting byte swapped initramfs using either the CPIO header or the header from standard compression methods, and byte swaps it if needed. It first checks that the header doesn't match in the native endianness to avoid false detections. It uses the kernel decompress library so that we don't have to maintain the list of magics if some decompression methods are added to the kernel. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13219/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79/clock.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud