Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 548c6af4 authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Eric Miao
Browse files

[ARM] pxa: enable L2 if present in XSC3



Check whether L2 is present or not in XSC3. If it's present, enable L2
immediately.

Disabling L2 after L2 is enabled that would result in unpredicatable behavior
of XSC3 processor.

Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent dc8601a2
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -407,6 +407,13 @@ __xsc3_setup:


	adr	r5, xsc3_crval
	adr	r5, xsc3_crval
	ldmia	r5, {r5, r6}
	ldmia	r5, {r5, r6}

#ifdef CONFIG_CACHE_XSC3L2
	mrc	p15, 1, r0, c0, c0, 1		@ get L2 present information
	ands	r0, r0, #0xf8
	orrne	r6, r6, #(1 << 26)		@ enable L2 if present
#endif

	mrc	p15, 0, r0, c1, c0, 0		@ get control register
	mrc	p15, 0, r0, c1, c0, 0		@ get control register
	bic	r0, r0, r5			@ ..V. ..R. .... ..A.
	bic	r0, r0, r5			@ ..V. ..R. .... ..A.
	orr	r0, r0, r6			@ ..VI Z..S .... .C.M (mmu)
	orr	r0, r0, r6			@ ..VI Z..S .... .C.M (mmu)