From patchwork Wed Dec 9 04:25:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 554225 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 8B4DF1402D9 for ; Wed, 9 Dec 2015 15:32:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29C7B4B705; Wed, 9 Dec 2015 05:32:18 +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 2qKDWcgdTNYc; Wed, 9 Dec 2015 05:32:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 285A64B6B2; Wed, 9 Dec 2015 05:32:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C0A84B6AF for ; Wed, 9 Dec 2015 05:32:11 +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 1jiFgK_PYUtu for ; Wed, 9 Dec 2015 05:32:11 +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 eusmtp01.atmel.com (eusmtp01.atmel.com [212.144.249.243]) by theia.denx.de (Postfix) with ESMTPS id 29CE54B6B3 for ; Wed, 9 Dec 2015 05:32:11 +0100 (CET) Received: from apsmtp01.atmel.com (10.168.254.31) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Wed, 9 Dec 2015 05:32:06 +0100 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:34:37 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Wed, 9 Dec 2015 12:25:00 +0800 Message-ID: <1449635102-7908-3-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1449635102-7908-1-git-send-email-wenyou.yang@atmel.com> References: <1449635102-7908-1-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 2/4] ARM: at91: armv7: clean up UTMI PLL handle 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 UTMI PLL enable function, use this function to reduce the duplicated code. Signed-off-by: Wenyou Yang --- arch/arm/mach-at91/armv7/sama5d2_devices.c | 5 +---- arch/arm/mach-at91/armv7/sama5d3_devices.c | 5 +---- arch/arm/mach-at91/armv7/sama5d4_devices.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-at91/armv7/sama5d2_devices.c b/arch/arm/mach-at91/armv7/sama5d2_devices.c index 88f8f2c..978eac2 100644 --- a/arch/arm/mach-at91/armv7/sama5d2_devices.c +++ b/arch/arm/mach-at91/armv7/sama5d2_devices.c @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -48,9 +47,7 @@ char *get_cpu_name() #ifdef CONFIG_USB_GADGET_ATMEL_USBA void at91_udp_hw_init(void) { - struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - - writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr); + at91_upll_clk_enable(); at91_periph_clk_enable(ATMEL_ID_UDPHS); } diff --git a/arch/arm/mach-at91/armv7/sama5d3_devices.c b/arch/arm/mach-at91/armv7/sama5d3_devices.c index 78ecfc8..64ac262 100644 --- a/arch/arm/mach-at91/armv7/sama5d3_devices.c +++ b/arch/arm/mach-at91/armv7/sama5d3_devices.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -208,10 +207,8 @@ void at91_lcd_hw_init(void) #ifdef CONFIG_USB_GADGET_ATMEL_USBA void at91_udp_hw_init(void) { - struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - /* Enable UPLL clock */ - writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr); + at91_upll_clk_enable(); /* Enable UDPHS clock */ at91_periph_clk_enable(ATMEL_ID_UDPHS); } diff --git a/arch/arm/mach-at91/armv7/sama5d4_devices.c b/arch/arm/mach-at91/armv7/sama5d4_devices.c index ce33cd4..ebb779e 100644 --- a/arch/arm/mach-at91/armv7/sama5d4_devices.c +++ b/arch/arm/mach-at91/armv7/sama5d4_devices.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -37,10 +36,8 @@ char *get_cpu_name() #ifdef CONFIG_USB_GADGET_ATMEL_USBA void at91_udp_hw_init(void) { - struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - /* Enable UPLL clock */ - writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr); + at91_upll_clk_enable(); /* Enable UDPHS clock */ at91_periph_clk_enable(ATMEL_ID_UDPHS); }