blob: 9cf9517006972862b8bcceaa6a977f0455e818cd [file] [log] [blame]
Gregory Beand2e753b2010-04-30 21:33:38 -07001/*
Russell Kinga09e64f2008-08-05 16:14:15 +01002 * Copyright (C) 2007 Google, Inc.
Syed Rameez Mustafa3971c142013-01-09 19:04:53 -08003 * Copyright (c) 2008-2013, The Linux Foundation. All rights reserved.
Russell Kinga09e64f2008-08-05 16:14:15 +01004 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_H
24#define __ASM_ARCH_MSM_IOMAP_H
25
26#include <asm/sizes.h>
27
28/* Physical base address and size of peripherals.
29 * Ordered by the virtual base addresses they will be mapped at.
30 *
31 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
32 * instruction, otherwise entry-macro.S will not compile.
33 *
34 * If you add or remove entries here, you'll want to edit the
35 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
36 * changes.
37 *
38 */
39
Sathish Ambleybb87d5f2011-11-08 15:14:01 -080040#define MSM_DEBUG_UART_SIZE SZ_4K
41
Taniya Dasfa4ee7f2012-02-21 15:04:51 +053042#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) \
43 || defined(CONFIG_DEBUG_MSM_UART3)
44#define MSM_DEBUG_UART_BASE 0xFC000000
45#define MSM_DEBUG_UART_PHYS CONFIG_MSM_DEBUG_UART_PHYS
46#endif
47
Murali Nalajalafeedeae2012-03-28 16:15:32 +053048#define MSM8625_WARM_BOOT_PHYS 0x0FD00000
49
Taniya Dasfa4ee7f2012-02-21 15:04:51 +053050
Stepan Moskovchenko2b992ad2011-10-18 17:24:18 -070051#if defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_APQ8064) || \
Sathish Ambley6829db12011-10-08 22:41:23 -070052 defined(CONFIG_ARCH_MSM8930) || defined(CONFIG_ARCH_MSM9615) || \
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -070053 defined(CONFIG_ARCH_MSM8974) || defined(CONFIG_ARCH_MSM7X27) || \
Taniya Das12df7bf2012-02-15 11:36:19 +053054 defined(CONFIG_ARCH_MSM7X25) || defined(CONFIG_ARCH_MSM7X01A) || \
Rohit Vaswani58fc0c62012-04-23 18:50:26 -070055 defined(CONFIG_ARCH_MSM8625) || defined(CONFIG_ARCH_MSM7X30) || \
Syed Rameez Mustafa61c9a572012-08-23 16:10:07 -070056 defined(CONFIG_ARCH_MSM9625) || defined(CONFIG_ARCH_MPQ8092) || \
Stepan Moskovchenkob6bd0bb2013-01-24 15:55:35 -080057 defined(CONFIG_ARCH_MSM8226) || defined(CONFIG_ARCH_MSM8610) || \
58 defined(CONFIG_ARCH_MSMZINC)
Taniya Das13b811a2011-12-09 18:33:45 +053059
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070060/* Unified iomap */
61
62#define MSM_TMR_BASE IOMEM(0xFA000000) /* 4K */
63#define MSM_TMR0_BASE IOMEM(0xFA001000) /* 4K */
Vikram Mulukutla226b79b2011-08-04 08:57:45 -070064#define MSM_QGIC_DIST_BASE IOMEM(0xFA002000) /* 4K */
65#define MSM_QGIC_CPU_BASE IOMEM(0xFA003000) /* 4K */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070066#define MSM_TCSR_BASE IOMEM(0xFA004000) /* 4K */
67#define MSM_APCS_GCC_BASE IOMEM(0xFA006000) /* 4K */
68#define MSM_SAW_L2_BASE IOMEM(0xFA007000) /* 4K */
69#define MSM_SAW0_BASE IOMEM(0xFA008000) /* 4K */
70#define MSM_SAW1_BASE IOMEM(0xFA009000) /* 4K */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -080071
72#ifndef CONFIG_ARCH_MSM9625
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070073#define MSM_IMEM_BASE IOMEM(0xFA00A000) /* 4K */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -080074#endif
75
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070076#define MSM_ACC0_BASE IOMEM(0xFA00B000) /* 4K */
77#define MSM_ACC1_BASE IOMEM(0xFA00C000) /* 4K */
Vikram Mulukutlabb408eb2011-08-04 09:28:56 -070078#define MSM_ACC2_BASE IOMEM(0xFA00D000) /* 4K */
79#define MSM_ACC3_BASE IOMEM(0xFA00E000) /* 4K */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070080#define MSM_CLK_CTL_BASE IOMEM(0xFA010000) /* 16K */
81#define MSM_MMSS_CLK_CTL_BASE IOMEM(0xFA014000) /* 4K */
82#define MSM_LPASS_CLK_CTL_BASE IOMEM(0xFA015000) /* 4K */
83#define MSM_HFPLL_BASE IOMEM(0xFA016000) /* 4K */
84#define MSM_TLMM_BASE IOMEM(0xFA017000) /* 16K */
Stepan Moskovchenko50bde9a2013-02-28 19:24:11 -080085#define MSM_SHARED_RAM_BASE IOMEM(0xFA400000) /* 2M */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070086#define MSM_SIC_NON_SECURE_BASE IOMEM(0xFA600000) /* 64K */
87#define MSM_HDMI_BASE IOMEM(0xFA800000) /* 4K */
Vikram Mulukutla226b79b2011-08-04 08:57:45 -070088#define MSM_RPM_BASE IOMEM(0xFA801000) /* 4K */
89#define MSM_RPM_MPM_BASE IOMEM(0xFA802000) /* 4K */
Siddartha Mohanadossce1315a2011-04-21 15:25:55 -070090#define MSM_QFPROM_BASE IOMEM(0xFA700000) /* 4K */
Praveen Chidambaramd9a41732011-10-17 09:41:05 -060091#define MSM_L2CC_BASE IOMEM(0xFA701000) /* 4K */
92#define MSM_APCS_GLB_BASE IOMEM(0xFA702000) /* 4K */
93#define MSM_SAW2_BASE IOMEM(0xFA703000) /* 4k */
94#define MSM_SAW3_BASE IOMEM(0xFA704000) /* 4k */
Taniya Das12df7bf2012-02-15 11:36:19 +053095#define MSM_VIC_BASE IOMEM(0xFA100000) /* 4K */
96#define MSM_CSR_BASE IOMEM(0xFA101000) /* 4K */
97#define MSM_GPIO1_BASE IOMEM(0xFA102000) /* 4K */
98#define MSM_GPIO2_BASE IOMEM(0xFA103000) /* 4K */
Taniya Das6b8c1b82012-02-16 12:28:26 +053099#define MSM_SCU_BASE IOMEM(0xFA104000) /* 4K */
100#define MSM_CFG_CTL_BASE IOMEM(0xFA105000) /* 4K */
Taniya Das298de8c2012-02-16 11:45:31 +0530101#define MSM_CLK_CTL_SH2_BASE IOMEM(0xFA106000) /* 4K */
Stepan Moskovchenkoda7ce9c2012-08-14 21:02:21 -0700102#define MSM_MPM2_PSHOLD_BASE IOMEM(0xFA107000) /* 4k */
Taniya Das12df7bf2012-02-15 11:36:19 +0530103#define MSM_MDC_BASE IOMEM(0xFA400000) /* 1M */
104#define MSM_AD5_BASE IOMEM(0xFA900000) /* 13M (D00000)
105 0xFB600000 */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -0800106/* MSM9625 has unaligned imem so we need to map excess 2K virtually
107 * to get the correct mapping. This should not be done for any
108 * other chipset under normal circumstances.
109 */
110#ifdef CONFIG_ARCH_MSM9625
111#define MSM_IMEM_BASE IOMEM(0xFB601800) /* 6K -> 8K */
112#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700113
Taniya Das12df7bf2012-02-15 11:36:19 +0530114#define MSM_STRONGLY_ORDERED_PAGE 0xFA0F0000
Taniya Das46c964e2012-09-24 17:59:14 +0530115#define MSM8625_CPU_PHYS 0x0FE00000
Taniya Dasfe04d4f2012-03-14 11:13:21 +0530116
Taniya Das12df7bf2012-02-15 11:36:19 +0530117
Taniya Das298de8c2012-02-16 11:45:31 +0530118#if defined(CONFIG_ARCH_MSM9615) || defined(CONFIG_ARCH_MSM7X27) \
Jeff Hugob26da2d2012-09-17 15:58:59 -0600119 || defined(CONFIG_ARCH_MSM7X30) || defined(CONFIG_ARCH_MSM9625)
Jeff Hugo56b933a2011-09-28 14:42:05 -0600120#define MSM_SHARED_RAM_SIZE SZ_1M
121#else
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700122#define MSM_SHARED_RAM_SIZE SZ_2M
Jeff Hugo56b933a2011-09-28 14:42:05 -0600123#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700124
Taniya Das12df7bf2012-02-15 11:36:19 +0530125#include "msm_iomap-7xxx.h"
Daniel Walker184d2522010-05-05 07:08:13 -0700126#include "msm_iomap-7x30.h"
Taniya Das12df7bf2012-02-15 11:36:19 +0530127#include "msm_iomap-8625.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700128#include "msm_iomap-8960.h"
Stepan Moskovchenko2b992ad2011-10-18 17:24:18 -0700129#include "msm_iomap-8930.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700130#include "msm_iomap-8064.h"
Rohit Vaswani99fb6f22011-08-15 13:37:32 -0700131#include "msm_iomap-9615.h"
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700132#include "msm_iomap-8974.h"
Stepan Moskovchenkob6bd0bb2013-01-24 15:55:35 -0800133#include "msm_iomap-zinc.h"
Rohit Vaswani58fc0c62012-04-23 18:50:26 -0700134#include "msm_iomap-9625.h"
Ravi Kumar V8834dad2012-08-31 22:49:55 +0530135#include "msm_iomap-8092.h"
Syed Rameez Mustafa61c9a572012-08-23 16:10:07 -0700136#include "msm_iomap-8226.h"
Syed Rameez Mustafa3971c142013-01-09 19:04:53 -0800137#include "msm_iomap-8610.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700138
139#else
140/* Legacy single-target iomap */
Taniya Das298de8c2012-02-16 11:45:31 +0530141#if defined(CONFIG_ARCH_QSD8X50)
Daniel Walkereb61bf82010-05-05 07:03:55 -0700142#include "msm_iomap-8x50.h"
Gregory Bean1963a2a2010-08-28 10:05:44 -0700143#elif defined(CONFIG_ARCH_MSM8X60)
144#include "msm_iomap-8x60.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700145#elif defined(CONFIG_ARCH_FSM9XXX)
146#include "msm_iomap-fsm9xxx.h"
Daniel Walkereb61bf82010-05-05 07:03:55 -0700147#else
Taniya Das12df7bf2012-02-15 11:36:19 +0530148#error "Target compiled without IO map\n"
Daniel Walkereb61bf82010-05-05 07:03:55 -0700149#endif
Dima Zavinb42dc442010-01-29 11:43:42 -0800150
Stephen Boyd650e3f02011-11-08 10:33:03 -0800151#endif
152
Russell Kinga09e64f2008-08-05 16:14:15 +0100153#endif