From patchwork Sun May 15 23:38:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1491 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:52:25 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs68656qah; Sun, 15 May 2011 16:38:03 -0700 (PDT) Received: by 10.223.86.67 with SMTP id r3mr4643458fal.16.1305502683019; Sun, 15 May 2011 16:38:03 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se [194.47.250.12]) by mx.google.com with ESMTPS id e1si6533578fam.25.2011.05.15.16.38.02 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 May 2011 16:38:03 -0700 (PDT) Received-SPF: pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of triad@df.lth.se designates 194.47.250.12 as permitted sender) smtp.mail=triad@df.lth.se Received: from mer.df.lth.se (mer.df.lth.se [194.47.250.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPS id 0FF9E65D7C; Mon, 16 May 2011 01:38:02 +0200 (CEST) Received: from mer.df.lth.se (triad@localhost.localdomain [127.0.0.1]) by mer.df.lth.se (8.14.3/8.14.3/Debian-9.4) with ESMTP id p4FNc1Vt032642; Mon, 16 May 2011 01:38:01 +0200 Received: (from triad@localhost) by mer.df.lth.se (8.14.3/8.14.3/Submit) id p4FNc18j032641; Mon, 16 May 2011 01:38:01 +0200 From: Linus Walleij To: Samuel Ortiz , linux-kernel@vger.kernel.org Cc: Lee Jones , Linus Walleij Subject: [PATCH 06/13] mach-ux500: make PRCMU base address dynamic Date: Mon, 16 May 2011 01:38:00 +0200 Message-Id: <1305502680-32612-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.2.5 This makes the PRCMU base address be selected at runtime for U8500 and U5500 instead of being compiled-in. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/cpu-db5500.c | 2 ++ arch/arm/mach-ux500/cpu-db8500.c | 2 ++ arch/arm/mach-ux500/cpu.c | 2 ++ arch/arm/mach-ux500/include/mach/hardware.h | 1 + arch/arm/mach-ux500/include/mach/prcmu-regs.h | 2 -- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index c9dc2ef..c01bc19 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c @@ -188,6 +188,8 @@ void __init u5500_map_io(void) ux500_map_io(); iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); + + _PRCMU_BASE = __io_address(U5500_PRCMU_BASE); } static int usb_db5500_rx_dma_cfg[] = { diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 516126c..3d419fe 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -87,6 +87,8 @@ void __init u8500_map_io(void) iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc)); else if (cpu_is_u8500v2()) iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc)); + + _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); } static struct resource db8500_pmu_resources[] = { diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 5a43107..0190e0e 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -23,6 +23,8 @@ #include "clock.h" +void __iomem *_PRCMU_BASE; + #ifdef CONFIG_CACHE_L2X0 static void __iomem *l2x0_base; #endif diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index bf63f26..2c6f710 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h @@ -35,6 +35,7 @@ #ifndef __ASSEMBLY__ #include +extern void __iomem *_PRCMU_BASE; #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) diff --git a/arch/arm/mach-ux500/include/mach/prcmu-regs.h b/arch/arm/mach-ux500/include/mach/prcmu-regs.h index 455467e..c1226da 100644 --- a/arch/arm/mach-ux500/include/mach/prcmu-regs.h +++ b/arch/arm/mach-ux500/include/mach/prcmu-regs.h @@ -15,8 +15,6 @@ #include -#define _PRCMU_BASE IO_ADDRESS(U8500_PRCMU_BASE) - #define PRCM_ARM_PLLDIVPS (_PRCMU_BASE + 0x118) #define PRCM_ARM_CHGCLKREQ (_PRCMU_BASE + 0x114) #define PRCM_PLLARM_ENABLE (_PRCMU_BASE + 0x98)