Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * AM642: SoC specific initialization |
| 4 | * |
| 5 | * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 | * Keerthy <j-keerthy@ti.com> |
| 7 | * Dave Gerlach <d-gerlach@ti.com> |
| 8 | */ |
| 9 | |
| 10 | #include <common.h> |
Aswath Govindraju | 70bc5e3 | 2021-06-04 22:00:33 +0530 | [diff] [blame] | 11 | #include <fdt_support.h> |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 12 | #include <spl.h> |
| 13 | #include <asm/io.h> |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 14 | #include <asm/arch/hardware.h> |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 15 | #include <asm/arch/sysfw-loader.h> |
| 16 | #include <asm/arch/sys_proto.h> |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 17 | #include "common.h" |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 18 | #include <asm/arch/sys_proto.h> |
| 19 | #include <linux/soc/ti/ti_sci_protocol.h> |
| 20 | #include <dm.h> |
| 21 | #include <dm/uclass-internal.h> |
| 22 | #include <dm/pinctrl.h> |
Dave Gerlach | a89f7a4 | 2021-04-23 11:27:37 -0500 | [diff] [blame] | 23 | #include <mmc.h> |
Lokesh Vutla | 17ad6e0 | 2021-05-06 16:44:52 +0530 | [diff] [blame] | 24 | #include <dm/root.h> |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 25 | |
| 26 | #if defined(CONFIG_SPL_BUILD) |
Hari Nagalla | d383c5e | 2022-03-09 14:42:30 -0600 | [diff] [blame] | 27 | #define MCU_CTRL_MMR0_BASE 0x04500000 |
| 28 | #define CTRLMMR_MCU_RST_CTRL 0x04518170 |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 29 | |
Dave Gerlach | eaef129 | 2021-04-23 11:27:34 -0500 | [diff] [blame] | 30 | static void ctrl_mmr_unlock(void) |
| 31 | { |
| 32 | /* Unlock all PADCFG_MMR1 module registers */ |
| 33 | mmr_unlock(PADCFG_MMR1_BASE, 1); |
| 34 | |
Hari Nagalla | d383c5e | 2022-03-09 14:42:30 -0600 | [diff] [blame] | 35 | /* Unlock all MCU_CTRL_MMR0 module registers */ |
| 36 | mmr_unlock(MCU_CTRL_MMR0_BASE, 0); |
| 37 | mmr_unlock(MCU_CTRL_MMR0_BASE, 1); |
| 38 | mmr_unlock(MCU_CTRL_MMR0_BASE, 2); |
| 39 | mmr_unlock(MCU_CTRL_MMR0_BASE, 3); |
| 40 | mmr_unlock(MCU_CTRL_MMR0_BASE, 4); |
| 41 | mmr_unlock(MCU_CTRL_MMR0_BASE, 6); |
| 42 | |
Dave Gerlach | eaef129 | 2021-04-23 11:27:34 -0500 | [diff] [blame] | 43 | /* Unlock all CTRL_MMR0 module registers */ |
| 44 | mmr_unlock(CTRL_MMR0_BASE, 0); |
| 45 | mmr_unlock(CTRL_MMR0_BASE, 1); |
| 46 | mmr_unlock(CTRL_MMR0_BASE, 2); |
| 47 | mmr_unlock(CTRL_MMR0_BASE, 3); |
| 48 | mmr_unlock(CTRL_MMR0_BASE, 5); |
| 49 | mmr_unlock(CTRL_MMR0_BASE, 6); |
Christian Gmeiner | 33a9d8e | 2022-05-12 08:21:01 +0200 | [diff] [blame^] | 50 | |
| 51 | /* Unlock all MCU_PADCFG_MMR1 module registers */ |
| 52 | mmr_unlock(MCU_PADCFG_MMR1_BASE, 1); |
Dave Gerlach | eaef129 | 2021-04-23 11:27:34 -0500 | [diff] [blame] | 53 | } |
| 54 | |
Dave Gerlach | b27a9f2 | 2021-04-23 11:27:35 -0500 | [diff] [blame] | 55 | /* |
| 56 | * This uninitialized global variable would normal end up in the .bss section, |
| 57 | * but the .bss is cleared between writing and reading this variable, so move |
| 58 | * it to the .data section. |
| 59 | */ |
| 60 | u32 bootindex __section(".data"); |
Marek BehĂșn | 4bebdd3 | 2021-05-20 13:23:52 +0200 | [diff] [blame] | 61 | static struct rom_extended_boot_data bootdata __section(".data"); |
Dave Gerlach | b27a9f2 | 2021-04-23 11:27:35 -0500 | [diff] [blame] | 62 | |
| 63 | static void store_boot_info_from_rom(void) |
| 64 | { |
| 65 | bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX); |
| 66 | memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO, |
| 67 | sizeof(struct rom_extended_boot_data)); |
| 68 | } |
| 69 | |
Dave Gerlach | a89f7a4 | 2021-04-23 11:27:37 -0500 | [diff] [blame] | 70 | #if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC) |
| 71 | void k3_mmc_stop_clock(void) |
| 72 | { |
| 73 | if (spl_boot_device() == BOOT_DEVICE_MMC1) { |
| 74 | struct mmc *mmc = find_mmc_device(0); |
| 75 | |
| 76 | if (!mmc) |
| 77 | return; |
| 78 | |
| 79 | mmc->saved_clock = mmc->clock; |
| 80 | mmc_set_clock(mmc, 0, true); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | void k3_mmc_restart_clock(void) |
| 85 | { |
| 86 | if (spl_boot_device() == BOOT_DEVICE_MMC1) { |
| 87 | struct mmc *mmc = find_mmc_device(0); |
| 88 | |
| 89 | if (!mmc) |
| 90 | return; |
| 91 | |
| 92 | mmc_set_clock(mmc, mmc->saved_clock, false); |
| 93 | } |
| 94 | } |
| 95 | #else |
| 96 | void k3_mmc_stop_clock(void) {} |
| 97 | void k3_mmc_restart_clock(void) {} |
| 98 | #endif |
| 99 | |
Lokesh Vutla | 17ad6e0 | 2021-05-06 16:44:52 +0530 | [diff] [blame] | 100 | #ifdef CONFIG_SPL_OF_LIST |
| 101 | void do_dt_magic(void) |
| 102 | { |
| 103 | int ret, rescan; |
| 104 | |
| 105 | if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) |
| 106 | do_board_detect(); |
| 107 | |
| 108 | /* |
| 109 | * Board detection has been done. |
| 110 | * Let us see if another dtb wouldn't be a better match |
| 111 | * for our board |
| 112 | */ |
| 113 | if (IS_ENABLED(CONFIG_CPU_V7R)) { |
| 114 | ret = fdtdec_resetup(&rescan); |
| 115 | if (!ret && rescan) { |
| 116 | dm_uninit(); |
| 117 | dm_init_and_scan(true); |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | #endif |
| 122 | |
Aswath Govindraju | 70bc5e3 | 2021-06-04 22:00:33 +0530 | [diff] [blame] | 123 | #if CONFIG_IS_ENABLED(USB_STORAGE) |
| 124 | static int fixup_usb_boot(const void *fdt_blob) |
| 125 | { |
| 126 | int ret = 0; |
| 127 | |
| 128 | switch (spl_boot_device()) { |
| 129 | case BOOT_DEVICE_USB: |
| 130 | /* |
| 131 | * If the boot mode is host, fixup the dr_mode to host |
| 132 | * before cdns3 bind takes place |
| 133 | */ |
| 134 | ret = fdt_find_and_setprop((void *)fdt_blob, |
| 135 | "/bus@f4000/cdns-usb@f900000/usb@f400000", |
| 136 | "dr_mode", "host", 5, 0); |
| 137 | if (ret) |
| 138 | printf("%s: fdt_find_and_setprop() failed:%d\n", |
| 139 | __func__, ret); |
| 140 | fallthrough; |
| 141 | default: |
| 142 | break; |
| 143 | } |
| 144 | |
| 145 | return ret; |
| 146 | } |
| 147 | |
| 148 | int fdtdec_board_setup(const void *fdt_blob) |
| 149 | { |
| 150 | /* Can use the pointer from the function parameters */ |
| 151 | return fixup_usb_boot(fdt_blob); |
| 152 | } |
| 153 | #endif |
| 154 | |
Hari Nagalla | d383c5e | 2022-03-09 14:42:30 -0600 | [diff] [blame] | 155 | #if defined(CONFIG_ESM_K3) |
| 156 | static void enable_mcu_esm_reset(void) |
| 157 | { |
| 158 | /* Set CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RST_EN_Z to '0' (low active) */ |
| 159 | u32 stat = readl(CTRLMMR_MCU_RST_CTRL); |
| 160 | |
| 161 | stat &= 0xFFFDFFFF; |
| 162 | writel(stat, CTRLMMR_MCU_RST_CTRL); |
| 163 | } |
| 164 | #endif |
| 165 | |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 166 | void board_init_f(ulong dummy) |
| 167 | { |
Hari Nagalla | d383c5e | 2022-03-09 14:42:30 -0600 | [diff] [blame] | 168 | #if defined(CONFIG_K3_LOAD_SYSFW) || defined(CONFIG_K3_AM64_DDRSS) || defined(CONFIG_ESM_K3) |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 169 | struct udevice *dev; |
| 170 | int ret; |
| 171 | #endif |
| 172 | |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 173 | #if defined(CONFIG_CPU_V7R) |
| 174 | setup_k3_mpu_regions(); |
| 175 | #endif |
| 176 | |
Dave Gerlach | b27a9f2 | 2021-04-23 11:27:35 -0500 | [diff] [blame] | 177 | /* |
| 178 | * Cannot delay this further as there is a chance that |
| 179 | * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section. |
| 180 | */ |
| 181 | store_boot_info_from_rom(); |
| 182 | |
Dave Gerlach | eaef129 | 2021-04-23 11:27:34 -0500 | [diff] [blame] | 183 | ctrl_mmr_unlock(); |
| 184 | |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 185 | /* Init DM early */ |
| 186 | spl_early_init(); |
| 187 | |
| 188 | preloader_console_init(); |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 189 | |
Lokesh Vutla | 17ad6e0 | 2021-05-06 16:44:52 +0530 | [diff] [blame] | 190 | do_dt_magic(); |
| 191 | |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 192 | #if defined(CONFIG_K3_LOAD_SYSFW) |
| 193 | /* |
| 194 | * Process pinctrl for serial3 a.k.a. MAIN UART1 module and continue |
| 195 | * regardless of the result of pinctrl. Do this without probing the |
| 196 | * device, but instead by searching the device that would request the |
| 197 | * given sequence number if probed. The UART will be used by the system |
| 198 | * firmware (SYSFW) image for various purposes and SYSFW depends on us |
| 199 | * to initialize its pin settings. |
| 200 | */ |
| 201 | ret = uclass_find_device_by_seq(UCLASS_SERIAL, 3, &dev); |
| 202 | if (!ret) |
| 203 | pinctrl_select_state(dev, "default"); |
| 204 | |
| 205 | /* |
| 206 | * Load, start up, and configure system controller firmware. |
| 207 | * This will determine whether or not ROM has already loaded |
| 208 | * system firmware and if so, will only perform needed config |
| 209 | * and not attempt to load firmware again. |
| 210 | */ |
Dave Gerlach | a89f7a4 | 2021-04-23 11:27:37 -0500 | [diff] [blame] | 211 | k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata), k3_mmc_stop_clock, |
| 212 | k3_mmc_restart_clock); |
Dave Gerlach | 8e0689b | 2021-04-23 11:27:36 -0500 | [diff] [blame] | 213 | #endif |
| 214 | |
| 215 | /* Output System Firmware version info */ |
| 216 | k3_sysfw_print_ver(); |
Dave Gerlach | ad38f51 | 2021-05-04 18:00:53 -0500 | [diff] [blame] | 217 | |
Hari Nagalla | d383c5e | 2022-03-09 14:42:30 -0600 | [diff] [blame] | 218 | #if defined(CONFIG_ESM_K3) |
| 219 | /* Probe/configure ESM0 */ |
| 220 | ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev); |
| 221 | if (ret) |
| 222 | printf("esm main init failed: %d\n", ret); |
| 223 | |
| 224 | /* Probe/configure MCUESM */ |
| 225 | ret = uclass_get_device_by_name(UCLASS_MISC, "esm@4100000", &dev); |
| 226 | if (ret) |
| 227 | printf("esm mcu init failed: %d\n", ret); |
| 228 | |
| 229 | enable_mcu_esm_reset(); |
| 230 | #endif |
| 231 | |
Dave Gerlach | ad38f51 | 2021-05-04 18:00:53 -0500 | [diff] [blame] | 232 | #if defined(CONFIG_K3_AM64_DDRSS) |
| 233 | ret = uclass_get_device(UCLASS_RAM, 0, &dev); |
| 234 | if (ret) |
| 235 | panic("DRAM init failed: %d\n", ret); |
| 236 | #endif |
Vignesh Raghavendra | 82cc43e | 2021-12-24 12:55:32 +0530 | [diff] [blame] | 237 | if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) && |
| 238 | spl_boot_device() == BOOT_DEVICE_ETHERNET) { |
| 239 | struct udevice *cpswdev; |
| 240 | |
| 241 | if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss), &cpswdev)) |
| 242 | printf("Failed to probe am65_cpsw_nuss driver\n"); |
| 243 | } |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 244 | } |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 245 | |
Andre Przywara | 3cb12ef | 2021-07-12 11:06:49 +0100 | [diff] [blame] | 246 | u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 247 | { |
| 248 | switch (boot_device) { |
| 249 | case BOOT_DEVICE_MMC1: |
| 250 | return MMCSD_MODE_EMMCBOOT; |
| 251 | |
| 252 | case BOOT_DEVICE_MMC2: |
| 253 | return MMCSD_MODE_FS; |
| 254 | |
| 255 | default: |
| 256 | return MMCSD_MODE_RAW; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | static u32 __get_backup_bootmedia(u32 main_devstat) |
| 261 | { |
| 262 | u32 bkup_bootmode = |
| 263 | (main_devstat & MAIN_DEVSTAT_BACKUP_BOOTMODE_MASK) >> |
| 264 | MAIN_DEVSTAT_BACKUP_BOOTMODE_SHIFT; |
| 265 | u32 bkup_bootmode_cfg = |
| 266 | (main_devstat & MAIN_DEVSTAT_BACKUP_BOOTMODE_CFG_MASK) >> |
| 267 | MAIN_DEVSTAT_BACKUP_BOOTMODE_CFG_SHIFT; |
| 268 | |
| 269 | switch (bkup_bootmode) { |
| 270 | case BACKUP_BOOT_DEVICE_UART: |
| 271 | return BOOT_DEVICE_UART; |
| 272 | |
Aswath Govindraju | 8a05c9a | 2021-06-04 22:00:32 +0530 | [diff] [blame] | 273 | case BACKUP_BOOT_DEVICE_DFU: |
| 274 | if (bkup_bootmode_cfg & MAIN_DEVSTAT_BACKUP_USB_MODE_MASK) |
| 275 | return BOOT_DEVICE_USB; |
| 276 | return BOOT_DEVICE_DFU; |
| 277 | |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 278 | |
| 279 | case BACKUP_BOOT_DEVICE_ETHERNET: |
| 280 | return BOOT_DEVICE_ETHERNET; |
| 281 | |
| 282 | case BACKUP_BOOT_DEVICE_MMC: |
| 283 | if (bkup_bootmode_cfg) |
| 284 | return BOOT_DEVICE_MMC2; |
| 285 | return BOOT_DEVICE_MMC1; |
| 286 | |
| 287 | case BACKUP_BOOT_DEVICE_SPI: |
| 288 | return BOOT_DEVICE_SPI; |
| 289 | |
| 290 | case BACKUP_BOOT_DEVICE_I2C: |
| 291 | return BOOT_DEVICE_I2C; |
| 292 | }; |
| 293 | |
| 294 | return BOOT_DEVICE_RAM; |
| 295 | } |
| 296 | |
| 297 | static u32 __get_primary_bootmedia(u32 main_devstat) |
| 298 | { |
| 299 | u32 bootmode = (main_devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >> |
| 300 | MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT; |
| 301 | u32 bootmode_cfg = |
| 302 | (main_devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK) >> |
| 303 | MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT; |
| 304 | |
| 305 | switch (bootmode) { |
| 306 | case BOOT_DEVICE_OSPI: |
| 307 | fallthrough; |
| 308 | case BOOT_DEVICE_QSPI: |
| 309 | fallthrough; |
| 310 | case BOOT_DEVICE_XSPI: |
| 311 | fallthrough; |
| 312 | case BOOT_DEVICE_SPI: |
| 313 | return BOOT_DEVICE_SPI; |
| 314 | |
| 315 | case BOOT_DEVICE_ETHERNET_RGMII: |
| 316 | fallthrough; |
| 317 | case BOOT_DEVICE_ETHERNET_RMII: |
| 318 | return BOOT_DEVICE_ETHERNET; |
| 319 | |
| 320 | case BOOT_DEVICE_EMMC: |
| 321 | return BOOT_DEVICE_MMC1; |
| 322 | |
| 323 | case BOOT_DEVICE_MMC: |
| 324 | if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_PORT_MASK) >> |
| 325 | MAIN_DEVSTAT_PRIMARY_MMC_PORT_SHIFT) |
| 326 | return BOOT_DEVICE_MMC2; |
| 327 | return BOOT_DEVICE_MMC1; |
| 328 | |
Aswath Govindraju | 8a05c9a | 2021-06-04 22:00:32 +0530 | [diff] [blame] | 329 | case BOOT_DEVICE_DFU: |
| 330 | if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_USB_MODE_MASK) >> |
| 331 | MAIN_DEVSTAT_PRIMARY_USB_MODE_SHIFT) |
| 332 | return BOOT_DEVICE_USB; |
| 333 | return BOOT_DEVICE_DFU; |
| 334 | |
Keerthy | 05d670e | 2021-04-23 11:27:33 -0500 | [diff] [blame] | 335 | case BOOT_DEVICE_NOBOOT: |
| 336 | return BOOT_DEVICE_RAM; |
| 337 | } |
| 338 | |
| 339 | return bootmode; |
| 340 | } |
| 341 | |
| 342 | u32 spl_boot_device(void) |
| 343 | { |
| 344 | u32 devstat = readl(CTRLMMR_MAIN_DEVSTAT); |
| 345 | |
| 346 | if (bootindex == K3_PRIMARY_BOOTMODE) |
| 347 | return __get_primary_bootmedia(devstat); |
| 348 | else |
| 349 | return __get_backup_bootmedia(devstat); |
| 350 | } |
Dave Gerlach | 96571ec | 2021-04-23 11:27:32 -0500 | [diff] [blame] | 351 | #endif |
Suman Anna | 320c020 | 2021-04-23 11:27:38 -0500 | [diff] [blame] | 352 | |
| 353 | #if defined(CONFIG_SYS_K3_SPL_ATF) |
| 354 | |
| 355 | #define AM64X_DEV_RTI8 127 |
| 356 | #define AM64X_DEV_RTI9 128 |
| 357 | #define AM64X_DEV_R5FSS0_CORE0 121 |
| 358 | #define AM64X_DEV_R5FSS0_CORE1 122 |
| 359 | |
| 360 | void release_resources_for_core_shutdown(void) |
| 361 | { |
| 362 | struct ti_sci_handle *ti_sci = get_ti_sci_handle(); |
| 363 | struct ti_sci_dev_ops *dev_ops = &ti_sci->ops.dev_ops; |
| 364 | struct ti_sci_proc_ops *proc_ops = &ti_sci->ops.proc_ops; |
| 365 | int ret; |
| 366 | u32 i; |
| 367 | |
| 368 | const u32 put_device_ids[] = { |
| 369 | AM64X_DEV_RTI9, |
| 370 | AM64X_DEV_RTI8, |
| 371 | }; |
| 372 | |
| 373 | /* Iterate through list of devices to put (shutdown) */ |
| 374 | for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { |
| 375 | u32 id = put_device_ids[i]; |
| 376 | |
| 377 | ret = dev_ops->put_device(ti_sci, id); |
| 378 | if (ret) |
| 379 | panic("Failed to put device %u (%d)\n", id, ret); |
| 380 | } |
| 381 | |
| 382 | const u32 put_core_ids[] = { |
| 383 | AM64X_DEV_R5FSS0_CORE1, |
| 384 | AM64X_DEV_R5FSS0_CORE0, /* Handle CPU0 after CPU1 */ |
| 385 | }; |
| 386 | |
| 387 | /* Iterate through list of cores to put (shutdown) */ |
| 388 | for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { |
| 389 | u32 id = put_core_ids[i]; |
| 390 | |
| 391 | /* |
| 392 | * Queue up the core shutdown request. Note that this call |
| 393 | * needs to be followed up by an actual invocation of an WFE |
| 394 | * or WFI CPU instruction. |
| 395 | */ |
| 396 | ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); |
| 397 | if (ret) |
| 398 | panic("Failed sending core %u shutdown message (%d)\n", |
| 399 | id, ret); |
| 400 | } |
| 401 | } |
| 402 | #endif |