/*
* Now check the SAR register for the strapped boot-device
*/
- val = readl(CONFIG_SAR_REG); /* SAR - Sample At Reset */
+ val = readl(CFG_SAR_REG); /* SAR - Sample At Reset */
boot_device = (val & BOOT_DEV_SEL_MASK) >> BOOT_DEV_SEL_OFFS;
debug("SAR_REG=0x%08x boot_device=0x%x\n", val, boot_device);
switch (boot_device) {
#if defined(CONFIG_ARMADA_375) || defined(CONFIG_ARMADA_MSYS)
val = readl(CFG_SAR2_REG); /* SAR - Sample At Reset */
#else
- val = readl(CONFIG_SAR_REG); /* SAR - Sample At Reset */
+ val = readl(CFG_SAR_REG); /* SAR - Sample At Reset */
#endif
freq = (val & SAR_CPU_FREQ_MASK) >> SAR_CPU_FREQ_OFFS;
#if defined(SAR2_CPU_FREQ_MASK)
#if defined(CONFIG_ARMADA_375)
/* SAR values for Armada 375 */
-#define CONFIG_SAR_REG (MVEBU_REGISTER(0xe8200))
+#define CFG_SAR_REG (MVEBU_REGISTER(0xe8200))
#define CFG_SAR2_REG (MVEBU_REGISTER(0xe8204))
#define SAR_CPU_FREQ_OFFS 17
#define BOOT_FROM_UART 0x30
#define BOOT_FROM_SPI 0x38
-#define CFG_SYS_TCLK ((readl(CONFIG_SAR_REG) & BIT(20)) ? \
+#define CFG_SYS_TCLK ((readl(CFG_SAR_REG) & BIT(20)) ? \
200000000 : 166000000)
#elif defined(CONFIG_ARMADA_38X)
/* SAR values for Armada 38x */
-#define CONFIG_SAR_REG (MVEBU_REGISTER(0x18600))
+#define CFG_SAR_REG (MVEBU_REGISTER(0x18600))
#define SAR_CPU_FREQ_OFFS 10
#define SAR_CPU_FREQ_MASK (0x1f << SAR_CPU_FREQ_OFFS)
#define BOOT_FROM_MMC 0x30
#define BOOT_FROM_MMC_ALT 0x31
-#define CFG_SYS_TCLK ((readl(CONFIG_SAR_REG) & BIT(15)) ? \
+#define CFG_SYS_TCLK ((readl(CFG_SAR_REG) & BIT(15)) ? \
200000000 : 250000000)
#elif defined(CONFIG_ARMADA_MSYS)
/* SAR values for MSYS */
-#define CONFIG_SAR_REG (MBUS_DFX_BASE + 0xf8200)
+#define CFG_SAR_REG (MBUS_DFX_BASE + 0xf8200)
#define CFG_SAR2_REG (MBUS_DFX_BASE + 0xf8204)
#define SAR_CPU_FREQ_OFFS 18
#define CFG_SYS_TCLK 200000000 /* 200MHz */
#elif defined(CONFIG_ARMADA_XP)
/* SAR values for Armada XP */
-#define CONFIG_SAR_REG (MVEBU_REGISTER(0x18230))
+#define CFG_SAR_REG (MVEBU_REGISTER(0x18230))
#define CFG_SAR2_REG (MVEBU_REGISTER(0x18234))
#define SAR_CPU_FREQ_OFFS 21