Lines Matching refs:p

482 	struct ec_params_vboot_hash p;  in cros_ec_wait_on_hash_done()  local
489 p.cmd = EC_VBOOT_HASH_GET; in cros_ec_wait_on_hash_done()
490 if (ec_command(dev, EC_CMD_VBOOT_HASH, 0, &p, sizeof(p), in cros_ec_wait_on_hash_done()
505 struct ec_params_vboot_hash p; in cros_ec_read_hash() local
508 p.cmd = EC_VBOOT_HASH_GET; in cros_ec_read_hash()
509 p.offset = hash_offset; in cros_ec_read_hash()
510 if (ec_command(dev, EC_CMD_VBOOT_HASH, 0, &p, sizeof(p), in cros_ec_read_hash()
529 p.cmd = EC_VBOOT_HASH_START; in cros_ec_read_hash()
530 p.hash_type = EC_VBOOT_HASH_TYPE_SHA256; in cros_ec_read_hash()
531 p.nonce_size = 0; in cros_ec_read_hash()
532 p.offset = hash_offset; in cros_ec_read_hash()
534 if (ec_command(dev, EC_CMD_VBOOT_HASH, 0, &p, sizeof(p), in cros_ec_read_hash()
549 struct ec_params_vboot_hash p; in cros_ec_invalidate_hash() local
556 p.cmd = EC_VBOOT_HASH_RECALC; in cros_ec_invalidate_hash()
557 p.hash_type = EC_VBOOT_HASH_TYPE_SHA256; in cros_ec_invalidate_hash()
558 p.nonce_size = 0; in cros_ec_invalidate_hash()
559 p.offset = 0; in cros_ec_invalidate_hash()
560 p.size = 0; in cros_ec_invalidate_hash()
564 if (ec_command_inptr(dev, EC_CMD_VBOOT_HASH, 0, &p, sizeof(p), in cros_ec_invalidate_hash()
574 struct ec_params_reboot_ec p; in cros_ec_reboot() local
576 p.cmd = cmd; in cros_ec_reboot()
577 p.flags = flags; in cros_ec_reboot()
579 if (ec_command_inptr(dev, EC_CMD_REBOOT_EC, 0, &p, sizeof(p), NULL, 0) in cros_ec_reboot()
791 struct ec_params_flash_region_info p; in cros_ec_flash_offset() local
795 p.region = region; in cros_ec_flash_offset()
798 &p, sizeof(p), (uint8_t **)&r, sizeof(*r)); in cros_ec_flash_offset()
812 struct ec_params_flash_erase p; in cros_ec_flash_erase() local
814 p.offset = offset; in cros_ec_flash_erase()
815 p.size = size; in cros_ec_flash_erase()
816 return ec_command_inptr(dev, EC_CMD_FLASH_ERASE, 0, &p, sizeof(p), in cros_ec_flash_erase()
841 struct ec_params_flash_write *p; in cros_ec_flash_write_block() local
844 p = malloc(sizeof(*p) + size); in cros_ec_flash_write_block()
845 if (!p) in cros_ec_flash_write_block()
848 p->offset = offset; in cros_ec_flash_write_block()
849 p->size = size; in cros_ec_flash_write_block()
850 assert(data && p->size <= EC_FLASH_WRITE_VER0_SIZE); in cros_ec_flash_write_block()
851 memcpy(p + 1, data, p->size); in cros_ec_flash_write_block()
854 p, sizeof(*p) + size, NULL, 0) >= 0 ? 0 : -1; in cros_ec_flash_write_block()
856 free(p); in cros_ec_flash_write_block()
953 struct ec_params_efs_verify p; in cros_ec_efs_verify() local
957 p.region = region; in cros_ec_efs_verify()
959 rv = ec_command(dev, EC_CMD_EFS_VERIFY, 0, &p, sizeof(p), NULL, 0); in cros_ec_efs_verify()
991 struct ec_params_flash_read p; in cros_ec_flash_read_block() local
993 p.offset = offset; in cros_ec_flash_read_block()
994 p.size = size; in cros_ec_flash_read_block()
997 &p, sizeof(p), data, size) >= 0 ? 0 : -1; in cros_ec_flash_read_block()
1060 struct ec_params_vbnvcontext p; in cros_ec_read_nvdata() local
1066 p.op = EC_VBNV_CONTEXT_OP_READ; in cros_ec_read_nvdata()
1069 &p, sizeof(uint32_t) + size, block, size); in cros_ec_read_nvdata()
1080 struct ec_params_vbnvcontext p; in cros_ec_write_nvdata() local
1085 p.op = EC_VBNV_CONTEXT_OP_WRITE; in cros_ec_write_nvdata()
1086 memcpy(p.block, block, size); in cros_ec_write_nvdata()
1089 &p, sizeof(uint32_t) + size, NULL, 0); in cros_ec_write_nvdata()
1098 struct ec_params_battery_cutoff p; in cros_ec_battery_cutoff() local
1101 p.flags = flags; in cros_ec_battery_cutoff()
1102 len = ec_command(dev, EC_CMD_BATTERY_CUT_OFF, 1, &p, sizeof(p), in cros_ec_battery_cutoff()
1213 struct ec_params_i2c_passthru p; in cros_ec_i2c_tunnel() member
1220 struct ec_params_i2c_passthru *p = &params.p; in cros_ec_i2c_tunnel() local
1229 p->port = port; in cros_ec_i2c_tunnel()
1231 p->num_msgs = nmsgs; in cros_ec_i2c_tunnel()
1232 size = sizeof(*p) + p->num_msgs * sizeof(*msg); in cros_ec_i2c_tunnel()
1235 pdata = (uint8_t *)p + size; in cros_ec_i2c_tunnel()
1238 for (i = 0, msg = p->msg; i < nmsgs; i++, msg++, in++) { in cros_ec_i2c_tunnel()
1252 if (pdata - (uint8_t *)p + in->len > sizeof(params)) { in cros_ec_i2c_tunnel()
1261 rv = ec_command(dev, EC_CMD_I2C_PASSTHRU, 0, p, pdata - (uint8_t *)p, in cros_ec_i2c_tunnel()
1407 struct ec_params_charge_state p; in cros_ec_read_limit_power() local
1411 p.cmd = CHARGE_STATE_CMD_GET_PARAM; in cros_ec_read_limit_power()
1412 p.get_param.param = CS_PARAM_LIMIT_POWER; in cros_ec_read_limit_power()
1413 ret = ec_command(dev, EC_CMD_CHARGE_STATE, 0, &p, sizeof(p), in cros_ec_read_limit_power()