Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/85xx: Don't report SRAM to L2 cache fallback as error

If the SRAM region parameters are missing the SRAM driver
probing exits and the L2 region is configured as L2 cache
entirely. This is the expected default behaviour, so it
makes no sense to report it as an error.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Scott Wood <oss@buserror.net>

authored by

Claudiu Manoil and committed by
Scott Wood
8ebf506a 63a72284

+2 -6
+2 -6
arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
··· 90 90 } 91 91 l2cache_size = *prop; 92 92 93 - if (get_cache_sram_params(&sram_params)) { 94 - dev_err(&dev->dev, 95 - "Entire L2 as cache, provide valid sram offset and size\n"); 96 - return -EINVAL; 97 - } 98 - 93 + if (get_cache_sram_params(&sram_params)) 94 + return 0; /* fall back to L2 cache only */ 99 95 100 96 rem = l2cache_size % sram_params.sram_size; 101 97 ways = LOCK_WAYS_FULL * sram_params.sram_size / l2cache_size;