[PATCH 5/7] bcm283x: mbox: align to cachesize

Alexander Aring alex.aring at gmail.com
Sat Dec 19 10:34:02 PST 2015


This patch change the align of mbox stack resource to 32. The reason is
that I had some experience with bcm2836 and the mbox implementation,
after setting the align to 64(on bcm2836) the issues was gone.

I found these values inside the u-boot implementation, they use 32
(bcm2835) and 64 (bcm2836).

Signed-off-by: Alexander Aring <alex.aring at gmail.com>
---
 arch/arm/mach-bcm283x/include/mach/mbox.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index 4c3fd77..09b31f2 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -73,8 +73,10 @@ struct bcm2835_mbox_hdr {
 #define BCM2835_MBOX_REQ_CODE		0
 #define BCM2835_MBOX_RESP_CODE_SUCCESS	0x80000000
 
+#define BCM2835_CACHELINE_SIZE		32
+
 #define BCM2835_MBOX_STACK_ALIGN(type, name) \
-	STACK_ALIGN_ARRAY(type, name, 1, BCM2835_CHAN_MASK + 1)
+	STACK_ALIGN_ARRAY(type, name, 1, BCM2835_CACHELINE_SIZE)
 
 #define BCM2835_MBOX_INIT_HDR(_m_) { \
 		memset((_m_), 0, sizeof(*(_m_))); \
-- 
2.6.1




More information about the barebox mailing list