From patchwork Sat May 21 08:42:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1574 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:53:14 -0000 Delivered-To: patches@linaro.org Received: by 10.224.54.134 with SMTP id q6cs8891qag; Sat, 21 May 2011 01:43:03 -0700 (PDT) Received: by 10.14.38.14 with SMTP id z14mr157956eea.169.1305967382338; Sat, 21 May 2011 01:43:02 -0700 (PDT) Received: from eu1sys200aog105.obsmtp.com (eu1sys200aog105.obsmtp.com [207.126.144.119]) by mx.google.com with SMTP id y16si9758587eeh.96.2011.05.21.01.42.55 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 May 2011 01:43:02 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.119; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKTdd7D4dfKNp7nqmr8KPkC+/3HI1dhPF0@postini.com; Sat, 21 May 2011 08:43:01 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id BC516BF; Sat, 21 May 2011 08:42:30 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 4902776C; Sat, 21 May 2011 08:42:30 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id BD8E4A8081; Sat, 21 May 2011 10:42:25 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sat, 21 May 2011 10:42:28 +0200 From: Linus Walleij To: Samuel Ortiz , Cc: Lee Jones , Linus Walleij Subject: [PATCH 06/13] mach-ux500: make PRCMU base address dynamic Date: Sat, 21 May 2011 10:42:27 +0200 Message-ID: <1305967347-16544-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 From: Linus Walleij 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)