Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 2 | /* |
| 3 | * |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 4 | * Common functions for OMAP4/5 based boards |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 5 | * |
| 6 | * (C) Copyright 2010 |
| 7 | * Texas Instruments, <www.ti.com> |
| 8 | * |
| 9 | * Author : |
| 10 | * Aneesh V <aneesh@ti.com> |
| 11 | * Steve Sakoman <steve@sakoman.com> |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 12 | */ |
| 13 | #include <common.h> |
Lokesh Vutla | 01fe119 | 2017-05-05 13:45:27 +0530 | [diff] [blame] | 14 | #include <debug_uart.h> |
Jean-Jacques Hiblot | 40ecdbc | 2018-12-07 14:50:55 +0100 | [diff] [blame] | 15 | #include <fdtdec.h> |
Simon Glass | 691d719 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 16 | #include <init.h> |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 17 | #include <spl.h> |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 18 | #include <asm/arch/sys_proto.h> |
Simon Glass | 401d1c4 | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 19 | #include <asm/global_data.h> |
Alexey Brodkin | 1ace402 | 2014-02-26 17:47:58 +0400 | [diff] [blame] | 20 | #include <linux/sizes.h> |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 21 | #include <asm/emif.h> |
SRICHARAN R | 01b753f | 2013-02-04 04:22:00 +0000 | [diff] [blame] | 22 | #include <asm/omap_common.h> |
Lokesh Vutla | d4d986e | 2013-02-12 01:33:45 +0000 | [diff] [blame] | 23 | #include <linux/compiler.h> |
R Sricharan | de63ac2 | 2013-03-04 20:04:45 +0000 | [diff] [blame] | 24 | #include <asm/system.h> |
Jean-Jacques Hiblot | 40ecdbc | 2018-12-07 14:50:55 +0100 | [diff] [blame] | 25 | #include <dm/root.h> |
R Sricharan | de63ac2 | 2013-03-04 20:04:45 +0000 | [diff] [blame] | 26 | |
Nishanth Menon | 93e3568 | 2010-11-19 11:19:40 -0500 | [diff] [blame] | 27 | DECLARE_GLOBAL_DATA_PTR; |
| 28 | |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 29 | void do_set_mux(u32 base, struct pad_conf_entry const *array, int size) |
| 30 | { |
| 31 | int i; |
| 32 | struct pad_conf_entry *pad = (struct pad_conf_entry *) array; |
| 33 | |
| 34 | for (i = 0; i < size; i++, pad++) |
| 35 | writew(pad->val, base + pad->offset); |
| 36 | } |
| 37 | |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 38 | static void set_mux_conf_regs(void) |
| 39 | { |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 40 | switch (omap_hw_init_context()) { |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 41 | case OMAP_INIT_CONTEXT_SPL: |
Paul Kocialkowski | 3ef56e6 | 2016-02-27 19:18:56 +0100 | [diff] [blame] | 42 | set_muxconf_regs(); |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 43 | break; |
| 44 | case OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL: |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 45 | break; |
| 46 | case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR: |
| 47 | case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH: |
Paul Kocialkowski | 3ef56e6 | 2016-02-27 19:18:56 +0100 | [diff] [blame] | 48 | set_muxconf_regs(); |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 49 | break; |
| 50 | } |
| 51 | } |
| 52 | |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 53 | u32 cortex_rev(void) |
Aneesh V | ad577c8 | 2011-07-21 09:10:04 -0400 | [diff] [blame] | 54 | { |
| 55 | |
| 56 | unsigned int rev; |
| 57 | |
| 58 | /* Read Main ID Register (MIDR) */ |
| 59 | asm ("mrc p15, 0, %0, c0, c0, 0" : "=r" (rev)); |
| 60 | |
| 61 | return rev; |
| 62 | } |
| 63 | |
Tom Rini | 0ac6db2 | 2013-05-31 10:44:23 -0400 | [diff] [blame] | 64 | static void omap_rev_string(void) |
Aneesh V | ad577c8 | 2011-07-21 09:10:04 -0400 | [diff] [blame] | 65 | { |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 66 | u32 omap_rev = omap_revision(); |
Lokesh Vutla | de62688 | 2013-02-12 21:29:03 +0000 | [diff] [blame] | 67 | u32 soc_variant = (omap_rev & 0xF0000000) >> 28; |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 68 | u32 omap_variant = (omap_rev & 0xFFFF0000) >> 16; |
| 69 | u32 major_rev = (omap_rev & 0x00000F00) >> 8; |
| 70 | u32 minor_rev = (omap_rev & 0x000000F0) >> 4; |
Aneesh V | ad577c8 | 2011-07-21 09:10:04 -0400 | [diff] [blame] | 71 | |
Lokesh Vutla | 941f2fc | 2017-12-29 11:47:51 +0530 | [diff] [blame] | 72 | const char *sec_s, *package = NULL; |
Daniel Allred | 47c331e | 2016-05-19 19:10:52 -0500 | [diff] [blame] | 73 | |
| 74 | switch (get_device_type()) { |
| 75 | case TST_DEVICE: |
| 76 | sec_s = "TST"; |
| 77 | break; |
| 78 | case EMU_DEVICE: |
| 79 | sec_s = "EMU"; |
| 80 | break; |
| 81 | case HS_DEVICE: |
| 82 | sec_s = "HS"; |
| 83 | break; |
| 84 | case GP_DEVICE: |
| 85 | sec_s = "GP"; |
| 86 | break; |
| 87 | default: |
| 88 | sec_s = "?"; |
| 89 | } |
| 90 | |
Lokesh Vutla | 941f2fc | 2017-12-29 11:47:51 +0530 | [diff] [blame] | 91 | #if defined(CONFIG_DRA7XX) |
| 92 | if (is_dra76x()) { |
| 93 | switch (omap_rev & 0xF) { |
| 94 | case DRA762_ABZ_PACKAGE: |
| 95 | package = "ABZ"; |
| 96 | break; |
| 97 | case DRA762_ACD_PACKAGE: |
| 98 | default: |
| 99 | package = "ACD"; |
| 100 | break; |
| 101 | } |
| 102 | } |
| 103 | #endif |
| 104 | |
Lokesh Vutla | de62688 | 2013-02-12 21:29:03 +0000 | [diff] [blame] | 105 | if (soc_variant) |
| 106 | printf("OMAP"); |
| 107 | else |
| 108 | printf("DRA"); |
Lokesh Vutla | 941f2fc | 2017-12-29 11:47:51 +0530 | [diff] [blame] | 109 | printf("%x-%s ES%x.%x", omap_variant, sec_s, major_rev, minor_rev); |
| 110 | if (package) |
| 111 | printf(" %s package\n", package); |
| 112 | else |
| 113 | puts("\n"); |
Aneesh V | ad577c8 | 2011-07-21 09:10:04 -0400 | [diff] [blame] | 114 | } |
| 115 | |
Sricharan | 78f455c | 2011-11-15 09:50:03 -0500 | [diff] [blame] | 116 | #ifdef CONFIG_SPL_BUILD |
Tom Rini | 861a86f | 2012-08-13 11:37:56 -0700 | [diff] [blame] | 117 | void spl_display_print(void) |
| 118 | { |
| 119 | omap_rev_string(); |
| 120 | } |
Sricharan | 78f455c | 2011-11-15 09:50:03 -0500 | [diff] [blame] | 121 | #endif |
| 122 | |
Lokesh Vutla | d4d986e | 2013-02-12 01:33:45 +0000 | [diff] [blame] | 123 | void __weak srcomp_enable(void) |
| 124 | { |
| 125 | } |
| 126 | |
Kipisz, Steven | d88d6c8 | 2016-02-24 12:30:57 -0600 | [diff] [blame] | 127 | /** |
| 128 | * do_board_detect() - Detect board description |
| 129 | * |
| 130 | * Function to detect board description. This is expected to be |
| 131 | * overridden in the SoC family board file where desired. |
| 132 | */ |
| 133 | void __weak do_board_detect(void) |
| 134 | { |
| 135 | } |
| 136 | |
Keerthy | 61462cd | 2016-05-24 11:45:05 +0530 | [diff] [blame] | 137 | /** |
| 138 | * vcores_init() - Assign omap_vcores based on board |
| 139 | * |
| 140 | * Function to pick the vcores based on board. This is expected to be |
| 141 | * overridden in the SoC family board file where desired. |
| 142 | */ |
| 143 | void __weak vcores_init(void) |
| 144 | { |
| 145 | } |
| 146 | |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 147 | void s_init(void) |
| 148 | { |
| 149 | } |
| 150 | |
| 151 | /** |
Lokesh Vutla | 941f2fc | 2017-12-29 11:47:51 +0530 | [diff] [blame] | 152 | * init_package_revision() - Initialize package revision |
| 153 | * |
| 154 | * Function to get the pacakage information. This is expected to be |
| 155 | * overridden in the SoC family file where desired. |
| 156 | */ |
| 157 | void __weak init_package_revision(void) |
| 158 | { |
| 159 | } |
| 160 | |
| 161 | /** |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 162 | * early_system_init - Does Early system initialization. |
| 163 | * |
| 164 | * Does early system init of watchdog, muxing, andclocks |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 165 | * Watchdog disable is done always. For the rest what gets done |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 166 | * depends on the boot mode in which this function is executed when |
| 167 | * 1. SPL running from SRAM |
| 168 | * 2. U-Boot running from FLASH |
| 169 | * 3. U-Boot loaded to SDRAM by SPL |
| 170 | * 4. U-Boot loaded to SDRAM by ROM code using the |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 171 | * Configuration Header feature |
| 172 | * Please have a look at the respective functions to see what gets |
| 173 | * done in each of these cases |
| 174 | * This function is called with SRAM stack. |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 175 | */ |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 176 | void early_system_init(void) |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 177 | { |
Jean-Jacques Hiblot | 40ecdbc | 2018-12-07 14:50:55 +0100 | [diff] [blame] | 178 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_MULTI_DTB_FIT) |
| 179 | int ret; |
| 180 | int rescan; |
| 181 | #endif |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 182 | init_omap_revision(); |
SRICHARAN R | 01b753f | 2013-02-04 04:22:00 +0000 | [diff] [blame] | 183 | hw_data_init(); |
Lokesh Vutla | 941f2fc | 2017-12-29 11:47:51 +0530 | [diff] [blame] | 184 | init_package_revision(); |
SRICHARAN R | 01b753f | 2013-02-04 04:22:00 +0000 | [diff] [blame] | 185 | |
Lokesh Vutla | 38f25b1 | 2012-05-29 19:26:43 +0000 | [diff] [blame] | 186 | #ifdef CONFIG_SPL_BUILD |
Lokesh Vutla | 663f6fc | 2016-07-12 14:47:41 +0530 | [diff] [blame] | 187 | if (warm_reset()) |
Lokesh Vutla | 38f25b1 | 2012-05-29 19:26:43 +0000 | [diff] [blame] | 188 | force_emif_self_refresh(); |
| 189 | #endif |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 190 | watchdog_init(); |
Aneesh V | 469ec1e | 2011-07-21 09:10:01 -0400 | [diff] [blame] | 191 | set_mux_conf_regs(); |
Aneesh V | bcae721 | 2011-07-21 09:10:21 -0400 | [diff] [blame] | 192 | #ifdef CONFIG_SPL_BUILD |
Lokesh Vutla | d4d986e | 2013-02-12 01:33:45 +0000 | [diff] [blame] | 193 | srcomp_enable(); |
Aneesh V | 4ecfcfa | 2011-09-08 11:05:56 -0400 | [diff] [blame] | 194 | do_io_settings(); |
Aneesh V | bcae721 | 2011-07-21 09:10:21 -0400 | [diff] [blame] | 195 | #endif |
Kipisz, Steven | 93e6253 | 2016-02-24 12:30:52 -0600 | [diff] [blame] | 196 | setup_early_clocks(); |
Jean-Jacques Hiblot | 40ecdbc | 2018-12-07 14:50:55 +0100 | [diff] [blame] | 197 | |
Lokesh Vutla | 4bd754d | 2017-06-27 13:50:56 +0530 | [diff] [blame] | 198 | #ifdef CONFIG_SPL_BUILD |
| 199 | /* |
| 200 | * Save the boot parameters passed from romcode. |
| 201 | * We cannot delay the saving further than this, |
| 202 | * to prevent overwrites. |
| 203 | */ |
| 204 | save_omap_boot_params(); |
Jean-Jacques Hiblot | a4d7286 | 2017-09-15 12:57:33 +0200 | [diff] [blame] | 205 | spl_early_init(); |
| 206 | #endif |
Jean-Jacques Hiblot | 2b30b38 | 2018-12-07 14:50:45 +0100 | [diff] [blame] | 207 | do_board_detect(); |
| 208 | |
Jean-Jacques Hiblot | 40ecdbc | 2018-12-07 14:50:55 +0100 | [diff] [blame] | 209 | #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_MULTI_DTB_FIT) |
| 210 | /* |
| 211 | * Board detection has been done. |
| 212 | * Let us see if another dtb wouldn't be a better match |
| 213 | * for our board |
| 214 | */ |
| 215 | ret = fdtdec_resetup(&rescan); |
| 216 | if (!ret && rescan) { |
| 217 | dm_uninit(); |
| 218 | dm_init_and_scan(true); |
| 219 | } |
| 220 | #endif |
| 221 | |
Keerthy | 61462cd | 2016-05-24 11:45:05 +0530 | [diff] [blame] | 222 | vcores_init(); |
Lokesh Vutla | 01fe119 | 2017-05-05 13:45:27 +0530 | [diff] [blame] | 223 | #ifdef CONFIG_DEBUG_UART_OMAP |
| 224 | debug_uart_init(); |
| 225 | #endif |
Aneesh V | 3776801 | 2011-07-21 09:10:07 -0400 | [diff] [blame] | 226 | prcm_init(); |
Simon Glass | 7ae8350 | 2015-03-03 08:03:02 -0700 | [diff] [blame] | 227 | } |
| 228 | |
Aneesh V | bcae721 | 2011-07-21 09:10:21 -0400 | [diff] [blame] | 229 | #ifdef CONFIG_SPL_BUILD |
Simon Glass | 7ae8350 | 2015-03-03 08:03:02 -0700 | [diff] [blame] | 230 | void board_init_f(ulong dummy) |
| 231 | { |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 232 | early_system_init(); |
Lokesh Vutla | 7b92252 | 2014-08-04 19:42:24 +0530 | [diff] [blame] | 233 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
| 234 | board_early_init_f(); |
| 235 | #endif |
Aneesh V | bcae721 | 2011-07-21 09:10:21 -0400 | [diff] [blame] | 236 | /* For regular u-boot sdram_init() is called from dram_init() */ |
| 237 | sdram_init(); |
Lokesh Vutla | 8628279 | 2017-04-18 17:27:24 +0530 | [diff] [blame] | 238 | gd->ram_size = omap_sdram_size(); |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 239 | } |
Simon Glass | 7ae8350 | 2015-03-03 08:03:02 -0700 | [diff] [blame] | 240 | #endif |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 241 | |
Lokesh Vutla | e850ed8 | 2016-03-07 14:49:54 +0530 | [diff] [blame] | 242 | int arch_cpu_init_dm(void) |
| 243 | { |
| 244 | early_system_init(); |
| 245 | return 0; |
| 246 | } |
| 247 | |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 248 | /* |
| 249 | * Routine: wait_for_command_complete |
| 250 | * Description: Wait for posting to finish on watchdog |
| 251 | */ |
| 252 | void wait_for_command_complete(struct watchdog *wd_base) |
| 253 | { |
| 254 | int pending = 1; |
| 255 | do { |
| 256 | pending = readl(&wd_base->wwps); |
| 257 | } while (pending); |
| 258 | } |
| 259 | |
| 260 | /* |
| 261 | * Routine: watchdog_init |
| 262 | * Description: Shut down watch dogs |
| 263 | */ |
| 264 | void watchdog_init(void) |
| 265 | { |
| 266 | struct watchdog *wd2_base = (struct watchdog *)WDT2_BASE; |
| 267 | |
| 268 | writel(WD_UNLOCK1, &wd2_base->wspr); |
| 269 | wait_for_command_complete(wd2_base); |
| 270 | writel(WD_UNLOCK2, &wd2_base->wspr); |
| 271 | } |
| 272 | |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 273 | |
| 274 | /* |
| 275 | * This function finds the SDRAM size available in the system |
| 276 | * based on DMM section configurations |
| 277 | * This is needed because the size of memory installed may be |
| 278 | * different on different versions of the board |
| 279 | */ |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 280 | u32 omap_sdram_size(void) |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 281 | { |
SRICHARAN R | e06e914 | 2012-05-17 00:12:06 +0000 | [diff] [blame] | 282 | u32 section, i, valid; |
| 283 | u64 sdram_start = 0, sdram_end = 0, addr, |
Lokesh Vutla | d7630da | 2014-05-12 13:49:33 +0530 | [diff] [blame] | 284 | size, total_size = 0, trap_size = 0, trap_start = 0; |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 285 | |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 286 | for (i = 0; i < 4; i++) { |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 287 | section = __raw_readl(DMM_BASE + i*4); |
SRICHARAN R | e06e914 | 2012-05-17 00:12:06 +0000 | [diff] [blame] | 288 | valid = (section & EMIF_SDRC_ADDRSPC_MASK) >> |
| 289 | (EMIF_SDRC_ADDRSPC_SHIFT); |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 290 | addr = section & EMIF_SYS_ADDR_MASK; |
SRICHARAN R | e06e914 | 2012-05-17 00:12:06 +0000 | [diff] [blame] | 291 | |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 292 | /* See if the address is valid */ |
Tom Rini | 939911a | 2014-05-16 13:02:24 -0400 | [diff] [blame] | 293 | if ((addr >= TI_ARMV7_DRAM_ADDR_SPACE_START) && |
| 294 | (addr < TI_ARMV7_DRAM_ADDR_SPACE_END)) { |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 295 | size = ((section & EMIF_SYS_SIZE_MASK) >> |
| 296 | EMIF_SYS_SIZE_SHIFT); |
| 297 | size = 1 << size; |
| 298 | size *= SZ_16M; |
SRICHARAN R | e06e914 | 2012-05-17 00:12:06 +0000 | [diff] [blame] | 299 | |
| 300 | if (valid != DMM_SDRC_ADDR_SPC_INVALID) { |
| 301 | if (!sdram_start || (addr < sdram_start)) |
| 302 | sdram_start = addr; |
| 303 | if (!sdram_end || ((addr + size) > sdram_end)) |
| 304 | sdram_end = addr + size; |
| 305 | } else { |
| 306 | trap_size = size; |
Lokesh Vutla | d7630da | 2014-05-12 13:49:33 +0530 | [diff] [blame] | 307 | trap_start = addr; |
SRICHARAN R | e06e914 | 2012-05-17 00:12:06 +0000 | [diff] [blame] | 308 | } |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 309 | } |
| 310 | } |
Lokesh Vutla | d7630da | 2014-05-12 13:49:33 +0530 | [diff] [blame] | 311 | |
| 312 | if ((trap_start >= sdram_start) && (trap_start < sdram_end)) |
| 313 | total_size = (sdram_end - sdram_start) - (trap_size); |
| 314 | else |
| 315 | total_size = sdram_end - sdram_start; |
Sricharan | bb772a5 | 2011-11-15 09:50:00 -0500 | [diff] [blame] | 316 | |
Aneesh V | 7ca3f9c | 2010-09-12 10:32:55 +0530 | [diff] [blame] | 317 | return total_size; |
| 318 | } |
| 319 | |
| 320 | |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 321 | /* |
| 322 | * Routine: dram_init |
| 323 | * Description: sets uboots idea of sdram size |
| 324 | */ |
| 325 | int dram_init(void) |
| 326 | { |
Aneesh V | 2ae610f | 2011-07-21 09:10:09 -0400 | [diff] [blame] | 327 | sdram_init(); |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 328 | gd->ram_size = omap_sdram_size(); |
Steve Sakoman | d34efc7 | 2010-06-08 13:07:46 -0700 | [diff] [blame] | 329 | return 0; |
| 330 | } |
| 331 | |
| 332 | /* |
| 333 | * Print board information |
| 334 | */ |
| 335 | int checkboard(void) |
| 336 | { |
| 337 | puts(sysinfo.board_string); |
| 338 | return 0; |
| 339 | } |
| 340 | |
Masahiro Yamada | 365475e | 2014-02-13 18:30:26 +0900 | [diff] [blame] | 341 | #if defined(CONFIG_DISPLAY_CPUINFO) |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 342 | /* |
| 343 | * Print CPU information |
| 344 | */ |
| 345 | int print_cpuinfo(void) |
Aneesh V | 8b457fa | 2011-06-16 23:30:52 +0000 | [diff] [blame] | 346 | { |
Andreas Müller | 761ca31 | 2012-01-04 15:26:24 +0000 | [diff] [blame] | 347 | puts("CPU : "); |
| 348 | omap_rev_string(); |
Sricharan | 508a58f | 2011-11-15 09:49:55 -0500 | [diff] [blame] | 349 | |
| 350 | return 0; |
| 351 | } |
Masahiro Yamada | 365475e | 2014-02-13 18:30:26 +0900 | [diff] [blame] | 352 | #endif |