Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbbKQImw (ORCPT ); Tue, 17 Nov 2015 03:42:52 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]:58296 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbbKQImu (ORCPT ); Tue, 17 Nov 2015 03:42:50 -0500 From: Alban Bedel To: linux-mips@linux-mips.org Cc: Alban Bedel , stable@vger.kernel.org, Ralf Baechle , Felix Fietkau , Qais Yousef , Andrew Bresticker , linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: ath79: Fix the DDR control initialization on ar71xx and ar934x Date: Tue, 17 Nov 2015 09:40:07 +0100 Message-Id: <1447749659-9073-1-git-send-email-albeu@free.fr> X-Mailer: git-send-email 2.0.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 35 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 CC: stable@vger.kernel.org # v4.2+ --- arch/mips/ath79/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 1ba2120..9a00137 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -216,9 +216,9 @@ void __init plat_mem_setup(void) AR71XX_RESET_SIZE); ath79_pll_base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE); - ath79_ddr_ctrl_init(); - ath79_detect_sys_type(); + ath79_ddr_ctrl_init(); + if (mips_machtype != ATH79_MACH_GENERIC_OF) detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX); -- 2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/