| /rk3399_rockchip-uboot/test/log/ |
| H A D | log_test.c | 29 int ret; in log_test() local 40 ret = log_add_filter("console", cat_list, LOGL_MAX, NULL); in log_test() 41 if (ret < 0) in log_test() 42 return ret; in log_test() 44 ret = log_remove_filter("console", ret); in log_test() 45 if (ret < 0) in log_test() 46 return ret; in log_test() 55 ret = log_add_filter("console", cat_list, LOGL_MAX, NULL); in log_test() 56 if (ret < 0) in log_test() 57 return ret; in log_test() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/eth/ |
| H A D | lan78xx.c | 79 int ret; in lan78xx_read_raw_otp() local 82 ret = lan7x_read_reg(udev, LAN78XX_OTP_PWR_DN, &buf); in lan78xx_read_raw_otp() 83 if (ret) in lan78xx_read_raw_otp() 84 return ret; in lan78xx_read_raw_otp() 88 ret = lan7x_write_reg(udev, LAN78XX_OTP_PWR_DN, 0); in lan78xx_read_raw_otp() 89 if (ret) in lan78xx_read_raw_otp() 90 return ret; in lan78xx_read_raw_otp() 92 ret = lan7x_wait_for_bit(udev, "LAN78XX_OTP_PWR_DN_PWRDN_N", in lan78xx_read_raw_otp() 96 if (ret) in lan78xx_read_raw_otp() 97 return ret; in lan78xx_read_raw_otp() [all …]
|
| H A D | lan75xx.c | 42 int ret = 0; in lan75xx_phy_gig_workaround() local 50 ret = lan7x_mdio_wait_for_bit(udev, "BMSR_LSTATUS", in lan75xx_phy_gig_workaround() 53 if (ret) in lan75xx_phy_gig_workaround() 54 return ret; in lan75xx_phy_gig_workaround() 64 int ret; in lan75xx_update_flowcontrol() local 66 ret = lan7x_update_flowcontrol(udev, dev, &flow, &fct_flow); in lan75xx_update_flowcontrol() 67 if (ret) in lan75xx_update_flowcontrol() 68 return ret; in lan75xx_update_flowcontrol() 70 ret = lan7x_write_reg(udev, LAN75XX_FCT_FLOW, fct_flow); in lan75xx_update_flowcontrol() 71 if (ret) in lan75xx_update_flowcontrol() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/cdns3/ |
| H A D | debug.h | 20 int ret; in cdns3_decode_usb_irq() local 22 ret = sprintf(str, "IRQ %08x = ", usb_ists); in cdns3_decode_usb_irq() 25 ret += sprintf(str + ret, "Connection %s\n", in cdns3_decode_usb_irq() 29 ret += sprintf(str + ret, "Disconnection "); in cdns3_decode_usb_irq() 31 ret += sprintf(str + ret, "suspended "); in cdns3_decode_usb_irq() 33 ret += sprintf(str + ret, "L1 enter "); in cdns3_decode_usb_irq() 35 ret += sprintf(str + ret, "L1 exit "); in cdns3_decode_usb_irq() 37 ret += sprintf(str + ret, "L2 enter "); in cdns3_decode_usb_irq() 39 ret += sprintf(str + ret, "L2 exit "); in cdns3_decode_usb_irq() 41 ret += sprintf(str + ret, "U3 exit "); in cdns3_decode_usb_irq() [all …]
|
| /rk3399_rockchip-uboot/drivers/adc/ |
| H A D | adc-uclass.c | 55 int ret = 0; in adc_supply_enable() local 59 ret = regulator_set_enable(uc_pdata->vdd_supply, true); in adc_supply_enable() 62 if (!ret && uc_pdata->vss_supply) { in adc_supply_enable() 64 ret = regulator_set_enable(uc_pdata->vss_supply, true); in adc_supply_enable() 67 if (ret) in adc_supply_enable() 70 return ret; in adc_supply_enable() 100 int ret; in adc_start_channel() local 105 ret = check_channel(dev, channel, CHECK_NUMBER, __func__); in adc_start_channel() 106 if (ret) in adc_start_channel() 107 return ret; in adc_start_channel() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/power_delivery/ |
| H A D | fusb302.c | 84 int ret = 0; in fusb302_i2c_write() local 86 ret = dm_i2c_write(chip->udev, address, &data, 1); in fusb302_i2c_write() 87 if (ret) in fusb302_i2c_write() 88 printf("%s: cannot write 0x%02x to 0x%02x, ret=%d\n", in fusb302_i2c_write() 89 __func__, data, address, ret); in fusb302_i2c_write() 91 return ret; in fusb302_i2c_write() 97 int ret = 0; in fusb302_i2c_block_write() local 100 return ret; in fusb302_i2c_block_write() 102 ret = dm_i2c_write(chip->udev, address, data, length); in fusb302_i2c_block_write() 103 if (ret) in fusb302_i2c_block_write() [all …]
|
| H A D | tcpci_husb311.c | 33 int ret = 0; in husb311_read16() local 36 ret = dm_i2c_read(chip->udev, reg, buffer, 2); in husb311_read16() 37 if (ret < 0) { in husb311_read16() 38 printf("%s: cannot read %02x, ret=%d\n", in husb311_read16() 39 __func__, reg, ret); in husb311_read16() 40 return ret; in husb311_read16() 42 ret = ((buffer[1] << 8) & 0xFF00) + (buffer[0] & 0xFF); in husb311_read16() 44 return ret; in husb311_read16() 49 int ret = 0; in husb311_write8() local 53 ret = dm_i2c_write(chip->udev, reg, &val, 1); in husb311_write8() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/ |
| H A D | axp221.c | 31 int ret; in axp_set_dcdc1() local 38 ret = pmic_bus_write(AXP221_DCDC1_CTRL, cfg); in axp_set_dcdc1() 39 if (ret) in axp_set_dcdc1() 40 return ret; in axp_set_dcdc1() 42 ret = pmic_bus_setbits(AXP221_OUTPUT_CTRL2, in axp_set_dcdc1() 44 if (ret) in axp_set_dcdc1() 45 return ret; in axp_set_dcdc1() 53 int ret; in axp_set_dcdc2() local 60 ret = pmic_bus_write(AXP221_DCDC2_CTRL, cfg); in axp_set_dcdc2() 61 if (ret) in axp_set_dcdc2() [all …]
|
| /rk3399_rockchip-uboot/post/lib_powerpc/ |
| H A D | cpu.c | 64 int ret = 0; in cpu_post_test() local 70 if (ret == 0) in cpu_post_test() 71 ret = cpu_post_test_cmp (); in cpu_post_test() 72 if (ret == 0) in cpu_post_test() 73 ret = cpu_post_test_cmpi (); in cpu_post_test() 74 if (ret == 0) in cpu_post_test() 75 ret = cpu_post_test_two (); in cpu_post_test() 76 if (ret == 0) in cpu_post_test() 77 ret = cpu_post_test_twox (); in cpu_post_test() 79 if (ret == 0) in cpu_post_test() [all …]
|
| /rk3399_rockchip-uboot/drivers/power/regulator/ |
| H A D | lp873x_regulator.c | 28 int ret; in lp873x_buck_enable() local 35 ret = pmic_reg_read(dev->parent, adr); in lp873x_buck_enable() 36 if (ret < 0) in lp873x_buck_enable() 37 return ret; in lp873x_buck_enable() 40 ret &= LP873X_BUCK_MODE_MASK; in lp873x_buck_enable() 42 if (ret) in lp873x_buck_enable() 50 ret |= LP873X_BUCK_MODE_MASK; in lp873x_buck_enable() 52 ret &= ~(LP873X_BUCK_MODE_MASK); in lp873x_buck_enable() 53 ret = pmic_reg_write(dev->parent, adr, ret); in lp873x_buck_enable() 54 if (ret) in lp873x_buck_enable() [all …]
|
| H A D | sy7636a_regulator.c | 17 int ret; in sy7636a_get_enable() local 19 ret = pmic_reg_read(pmic, SY7636A_REG_OPERATION_MODE_CRL); in sy7636a_get_enable() 20 if (ret < 0) in sy7636a_get_enable() 21 return ret; in sy7636a_get_enable() 23 return !!(ret & SY7636A_OPERATION_MODE_CRL_VCOMCTL); in sy7636a_get_enable() 29 int ret; in sy7636a_set_enable() local 32 ret = pmic_clrsetbits(pmic, SY7636A_REG_OPERATION_MODE_CRL, in sy7636a_set_enable() 35 ret = pmic_clrsetbits(pmic, SY7636A_REG_OPERATION_MODE_CRL, in sy7636a_set_enable() 38 return ret; in sy7636a_set_enable() 46 int ret; in sy7636a_set_value() local [all …]
|
| /rk3399_rockchip-uboot/drivers/power/pmic/ |
| H A D | rk8xx_spi.c | 57 int ret; in _spi_read() local 66 ret = spi_write_then_read(priv->slave, txbuf, 3, NULL, buffer, 1); in _spi_read() 69 return ret; in _spi_read() 76 int ret; in _spi_write() local 91 ret = spi_write_then_read(priv->slave, txbuf, 4, NULL, NULL, 0); in _spi_write() 94 return ret; in _spi_write() 102 int ret; in rk806_spi_read() local 104 ret = _spi_read(dev, reg, buffer, len); in rk806_spi_read() 105 if (ret) in rk806_spi_read() 106 dev_err(dev, "rk806 read reg(0x%x) error: %d\n", reg, ret); in rk806_spi_read() [all …]
|
| H A D | as3722.c | 22 int ret; in as3722_read() local 24 ret = dm_i2c_read(dev, reg, buff, len); in as3722_read() 25 if (ret < 0) in as3722_read() 26 return ret; in as3722_read() 34 int ret; in as3722_write() local 36 ret = dm_i2c_write(dev, reg, buff, len); in as3722_write() 37 if (ret < 0) in as3722_write() 38 return ret; in as3722_write() 45 int ret; in as3722_read_id() local 47 ret = pmic_reg_read(dev, AS3722_ASIC_ID1); in as3722_read_id() [all …]
|
| /rk3399_rockchip-uboot/drivers/net/phy/ |
| H A D | mv88e6352.c | 37 int ret; in sw_wait_rdy() local 42 ret = miiphy_read(devname, phy_addr, COMMAND_REG, &command); in sw_wait_rdy() 43 if (ret < 0) { in sw_wait_rdy() 46 return ret; in sw_wait_rdy() 60 int ret; in sw_reg_read() local 63 ret = sw_wait_rdy(devname, phy_addr); in sw_reg_read() 64 if (ret) in sw_reg_read() 65 return ret; in sw_reg_read() 70 ret = miiphy_write(devname, phy_addr, COMMAND_REG, command); in sw_reg_read() 71 if (ret) in sw_reg_read() [all …]
|
| /rk3399_rockchip-uboot/drivers/misc/ |
| H A D | tegra186_bpmp.c | 33 int ret, err; in tegra186_bpmp_call() local 45 ret = tegra_ivc_write_get_next_frame(&priv->ivc, &ivc_frame); in tegra186_bpmp_call() 46 if (ret) { in tegra186_bpmp_call() 47 pr_err("tegra_ivc_write_get_next_frame() failed: %d\n", ret); in tegra186_bpmp_call() 48 return ret; in tegra186_bpmp_call() 56 ret = tegra_ivc_write_advance(&priv->ivc); in tegra186_bpmp_call() 57 if (ret) { in tegra186_bpmp_call() 58 pr_err("tegra_ivc_write_advance() failed: %d\n", ret); in tegra186_bpmp_call() 59 return ret; in tegra186_bpmp_call() 64 ret = tegra_ivc_channel_notified(&priv->ivc); in tegra186_bpmp_call() [all …]
|
| /rk3399_rockchip-uboot/drivers/core/ |
| H A D | uclass.c | 58 int ret; in uclass_add() local 78 ret = -ENOMEM; in uclass_add() 91 ret = uc_drv->init(uc); in uclass_add() 92 if (ret) in uclass_add() 108 return ret; in uclass_add() 115 int ret; in uclass_destroy() local 126 ret = device_remove(dev, DM_REMOVE_NORMAL); in uclass_destroy() 127 if (ret) in uclass_destroy() 128 return ret; in uclass_destroy() 129 ret = device_unbind(dev); in uclass_destroy() [all …]
|
| /rk3399_rockchip-uboot/drivers/block/ |
| H A D | blk-uclass.c | 80 int ret; in blk_get_devnum_by_type() local 82 ret = blk_get_device(if_type, devnum, &dev); in blk_get_devnum_by_type() 83 if (ret) in blk_get_devnum_by_type() 101 int ret; in blk_get_devnum_by_typename() local 116 ret = uclass_get(UCLASS_BLK, &uc); in blk_get_devnum_by_typename() 117 if (ret) in blk_get_devnum_by_typename() 182 int ret; in get_desc() local 185 ret = uclass_get(UCLASS_BLK, &uc); in get_desc() 186 if (ret) in get_desc() 187 return ret; in get_desc() [all …]
|
| /rk3399_rockchip-uboot/drivers/net/ |
| H A D | ag7xxx.c | 159 int ret; in ag7xxx_switch_read() local 167 ret = wait_for_bit_le32(regs + AG7XXX_ETH_MII_MGMT_IND, in ag7xxx_switch_read() 169 if (ret) in ag7xxx_switch_read() 170 return ret; in ag7xxx_switch_read() 182 int ret; in ag7xxx_switch_write() local 188 ret = wait_for_bit_le32(regs + AG7XXX_ETH_MII_MGMT_IND, in ag7xxx_switch_write() 191 return ret; in ag7xxx_switch_write() 202 int ret; in ag7xxx_switch_reg_read() local 213 ret = ag7xxx_switch_write(bus, phy_addr, reg_addr, reg >> 9); in ag7xxx_switch_reg_read() 214 if (ret) in ag7xxx_switch_reg_read() [all …]
|
| /rk3399_rockchip-uboot/board/keymile/km_arm/ |
| H A D | fpga_config.c | 22 int ret; in check_boco2() local 25 ret = i2c_read(BOCO_ADDR, ID_REG, 1, &id, 1); in check_boco2() 26 if (ret) { in check_boco2() 28 return ret; in check_boco2() 36 int ret; in boco_clear_bits() local 40 ret = i2c_read(BOCO_ADDR, reg, 1, ®val, 1); in boco_clear_bits() 41 if (ret) { in boco_clear_bits() 44 return ret; in boco_clear_bits() 47 ret = i2c_write(BOCO_ADDR, reg, 1, ®val, 1); in boco_clear_bits() 48 if (ret) { in boco_clear_bits() [all …]
|
| /rk3399_rockchip-uboot/fs/sandbox/ |
| H A D | sandboxfs.c | 24 int fd, ret; in sandbox_fs_read_at() local 29 ret = os_lseek(fd, pos, OS_SEEK_SET); in sandbox_fs_read_at() 30 if (ret == -1) { in sandbox_fs_read_at() 32 return ret; in sandbox_fs_read_at() 35 ret = os_get_filesize(filename, &size); in sandbox_fs_read_at() 36 if (ret) { in sandbox_fs_read_at() 38 return ret; in sandbox_fs_read_at() 48 ret = -1; in sandbox_fs_read_at() 50 ret = 0; in sandbox_fs_read_at() 54 return ret; in sandbox_fs_read_at() [all …]
|
| /rk3399_rockchip-uboot/env/ |
| H A D | sf.c | 57 int ret; in setup_flash_device() local 60 ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, in setup_flash_device() 62 if (ret) { in setup_flash_device() 64 return ret; in setup_flash_device() 90 int ret; in env_sf_save() local 92 ret = setup_flash_device(); in env_sf_save() 93 if (ret) in env_sf_save() 94 return ret; in env_sf_save() 96 ret = env_export(&env_new); in env_sf_save() 97 if (ret) in env_sf_save() [all …]
|
| /rk3399_rockchip-uboot/drivers/video/bridge/ |
| H A D | video-bridge-uclass.c | 38 int ret; in video_bridge_check_attached() local 41 ret = dm_gpio_get_value(&uc_priv->hotplug); in video_bridge_check_attached() 43 return ret > 0 ? 0 : ret == 0 ? -ENOTCONN : ret; in video_bridge_check_attached() 70 int ret; in video_bridge_pre_probe() local 73 ret = gpio_request_by_name(dev, "sleep-gpios", 0, in video_bridge_pre_probe() 75 if (ret) { in video_bridge_pre_probe() 76 debug("%s: Could not decode sleep-gpios (%d)\n", __func__, ret); in video_bridge_pre_probe() 77 if (ret != -ENOENT) in video_bridge_pre_probe() 78 return ret; in video_bridge_pre_probe() 83 * ret = dm_gpio_set_pull(&uc_priv->sleep, GPIO_PULL_NONE); in video_bridge_pre_probe() [all …]
|
| /rk3399_rockchip-uboot/drivers/mtd/nand/spi/ |
| H A D | core.c | 52 int ret; in spinand_read_reg_op() local 54 ret = spi_mem_exec_op(spinand->slave, &op); in spinand_read_reg_op() 55 if (ret) in spinand_read_reg_op() 56 return ret; in spinand_read_reg_op() 91 int ret; in spinand_set_cfg() local 100 ret = spinand_write_reg_op(spinand, REG_CFG, cfg); in spinand_set_cfg() 101 if (ret) in spinand_set_cfg() 102 return ret; in spinand_set_cfg() 120 int ret; in spinand_upd_cfg() local 123 ret = spinand_get_cfg(spinand, &cfg); in spinand_upd_cfg() [all …]
|
| /rk3399_rockchip-uboot/arch/arm/mach-rockchip/rk3288/ |
| H A D | rk3288.c | 112 int ret; in configure_emmc() local 121 ret = dm_gpio_lookup_name("D9", &desc); in configure_emmc() 122 if (ret) { in configure_emmc() 123 debug("gpio ret=%d\n", ret); in configure_emmc() 124 return ret; in configure_emmc() 126 ret = dm_gpio_request(&desc, "emmc_pwren"); in configure_emmc() 127 if (ret) { in configure_emmc() 128 debug("gpio_request ret=%d\n", ret); in configure_emmc() 129 return ret; in configure_emmc() 131 ret = dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT); in configure_emmc() [all …]
|
| /rk3399_rockchip-uboot/drivers/video/ |
| H A D | simple_panel.c | 26 int ret; in simple_panel_enable_backlight() local 30 ret = backlight_enable(priv->backlight); in simple_panel_enable_backlight() 31 debug("%s: done, ret = %d\n", __func__, ret); in simple_panel_enable_backlight() 32 if (ret) in simple_panel_enable_backlight() 33 return ret; in simple_panel_enable_backlight() 41 int ret; in simple_panel_ofdata_to_platdata() local 44 ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev, in simple_panel_ofdata_to_platdata() 46 if (ret) { in simple_panel_ofdata_to_platdata() 47 debug("%s: Warning: cannot get power supply: ret=%d\n", in simple_panel_ofdata_to_platdata() 48 __func__, ret); in simple_panel_ofdata_to_platdata() [all …]
|