]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: bcm283x: Allocate all mailbox buffers cacheline aligned
authorAlexander Stein <alexanders83@web.de>
Fri, 24 Jul 2015 07:22:12 +0000 (09:22 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:25:46 +0000 (08:25 +0200)
The mailbox buffer is required to be at least 16 bytes aligned, but for
cache invalidation and/or flush it needs to be cacheline aligned.
Use ALLOC_CACHE_ALIGN_BUFFER for all mailbox buffer allocations.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
board/raspberrypi/rpi/rpi.c
drivers/video/bcm2835.c

index 96fe87064533cd7797593f0001fe27cf578058e7..d21750e2a0434d262a139681f805adc511abe847 100644 (file)
@@ -182,7 +182,7 @@ u32 rpi_board_rev = 0;
 
 int dram_init(void)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_get_arm_mem, msg, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_arm_mem, msg, 1);
        int ret;
 
        BCM2835_MBOX_INIT_HDR(msg);
@@ -212,7 +212,7 @@ static void set_fdtfile(void)
 
 static void set_usbethaddr(void)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1);
        int ret;
 
        if (!models[rpi_board_rev].has_onboard_eth)
@@ -245,7 +245,7 @@ int misc_init_r(void)
 
 static int power_on_module(u32 module)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1);
        int ret;
 
        BCM2835_MBOX_INIT_HDR(msg_pwr);
@@ -269,7 +269,7 @@ static int power_on_module(u32 module)
 
 static void get_board_rev(void)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_get_board_rev, msg, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_board_rev, msg, 1);
        int ret;
        const char *name;
 
@@ -324,7 +324,7 @@ int board_init(void)
 
 int board_mmc_init(bd_t *bis)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
        int ret;
 
        power_on_module(BCM2835_MBOX_POWER_DEVID_SDHCI);
index 1f18231ac69ddc3c698720b90dbd389a615f43dc..61d054dd8923d7423df19aa5ee13366c6e084d32 100644 (file)
@@ -38,8 +38,8 @@ struct msg_setup {
 
 void lcd_ctrl_init(void *lcdbase)
 {
-       ALLOC_ALIGN_BUFFER(struct msg_query, msg_query, 1, 16);
-       ALLOC_ALIGN_BUFFER(struct msg_setup, msg_setup, 1, 16);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_query, msg_query, 1);
+       ALLOC_CACHE_ALIGN_BUFFER(struct msg_setup, msg_setup, 1);
        int ret;
        u32 w, h;