From patchwork Mon Mar 4 11:27:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Jackson X-Patchwork-Id: 224691 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 2100F2C0311 for ; Mon, 4 Mar 2013 22:27:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA80A4A033; Mon, 4 Mar 2013 12:27:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 886ZVKpL0ZJ2; Mon, 4 Mar 2013 12:27:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7099F4A028; Mon, 4 Mar 2013 12:27:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB7CD4A028 for ; Mon, 4 Mar 2013 12:27:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 nqw4to-WgH3E for ; Mon, 4 Mar 2013 12:27:22 +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 centos1.newflow.co.uk (mercuryimc.plus.com [80.229.200.144]) by theia.denx.de (Postfix) with ESMTP id 1D4E64A027 for ; Mon, 4 Mar 2013 12:27:20 +0100 (CET) Received: from [10.0.0.103] (unknown [10.0.0.103]) by centos1.newflow.co.uk (Postfix) with ESMTP id 1292926B803D for ; Mon, 4 Mar 2013 11:27:20 +0000 (GMT) Message-ID: <51348518.2020901@mimc.co.uk> Date: Mon, 04 Mar 2013 11:27:20 +0000 From: Mark Jackson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v4] Allow AM335x MPU core clock speed to be specified in the board config file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Allow AM335x MPU core clock speed to be specified in the board config file. To use, add the following to the board's config file:- #define CONFIG_SYS_MPUCLK Signed-off-by: Mark Jackson Acked-by: Peter Korsgaard --- Changes in v4: - Now defined as MHz (not Hz) Changes in v3: - Changed from V_MPUCLK to CONFIG_SYS_MPUCLK - Added entry in README Changes in v2: - Tweaked after comments from Peter Korsgaard README | 4 ++++ arch/arm/include/asm/arch-am33xx/clocks_am33xx.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README b/README index d8cb394..ddf6df2 100644 --- a/README +++ b/README @@ -3820,6 +3820,10 @@ Low Level (hardware related) configuration options: If defined, the x86 reset vector code is included. This is not needed when U-Boot is running from Coreboot. +- CONFIG_SYS_MPUCLK + Defines the MPU clock speed (in MHz). + + NOTE : currently only supported on AM335x platforms. Freescale QE/FMAN Firmware Support: ----------------------------------- diff --git a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h index d748dd2..2d96007 100644 --- a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h +++ b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h @@ -21,8 +21,11 @@ #define OSC (V_OSCK/1000000) -/* MAIN PLL Fdll = 550 MHZ, */ -#define MPUPLL_M 550 +/* MAIN PLL Fdll = 550 MHz, by default */ +#ifndef CONFIG_SYS_MPUCLK +#define CONFIG_SYS_MPUCLK 550 +#endif +#define MPUPLL_M CONFIG_SYS_MPUCLK #define MPUPLL_N (OSC-1) #define MPUPLL_M2 1