OMAP3: X-Loader: Make MMC register macros volatile
authorDirk Behme <dirk.behme@googlemail.com>
Sat, 20 Dec 2008 19:35:12 +0000 (11:35 -0800)
committerSteve Sakoman <steve@sakoman.com>
Sat, 20 Dec 2008 19:35:12 +0000 (11:35 -0800)
As discussed in

http://groups.google.com/group/beagleboard/browse_thread/thread/14988091de9c80cf

make register macros volatile to avoid reordering by compiler.

Remove macro defined twice.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
include/asm/arch-omap3/mmc_host_def.h

index 37aaa08..408d1e2 100644 (file)
 /*
  * OMAP HSMMC register definitions
  */
-#define OMAP_HSMMC_SYSCONFIG           (*(unsigned int *) 0x4809C010)
-#define OMAP_HSMMC_SYSSTATUS           (*(unsigned int *) 0x4809C014)
-#define OMAP_HSMMC_CON                 (*(unsigned int *) 0x4809C02C)
-#define OMAP_HSMMC_BLK                 (*(unsigned int *) 0x4809C104)
-#define OMAP_HSMMC_ARG                 (*(unsigned int *) 0x4809C108)
-#define OMAP_HSMMC_CMD                 (*(unsigned int *) 0x4809C10C)
-#define OMAP_HSMMC_RSP10               (*(unsigned int *) 0x4809C110)
-#define OMAP_HSMMC_RSP32               (*(unsigned int *) 0x4809C114)
-#define OMAP_HSMMC_RSP54               (*(unsigned int *) 0x4809C118)
-#define OMAP_HSMMC_RSP76               (*(unsigned int *) 0x4809C11C)
-#define OMAP_HSMMC_DATA                        (*(unsigned int *) 0x4809C120)
-#define OMAP_HSMMC_PSTATE              (*(unsigned int *) 0x4809C124)
-#define OMAP_HSMMC_HCTL                        (*(unsigned int *) 0x4809C128)
-#define OMAP_HSMMC_SYSCTL              (*(unsigned int *) 0x4809C12C)
-#define OMAP_HSMMC_STAT                        (*(unsigned int *) 0x4809C130)
-#define OMAP_HSMMC_IE                  (*(unsigned int *) 0x4809C134)
-#define OMAP_HSMMC_CAPA                        (*(unsigned int *) 0x4809C140)
+#define OMAP_HSMMC_SYSCONFIG   (*(volatile unsigned int *) 0x4809C010)
+#define OMAP_HSMMC_SYSSTATUS   (*(volatile unsigned int *) 0x4809C014)
+#define OMAP_HSMMC_CON         (*(volatile unsigned int *) 0x4809C02C)
+#define OMAP_HSMMC_BLK         (*(volatile unsigned int *) 0x4809C104)
+#define OMAP_HSMMC_ARG         (*(volatile unsigned int *) 0x4809C108)
+#define OMAP_HSMMC_CMD         (*(volatile unsigned int *) 0x4809C10C)
+#define OMAP_HSMMC_RSP10       (*(volatile unsigned int *) 0x4809C110)
+#define OMAP_HSMMC_RSP32       (*(volatile unsigned int *) 0x4809C114)
+#define OMAP_HSMMC_RSP54       (*(volatile unsigned int *) 0x4809C118)
+#define OMAP_HSMMC_RSP76       (*(volatile unsigned int *) 0x4809C11C)
+#define OMAP_HSMMC_DATA                (*(volatile unsigned int *) 0x4809C120)
+#define OMAP_HSMMC_PSTATE      (*(volatile unsigned int *) 0x4809C124)
+#define OMAP_HSMMC_HCTL                (*(volatile unsigned int *) 0x4809C128)
+#define OMAP_HSMMC_SYSCTL      (*(volatile unsigned int *) 0x4809C12C)
+#define OMAP_HSMMC_STAT                (*(volatile unsigned int *) 0x4809C130)
+#define OMAP_HSMMC_IE          (*(volatile unsigned int *) 0x4809C134)
+#define OMAP_HSMMC_CAPA                (*(volatile unsigned int *) 0x4809C140)
 
 /* T2 Register definitions */
-#define CONTROL_DEV_CONF0              (*(unsigned int *) 0x48002274)
-#define CONTROL_PBIAS_LITE             (*(unsigned int *) 0x48002520)
+#define CONTROL_DEV_CONF0      (*(volatile unsigned int *) 0x48002274)
+#define CONTROL_PBIAS_LITE     (*(volatile unsigned int *) 0x48002520)
 
 /*
  * OMAP HS MMC Bit definitions
@@ -158,8 +158,6 @@ typedef struct {
        unsigned int RCA;
 } mmc_card_data;
 
-#define mmc_reg_out(addr, mask, val)\
-       (addr) = (((addr)) & (~(mask))) | ((val) & (mask));
 #define mmc_reg_out(addr, mask, val)\
        (addr) = (((addr)) & (~(mask))) | ((val) & (mask));