Gregory Bean | d2e753b | 2010-04-30 21:33:38 -0700 | [diff] [blame] | 1 | /* |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 2 | * Copyright (C) 2007 Google, Inc. |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 3 | * Copyright (c) 2008-2013, The Linux Foundation. All rights reserved. |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 4 | * 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 Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 40 | #define MSM_DEBUG_UART_SIZE SZ_4K |
| 41 | |
Taniya Das | fa4ee7f | 2012-02-21 15:04:51 +0530 | [diff] [blame] | 42 | #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 Nalajala | feedeae | 2012-03-28 16:15:32 +0530 | [diff] [blame] | 48 | #define MSM8625_WARM_BOOT_PHYS 0x0FD00000 |
| 49 | |
Stepan Moskovchenko | 902ad81 | 2013-03-18 19:15:44 -0700 | [diff] [blame] | 50 | /* 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 Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 58 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | /* Unified iomap */ |
| 60 | |
| 61 | #define MSM_TMR_BASE IOMEM(0xFA000000) /* 4K */ |
| 62 | #define MSM_TMR0_BASE IOMEM(0xFA001000) /* 4K */ |
Vikram Mulukutla | 226b79b | 2011-08-04 08:57:45 -0700 | [diff] [blame] | 63 | #define MSM_QGIC_DIST_BASE IOMEM(0xFA002000) /* 4K */ |
| 64 | #define MSM_QGIC_CPU_BASE IOMEM(0xFA003000) /* 4K */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 65 | #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 Kapur | b0f6545 | 2013-02-04 17:24:24 -0800 | [diff] [blame] | 70 | |
| 71 | #ifndef CONFIG_ARCH_MSM9625 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 72 | #define MSM_IMEM_BASE IOMEM(0xFA00A000) /* 4K */ |
Abhimanyu Kapur | b0f6545 | 2013-02-04 17:24:24 -0800 | [diff] [blame] | 73 | #endif |
| 74 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 75 | #define MSM_ACC0_BASE IOMEM(0xFA00B000) /* 4K */ |
| 76 | #define MSM_ACC1_BASE IOMEM(0xFA00C000) /* 4K */ |
Vikram Mulukutla | bb408eb | 2011-08-04 09:28:56 -0700 | [diff] [blame] | 77 | #define MSM_ACC2_BASE IOMEM(0xFA00D000) /* 4K */ |
| 78 | #define MSM_ACC3_BASE IOMEM(0xFA00E000) /* 4K */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 79 | #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 Moskovchenko | 50bde9a | 2013-02-28 19:24:11 -0800 | [diff] [blame] | 84 | #define MSM_SHARED_RAM_BASE IOMEM(0xFA400000) /* 2M */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 85 | #define MSM_SIC_NON_SECURE_BASE IOMEM(0xFA600000) /* 64K */ |
| 86 | #define MSM_HDMI_BASE IOMEM(0xFA800000) /* 4K */ |
Vikram Mulukutla | 226b79b | 2011-08-04 08:57:45 -0700 | [diff] [blame] | 87 | #define MSM_RPM_BASE IOMEM(0xFA801000) /* 4K */ |
| 88 | #define MSM_RPM_MPM_BASE IOMEM(0xFA802000) /* 4K */ |
Siddartha Mohanadoss | ce1315a | 2011-04-21 15:25:55 -0700 | [diff] [blame] | 89 | #define MSM_QFPROM_BASE IOMEM(0xFA700000) /* 4K */ |
Praveen Chidambaram | d9a4173 | 2011-10-17 09:41:05 -0600 | [diff] [blame] | 90 | #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 Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 94 | #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 Das | 6b8c1b8 | 2012-02-16 12:28:26 +0530 | [diff] [blame] | 98 | #define MSM_SCU_BASE IOMEM(0xFA104000) /* 4K */ |
| 99 | #define MSM_CFG_CTL_BASE IOMEM(0xFA105000) /* 4K */ |
Taniya Das | 298de8c | 2012-02-16 11:45:31 +0530 | [diff] [blame] | 100 | #define MSM_CLK_CTL_SH2_BASE IOMEM(0xFA106000) /* 4K */ |
Stepan Moskovchenko | da7ce9c | 2012-08-14 21:02:21 -0700 | [diff] [blame] | 101 | #define MSM_MPM2_PSHOLD_BASE IOMEM(0xFA107000) /* 4k */ |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 102 | #define MSM_MDC_BASE IOMEM(0xFA400000) /* 1M */ |
| 103 | #define MSM_AD5_BASE IOMEM(0xFA900000) /* 13M (D00000) |
| 104 | 0xFB600000 */ |
Abhimanyu Kapur | b0f6545 | 2013-02-04 17:24:24 -0800 | [diff] [blame] | 105 | /* 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 112 | |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 113 | #define MSM_STRONGLY_ORDERED_PAGE 0xFA0F0000 |
Taniya Das | 46c964e | 2012-09-24 17:59:14 +0530 | [diff] [blame] | 114 | #define MSM8625_CPU_PHYS 0x0FE00000 |
Taniya Das | fe04d4f | 2012-03-14 11:13:21 +0530 | [diff] [blame] | 115 | |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 116 | |
Taniya Das | 298de8c | 2012-02-16 11:45:31 +0530 | [diff] [blame] | 117 | #if defined(CONFIG_ARCH_MSM9615) || defined(CONFIG_ARCH_MSM7X27) \ |
Jeff Hugo | b26da2d | 2012-09-17 15:58:59 -0600 | [diff] [blame] | 118 | || defined(CONFIG_ARCH_MSM7X30) || defined(CONFIG_ARCH_MSM9625) |
Jeff Hugo | 56b933a | 2011-09-28 14:42:05 -0600 | [diff] [blame] | 119 | #define MSM_SHARED_RAM_SIZE SZ_1M |
| 120 | #else |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 121 | #define MSM_SHARED_RAM_SIZE SZ_2M |
Jeff Hugo | 56b933a | 2011-09-28 14:42:05 -0600 | [diff] [blame] | 122 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 123 | |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 124 | #include "msm_iomap-7xxx.h" |
Daniel Walker | 184d252 | 2010-05-05 07:08:13 -0700 | [diff] [blame] | 125 | #include "msm_iomap-7x30.h" |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 126 | #include "msm_iomap-8625.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 127 | #include "msm_iomap-8960.h" |
Stepan Moskovchenko | 2b992ad | 2011-10-18 17:24:18 -0700 | [diff] [blame] | 128 | #include "msm_iomap-8930.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 129 | #include "msm_iomap-8064.h" |
Rohit Vaswani | 99fb6f2 | 2011-08-15 13:37:32 -0700 | [diff] [blame] | 130 | #include "msm_iomap-9615.h" |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 131 | #include "msm_iomap-8974.h" |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 132 | #include "msm_iomap-8084.h" |
Rohit Vaswani | 58fc0c6 | 2012-04-23 18:50:26 -0700 | [diff] [blame] | 133 | #include "msm_iomap-9625.h" |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 134 | #include "msm_iomap-8092.h" |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 135 | #include "msm_iomap-8226.h" |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 136 | #include "msm_iomap-8610.h" |
Abhimanyu Kapur | b2e8914 | 2013-03-18 15:59:57 -0700 | [diff] [blame] | 137 | #include "msm_iomap-krypton.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 138 | |
Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame] | 139 | #endif |
| 140 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 141 | #endif |