From patchwork Fri Jan 20 13:03:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 717634 X-Patchwork-Delegate: trini@ti.com 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 3v4grb5xQwz9s3T for ; Sat, 21 Jan 2017 00:03:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 526BB4AA22; Fri, 20 Jan 2017 14:03:58 +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 37aqnk5Bzjiz; Fri, 20 Jan 2017 14:03:57 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B9754A078; Fri, 20 Jan 2017 14:03:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 917814A08A for ; Fri, 20 Jan 2017 14:03:53 +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 Mj0HjFvDOPNM for ; Fri, 20 Jan 2017 14:03:53 +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 cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by theia.denx.de (Postfix) with ESMTP id 636574A078 for ; Fri, 20 Jan 2017 14:03:53 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23993543AbdATNDxJ5tuL (ORCPT ); Fri, 20 Jan 2017 14:03:53 +0100 Date: Fri, 20 Jan 2017 14:03:52 +0100 From: Ladislav Michl To: Adam Ford , albert.u.boot@aribaud.net Message-ID: <20170120130352.d6dp3n7lybcnm6pd@lenoch> References: <1484856251-7442-1-git-send-email-aford173@gmail.com> <20170120103225.bpnlifuf3pzwwrsf@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161126 (1.7.1) Cc: U-Boot Mailing List Subject: [U-Boot] [PATCH v2 2/2] arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Adam Ford The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but anything else is lumped into 36XX/37XX with an assumed 1GHz speed. Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ). This also adds the ability to distinguish between the DM3730, DM3725, AM3715, and AM3703 and correctly display their maximum speed. Signed-off-by: Adam Ford Tested-by: Ladislav Michl --- Changes: - v2: rebase on top of spelling fix add Tested-by line indent header file arch/arm/include/asm/arch-omap3/omap.h | 8 +++++++ arch/arm/mach-omap2/omap3/sys_info.c | 42 ++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/omap.h b/arch/arm/include/asm/arch-omap3/omap.h index 417ff895f1..91d73c2f1d 100644 --- a/arch/arm/include/asm/arch-omap3/omap.h +++ b/arch/arm/include/asm/arch-omap3/omap.h @@ -230,6 +230,14 @@ struct gpio { #define AM3517 0x1c00 #define OMAP3730 0x0c00 +#define OMAP3725 0x4c00 +#define AM3715 0x1c00 +#define AM3703 0x5c00 + +#define OMAP3730_1GHZ 0x0e00 +#define OMAP3725_1GHZ 0x4e00 +#define AM3715_1GHZ 0x1e00 +#define AM3703_1GHZ 0x5e00 /* * ROM code API related flags diff --git a/arch/arm/mach-omap2/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c index 1f8b5ad77c..7e6c2633f9 100644 --- a/arch/arm/mach-omap2/omap3/sys_info.c +++ b/arch/arm/mach-omap2/omap3/sys_info.c @@ -295,16 +295,54 @@ int print_cpuinfo (void) max_clk = "600 MHz"; break; case CPU_OMAP36XX: - cpu_family_s = "OMAP"; switch (get_cpu_type()) { + case AM3703: + cpu_family_s = "AM"; + cpu_s = "3703"; + max_clk = "800 MHz"; + break; + case AM3703_1GHZ: + cpu_family_s = "AM"; + cpu_s = "3703"; + max_clk = "1 GHz"; + break; + case AM3715: + cpu_family_s = "AM"; + cpu_s = "3715"; + max_clk = "800 MHz"; + break; + case AM3715_1GHZ: + cpu_family_s = "AM"; + cpu_s = "3715"; + max_clk = "1 GHz"; + break; + case OMAP3725: + cpu_family_s = "OMAP"; + cpu_s = "3625/3725"; + max_clk = "800 MHz"; + break; + case OMAP3725_1GHZ: + cpu_family_s = "OMAP"; + cpu_s = "3625/3725"; + max_clk = "1 GHz"; + break; case OMAP3730: + cpu_family_s = "OMAP"; cpu_s = "3630/3730"; + max_clk = "800 MHz"; + break; + case OMAP3730_1GHZ: + cpu_family_s = "OMAP"; + cpu_s = "3630/3730"; + max_clk = "1 GHz"; break; default: + cpu_family_s = "OMAP/AM"; cpu_s = "36XX/37XX"; + max_clk = "1 GHz"; break; } - max_clk = "1 GHz"; + break; default: cpu_family_s = "OMAP";