ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL
ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL

Certain platforms (i.e. Exynos) might need to set .write_sec callback
from firmware initialization which is happenning in .init_early callback
of machine descriptor. However current code will overwrite the pointer
with whatever is present in machine descriptor, even though it can be
already set earlier. This patch fixes this by making the assignment
conditional, depending on whether current .write_sec callback is NULL.

Signed-off-by: Tomasz Figa <c4885e520559c7b5b4fe1e9e188b924d2debd35e@samsung.com>
Signed-off-by: Marek Szyprowski <2a0259761cc3e88db42be5300c1579a67c77e65e@samsung.com>
Tested-by: Nishanth Menon <50c3c575ce2bb12c45e20736ce59e86fe81915b4@ti.com>
Acked-by: Nishanth Menon <50c3c575ce2bb12c45e20736ce59e86fe81915b4@ti.com>
Acked-by: Tony Lindgren <1001e8702733cced254345e193c88aaa47a4f5de@atomide.com>
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs