blob: d3706cd4bd64a0d7600089b0a2b9371e324cf298 [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
Stepan Moskovchenko902ad812013-03-18 19:15:44 -070050/* Legacy single-target iomap */
51#if defined(CONFIG_ARCH_QSD8X50)
52#include "msm_iomap-8x50.h"
53#elif defined(CONFIG_ARCH_MSM8X60)
54#include "msm_iomap-8x60.h"
55#elif defined(CONFIG_ARCH_FSM9XXX)
56#include "msm_iomap-fsm9xxx.h"
57#else
Taniya Das13b811a2011-12-09 18:33:45 +053058
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070059/* Unified iomap */
60
61#define MSM_TMR_BASE IOMEM(0xFA000000) /* 4K */
62#define MSM_TMR0_BASE IOMEM(0xFA001000) /* 4K */
Vikram Mulukutla226b79b2011-08-04 08:57:45 -070063#define MSM_QGIC_DIST_BASE IOMEM(0xFA002000) /* 4K */
64#define MSM_QGIC_CPU_BASE IOMEM(0xFA003000) /* 4K */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070065#define MSM_TCSR_BASE IOMEM(0xFA004000) /* 4K */
66#define MSM_APCS_GCC_BASE IOMEM(0xFA006000) /* 4K */
67#define MSM_SAW_L2_BASE IOMEM(0xFA007000) /* 4K */
68#define MSM_SAW0_BASE IOMEM(0xFA008000) /* 4K */
69#define MSM_SAW1_BASE IOMEM(0xFA009000) /* 4K */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -080070
71#ifndef CONFIG_ARCH_MSM9625
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070072#define MSM_IMEM_BASE IOMEM(0xFA00A000) /* 4K */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -080073#endif
74
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070075#define MSM_ACC0_BASE IOMEM(0xFA00B000) /* 4K */
76#define MSM_ACC1_BASE IOMEM(0xFA00C000) /* 4K */
Vikram Mulukutlabb408eb2011-08-04 09:28:56 -070077#define MSM_ACC2_BASE IOMEM(0xFA00D000) /* 4K */
78#define MSM_ACC3_BASE IOMEM(0xFA00E000) /* 4K */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070079#define MSM_CLK_CTL_BASE IOMEM(0xFA010000) /* 16K */
80#define MSM_MMSS_CLK_CTL_BASE IOMEM(0xFA014000) /* 4K */
81#define MSM_LPASS_CLK_CTL_BASE IOMEM(0xFA015000) /* 4K */
82#define MSM_HFPLL_BASE IOMEM(0xFA016000) /* 4K */
83#define MSM_TLMM_BASE IOMEM(0xFA017000) /* 16K */
Stepan Moskovchenko50bde9a2013-02-28 19:24:11 -080084#define MSM_SHARED_RAM_BASE IOMEM(0xFA400000) /* 2M */
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070085#define MSM_SIC_NON_SECURE_BASE IOMEM(0xFA600000) /* 64K */
86#define MSM_HDMI_BASE IOMEM(0xFA800000) /* 4K */
Vikram Mulukutla226b79b2011-08-04 08:57:45 -070087#define MSM_RPM_BASE IOMEM(0xFA801000) /* 4K */
88#define MSM_RPM_MPM_BASE IOMEM(0xFA802000) /* 4K */
Siddartha Mohanadossce1315a2011-04-21 15:25:55 -070089#define MSM_QFPROM_BASE IOMEM(0xFA700000) /* 4K */
Praveen Chidambaramd9a41732011-10-17 09:41:05 -060090#define MSM_L2CC_BASE IOMEM(0xFA701000) /* 4K */
91#define MSM_APCS_GLB_BASE IOMEM(0xFA702000) /* 4K */
92#define MSM_SAW2_BASE IOMEM(0xFA703000) /* 4k */
93#define MSM_SAW3_BASE IOMEM(0xFA704000) /* 4k */
Taniya Das12df7bf2012-02-15 11:36:19 +053094#define MSM_VIC_BASE IOMEM(0xFA100000) /* 4K */
95#define MSM_CSR_BASE IOMEM(0xFA101000) /* 4K */
96#define MSM_GPIO1_BASE IOMEM(0xFA102000) /* 4K */
97#define MSM_GPIO2_BASE IOMEM(0xFA103000) /* 4K */
Taniya Das6b8c1b82012-02-16 12:28:26 +053098#define MSM_SCU_BASE IOMEM(0xFA104000) /* 4K */
99#define MSM_CFG_CTL_BASE IOMEM(0xFA105000) /* 4K */
Taniya Das298de8c2012-02-16 11:45:31 +0530100#define MSM_CLK_CTL_SH2_BASE IOMEM(0xFA106000) /* 4K */
Stepan Moskovchenkoda7ce9c2012-08-14 21:02:21 -0700101#define MSM_MPM2_PSHOLD_BASE IOMEM(0xFA107000) /* 4k */
Taniya Das12df7bf2012-02-15 11:36:19 +0530102#define MSM_MDC_BASE IOMEM(0xFA400000) /* 1M */
103#define MSM_AD5_BASE IOMEM(0xFA900000) /* 13M (D00000)
104 0xFB600000 */
Abhimanyu Kapurb0f65452013-02-04 17:24:24 -0800105/* MSM9625 has unaligned imem so we need to map excess 2K virtually
106 * to get the correct mapping. This should not be done for any
107 * other chipset under normal circumstances.
108 */
109#ifdef CONFIG_ARCH_MSM9625
110#define MSM_IMEM_BASE IOMEM(0xFB601800) /* 6K -> 8K */
111#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700112
Taniya Das12df7bf2012-02-15 11:36:19 +0530113#define MSM_STRONGLY_ORDERED_PAGE 0xFA0F0000
Taniya Das46c964e2012-09-24 17:59:14 +0530114#define MSM8625_CPU_PHYS 0x0FE00000
Taniya Dasfe04d4f2012-03-14 11:13:21 +0530115
Taniya Das12df7bf2012-02-15 11:36:19 +0530116
Taniya Das298de8c2012-02-16 11:45:31 +0530117#if defined(CONFIG_ARCH_MSM9615) || defined(CONFIG_ARCH_MSM7X27) \
Jeff Hugob26da2d2012-09-17 15:58:59 -0600118 || defined(CONFIG_ARCH_MSM7X30) || defined(CONFIG_ARCH_MSM9625)
Jeff Hugo56b933a2011-09-28 14:42:05 -0600119#define MSM_SHARED_RAM_SIZE SZ_1M
120#else
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700121#define MSM_SHARED_RAM_SIZE SZ_2M
Jeff Hugo56b933a2011-09-28 14:42:05 -0600122#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700123
Taniya Das12df7bf2012-02-15 11:36:19 +0530124#include "msm_iomap-7xxx.h"
Daniel Walker184d2522010-05-05 07:08:13 -0700125#include "msm_iomap-7x30.h"
Taniya Das12df7bf2012-02-15 11:36:19 +0530126#include "msm_iomap-8625.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700127#include "msm_iomap-8960.h"
Stepan Moskovchenko2b992ad2011-10-18 17:24:18 -0700128#include "msm_iomap-8930.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700129#include "msm_iomap-8064.h"
Rohit Vaswani99fb6f22011-08-15 13:37:32 -0700130#include "msm_iomap-9615.h"
Abhimanyu Kapur90ced6e2012-06-26 17:41:25 -0700131#include "msm_iomap-8974.h"
Stepan Moskovchenkob6bd0bb2013-01-24 15:55:35 -0800132#include "msm_iomap-zinc.h"
Rohit Vaswani58fc0c62012-04-23 18:50:26 -0700133#include "msm_iomap-9625.h"
Ravi Kumar V8834dad2012-08-31 22:49:55 +0530134#include "msm_iomap-8092.h"
Syed Rameez Mustafa61c9a572012-08-23 16:10:07 -0700135#include "msm_iomap-8226.h"
Syed Rameez Mustafa3971c142013-01-09 19:04:53 -0800136#include "msm_iomap-8610.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700137
Stephen Boyd650e3f02011-11-08 10:33:03 -0800138#endif
139
Russell Kinga09e64f2008-08-05 16:14:15 +0100140#endif