From patchwork Thu Jun 30 19:14:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex.Waterman.awaterman@dawning.com X-Patchwork-Id: 102819 X-Patchwork-Delegate: info@emk-elektronik.de 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 20B01B6F54 for ; Fri, 1 Jul 2011 05:45:37 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4814280E2; Thu, 30 Jun 2011 21:45:35 +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 UXlf48FPlQ9j; Thu, 30 Jun 2011 21:45:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 569D528111; Thu, 30 Jun 2011 21:45:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9FC6A280CA for ; Thu, 30 Jun 2011 21:45:19 +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 JH8QGVghEmjh for ; Thu, 30 Jun 2011 21:45:19 +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 victoria.dawning.com (mail.dawning.com [63.247.149.203]) by theia.denx.de (Postfix) with ESMTPS id D35CE280CC for ; Thu, 30 Jun 2011 21:45:18 +0200 (CEST) Received: from victoria.dawning.com (victoria.dawning.com [127.0.0.1]) by victoria.dawning.com (8.14.4/8.14.4) with ESMTP id p5UJFPH1022648; Thu, 30 Jun 2011 15:15:25 -0400 Received: (from alex@localhost) by victoria.dawning.com (8.14.4/8.14.4/Submit) id p5UJFPfe022647; Thu, 30 Jun 2011 15:15:25 -0400 From: To: u-boot@lists.denx.de Date: Thu, 30 Jun 2011 15:14:54 -0400 Message-Id: <1309461299-22604-4-git-send-email-awaterman@dawning.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1309461299-22604-1-git-send-email-awaterman@dawning.com> References: <4E0C6CDC.4020806@dawning.com> <1309461299-22604-1-git-send-email-awaterman@dawning.com> Cc: sedji.gaouaou@atmel.com Subject: [U-Boot] [PATCH 3/8] Fix compile problem for some boards in the clock code. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 From: Alex Waterman Some boards use AT91_SLOW_CLOCK and other use CONFIG_SYS_AT91_SLOW_CLOCK. This patch makes it so the arm926ejs clock code will return which ever is set. Signed-off-by: Alex Waterman --- arch/arm/cpu/arm926ejs/at91/clock.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/at91/clock.c b/arch/arm/cpu/arm926ejs/at91/clock.c index 608af2c..0083bd2 100644 --- a/arch/arm/cpu/arm926ejs/at91/clock.c +++ b/arch/arm/cpu/arm926ejs/at91/clock.c @@ -57,7 +57,11 @@ static unsigned long at91_css_to_rate(unsigned long css) { switch (css) { case AT91_PMC_MCKR_CSS_SLOW: +#ifdef AT91_SLOW_CLOCK + return AT91_SLOW_CLOCK; +#else return CONFIG_SYS_AT91_SLOW_CLOCK; +#endif case AT91_PMC_MCKR_CSS_MAIN: return gd->main_clk_rate_hz; case AT91_PMC_MCKR_CSS_PLLA: