diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/cpu/arm1176/tnetv107x/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/exynos/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/mx6/ddr.c | 40 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-kirkwood/spi.h | 8 |
5 files changed, 31 insertions, 25 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 106aed985f..3efede2c55 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -462,6 +462,7 @@ config ZYNQ config TEGRA bool "NVIDIA Tegra" select SPL + select OF_CONTROL if !SPL_BUILD config TARGET_VEXPRESS_AEMV8A bool "Support vexpress_aemv8a" diff --git a/arch/arm/cpu/arm1176/tnetv107x/clock.c b/arch/arm/cpu/arm1176/tnetv107x/clock.c index 3708b6f59f..47c23bb268 100644 --- a/arch/arm/cpu/arm1176/tnetv107x/clock.c +++ b/arch/arm/cpu/arm1176/tnetv107x/clock.c @@ -362,7 +362,7 @@ static void init_pll(const struct pll_init_data *data) pllctl_reg_write(data->pll, ctl, tmp); mult = data->pll_freq / fpll; - for (mult = MAX(mult, 1); mult <= MAX_MULT; mult++) { + for (mult = max(mult, 1); mult <= MAX_MULT; mult++) { div = (fpll * mult) / data->pll_freq; if (div < 1 || div > MAX_DIV) continue; diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index d132f03514..e7c93d8c1f 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -23,18 +23,23 @@ config TARGET_ODROID config TARGET_ARNDALE bool "Exynos5250 Arndale board" + select OF_CONTROL if !SPL_BUILD config TARGET_SMDK5250 bool "SMDK5250 board" + select OF_CONTROL if !SPL_BUILD config TARGET_SNOW bool "Snow board" + select OF_CONTROL if !SPL_BUILD config TARGET_SMDK5420 bool "SMDK5420 board" + select OF_CONTROL if !SPL_BUILD config TARGET_PEACH_PIT bool "Peach Pi board" + select OF_CONTROL if !SPL_BUILD endchoice diff --git a/arch/arm/cpu/armv7/mx6/ddr.c b/arch/arm/cpu/armv7/mx6/ddr.c index 7b5c1e4dd7..7a9b03a68f 100644 --- a/arch/arm/cpu/armv7/mx6/ddr.c +++ b/arch/arm/cpu/armv7/mx6/ddr.c @@ -247,47 +247,47 @@ void mx6_dram_cfg(const struct mx6_ddr_sysinfo *sysinfo, switch (ddr3_cfg->mem_speed) { case 800: - txp = DIV_ROUND_UP(MAX(3 * clkper, 7500), clkper) - 1; - tcke = DIV_ROUND_UP(MAX(3 * clkper, 7500), clkper) - 1; + txp = DIV_ROUND_UP(max(3 * clkper, 7500), clkper) - 1; + tcke = DIV_ROUND_UP(max(3 * clkper, 7500), clkper) - 1; if (ddr3_cfg->pagesz == 1) { tfaw = DIV_ROUND_UP(40000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 10000), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 10000), clkper) - 1; } else { tfaw = DIV_ROUND_UP(50000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 10000), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 10000), clkper) - 1; } break; case 1066: - txp = DIV_ROUND_UP(MAX(3 * clkper, 7500), clkper) - 1; - tcke = DIV_ROUND_UP(MAX(3 * clkper, 5625), clkper) - 1; + txp = DIV_ROUND_UP(max(3 * clkper, 7500), clkper) - 1; + tcke = DIV_ROUND_UP(max(3 * clkper, 5625), clkper) - 1; if (ddr3_cfg->pagesz == 1) { tfaw = DIV_ROUND_UP(37500, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 7500), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 7500), clkper) - 1; } else { tfaw = DIV_ROUND_UP(50000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 10000), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 10000), clkper) - 1; } break; case 1333: - txp = DIV_ROUND_UP(MAX(3 * clkper, 6000), clkper) - 1; - tcke = DIV_ROUND_UP(MAX(3 * clkper, 5625), clkper) - 1; + txp = DIV_ROUND_UP(max(3 * clkper, 6000), clkper) - 1; + tcke = DIV_ROUND_UP(max(3 * clkper, 5625), clkper) - 1; if (ddr3_cfg->pagesz == 1) { tfaw = DIV_ROUND_UP(30000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 6000), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 6000), clkper) - 1; } else { tfaw = DIV_ROUND_UP(45000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 7500), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 7500), clkper) - 1; } break; case 1600: - txp = DIV_ROUND_UP(MAX(3 * clkper, 6000), clkper) - 1; - tcke = DIV_ROUND_UP(MAX(3 * clkper, 5000), clkper) - 1; + txp = DIV_ROUND_UP(max(3 * clkper, 6000), clkper) - 1; + tcke = DIV_ROUND_UP(max(3 * clkper, 5000), clkper) - 1; if (ddr3_cfg->pagesz == 1) { tfaw = DIV_ROUND_UP(30000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 6000), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 6000), clkper) - 1; } else { tfaw = DIV_ROUND_UP(40000, clkper) - 1; - trrd = DIV_ROUND_UP(MAX(4 * clkper, 7500), clkper) - 1; + trrd = DIV_ROUND_UP(max(4 * clkper, 7500), clkper) - 1; } break; default: @@ -295,18 +295,18 @@ void mx6_dram_cfg(const struct mx6_ddr_sysinfo *sysinfo, hang(); break; } - txpdll = DIV_ROUND_UP(MAX(10 * clkper, 24000), clkper) - 1; - tcksre = DIV_ROUND_UP(MAX(5 * clkper, 10000), clkper); + txpdll = DIV_ROUND_UP(max(10 * clkper, 24000), clkper) - 1; + tcksre = DIV_ROUND_UP(max(5 * clkper, 10000), clkper); taonpd = DIV_ROUND_UP(2000, clkper) - 1; tcksrx = tcksre; taofpd = taonpd; twr = DIV_ROUND_UP(15000, clkper) - 1; - tmrd = DIV_ROUND_UP(MAX(12 * clkper, 15000), clkper) - 1; + tmrd = DIV_ROUND_UP(max(12 * clkper, 15000), clkper) - 1; trc = DIV_ROUND_UP(ddr3_cfg->trcmin, clkper / 10) - 1; tras = DIV_ROUND_UP(ddr3_cfg->trasmin, clkper / 10) - 1; tcl = DIV_ROUND_UP(ddr3_cfg->trcd, clkper / 10) - 3; trp = DIV_ROUND_UP(ddr3_cfg->trcd, clkper / 10) - 1; - twtr = ROUND(MAX(4 * clkper, 7500) / clkper, 1) - 1; + twtr = ROUND(max(4 * clkper, 7500) / clkper, 1) - 1; trcd = trp; trtp = twtr; cs0_end = 4 * sysinfo->cs_density - 1; diff --git a/arch/arm/include/asm/arch-kirkwood/spi.h b/arch/arm/include/asm/arch-kirkwood/spi.h index b1cf614ca9..e512dcec16 100644 --- a/arch/arm/include/asm/arch-kirkwood/spi.h +++ b/arch/arm/include/asm/arch-kirkwood/spi.h @@ -43,10 +43,10 @@ struct kwspi_registers { #define KWSPI_XFERLEN_2BYTE (1 << 5) #define KWSPI_XFERLEN_MASK (1 << 5) #define KWSPI_ADRLEN_1BYTE 0 -#define KWSPI_ADRLEN_2BYTE 1 << 8 -#define KWSPI_ADRLEN_3BYTE 2 << 8 -#define KWSPI_ADRLEN_4BYTE 3 << 8 -#define KWSPI_ADRLEN_MASK 3 << 8 +#define KWSPI_ADRLEN_2BYTE (1 << 8) +#define KWSPI_ADRLEN_3BYTE (2 << 8) +#define KWSPI_ADRLEN_4BYTE (3 << 8) +#define KWSPI_ADRLEN_MASK (3 << 8) #define KWSPI_TIMEOUT 10000 #endif /* __KW_SPI_H__ */ |