From patchwork Thu Jun 5 15:15:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 356501 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 02C9E14008F for ; Fri, 6 Jun 2014 01:16:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 85BE8A7427; Thu, 5 Jun 2014 17:15:53 +0200 (CEST) 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 PjRUGPCYBNxp; Thu, 5 Jun 2014 17:15:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2BFC4B7A4; Thu, 5 Jun 2014 17:15:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6612D4A04C for ; Thu, 5 Jun 2014 17:15:40 +0200 (CEST) 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 LwtgQBJMzPml for ; Thu, 5 Jun 2014 17:15:37 +0200 (CEST) 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-qa0-f45.google.com (mail-qa0-f45.google.com [209.85.216.45]) by theia.denx.de (Postfix) with ESMTPS id 3C14B4B693 for ; Thu, 5 Jun 2014 17:15:33 +0200 (CEST) Received: by mail-qa0-f45.google.com with SMTP id hw13so1575431qab.32 for ; Thu, 05 Jun 2014 08:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=n7IKqPr52jmEJpbiqHkQzDi3Cc/b4UylPE1K0cEerHw=; b=v1ncji4WWA6xUsoj/TxrYgz0lNTFMHSiWcl9nxVxzzOaDVjDhsb5jBXa+sfjW+ldh2 EMb0yqBEbv0lUMZh7K8ZVoKNiSBtf/utvStKKnz09bA6LNqCxgUEwo5Q1i9UTM6FWvgx IGh2Zd9EiXaKQ5mhUQq86Q2qZp6pLpkZEzsqlfZGN8+L9mlKYCaLZkvUXrWkt5m7zgD0 DcBQng18w6jJPld1cKd12fZlFEKZodTKDWoIzOgcfB0KBx3jK/kmqltQdNqdL5S2eKU8 vj3vJPKhGafzrKmrPMLyFgCWAFB7vASEKaCDkPk9loUF5I9cGnC1yfgEmS3AseizKMEY OW/w== X-Received: by 10.140.32.195 with SMTP id h61mr78232772qgh.10.1401981332522; Thu, 05 Jun 2014 08:15:32 -0700 (PDT) Received: from localhost.localdomain (cpe-098-121-186-226.ec.res.rr.com. [98.121.186.226]) by mx.google.com with ESMTPSA id 91sm3894084qgp.41.2014.06.05.08.15.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Jun 2014 08:15:31 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 5 Jun 2014 11:15:28 -0400 Message-Id: <1401981330-25101-2-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1401981330-25101-1-git-send-email-trini@ti.com> References: <1401981330-25101-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH 2/4] arm:am33xx: Add a scale_vcores() hook 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Similar to OMAP4/5 we need to scale the voltage up prior to changing the clock frequencies up higher. Add a similar hook to start with. Signed-off-by: Tom Rini --- arch/arm/cpu/armv7/am33xx/clock.c | 11 +++++++++++ arch/arm/include/asm/arch-am33xx/clock.h | 1 + 2 files changed, 12 insertions(+) diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c index 0672798..ec7d468 100644 --- a/arch/arm/cpu/armv7/am33xx/clock.c +++ b/arch/arm/cpu/armv7/am33xx/clock.c @@ -170,8 +170,19 @@ void do_enable_clocks(u32 *const *clk_domains, }; } +/* + * Before scaling up the clocks we need to have the PMIC scale up the + * voltages first. This will be dependent on which PMIC is in use + * and in some cases we may not be scaling things up at all and thus not + * need to do anything here. + */ +__weak void scale_vcores(void) +{ +} + void prcm_init() { enable_basic_clocks(); + scale_vcores(); setup_dplls(); } diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h index f00fad3..4af6b57 100644 --- a/arch/arm/include/asm/arch-am33xx/clock.h +++ b/arch/arm/include/asm/arch-am33xx/clock.h @@ -107,6 +107,7 @@ const struct dpll_params *get_dpll_mpu_params(void); const struct dpll_params *get_dpll_core_params(void); const struct dpll_params *get_dpll_per_params(void); const struct dpll_params *get_dpll_ddr_params(void); +void scale_vcores(void); void do_setup_dpll(const struct dpll_regs *, const struct dpll_params *); void prcm_init(void); void enable_basic_clocks(void);