| /rk3399_rockchip-uboot/cmd/ |
| H A D | pinmux.c | 20 int ret; in do_dev() local 25 ret = uclass_get_device_by_name(UCLASS_PINCTRL, name, &currdev); in do_dev() 26 if (ret) { in do_dev() 49 int ret; in show_pinmux() local 59 ret = pinctrl_get_pin_name(dev, i, pin_name, PINNAME_SIZE); in show_pinmux() 60 if (ret == -ENOSYS) { in show_pinmux() 62 return ret; in show_pinmux() 65 ret = pinctrl_get_pin_muxing(dev, i, pin_mux, PINMUX_SIZE); in show_pinmux() 66 if (ret) { in show_pinmux() 67 printf("Ops get_pin_muxing error (%d)\n", ret); in show_pinmux() [all …]
|
| H A D | script_update.c | 78 int ret = CMD_RET_SUCCESS; in do_script() local 100 ret = run_command(next_line, 0); in do_script() 101 if (ret) in do_script() 106 return ret; in do_script() 116 int ret; in do_sd_update() local 122 ret = mmc_initialize(gd->bd); in do_sd_update() 123 if (ret) { in do_sd_update() 124 printf("Could not initialize mmc. error: %d\n", ret); in do_sd_update() 125 return ret; in do_sd_update() 142 ret = run_command(cmd, 0); in do_sd_update() [all …]
|
| /rk3399_rockchip-uboot/board/freescale/ls1021aqds/ |
| H A D | dcu.c | 21 int ret; in select_i2c_ch_pca9547() local 23 ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1); in select_i2c_ch_pca9547() 24 if (ret) { in select_i2c_ch_pca9547() 26 return ret; in select_i2c_ch_pca9547() 49 int ret; in platform_dcu_init() local 53 ret = i2c_read(CONFIG_SYS_I2C_QIXIS_ADDR, QIXIS_DCU_BRDCFG5, in platform_dcu_init() 55 if (ret) { in platform_dcu_init() 58 return ret; in platform_dcu_init() 62 ret = i2c_write(CONFIG_SYS_I2C_QIXIS_ADDR, QIXIS_DCU_BRDCFG5, in platform_dcu_init() 64 if (ret) { in platform_dcu_init() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/host/ |
| H A D | ohci-lpc32xx.c | 131 u32 ret; in usbpll_setup() local 146 ret = wait_for_bit_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_PLL_STS, in usbpll_setup() 148 if (ret) in usbpll_setup() 149 return ret; in usbpll_setup() 159 u32 ret; in usb_cpu_init() local 163 ret = i2c_get_chip_for_busnum(I2C_2, ISP1301_I2C_ADDR, 1, &dev); in usb_cpu_init() 164 if (ret) { in usb_cpu_init() 166 return ret; in usb_cpu_init() 181 ret = wait_for_bit_le32(&otg->otg_clk_sts, OTG_CLK_I2C_EN, true, in usb_cpu_init() 183 if (ret) in usb_cpu_init() [all …]
|
| H A D | xhci-fsl.c | 51 int ret; in fsl_apply_xhci_errata() local 53 ret = erratum_a008751(); in fsl_apply_xhci_errata() 54 if (ret != 0) in fsl_apply_xhci_errata() 68 int ret = 0; in fsl_xhci_core_init() local 70 ret = dwc3_core_init(fsl_xhci->dwc3_reg); in fsl_xhci_core_init() 71 if (ret) { in fsl_xhci_core_init() 73 return ret; in fsl_xhci_core_init() 98 return ret; in fsl_xhci_core_init() 117 int ret = 0; in xhci_fsl_probe() local 133 ret = fsl_xhci_core_init(&priv->ctx); in xhci_fsl_probe() [all …]
|
| /rk3399_rockchip-uboot/drivers/video/drm/ |
| H A D | rohm-bu18rl82.c | 42 int ret = 0; in bu18rl82_bridge_reset() local 46 ret = dm_i2c_reg_write(dev, BU18RL82_REG_RESET, in bu18rl82_bridge_reset() 48 if (ret < 0) in bu18rl82_bridge_reset() 49 printf("failed to reset bu18rl82(%s) ret=%d\n", bus->name, ret); in bu18rl82_bridge_reset() 60 int ret = 0; in bu18rl82_serdes_init_sequence_write() local 63 ret = dm_i2c_reg_write(dev, reg_sequence[i].reg, reg_sequence[i].def); in bu18rl82_serdes_init_sequence_write() 64 if (ret < 0) { in bu18rl82_serdes_init_sequence_write() 71 return ret; in bu18rl82_serdes_init_sequence_write() 80 int ret; in bu18rl82_bridge_enable() local 83 ret = bu18rl82_serdes_init_sequence_write(priv); in bu18rl82_bridge_enable() [all …]
|
| /rk3399_rockchip-uboot/lib/rsa/ |
| H A D | rsa-verify.c | 55 int ret; in rsa_verify_padding() local 58 ret = *msg++; in rsa_verify_padding() 60 ret |= *msg++ ^ 0x01; in rsa_verify_padding() 63 ret |= *msg ^ 0xff; in rsa_verify_padding() 64 ret |= memcmp(msg, msg+1, ff_len-1); in rsa_verify_padding() 67 ret |= *msg++; in rsa_verify_padding() 69 ret |= memcmp(msg, algo->der_prefix, algo->der_len); in rsa_verify_padding() 71 return ret; in rsa_verify_padding() 98 int i, ret; in rsa_mod_exp_hw() local 151 ret = crypto_rsa_verify(dev, &rsa_key, (u8 *)sig_reverse, buf); in rsa_mod_exp_hw() [all …]
|
| /rk3399_rockchip-uboot/drivers/firmware/scmi/ |
| H A D | smccc_agent.c | 35 int ret; in scmi_smccc_process_msg() local 37 ret = scmi_write_msg_to_smt(dev, &chan->smt, msg); in scmi_smccc_process_msg() 38 if (ret) in scmi_smccc_process_msg() 39 return ret; in scmi_smccc_process_msg() 43 ret = -ENXIO; in scmi_smccc_process_msg() 45 ret = scmi_read_resp_from_smt(dev, &chan->smt, msg); in scmi_smccc_process_msg() 49 return ret; in scmi_smccc_process_msg() 56 int ret; in scmi_smccc_probe() local 66 ret = scmi_dt_get_smt_buffer(dev, &chan->smt); in scmi_smccc_probe() 67 if (ret) { in scmi_smccc_probe() [all …]
|
| /rk3399_rockchip-uboot/drivers/mtd/nand/raw/ |
| H A D | mxs_nand_dt.c | 49 int ret; in mxs_nand_dt_probe() local 57 ret = dev_read_resource_byname(dev, "gpmi-nand", &res); in mxs_nand_dt_probe() 58 if (ret) in mxs_nand_dt_probe() 59 return ret; in mxs_nand_dt_probe() 64 ret = dev_read_resource_byname(dev, "bch", &res); in mxs_nand_dt_probe() 65 if (ret) in mxs_nand_dt_probe() 66 return ret; in mxs_nand_dt_probe() 86 int ret; in board_nand_init() local 88 ret = uclass_get_device_by_driver(UCLASS_MTD, in board_nand_init() 91 if (ret && ret != -ENODEV) in board_nand_init() [all …]
|
| /rk3399_rockchip-uboot/drivers/fpga/ |
| H A D | stratixv.c | 18 int ret; in program_write() local 31 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data, in program_write() 36 return ret; in program_write() 49 int ret = 0; in stratixv_load() local 81 ret = (pfns->write)(rbf_data, rbf_size, true, cookie); in stratixv_load() 89 ret = program_write(spi_bus, spi_dev, rbf_data, rbf_size); in stratixv_load() 91 if (ret) in stratixv_load() 92 return ret; in stratixv_load() 96 ret = (pfns->done)(cookie); in stratixv_load() 98 if (ret) in stratixv_load() [all …]
|
| /rk3399_rockchip-uboot/arch/x86/cpu/intel_common/ |
| H A D | cpu.c | 35 int ret; in cpu_common_init() local 38 ret = report_bist_failure(); in cpu_common_init() 39 if (ret) in cpu_common_init() 40 return ret; in cpu_common_init() 44 ret = microcode_update_intel(); in cpu_common_init() 45 if (ret && ret != -EEXIST) { in cpu_common_init() 46 debug("%s: Microcode update failure (err=%d)\n", __func__, ret); in cpu_common_init() 47 return ret; in cpu_common_init() 56 ret = uclass_first_device(UCLASS_LPC, &lpc); in cpu_common_init() 57 if (ret) in cpu_common_init() [all …]
|
| /rk3399_rockchip-uboot/board/samsung/common/ |
| H A D | exynos5-dt-types.c | 57 int ret, i; in odroid_get_board_type() local 59 ret = adc_channel_single_shot("adc", CONFIG_ODROID_REV_AIN, &adcval); in odroid_get_board_type() 60 if (ret) in odroid_get_board_type() 85 int i, ret; in odroid_get_type_str() local 90 ret = pmic_get("s2mps11", &dev); in odroid_get_type_str() 91 if (ret) in odroid_get_type_str() 95 ret = pmic_reg_write(dev, S2MPS11_REG_L26CTRL, in odroid_get_type_str() 97 if (ret) in odroid_get_type_str() 101 ret = uclass_get_device(UCLASS_I2C, 0, &dev); in odroid_get_type_str() 102 if (ret) in odroid_get_type_str() [all …]
|
| /rk3399_rockchip-uboot/lib/efi/ |
| H A D | efi_app.c | 38 efi_status_t ret; in setup_memory() local 46 global_data_ptr = efi_malloc(priv, sizeof(struct global_data), &ret); in setup_memory() 48 return ret; in setup_memory() 52 &ret); in setup_memory() 54 return ret; in setup_memory() 62 ret = boot->allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, in setup_memory() 64 if (ret) { in setup_memory() 65 printf("(using pool %lx) ", ret); in setup_memory() 67 &ret); in setup_memory() 69 return ret; in setup_memory() [all …]
|
| /rk3399_rockchip-uboot/arch/arm/mach-rockchip/ |
| H A D | fit_misc.c | 69 int ret = -ENOSYS; in fit_decomp_image() local 110 ret = lzmaBuffToBuffDecompress((uchar *)(*load_addr), &lzma_len, in fit_decomp_image() 126 ret = misc_decompress_process((ulong)(*load_addr), in fit_decomp_image() 137 ret = gunzip((void *)(*load_addr), ALIGN(len, FIT_MAX_SPL_IMAGE_SZ), in fit_decomp_image() 143 if (ret) { in fit_decomp_image() 145 fdt_get_name(fit, node, NULL), ret); in fit_decomp_image() 146 return ret; in fit_decomp_image() 150 ret = fit_image_check_uncomp_hash(fit, node, (void *)(*load_addr), len); in fit_decomp_image() 151 if (!ret) in fit_decomp_image() 154 return ret; in fit_decomp_image() [all …]
|
| H A D | fit.c | 93 int ret; in fdt_image_get_offset_size() local 99 ret = fit_image_get_data_size(fit, noffset, &sz); in fdt_image_get_offset_size() 100 if (ret) in fdt_image_get_offset_size() 101 return ret; in fdt_image_get_offset_size() 103 ret = fit_image_get_data_position(fit, noffset, &offs); in fdt_image_get_offset_size() 104 if (!ret) in fdt_image_get_offset_size() 107 ret = fit_image_get_data_offset(fit, noffset, &offs); in fdt_image_get_offset_size() 112 return ret; in fdt_image_get_offset_size() 130 int ret; in fit_image_get_param() local 132 ret = fdt_image_get_offset_size(fit, prop_name, offset, size); in fit_image_get_param() [all …]
|
| /rk3399_rockchip-uboot/drivers/video/drm/display-serdes/ |
| H A D | serdes-i2c.c | 39 int ret = 0; in serdes_set_i2c_address() local 58 ret = serdes_split->chip_data->split_ops->select(serdes_split, link); in serdes_set_i2c_address() 67 ret = serdes_split->chip_data->split_ops->select(serdes_split, in serdes_set_i2c_address() 74 return ret; in serdes_set_i2c_address() 83 int ret; in serdes_i2c_probe() local 85 ret = i2c_set_chip_offset_len(dev, 2); in serdes_i2c_probe() 86 if (ret) in serdes_i2c_probe() 87 return ret; in serdes_i2c_probe() 96 ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev, in serdes_i2c_probe() 99 if (ret && ret != -ENOENT) in serdes_i2c_probe() [all …]
|
| /rk3399_rockchip-uboot/drivers/keylad/ |
| H A D | rk_keylad.c | 50 #define KEYLAD_POLL_TIMEOUT(condition, timeout, ret) do { \ argument 55 ret = -ETIMEDOUT; \ 74 int i, ret; in rk_keylad_do_enable_clk() local 77 ret = clk_get_by_index(dev, i, &clk); in rk_keylad_do_enable_clk() 78 if (ret < 0) { in rk_keylad_do_enable_clk() 79 printf("Keylad failed to get clk index %d, ret=%d\n", i, ret); in rk_keylad_do_enable_clk() 80 return ret; in rk_keylad_do_enable_clk() 84 ret = clk_enable(&clk); in rk_keylad_do_enable_clk() 86 ret = clk_disable(&clk); in rk_keylad_do_enable_clk() 88 if (ret < 0 && ret != -ENOSYS) { in rk_keylad_do_enable_clk() [all …]
|
| /rk3399_rockchip-uboot/drivers/pinctrl/rockchip/ |
| H A D | pinctrl-rv1126b.c | 19 int reg, ret, mask; in rv1126b_set_mux() local 39 ret = regmap_write(regmap, reg, data); in rv1126b_set_mux() 41 return ret; in rv1126b_set_mux() 92 int reg, ret; in rv1126b_set_drive() local 97 ret = rv1126b_calc_drv_reg_and_bit(bank, pin_num, ®map, ®, &bit); in rv1126b_set_drive() 98 if (ret) in rv1126b_set_drive() 99 return ret; in rv1126b_set_drive() 103 ret = (1 << (strength + 1)) - 1; in rv1126b_set_drive() 104 data |= (ret << bit); in rv1126b_set_drive() 105 ret = regmap_write(regmap, reg, data); in rv1126b_set_drive() [all …]
|
| /rk3399_rockchip-uboot/env/ |
| H A D | mmc.c | 41 int len, i, ret; in mmc_offset_try_partition() local 43 ret = blk_get_device_by_str("mmc", STR(CONFIG_SYS_MMC_ENV_DEV), &desc); in mmc_offset_try_partition() 44 if (ret < 0) in mmc_offset_try_partition() 45 return (ret); in mmc_offset_try_partition() 48 ret = part_get_info(desc, i, &info); in mmc_offset_try_partition() 49 if (ret < 0) in mmc_offset_try_partition() 50 return ret; in mmc_offset_try_partition() 143 int ret = 0; in mmc_set_env_part() local 146 ret = blk_select_hwpart_devnum(IF_TYPE_MMC, dev, part); in mmc_set_env_part() 147 if (ret) in mmc_set_env_part() [all …]
|
| /rk3399_rockchip-uboot/drivers/i2c/ |
| H A D | sandbox_i2c.c | 28 int ret; in get_emul() local 34 ret = dm_scan_fdt_dev(dev); in get_emul() 35 if (ret) in get_emul() 36 return ret; in get_emul() 43 ret = device_probe(child); in get_emul() 44 if (ret) in get_emul() 45 return ret; in get_emul() 76 int ret; in sandbox_i2c_xfer() local 82 ret = i2c_get_chip(bus, msg->addr, 1, &dev); in sandbox_i2c_xfer() 83 if (ret) in sandbox_i2c_xfer() [all …]
|
| /rk3399_rockchip-uboot/drivers/gpio/ |
| H A D | 74x164_gpio.c | 49 int ret; in gen_74x164_write_conf() local 51 ret = dm_spi_claim_bus(dev); in gen_74x164_write_conf() 52 if (ret) in gen_74x164_write_conf() 53 return ret; in gen_74x164_write_conf() 55 ret = dm_spi_xfer(dev, priv->nregs * 8, priv->buffer, NULL, in gen_74x164_write_conf() 60 return ret; in gen_74x164_write_conf() 78 int ret; in gen_74x164_set_value() local 85 ret = gen_74x164_write_conf(dev); in gen_74x164_set_value() 86 if (ret) in gen_74x164_set_value() 87 return ret; in gen_74x164_set_value() [all …]
|
| /rk3399_rockchip-uboot/board/qualcomm/dragonboard410c/ |
| H A D | dragonboard410c.c | 35 int ret = 0, node; in board_prepare_usb() local 38 ret = uclass_get_device_by_name(UCLASS_GPIO, in board_prepare_usb() 41 if (ret < 0) { in board_prepare_usb() 43 return ret; in board_prepare_usb() 56 ret = gpio_request_by_name_nodev(offset_to_ofnode(node), in board_prepare_usb() 58 if (ret < 0) { in board_prepare_usb() 60 return ret; in board_prepare_usb() 72 ret = gpio_request_by_name_nodev(offset_to_ofnode(node), in board_prepare_usb() 74 if (ret < 0) { in board_prepare_usb() 76 return ret; in board_prepare_usb() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/regulator/ |
| H A D | rk8xx.c | 411 int ret; in _buck_set_enable() local 422 ret = pmic_reg_write(pmic, en_reg, value); in _buck_set_enable() 436 ret = pmic_reg_write(pmic, en_reg, value); in _buck_set_enable() 443 ret = pmic_clrsetbits(pmic, REG_DCDC_ILMAX, in _buck_set_enable() 445 if (ret) in _buck_set_enable() 446 return ret; in _buck_set_enable() 448 ret = pmic_clrsetbits(pmic, REG_DCDC_EN, mask, in _buck_set_enable() 458 ret = pmic_reg_write(pmic, RK817_POWER_EN(0), value); in _buck_set_enable() 465 ret = pmic_reg_write(pmic, RK817_POWER_EN(3), value); in _buck_set_enable() 469 ret = -EINVAL; in _buck_set_enable() [all …]
|
| /rk3399_rockchip-uboot/test/rockchip/ |
| H A D | test-storage.c | 80 int i, ret; in do_test_storage() local 87 ret = -ENODEV; in do_test_storage() 94 ret = -ENODEV; in do_test_storage() 150 ret = -ENOMEM; in do_test_storage() 160 ret = -ENOMEM; in do_test_storage() 177 ret = -EIO; in do_test_storage() 183 ret = blk_dwrite(dev_desc, sector, blocks, w_buf); in do_test_storage() 184 if (ret != blocks) { in do_test_storage() 186 ret = -EIO; in do_test_storage() 205 ret = -EIO; in do_test_storage() [all …]
|
| /rk3399_rockchip-uboot/drivers/mtd/spi/ |
| H A D | spi-nor-core.c | 53 int ret; in spi_nor_read_reg() local 55 ret = spi_nor_read_write_reg(nor, &op, val); in spi_nor_read_reg() 56 if (ret < 0) in spi_nor_read_reg() 57 dev_dbg(&flash->spimem->spi->dev, "error %d reading %x\n", ret, in spi_nor_read_reg() 60 return ret; in spi_nor_read_reg() 82 int ret; in spi_nor_read_data() local 95 ret = spi_mem_adjust_op_size(nor->spi, &op); in spi_nor_read_data() 96 if (ret) in spi_nor_read_data() 97 return ret; in spi_nor_read_data() 99 ret = spi_mem_exec_op(nor->spi, &op); in spi_nor_read_data() [all …]
|