From patchwork Wed Dec 9 04:29:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 554231 X-Patchwork-Delegate: andreas.biessmann@googlemail.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 61FF41402D9 for ; Wed, 9 Dec 2015 15:37:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC12B4B70B; Wed, 9 Dec 2015 05:37:02 +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 OcTAuOmdOP70; Wed, 9 Dec 2015 05:37:02 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3AEEA4B712; Wed, 9 Dec 2015 05:37:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 429804B6F3 for ; Wed, 9 Dec 2015 05:36:57 +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 e1GcR48ILHUA for ; Wed, 9 Dec 2015 05:36:57 +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 SJOEDG01.corp.atmel.com (nasmtp02.atmel.com [204.2.163.16]) by theia.denx.de (Postfix) with ESMTPS id 73A534B6C7 for ; Wed, 9 Dec 2015 05:36:56 +0100 (CET) Received: from apsmtp01.atmel.com (10.168.254.31) by sjoedg01.corp.atmel.com (10.64.253.30) with Microsoft SMTP Server (TLS) id 14.3.235.1; Tue, 8 Dec 2015 20:44:08 -0800 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Wed, 9 Dec 2015 12:39:20 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Wed, 9 Dec 2015 12:29:43 +0800 Message-ID: <1449635383-8180-4-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1449635383-8180-1-git-send-email-wenyou.yang@atmel.com> References: <1449635383-8180-1-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 3/3] board: atmel: siemens: clean up PLLB code 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" Due to introducing the new PLLB clock handle functions, use these functions to clean up the PLLB enable code. Signed-off-by: Wenyou Yang Tested-by: Heiko Schocher Reviewed-by: Andreas Bießmann --- board/siemens/smartweb/smartweb.c | 6 +----- board/siemens/taurus/taurus.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index e7ee65c..47a60a7 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -115,12 +115,8 @@ static void smartweb_macb_hw_init(void) void at91_udp_hw_init(void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; - /* Enable PLLB */ - writel(get_pllb_init(), &pmc->pllbr); - while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB) - ; + at91_pllb_clk_enable(get_pllb_init()); /* Enable UDPCK clock, MCK is enabled in at91_clock_init() */ at91_periph_clk_enable(ATMEL_ID_UDP); diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 9374064..b0385d8 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -289,12 +289,8 @@ void spi_cs_deactivate(struct spi_slave *slave) void at91_udp_hw_init(void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; - /* Enable PLLB */ - writel(get_pllb_init(), &pmc->pllbr); - while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB) - ; + at91_pllb_clk_enable(get_pllb_init()); /* Enable UDPCK clock, MCK is enabled in at91_clock_init() */ at91_periph_clk_enable(ATMEL_ID_UDP);