From patchwork Fri Dec 25 13:41:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 561018 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B89C3140C66 for ; Sat, 26 Dec 2015 00:40:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7B434BB1F; Fri, 25 Dec 2015 14:40:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lu742F9R0Wth; Fri, 25 Dec 2015 14:40:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C0EC4BAFC; Fri, 25 Dec 2015 14:40:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4AFE34BAFC for ; Fri, 25 Dec 2015 14:40:10 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0xrl8oDzxFSa for ; Fri, 25 Dec 2015 14:40:10 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.nwl.cc (orbyte.nwl.cc [151.80.46.58]) by theia.denx.de (Postfix) with ESMTPS id 120714BAC3 for ; Fri, 25 Dec 2015 14:40:08 +0100 (CET) Received: from mail.nwl.cc (orbyte.nwl.cc [127.0.0.1]) by mail.nwl.cc (Postfix) with ESMTP id 1E6C661224; Fri, 25 Dec 2015 14:40:08 +0100 (CET) Received: from base (localhost [IPv6:::1]) by mail.nwl.cc (Postfix) with ESMTP id EED946121B; Fri, 25 Dec 2015 14:40:07 +0100 (CET) From: Phil Sutter To: u-boot@lists.denx.de Date: Fri, 25 Dec 2015 14:41:24 +0100 X-Mailer: git-send-email 2.5.3 In-Reply-To: <1451050886-20124-1-git-send-email-phil@nwl.cc> References: <1451050886-20124-1-git-send-email-phil@nwl.cc> Message-Id: <20151225134007.EED946121B@mail.nwl.cc> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Dennis Gilmore , Stefan Roese , Luka Perkov Subject: [U-Boot] [PATCH v3 08/10] mvebu: Add rudimental MV78230 support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This adds basic support for Marvell's MV78230 SoC which belongs to the Armada XP series. Signed-off-by: Phil Sutter Reviewed-by: Tom Rini --- arch/arm/mach-mvebu/cpu.c | 16 +++++++++++----- arch/arm/mach-mvebu/include/mach/soc.h | 1 + arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c | 6 +++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 6ea558c..5c62fd5 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -49,13 +49,16 @@ int mvebu_soc_family(void) { u16 devid = (readl(MVEBU_REG_PCIE_DEVID) >> 16) & 0xffff; - if ((devid == SOC_MV78260_ID) || (devid == SOC_MV78460_ID)) + switch (devid) { + case SOC_MV78230_ID: + case SOC_MV78260_ID: + case SOC_MV78460_ID: return MVEBU_SOC_AXP; - - if (devid == SOC_88F6810_ID || devid == SOC_88F6820_ID || - devid == SOC_88F6828_ID) + case SOC_88F6810_ID: + case SOC_88F6820_ID: + case SOC_88F6828_ID: return MVEBU_SOC_A38X; - + } return MVEBU_SOC_UNKNOWN; } @@ -153,6 +156,9 @@ int print_cpuinfo(void) puts("SoC: "); switch (devid) { + case SOC_MV78230_ID: + puts("MV78230-"); + break; case SOC_MV78260_ID: puts("MV78260-"); break; diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h index 9eaf0db..6b12a92 100644 --- a/arch/arm/mach-mvebu/include/mach/soc.h +++ b/arch/arm/mach-mvebu/include/mach/soc.h @@ -11,6 +11,7 @@ #ifndef _MVEBU_SOC_H #define _MVEBU_SOC_H +#define SOC_MV78230_ID 0x7823 #define SOC_MV78260_ID 0x7826 #define SOC_MV78460_ID 0x7846 #define SOC_88F6810_ID 0x6810 diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c index 633b899..afc0cef 100644 --- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c +++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c @@ -199,7 +199,9 @@ u16 ctrl_model_get(void) * SoC version can't be autodetected. So we need to rely on a define * from the config system here. */ -#ifdef CONFIG_MV78260 +#if defined(CONFIG_MV78230) + return MV_78230_DEV_ID; +#elif defined(CONFIG_MV78260) return MV_78260_DEV_ID; #else return MV_78460_DEV_ID; @@ -217,6 +219,8 @@ u32 get_line_cfg(u32 line_num, MV_BIN_SERDES_CFG *info) static int serdes_max_lines_get(void) { switch (ctrl_model_get()) { + case MV_78230_DEV_ID: + return 7; case MV_78260_DEV_ID: return 12; case MV_78460_DEV_ID: