Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2007 |
| 3 | * Sascha Hauer, Pengutronix |
| 4 | * |
| 5 | * (C) Copyright 2009 Freescale Semiconductor, Inc. |
| 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
Jeroen Hofstee | 1abf3a1 | 2014-10-08 22:57:52 +0200 | [diff] [blame] | 10 | #include <bootm.h> |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 11 | #include <common.h> |
Jeroen Hofstee | 1abf3a1 | 2014-10-08 22:57:52 +0200 | [diff] [blame] | 12 | #include <netdev.h> |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 13 | #include <asm/errno.h> |
| 14 | #include <asm/io.h> |
| 15 | #include <asm/arch/imx-regs.h> |
| 16 | #include <asm/arch/clock.h> |
| 17 | #include <asm/arch/sys_proto.h> |
Fabio Estevam | 6479f51 | 2012-04-29 08:11:13 +0000 | [diff] [blame] | 18 | #include <asm/arch/crm_regs.h> |
Tim Harvey | 27f9059 | 2015-05-18 06:56:46 -0700 | [diff] [blame] | 19 | #include <imx_thermal.h> |
Eric Nelson | 54b3f3b | 2012-09-23 07:30:55 +0000 | [diff] [blame] | 20 | #include <ipu_pixfmt.h> |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 21 | #include <thermal.h> |
Nikita Kiryanov | b5c9ed3 | 2014-11-21 12:47:26 +0200 | [diff] [blame] | 22 | #include <sata.h> |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 23 | |
| 24 | #ifdef CONFIG_FSL_ESDHC |
| 25 | #include <fsl_esdhc.h> |
| 26 | #endif |
| 27 | |
Prabhakar Kushwaha | f2c19de | 2015-05-18 17:13:52 +0530 | [diff] [blame] | 28 | #if defined(CONFIG_DISPLAY_CPUINFO) |
Eric Nelson | 25e0230 | 2015-02-15 14:37:21 -0700 | [diff] [blame] | 29 | static u32 reset_cause = -1; |
| 30 | |
| 31 | static char *get_reset_cause(void) |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 32 | { |
| 33 | u32 cause; |
| 34 | struct src *src_regs = (struct src *)SRC_BASE_ADDR; |
| 35 | |
| 36 | cause = readl(&src_regs->srsr); |
| 37 | writel(cause, &src_regs->srsr); |
Eric Nelson | 25e0230 | 2015-02-15 14:37:21 -0700 | [diff] [blame] | 38 | reset_cause = cause; |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 39 | |
| 40 | switch (cause) { |
| 41 | case 0x00001: |
Fabio Estevam | 9af122b | 2012-03-13 07:26:48 +0000 | [diff] [blame] | 42 | case 0x00011: |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 43 | return "POR"; |
| 44 | case 0x00004: |
| 45 | return "CSU"; |
| 46 | case 0x00008: |
| 47 | return "IPP USER"; |
| 48 | case 0x00010: |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 49 | #ifdef CONFIG_MX7 |
| 50 | return "WDOG1"; |
| 51 | #else |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 52 | return "WDOG"; |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 53 | #endif |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 54 | case 0x00020: |
| 55 | return "JTAG HIGH-Z"; |
| 56 | case 0x00040: |
| 57 | return "JTAG SW"; |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 58 | case 0x00080: |
| 59 | return "WDOG3"; |
| 60 | #ifdef CONFIG_MX7 |
| 61 | case 0x00100: |
| 62 | return "WDOG4"; |
| 63 | case 0x00200: |
| 64 | return "TEMPSENSE"; |
| 65 | #else |
| 66 | case 0x00100: |
| 67 | return "TEMPSENSE"; |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 68 | case 0x10000: |
| 69 | return "WARM BOOT"; |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 70 | #endif |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 71 | default: |
| 72 | return "unknown reset"; |
| 73 | } |
| 74 | } |
| 75 | |
Eric Nelson | 25e0230 | 2015-02-15 14:37:21 -0700 | [diff] [blame] | 76 | u32 get_imx_reset_cause(void) |
| 77 | { |
| 78 | return reset_cause; |
| 79 | } |
Prabhakar Kushwaha | f2c19de | 2015-05-18 17:13:52 +0530 | [diff] [blame] | 80 | #endif |
Eric Nelson | 25e0230 | 2015-02-15 14:37:21 -0700 | [diff] [blame] | 81 | |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 82 | #if defined(CONFIG_MX53) || defined(CONFIG_MX6) |
| 83 | #if defined(CONFIG_MX53) |
Eric Nelson | c7d4612 | 2013-11-08 16:50:53 -0700 | [diff] [blame] | 84 | #define MEMCTL_BASE ESDCTL_BASE_ADDR |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 85 | #else |
Eric Nelson | c7d4612 | 2013-11-08 16:50:53 -0700 | [diff] [blame] | 86 | #define MEMCTL_BASE MMDC_P0_BASE_ADDR |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 87 | #endif |
| 88 | static const unsigned char col_lookup[] = {9, 10, 11, 8, 12, 9, 9, 9}; |
| 89 | static const unsigned char bank_lookup[] = {3, 2}; |
| 90 | |
Tim Harvey | 066fbad | 2014-06-02 16:13:21 -0700 | [diff] [blame] | 91 | /* these MMDC registers are common to the IMX53 and IMX6 */ |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 92 | struct esd_mmdc_regs { |
| 93 | uint32_t ctl; |
| 94 | uint32_t pdc; |
| 95 | uint32_t otc; |
| 96 | uint32_t cfg0; |
| 97 | uint32_t cfg1; |
| 98 | uint32_t cfg2; |
| 99 | uint32_t misc; |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 100 | }; |
| 101 | |
| 102 | #define ESD_MMDC_CTL_GET_ROW(mdctl) ((ctl >> 24) & 7) |
| 103 | #define ESD_MMDC_CTL_GET_COLUMN(mdctl) ((ctl >> 20) & 7) |
| 104 | #define ESD_MMDC_CTL_GET_WIDTH(mdctl) ((ctl >> 16) & 3) |
| 105 | #define ESD_MMDC_CTL_GET_CS1(mdctl) ((ctl >> 30) & 1) |
| 106 | #define ESD_MMDC_MISC_GET_BANK(mdmisc) ((misc >> 5) & 1) |
| 107 | |
Tim Harvey | 066fbad | 2014-06-02 16:13:21 -0700 | [diff] [blame] | 108 | /* |
| 109 | * imx_ddr_size - return size in bytes of DRAM according MMDC config |
| 110 | * The MMDC MDCTL register holds the number of bits for row, col, and data |
| 111 | * width and the MMDC MDMISC register holds the number of banks. Combine |
| 112 | * all these bits to determine the meme size the MMDC has been configured for |
| 113 | */ |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 114 | unsigned imx_ddr_size(void) |
| 115 | { |
| 116 | struct esd_mmdc_regs *mem = (struct esd_mmdc_regs *)MEMCTL_BASE; |
| 117 | unsigned ctl = readl(&mem->ctl); |
| 118 | unsigned misc = readl(&mem->misc); |
| 119 | int bits = 11 + 0 + 0 + 1; /* row + col + bank + width */ |
| 120 | |
| 121 | bits += ESD_MMDC_CTL_GET_ROW(ctl); |
| 122 | bits += col_lookup[ESD_MMDC_CTL_GET_COLUMN(ctl)]; |
| 123 | bits += bank_lookup[ESD_MMDC_MISC_GET_BANK(misc)]; |
| 124 | bits += ESD_MMDC_CTL_GET_WIDTH(ctl); |
| 125 | bits += ESD_MMDC_CTL_GET_CS1(ctl); |
Marek Vasut | 005a4d1 | 2014-08-04 01:47:09 +0200 | [diff] [blame] | 126 | |
| 127 | /* The MX6 can do only 3840 MiB of DRAM */ |
| 128 | if (bits == 32) |
| 129 | return 0xf0000000; |
| 130 | |
Troy Kisky | b3aec6a | 2012-10-23 10:57:48 +0000 | [diff] [blame] | 131 | return 1 << bits; |
| 132 | } |
| 133 | #endif |
| 134 | |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 135 | #if defined(CONFIG_DISPLAY_CPUINFO) |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 136 | |
Troy Kisky | 5839493 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 137 | const char *get_imx_type(u32 imxtype) |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 138 | { |
| 139 | switch (imxtype) { |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 140 | case MXC_CPU_MX7D: |
| 141 | return "7D"; /* Dual-core version of the mx7 */ |
Peng Fan | 5f24792 | 2015-07-11 11:38:42 +0800 | [diff] [blame] | 142 | case MXC_CPU_MX6QP: |
| 143 | return "6QP"; /* Quad-Plus version of the mx6 */ |
| 144 | case MXC_CPU_MX6DP: |
| 145 | return "6DP"; /* Dual-Plus version of the mx6 */ |
Troy Kisky | 5839493 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 146 | case MXC_CPU_MX6Q: |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 147 | return "6Q"; /* Quad-core version of the mx6 */ |
Fabio Estevam | f3d5a2c | 2014-01-26 15:06:41 -0200 | [diff] [blame] | 148 | case MXC_CPU_MX6D: |
| 149 | return "6D"; /* Dual-core version of the mx6 */ |
Troy Kisky | 5839493 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 150 | case MXC_CPU_MX6DL: |
| 151 | return "6DL"; /* Dual Lite version of the mx6 */ |
| 152 | case MXC_CPU_MX6SOLO: |
| 153 | return "6SOLO"; /* Solo version of the mx6 */ |
| 154 | case MXC_CPU_MX6SL: |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 155 | return "6SL"; /* Solo-Lite version of the mx6 */ |
Fabio Estevam | 712ab88 | 2014-06-24 17:40:58 -0300 | [diff] [blame] | 156 | case MXC_CPU_MX6SX: |
| 157 | return "6SX"; /* SoloX version of the mx6 */ |
Peng Fan | eaa53a1 | 2015-07-20 19:28:21 +0800 | [diff] [blame] | 158 | case MXC_CPU_MX6UL: |
| 159 | return "6UL"; /* Ultra-Lite version of the mx6 */ |
Troy Kisky | 5839493 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 160 | case MXC_CPU_MX51: |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 161 | return "51"; |
Troy Kisky | 5839493 | 2012-10-23 10:57:46 +0000 | [diff] [blame] | 162 | case MXC_CPU_MX53: |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 163 | return "53"; |
| 164 | default: |
Otavio Salvador | 8567d7d | 2012-06-30 05:07:32 +0000 | [diff] [blame] | 165 | return "??"; |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 166 | } |
| 167 | } |
| 168 | |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 169 | int print_cpuinfo(void) |
| 170 | { |
Stefano Babic | 40adacc | 2015-05-26 19:53:41 +0200 | [diff] [blame] | 171 | u32 cpurev; |
| 172 | __maybe_unused u32 max_freq; |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 173 | |
Adrian Alonso | ce08c36 | 2015-09-02 13:54:13 -0500 | [diff] [blame] | 174 | cpurev = get_cpu_rev(); |
| 175 | |
| 176 | #if defined(CONFIG_IMX_THERMAL) |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 177 | struct udevice *thermal_dev; |
Tim Harvey | 27f9059 | 2015-05-18 06:56:46 -0700 | [diff] [blame] | 178 | int cpu_tmp, minc, maxc, ret; |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 179 | |
Tim Harvey | d792ede | 2015-05-18 07:02:25 -0700 | [diff] [blame] | 180 | printf("CPU: Freescale i.MX%s rev%d.%d", |
| 181 | get_imx_type((cpurev & 0xFF000) >> 12), |
| 182 | (cpurev & 0x000F0) >> 4, |
| 183 | (cpurev & 0x0000F) >> 0); |
| 184 | max_freq = get_cpu_speed_grade_hz(); |
| 185 | if (!max_freq || max_freq == mxc_get_clock(MXC_ARM_CLK)) { |
| 186 | printf(" at %dMHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000); |
| 187 | } else { |
| 188 | printf(" %d MHz (running at %d MHz)\n", max_freq / 1000000, |
| 189 | mxc_get_clock(MXC_ARM_CLK) / 1000000); |
| 190 | } |
| 191 | #else |
Fabio Estevam | 46e9733 | 2012-03-20 04:21:45 +0000 | [diff] [blame] | 192 | printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n", |
| 193 | get_imx_type((cpurev & 0xFF000) >> 12), |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 194 | (cpurev & 0x000F0) >> 4, |
| 195 | (cpurev & 0x0000F) >> 0, |
| 196 | mxc_get_clock(MXC_ARM_CLK) / 1000000); |
Tim Harvey | d792ede | 2015-05-18 07:02:25 -0700 | [diff] [blame] | 197 | #endif |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 198 | |
Adrian Alonso | ce08c36 | 2015-09-02 13:54:13 -0500 | [diff] [blame] | 199 | #if defined(CONFIG_IMX_THERMAL) |
Tim Harvey | 27f9059 | 2015-05-18 06:56:46 -0700 | [diff] [blame] | 200 | puts("CPU: "); |
| 201 | switch (get_cpu_temp_grade(&minc, &maxc)) { |
| 202 | case TEMP_AUTOMOTIVE: |
| 203 | puts("Automotive temperature grade "); |
| 204 | break; |
| 205 | case TEMP_INDUSTRIAL: |
| 206 | puts("Industrial temperature grade "); |
| 207 | break; |
| 208 | case TEMP_EXTCOMMERCIAL: |
| 209 | puts("Extended Commercial temperature grade "); |
| 210 | break; |
| 211 | default: |
| 212 | puts("Commercial temperature grade "); |
| 213 | break; |
| 214 | } |
| 215 | printf("(%dC to %dC)", minc, maxc); |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 216 | ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev); |
| 217 | if (!ret) { |
| 218 | ret = thermal_get_temp(thermal_dev, &cpu_tmp); |
| 219 | |
| 220 | if (!ret) |
Tim Harvey | 27f9059 | 2015-05-18 06:56:46 -0700 | [diff] [blame] | 221 | printf(" at %dC\n", cpu_tmp); |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 222 | else |
Fabio Estevam | f62604d | 2015-09-08 14:43:10 -0300 | [diff] [blame] | 223 | debug(" - invalid sensor data\n"); |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 224 | } else { |
Fabio Estevam | f62604d | 2015-09-08 14:43:10 -0300 | [diff] [blame] | 225 | debug(" - invalid sensor device\n"); |
Ye.Li | f19692c | 2014-11-20 21:14:14 +0800 | [diff] [blame] | 226 | } |
| 227 | #endif |
| 228 | |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 229 | printf("Reset cause: %s\n", get_reset_cause()); |
| 230 | return 0; |
| 231 | } |
| 232 | #endif |
| 233 | |
| 234 | int cpu_eth_init(bd_t *bis) |
| 235 | { |
| 236 | int rc = -ENODEV; |
| 237 | |
| 238 | #if defined(CONFIG_FEC_MXC) |
| 239 | rc = fecmxc_initialize(bis); |
| 240 | #endif |
| 241 | |
| 242 | return rc; |
| 243 | } |
| 244 | |
Benoît Thébaudeau | 58d2232 | 2012-08-17 10:42:55 +0000 | [diff] [blame] | 245 | #ifdef CONFIG_FSL_ESDHC |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 246 | /* |
| 247 | * Initializes on-chip MMC controllers. |
| 248 | * to override, implement board_mmc_init() |
| 249 | */ |
| 250 | int cpu_mmc_init(bd_t *bis) |
| 251 | { |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 252 | return fsl_esdhc_mmc_init(bis); |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 253 | } |
Benoît Thébaudeau | 58d2232 | 2012-08-17 10:42:55 +0000 | [diff] [blame] | 254 | #endif |
Jason Liu | 83aa8fe | 2011-11-25 00:18:01 +0000 | [diff] [blame] | 255 | |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 256 | #ifndef CONFIG_MX7 |
Fabio Estevam | 6479f51 | 2012-04-29 08:11:13 +0000 | [diff] [blame] | 257 | u32 get_ahb_clk(void) |
| 258 | { |
| 259 | struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; |
| 260 | u32 reg, ahb_podf; |
| 261 | |
| 262 | reg = __raw_readl(&imx_ccm->cbcdr); |
| 263 | reg &= MXC_CCM_CBCDR_AHB_PODF_MASK; |
| 264 | ahb_podf = reg >> MXC_CCM_CBCDR_AHB_PODF_OFFSET; |
| 265 | |
| 266 | return get_periph_clk() / (ahb_podf + 1); |
| 267 | } |
Adrian Alonso | 9f883e0 | 2015-09-02 13:54:23 -0500 | [diff] [blame] | 268 | #endif |
Eric Nelson | 54b3f3b | 2012-09-23 07:30:55 +0000 | [diff] [blame] | 269 | |
Eric Nelson | 54b3f3b | 2012-09-23 07:30:55 +0000 | [diff] [blame] | 270 | void arch_preboot_os(void) |
| 271 | { |
Nikita Kiryanov | b5c9ed3 | 2014-11-21 12:47:26 +0200 | [diff] [blame] | 272 | #if defined(CONFIG_CMD_SATA) |
| 273 | sata_stop(); |
Soeren Moch | a517d02 | 2014-11-27 10:11:41 +0100 | [diff] [blame] | 274 | #if defined(CONFIG_MX6) |
| 275 | disable_sata_clock(); |
| 276 | #endif |
Nikita Kiryanov | b5c9ed3 | 2014-11-21 12:47:26 +0200 | [diff] [blame] | 277 | #endif |
| 278 | #if defined(CONFIG_VIDEO_IPUV3) |
Eric Nelson | 54b3f3b | 2012-09-23 07:30:55 +0000 | [diff] [blame] | 279 | /* disable video before launching O/S */ |
| 280 | ipuv3_fb_shutdown(); |
Eric Nelson | 54b3f3b | 2012-09-23 07:30:55 +0000 | [diff] [blame] | 281 | #endif |
Nikita Kiryanov | b5c9ed3 | 2014-11-21 12:47:26 +0200 | [diff] [blame] | 282 | } |
Fabio Estevam | 16e65f6 | 2014-11-14 11:27:21 -0200 | [diff] [blame] | 283 | |
| 284 | void set_chipselect_size(int const cs_size) |
| 285 | { |
| 286 | unsigned int reg; |
| 287 | struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; |
| 288 | reg = readl(&iomuxc_regs->gpr[1]); |
| 289 | |
| 290 | switch (cs_size) { |
| 291 | case CS0_128: |
| 292 | reg &= ~0x7; /* CS0=128MB, CS1=0, CS2=0, CS3=0 */ |
| 293 | reg |= 0x5; |
| 294 | break; |
| 295 | case CS0_64M_CS1_64M: |
| 296 | reg &= ~0x3F; /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */ |
| 297 | reg |= 0x1B; |
| 298 | break; |
| 299 | case CS0_64M_CS1_32M_CS2_32M: |
| 300 | reg &= ~0x1FF; /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */ |
| 301 | reg |= 0x4B; |
| 302 | break; |
| 303 | case CS0_32M_CS1_32M_CS2_32M_CS3_32M: |
| 304 | reg &= ~0xFFF; /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */ |
| 305 | reg |= 0x249; |
| 306 | break; |
| 307 | default: |
| 308 | printf("Unknown chip select size: %d\n", cs_size); |
| 309 | break; |
| 310 | } |
| 311 | |
| 312 | writel(reg, &iomuxc_regs->gpr[1]); |
| 313 | } |