[PATCH 63/75] ARM: l2c: zynq: remove cache size override

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Apr 3 12:11:21 PDT 2014

On Wed, Apr 02, 2014 at 10:08:13AM +0200, Michal Simek wrote:
> Reset values are correctly setup by bootrom to 0x02060000
> That's why we can even use full mask.
> For current mainline code just like this
> 	l2x0_of_init(0x00000000, 0xffffffff);
> and we will submit the code which change this to
> 	l2x0_of_init(0x00400000, 0xffffffff);

If you wish to do that, please use 0xffbfffff as the mask, otherwise
some of the checks will fire (about possibly corrupted values.)

Fields you wish to set to a value must have clear bits in the mask.
This is to stop things like:

	l2x0_of_init(0x...246, 0x...fff)

which if the LSBs of the register are already set to a different value,
ends up doing this:

	new_reg = (old_reg & mask) | val

and hence ends up ORing the specified value with the existing value in
the register.  Hence, (val & mask) must be zero.

I'd rather not force bit 22 on for everyone - this problem /should/ no
longer be present with CMA since the memory is remapped in place rather
than having a second mapping setup.

FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

More information about the linux-arm-kernel mailing list