From patchwork Tue May 3 12:31:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinya Kuribayashi X-Patchwork-Id: 93781 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 4BBCCB6F59 for ; Tue, 3 May 2011 22:31:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EEB5A28122; Tue, 3 May 2011 14:31:57 +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 SzfTWu2RESzf; Tue, 3 May 2011 14:31:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 810C228123; Tue, 3 May 2011 14:31:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E1CDE28123 for ; Tue, 3 May 2011 14:31: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 CD6f99zFfhCx for ; Tue, 3 May 2011 14:31:51 +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 sasl.smtp.pobox.com (b-pb-sasl-quonix.pobox.com [208.72.237.35]) by theia.denx.de (Postfix) with ESMTP id 0DDC928122 for ; Tue, 3 May 2011 14:31:48 +0200 (CEST) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 9DE292C43; Tue, 3 May 2011 08:31:46 -0400 (EDT) Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 8641B2C41; Tue, 3 May 2011 08:31:45 -0400 (EDT) Received: from [192.168.11.3] (unknown [180.12.161.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 78F282C40; Tue, 3 May 2011 08:31:43 -0400 (EDT) Message-ID: <4DBFF5A9.70605@pobox.com> Date: Tue, 03 May 2011 21:31:37 +0900 From: Shinya Kuribayashi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: u-boot@lists.denx.de X-Pobox-Relay-ID: 4EC7CEC4-7581-11E0-A747-C1F4E168B6F2-47602734!b-pb-sasl-quonix.pobox.com Subject: [U-Boot] [PATCH] MIPS: Move timer code to arch/mips/cpu/$(CPU)/ 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Current timer routines (arch/mips/lib/timer.c) are implemented assuming that MIPS32 coprocessor (CP0) resources, Counter and Compare registers in this case, are available. But this doesn't always work. We need to make sure that all MIPS-based systems don't necessarily use CP0 counter/compare registers as time keeping resources. And some MIPS variant processors might come with different hardware specs with genuine MIPS32 CP0 registers. This patch makes each $(CPU) can have its own timer code. Signed-off-by: Shinya Kuribayashi --- arch/mips/cpu/mips32/Makefile | 2 +- arch/mips/{lib => cpu/mips32}/time.c | 0 arch/mips/lib/Makefile | 1 - 3 files changed, 1 insertions(+), 2 deletions(-) rename arch/mips/{lib => cpu/mips32}/time.c (100%) diff --git a/arch/mips/cpu/mips32/Makefile b/arch/mips/cpu/mips32/Makefile index e315c1b..eb8e005 100644 --- a/arch/mips/cpu/mips32/Makefile +++ b/arch/mips/cpu/mips32/Makefile @@ -27,7 +27,7 @@ LIB = $(obj)lib$(CPU).o START = start.o SOBJS-y = cache.o -COBJS-y = cpu.o interrupts.o +COBJS-y = cpu.o interrupts.o time.o SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) diff --git a/arch/mips/lib/time.c b/arch/mips/cpu/mips32/time.c similarity index 100% rename from arch/mips/lib/time.c rename to arch/mips/cpu/mips32/time.c diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile index 4e90704..9244f31 100644 --- a/arch/mips/lib/Makefile +++ b/arch/mips/lib/Makefile @@ -33,7 +33,6 @@ COBJS-y += bootm_qemu_mips.o else COBJS-y += bootm.o endif -COBJS-y += time.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))