ARM: bcm283x: Move BCM283x_BASE to a global variable
[oweals/u-boot.git] / arch / arm / mach-bcm283x / include / mach / sdhci.h
index 64e582c114f5401d59b7b2f3efdcecbc008f4466..7323690687057a0c4715bc498273e39c54ddf358 100644 (file)
@@ -1,17 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) Copyright 2012,2015 Stephen Warren
- *
- * SPDX-License-Identifier:    GPL-2.0
  */
 
 #ifndef _BCM2835_SDHCI_H_
 #define _BCM2835_SDHCI_H_
 
-#ifndef CONFIG_BCM2835
-#define BCM2835_SDHCI_BASE 0x3f300000
-#else
-#define BCM2835_SDHCI_BASE 0x20300000
-#endif
+#include <asm/arch/base.h>
+
+#define BCM2835_SDHCI_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \
+                                 rpi_bcm283x_base + 0x00300000; })
 
 int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq);