From patchwork Thu Nov 17 16:55:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 126282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8CB4EB7225 for ; Fri, 18 Nov 2011 03:56:43 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757643Ab1KQQ4f (ORCPT ); Thu, 17 Nov 2011 11:56:35 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:55239 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156Ab1KQQ4e (ORCPT ); Thu, 17 Nov 2011 11:56:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=FjagQRi7Iww+anL6Vpxy8E9tjlzHm/UubCTOtMmbIwo=; b=AAU38r3lkpE3iC5U/T+IaK6SwGYHUxXgIHvzQtnQZ+duuF8n+kn7DSVgqGXiaxB2KwQoCU92+pO4yhfXrJSBViETZyuGZ1VO2Lylbnq/SbGG4aTlD1TVnzyjbBGj+9fNFUnu1J5XNEooAFIg/Laa6vGJZDeZHj24o4D1rAoPEYg=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:34249) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RR5Fh-0003lN-4Y; Thu, 17 Nov 2011 16:55:53 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1RR5Ff-00033Q-OK; Thu, 17 Nov 2011 16:55:51 +0000 Date: Thu, 17 Nov 2011 16:55:51 +0000 From: Russell King - ARM Linux To: Peter De Schrijver Cc: Grant Likely , Rob Herring , Randy Dunlap , Colin Cross , Olof Johansson , Stephen Warren , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH 04/10] arm/tegra: prepare early init for multiple tegra variants Message-ID: <20111117165551.GV9581@n2100.arm.linux.org.uk> References: <1321546766-26770-1-git-send-email-pdeschrijver@nvidia.com> <1321546766-26770-5-git-send-email-pdeschrijver@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1321546766-26770-5-git-send-email-pdeschrijver@nvidia.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org On Thu, Nov 17, 2011 at 06:19:18PM +0200, Peter De Schrijver wrote: > This patch splits the early init code in a common and a tegra20 specific part. > L2 cache initialization is generalized and discovers the cache associativity > at runtime. Also use arm_pm_restart instead of arm_arch_reset and reset the > the system using the PMC reset feature rather then the CAR system reset. I'm already carrying this, and the follow-on patch to remove the arch_reset() from tegra entirely. 8<=== ARM: restart: tegra: use new restart hook Hook these platforms restart code into the arm_pm_restart hook rather than using arch_reset(). Signed-off-by: Russell King --- arch/arm/mach-tegra/common.c | 5 ++--- arch/arm/mach-tegra/include/mach/system.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 690b888..1374d10 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -31,9 +31,7 @@ #include "clock.h" #include "fuse.h" -void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset; - -void tegra_assert_system_reset(char mode, const char *cmd) +static void tegra_assert_system_reset(char mode, const char *cmd) { void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04); u32 reg; @@ -76,6 +74,7 @@ static void __init tegra_init_cache(void) void __init tegra_init_early(void) { + arm_pm_restart = tegra_assert_system_reset; tegra_init_fuse(); tegra_init_clock(); tegra_clk_init_from_table(common_clk_init_table); diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h index 027c421..b87b8a4 100644 --- a/arch/arm/mach-tegra/include/mach/system.h +++ b/arch/arm/mach-tegra/include/mach/system.h @@ -21,9 +21,9 @@ #ifndef __MACH_TEGRA_SYSTEM_H #define __MACH_TEGRA_SYSTEM_H -#include - -extern void (*arch_reset)(char mode, const char *cmd); +static inline void arch_reset(char mode, const char *cmd) +{ +} static inline void arch_idle(void) {