powerpc/85xx: Don't report SRAM to L2 cache fallback as error
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Thu, 7 Jul 2016 12:49:02 +0000 (15:49 +0300)
committerScott Wood <oss@buserror.net>
Sat, 9 Jul 2016 00:55:34 +0000 (19:55 -0500)
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>
arch/powerpc/sysdev/fsl_85xx_l2ctlr.c

index 861cebf9c292a4885d67218d0aa58876f1cf348e..c27058e5df266733199e1f12ee2b71a827e053eb 100644 (file)
@@ -90,12 +90,8 @@ static int mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
        }
        l2cache_size = *prop;
 
-       if (get_cache_sram_params(&sram_params)) {
-               dev_err(&dev->dev,
-                       "Entire L2 as cache, provide valid sram offset and size\n");
-               return -EINVAL;
-       }
-
+       if (get_cache_sram_params(&sram_params))
+               return 0; /* fall back to L2 cache only */
 
        rem = l2cache_size % sram_params.sram_size;
        ways = LOCK_WAYS_FULL * sram_params.sram_size / l2cache_size;