Skip to content

Commit 5011a7e

Browse files
AlbanBedelralfbaechle
authored andcommitted
MIPS: ath79: Fix the DDR control initialization on ar71xx and ar934x
The DDR control initialization needs to know the SoC type, however ath79_detect_sys_type() was called after ath79_ddr_ctrl_init(). Reverse the order to fix the DDR control initialization on ar71xx and ar934x. Signed-off-by: Alban Bedel <[email protected]> Cc: Felix Fietkau <[email protected]> Cc: Qais Yousef <[email protected]> Cc: Andrew Bresticker <[email protected]> CC: [email protected] # v4.2+ Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11500/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 95486e4 commit 5011a7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/ath79/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ void __init plat_mem_setup(void)
216216
AR71XX_RESET_SIZE);
217217
ath79_pll_base = ioremap_nocache(AR71XX_PLL_BASE,
218218
AR71XX_PLL_SIZE);
219+
ath79_detect_sys_type();
219220
ath79_ddr_ctrl_init();
220221

221-
ath79_detect_sys_type();
222222
if (mips_machtype != ATH79_MACH_GENERIC_OF)
223223
detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
224224

0 commit comments

Comments
 (0)