Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 1 | /* linux/arch/arm/mach-exynos4/dev-sysmmu.c |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 2 | * |
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. |
| 4 | * http://www.samsung.com |
| 5 | * |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 6 | * EXYNOS4 - System MMU support |
| 7 | * |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/dma-mapping.h> |
| 15 | |
| 16 | #include <mach/map.h> |
| 17 | #include <mach/irqs.h> |
| 18 | |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 19 | static struct resource exynos4_sysmmu_resource[] = { |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 20 | [0] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 21 | .start = EXYNOS4_PA_SYSMMU_MDMA, |
| 22 | .end = EXYNOS4_PA_SYSMMU_MDMA + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 23 | .flags = IORESOURCE_MEM, |
| 24 | }, |
| 25 | [1] = { |
| 26 | .start = IRQ_SYSMMU_MDMA0_0, |
| 27 | .end = IRQ_SYSMMU_MDMA0_0, |
| 28 | .flags = IORESOURCE_IRQ, |
| 29 | }, |
| 30 | [2] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 31 | .start = EXYNOS4_PA_SYSMMU_SSS, |
| 32 | .end = EXYNOS4_PA_SYSMMU_SSS + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 33 | .flags = IORESOURCE_MEM, |
| 34 | }, |
| 35 | [3] = { |
| 36 | .start = IRQ_SYSMMU_SSS_0, |
| 37 | .end = IRQ_SYSMMU_SSS_0, |
| 38 | .flags = IORESOURCE_IRQ, |
| 39 | }, |
| 40 | [4] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 41 | .start = EXYNOS4_PA_SYSMMU_FIMC0, |
| 42 | .end = EXYNOS4_PA_SYSMMU_FIMC0 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 43 | .flags = IORESOURCE_MEM, |
| 44 | }, |
| 45 | [5] = { |
| 46 | .start = IRQ_SYSMMU_FIMC0_0, |
| 47 | .end = IRQ_SYSMMU_FIMC0_0, |
| 48 | .flags = IORESOURCE_IRQ, |
| 49 | }, |
| 50 | [6] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 51 | .start = EXYNOS4_PA_SYSMMU_FIMC1, |
| 52 | .end = EXYNOS4_PA_SYSMMU_FIMC1 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 53 | .flags = IORESOURCE_MEM, |
| 54 | }, |
| 55 | [7] = { |
| 56 | .start = IRQ_SYSMMU_FIMC1_0, |
| 57 | .end = IRQ_SYSMMU_FIMC1_0, |
| 58 | .flags = IORESOURCE_IRQ, |
| 59 | }, |
| 60 | [8] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 61 | .start = EXYNOS4_PA_SYSMMU_FIMC2, |
| 62 | .end = EXYNOS4_PA_SYSMMU_FIMC2 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 63 | .flags = IORESOURCE_MEM, |
| 64 | }, |
| 65 | [9] = { |
| 66 | .start = IRQ_SYSMMU_FIMC2_0, |
| 67 | .end = IRQ_SYSMMU_FIMC2_0, |
| 68 | .flags = IORESOURCE_IRQ, |
| 69 | }, |
| 70 | [10] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 71 | .start = EXYNOS4_PA_SYSMMU_FIMC3, |
| 72 | .end = EXYNOS4_PA_SYSMMU_FIMC3 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 73 | .flags = IORESOURCE_MEM, |
| 74 | }, |
| 75 | [11] = { |
| 76 | .start = IRQ_SYSMMU_FIMC3_0, |
| 77 | .end = IRQ_SYSMMU_FIMC3_0, |
| 78 | .flags = IORESOURCE_IRQ, |
| 79 | }, |
| 80 | [12] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 81 | .start = EXYNOS4_PA_SYSMMU_JPEG, |
| 82 | .end = EXYNOS4_PA_SYSMMU_JPEG + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 83 | .flags = IORESOURCE_MEM, |
| 84 | }, |
| 85 | [13] = { |
| 86 | .start = IRQ_SYSMMU_JPEG_0, |
| 87 | .end = IRQ_SYSMMU_JPEG_0, |
| 88 | .flags = IORESOURCE_IRQ, |
| 89 | }, |
| 90 | [14] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 91 | .start = EXYNOS4_PA_SYSMMU_FIMD0, |
| 92 | .end = EXYNOS4_PA_SYSMMU_FIMD0 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 93 | .flags = IORESOURCE_MEM, |
| 94 | }, |
| 95 | [15] = { |
| 96 | .start = IRQ_SYSMMU_LCD0_M0_0, |
| 97 | .end = IRQ_SYSMMU_LCD0_M0_0, |
| 98 | .flags = IORESOURCE_IRQ, |
| 99 | }, |
| 100 | [16] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 101 | .start = EXYNOS4_PA_SYSMMU_FIMD1, |
| 102 | .end = EXYNOS4_PA_SYSMMU_FIMD1 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 103 | .flags = IORESOURCE_MEM, |
| 104 | }, |
| 105 | [17] = { |
| 106 | .start = IRQ_SYSMMU_LCD1_M1_0, |
| 107 | .end = IRQ_SYSMMU_LCD1_M1_0, |
| 108 | .flags = IORESOURCE_IRQ, |
| 109 | }, |
| 110 | [18] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 111 | .start = EXYNOS4_PA_SYSMMU_PCIe, |
| 112 | .end = EXYNOS4_PA_SYSMMU_PCIe + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 113 | .flags = IORESOURCE_MEM, |
| 114 | }, |
| 115 | [19] = { |
| 116 | .start = IRQ_SYSMMU_PCIE_0, |
| 117 | .end = IRQ_SYSMMU_PCIE_0, |
| 118 | .flags = IORESOURCE_IRQ, |
| 119 | }, |
| 120 | [20] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 121 | .start = EXYNOS4_PA_SYSMMU_G2D, |
| 122 | .end = EXYNOS4_PA_SYSMMU_G2D + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 123 | .flags = IORESOURCE_MEM, |
| 124 | }, |
| 125 | [21] = { |
| 126 | .start = IRQ_SYSMMU_2D_0, |
| 127 | .end = IRQ_SYSMMU_2D_0, |
| 128 | .flags = IORESOURCE_IRQ, |
| 129 | }, |
| 130 | [22] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 131 | .start = EXYNOS4_PA_SYSMMU_ROTATOR, |
| 132 | .end = EXYNOS4_PA_SYSMMU_ROTATOR + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 133 | .flags = IORESOURCE_MEM, |
| 134 | }, |
| 135 | [23] = { |
| 136 | .start = IRQ_SYSMMU_ROTATOR_0, |
| 137 | .end = IRQ_SYSMMU_ROTATOR_0, |
| 138 | .flags = IORESOURCE_IRQ, |
| 139 | }, |
| 140 | [24] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 141 | .start = EXYNOS4_PA_SYSMMU_MDMA2, |
| 142 | .end = EXYNOS4_PA_SYSMMU_MDMA2 + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 143 | .flags = IORESOURCE_MEM, |
| 144 | }, |
| 145 | [25] = { |
| 146 | .start = IRQ_SYSMMU_MDMA1_0, |
| 147 | .end = IRQ_SYSMMU_MDMA1_0, |
| 148 | .flags = IORESOURCE_IRQ, |
| 149 | }, |
| 150 | [26] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 151 | .start = EXYNOS4_PA_SYSMMU_TV, |
| 152 | .end = EXYNOS4_PA_SYSMMU_TV + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 153 | .flags = IORESOURCE_MEM, |
| 154 | }, |
| 155 | [27] = { |
| 156 | .start = IRQ_SYSMMU_TV_M0_0, |
| 157 | .end = IRQ_SYSMMU_TV_M0_0, |
| 158 | .flags = IORESOURCE_IRQ, |
| 159 | }, |
| 160 | [28] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 161 | .start = EXYNOS4_PA_SYSMMU_MFC_L, |
| 162 | .end = EXYNOS4_PA_SYSMMU_MFC_L + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 163 | .flags = IORESOURCE_MEM, |
| 164 | }, |
| 165 | [29] = { |
| 166 | .start = IRQ_SYSMMU_MFC_M0_0, |
| 167 | .end = IRQ_SYSMMU_MFC_M0_0, |
| 168 | .flags = IORESOURCE_IRQ, |
| 169 | }, |
| 170 | [30] = { |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 171 | .start = EXYNOS4_PA_SYSMMU_MFC_R, |
| 172 | .end = EXYNOS4_PA_SYSMMU_MFC_R + SZ_64K - 1, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 173 | .flags = IORESOURCE_MEM, |
| 174 | }, |
| 175 | [31] = { |
| 176 | .start = IRQ_SYSMMU_MFC_M1_0, |
| 177 | .end = IRQ_SYSMMU_MFC_M1_0, |
| 178 | .flags = IORESOURCE_IRQ, |
| 179 | }, |
| 180 | }; |
| 181 | |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 182 | struct platform_device exynos4_device_sysmmu = { |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 183 | .name = "s5p-sysmmu", |
| 184 | .id = 32, |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 185 | .num_resources = ARRAY_SIZE(exynos4_sysmmu_resource), |
| 186 | .resource = exynos4_sysmmu_resource, |
Donguk Ryu | ccbc876 | 2011-01-13 13:40:29 +0900 | [diff] [blame] | 187 | }; |
| 188 | |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame^] | 189 | EXPORT_SYMBOL(exynos4_device_sysmmu); |