/openbmc/linux/drivers/hwmon/ |
H A D | acpi_power_meter.c | 109 static int update_avg_interval(struct acpi_power_meter_resource *resource) in update_avg_interval() argument 114 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", in update_avg_interval() 117 acpi_evaluation_failure_warn(resource->acpi_dev->handle, "_GAI", in update_avg_interval() 122 resource->avg_interval = data; in update_avg_interval() 131 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local 133 mutex_lock(&resource->lock); in show_avg_interval() 134 update_avg_interval(resource); in show_avg_interval() 135 mutex_unlock(&resource->lock); in show_avg_interval() 137 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval() 145 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local [all …]
|
/openbmc/linux/net/devlink/ |
H A D | resource.c | 40 struct devlink_resource *resource, u64 resource_id) in devlink_resource_find() argument 44 if (resource) in devlink_resource_find() 45 resource_list = &resource->resource_list; in devlink_resource_find() 49 list_for_each_entry(resource, resource_list, list) { in devlink_resource_find() 52 if (resource->id == resource_id) in devlink_resource_find() 53 return resource; in devlink_resource_find() 55 child_resource = devlink_resource_find(devlink, resource, in devlink_resource_find() 64 devlink_resource_validate_children(struct devlink_resource *resource) in devlink_resource_validate_children() argument 70 if (list_empty(&resource->resource_list)) in devlink_resource_validate_children() 73 list_for_each_entry(child_resource, &resource->resource_list, list) in devlink_resource_validate_children() [all …]
|
/openbmc/linux/drivers/acpi/ |
H A D | power.c | 62 struct acpi_power_resource *resource; member 96 struct acpi_power_resource *resource = acpi_power_get_context(handle); in acpi_power_resources_list_add() local 99 if (!resource || !list) in acpi_power_resources_list_add() 106 entry->resource = resource; in acpi_power_resources_list_add() 111 if (e->resource->order > resource->order) { in acpi_power_resources_list_add() 206 static int acpi_power_get_state(struct acpi_power_resource *resource, u8 *state) in acpi_power_get_state() argument 208 if (resource->state == ACPI_POWER_RESOURCE_STATE_UNKNOWN) { in acpi_power_get_state() 211 ret = __get_state(resource->device.handle, &resource->state); in acpi_power_get_state() 216 *state = resource->state; in acpi_power_get_state() 230 struct acpi_power_resource *resource = entry->resource; in acpi_power_get_list_state() local [all …]
|
/openbmc/linux/include/linux/ |
H A D | ioport.h | 21 struct resource { struct 27 struct resource *parent, *sibling, *child; argument 158 (struct resource) { \ 192 extern struct resource ioport_resource; 193 extern struct resource iomem_resource; 195 extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); 196 extern int request_resource(struct resource *root, struct resource *new); 197 extern int release_resource(struct resource *new); 198 void release_child_resources(struct resource *new); 199 extern void reserve_region_with_split(struct resource *root, [all …]
|
/openbmc/linux/drivers/misc/vmw_vmci/ |
H A D | vmci_resource.c | 32 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash() 41 struct vmci_resource *r, *resource = NULL; in vmci_resource_lookup() local 48 u32 rid = r->handle.resource; in vmci_resource_lookup() 51 rid == handle.resource && in vmci_resource_lookup() 54 resource = r; in vmci_resource_lookup() 60 return resource; in vmci_resource_lookup() 99 int vmci_resource_add(struct vmci_resource *resource, in vmci_resource_add() argument 109 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add() 110 handle.resource = vmci_resource_find_id(handle.context, in vmci_resource_add() 112 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add() [all …]
|
H A D | vmci_datagram.c | 27 struct vmci_resource resource; member 87 result = vmci_resource_add(&entry->resource, in dg_create_handle() 92 handle.context, handle.resource, result); in dg_create_handle() 97 *out_handle = vmci_resource_handle(&entry->resource); in dg_create_handle() 114 struct vmci_resource *resource; in vmci_datagram_get_priv_flags() local 116 resource = vmci_resource_by_handle(handle, in vmci_datagram_get_priv_flags() 118 if (!resource) in vmci_datagram_get_priv_flags() 121 src_entry = container_of(resource, struct datagram_entry, in vmci_datagram_get_priv_flags() 122 resource); in vmci_datagram_get_priv_flags() 124 vmci_resource_put(resource); in vmci_datagram_get_priv_flags() [all …]
|
H A D | vmci_doorbell.c | 34 struct vmci_resource resource; member 92 struct vmci_resource *resource; in vmci_dbell_get_priv_flags() local 94 resource = vmci_resource_by_handle(handle, in vmci_dbell_get_priv_flags() 96 if (!resource) in vmci_dbell_get_priv_flags() 99 entry = container_of(resource, struct dbell_entry, resource); in vmci_dbell_get_priv_flags() 101 vmci_resource_put(resource); in vmci_dbell_get_priv_flags() 142 vmci_resource_get(&entry->resource); in dbell_index_table_add() 221 vmci_resource_put(&entry->resource); in dbell_index_table_remove() 286 vmci_resource_put(&entry->resource); in dbell_delayed_dispatch() 295 struct vmci_resource *resource; in vmci_dbell_host_context_notify() local [all …]
|
/openbmc/u-boot/drivers/clk/imx/ |
H A D | clk-imx8.c | 49 u16 resource; in imx8_clk_get_rate() local 56 resource = SC_R_A35; in imx8_clk_get_rate() 60 resource = SC_R_I2C_0; in imx8_clk_get_rate() 64 resource = SC_R_I2C_1; in imx8_clk_get_rate() 68 resource = SC_R_I2C_2; in imx8_clk_get_rate() 72 resource = SC_R_I2C_3; in imx8_clk_get_rate() 78 resource = SC_R_SDHC_0; in imx8_clk_get_rate() 84 resource = SC_R_SDHC_1; in imx8_clk_get_rate() 89 resource = SC_R_UART_0; in imx8_clk_get_rate() 93 resource = SC_R_UART_1; in imx8_clk_get_rate() [all …]
|
/openbmc/linux/drivers/bus/fsl-mc/ |
H A D | fsl-mc-allocator.c | 38 struct fsl_mc_resource *resource; in fsl_mc_resource_pool_add_device() local 46 if (mc_dev->resource) in fsl_mc_resource_pool_add_device() 63 resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), in fsl_mc_resource_pool_add_device() 65 if (!resource) { in fsl_mc_resource_pool_add_device() 72 resource->type = pool_type; in fsl_mc_resource_pool_add_device() 73 resource->id = mc_dev->obj_desc.id; in fsl_mc_resource_pool_add_device() 74 resource->data = mc_dev; in fsl_mc_resource_pool_add_device() 75 resource->parent_pool = res_pool; in fsl_mc_resource_pool_add_device() 76 INIT_LIST_HEAD(&resource->node); in fsl_mc_resource_pool_add_device() 77 list_add_tail(&resource->node, &res_pool->free_list); in fsl_mc_resource_pool_add_device() [all …]
|
/openbmc/linux/arch/arm/mach-pxa/ |
H A D | devices.c | 37 static struct resource pxa_resource_pmu = { 46 .resource = &pxa_resource_pmu, 50 static struct resource pxamci_resources[] = { 73 .resource = pxamci_resources, 85 static struct resource pxa2xx_udc_resources[] = { 103 .resource = pxa2xx_udc_resources, 114 .resource = pxa2xx_udc_resources, 122 static struct resource pxafb_resources[] = { 145 .resource = pxafb_resources, 154 static struct resource pxa_resource_ffuart[] = { [all …]
|
/openbmc/linux/drivers/tty/ipwireless/ |
H A D | main.c | 84 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in ipwireless_probe() 85 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; in ipwireless_probe() 95 if (!request_region(p_dev->resource[0]->start, in ipwireless_probe() 96 resource_size(p_dev->resource[0]), in ipwireless_probe() 102 p_dev->resource[2]->flags |= in ipwireless_probe() 105 ret = pcmcia_request_window(p_dev, p_dev->resource[2], 0); in ipwireless_probe() 109 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr); in ipwireless_probe() 113 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100; in ipwireless_probe() 115 ipw->common_memory = ioremap(p_dev->resource[2]->start, in ipwireless_probe() 116 resource_size(p_dev->resource[2])); in ipwireless_probe() [all …]
|
/openbmc/linux/drivers/net/ipa/ |
H A D | ipa_resource.c | 47 const struct ipa_resource *resource; in ipa_resource_limits_valid() local 49 resource = &data->resource_src[i]; in ipa_resource_limits_valid() 51 if (resource->limits[j].min || resource->limits[j].max) in ipa_resource_limits_valid() 60 const struct ipa_resource *resource; in ipa_resource_limits_valid() local 62 resource = &data->resource_dst[i]; in ipa_resource_limits_valid() 64 if (resource->limits[j].min || resource->limits[j].max) in ipa_resource_limits_valid() 94 const struct ipa_resource *resource; in ipa_resource_config_src() local 97 resource = &data->resource_src[resource_type]; in ipa_resource_config_src() 100 ylimits = group_count == 1 ? NULL : &resource->limits[1]; in ipa_resource_config_src() 102 &resource->limits[0], ylimits); in ipa_resource_config_src() [all …]
|
/openbmc/linux/drivers/acpi/acpica/ |
H A D | rslist.c | 36 struct acpi_resource *resource; in acpi_rs_convert_aml_to_resources() local 47 resource = *resource_ptr; in acpi_rs_convert_aml_to_resources() 48 if (ACPI_IS_MISALIGNED(resource)) { in acpi_rs_convert_aml_to_resources() 50 "Misaligned resource pointer %p", resource)); in acpi_rs_convert_aml_to_resources() 89 acpi_rs_convert_aml_to_resource(resource, aml_resource, in acpi_rs_convert_aml_to_resources() 98 if (!resource->length) { in acpi_rs_convert_aml_to_resources() 106 resource->length)); in acpi_rs_convert_aml_to_resources() 110 *resource_ptr = ACPI_NEXT_RESOURCE(resource); in acpi_rs_convert_aml_to_resources() 134 acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, in acpi_rs_convert_resources_to_aml() argument 150 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { in acpi_rs_convert_resources_to_aml() [all …]
|
H A D | rsmisc.c | 35 acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, in acpi_rs_convert_aml_to_resource() argument 54 if (((acpi_size)resource) & 0x3) { in acpi_rs_convert_aml_to_resource() 60 resource, resource->type, resource->length)); in acpi_rs_convert_aml_to_resource() 81 ACPI_ADD_PTR(void, resource, info->resource_offset); in acpi_rs_convert_aml_to_resource() 88 memset(resource, 0, INIT_RESOURCE_LENGTH(info)); in acpi_rs_convert_aml_to_resource() 89 resource->type = INIT_RESOURCE_TYPE(info); in acpi_rs_convert_aml_to_resource() 90 resource->length = INIT_RESOURCE_LENGTH(info); in acpi_rs_convert_aml_to_resource() 138 resource->length = resource->length + in acpi_rs_convert_aml_to_resource() 147 resource->length = resource->length + in acpi_rs_convert_aml_to_resource() 156 resource->length = resource->length + item_count; in acpi_rs_convert_aml_to_resource() [all …]
|
H A D | rscalc.c | 154 acpi_rs_get_aml_length(struct acpi_resource *resource, in acpi_rs_get_aml_length() argument 166 ACPI_ADD_PTR(struct acpi_resource, resource, resource_list_size); in acpi_rs_get_aml_length() 167 while (resource < resource_end) { in acpi_rs_get_aml_length() 171 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { in acpi_rs_get_aml_length() 177 if (!resource->length) { in acpi_rs_get_aml_length() 183 total_size = acpi_gbl_aml_resource_sizes[resource->type]; in acpi_rs_get_aml_length() 189 switch (resource->type) { in acpi_rs_get_aml_length() 194 if (resource->data.irq.descriptor_length == 2) { in acpi_rs_get_aml_length() 203 if (resource->data.irq.descriptor_length == 0) { in acpi_rs_get_aml_length() 215 if (resource->data.vendor.byte_length > 7) { in acpi_rs_get_aml_length() [all …]
|
H A D | rsxface.c | 35 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context); 332 acpi_resource_to_address64(struct acpi_resource *resource, in ACPI_EXPORT_SYMBOL() 338 if (!resource || !out) { in ACPI_EXPORT_SYMBOL() 344 switch (resource->type) { in ACPI_EXPORT_SYMBOL() 349 &resource->data); in ACPI_EXPORT_SYMBOL() 357 &resource->data); in ACPI_EXPORT_SYMBOL() 365 memcpy(out, &resource->data, in ACPI_EXPORT_SYMBOL() 442 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) in ACPI_EXPORT_SYMBOL() 451 if (resource->type != ACPI_RESOURCE_TYPE_VENDOR) { in ACPI_EXPORT_SYMBOL() 455 vendor = &resource->data.vendor_typed; in ACPI_EXPORT_SYMBOL() [all …]
|
/openbmc/linux/drivers/staging/vme_user/ |
H A D | vme.c | 48 static struct vme_bridge *find_bridge(struct vme_resource *resource) in find_bridge() argument 51 switch (resource->type) { in find_bridge() 53 return list_entry(resource->entry, struct vme_master_resource, in find_bridge() 56 return list_entry(resource->entry, struct vme_slave_resource, in find_bridge() 59 return list_entry(resource->entry, struct vme_dma_resource, in find_bridge() 62 return list_entry(resource->entry, struct vme_lm_resource, in find_bridge() 81 void *vme_alloc_consistent(struct vme_resource *resource, size_t size, in vme_alloc_consistent() argument 86 if (!resource) { in vme_alloc_consistent() 91 bridge = find_bridge(resource); in vme_alloc_consistent() 121 void vme_free_consistent(struct vme_resource *resource, size_t size, in vme_free_consistent() argument [all …]
|
/openbmc/u-boot/include/linux/ |
H A D | ioport.h | 18 struct resource { struct 23 struct resource *parent, *sibling, *child; argument 28 struct resource *res; 110 extern struct resource ioport_resource; 111 extern struct resource iomem_resource; 113 extern int request_resource(struct resource *root, struct resource *new); 114 extern int release_resource(struct resource *new); 115 extern void reserve_region_with_split(struct resource *root, 118 extern int insert_resource(struct resource *parent, struct resource *new); 119 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); [all …]
|
/openbmc/linux/kernel/ |
H A D | resource.c | 33 struct resource ioport_resource = { 41 struct resource iomem_resource = { 52 resource_size_t (*alignf)(void *, const struct resource *, 59 static struct resource *next_resource(struct resource *p) in next_resource() 68 static struct resource *next_resource_skip_children(struct resource *p) in next_resource_skip_children() 82 struct resource *p = v; in r_next() 94 struct resource *p = pde_data(file_inode(m->file)); in r_start() 110 struct resource *root = pde_data(file_inode(m->file)); in r_show() 111 struct resource *r = v, *p; in r_show() 153 static void free_resource(struct resource *res) in free_resource() [all …]
|
/openbmc/bmcweb/test/redfish-core/lib/ |
H A D | system_test.cpp | 52 allowed.emplace_back(resource::ResetType::ForceOff); in TEST() 53 allowed.emplace_back(resource::ResetType::PowerCycle); in TEST() 54 allowed.emplace_back(resource::ResetType::Nmi); in TEST() 55 allowed.emplace_back(resource::ResetType::On); in TEST() 56 allowed.emplace_back(resource::ResetType::ForceOn); in TEST() 57 allowed.emplace_back(resource::ResetType::ForceRestart); in TEST() 58 allowed.emplace_back(resource::ResetType::GracefulRestart); in TEST() 59 allowed.emplace_back(resource::ResetType::GracefulShutdown); in TEST() 85 allowed.emplace_back(resource::ResetType::ForceOff); in TEST() 86 allowed.emplace_back(resource::ResetType::PowerCycle); in TEST() [all …]
|
/openbmc/linux/arch/arm/mach-s3c/ |
H A D | devs.c | 55 static struct resource s3c_fb_resource[] = { 66 .resource = s3c_fb_resource, 83 static struct resource s3c_hsmmc_resource[] = { 98 .resource = s3c_hsmmc_resource, 113 static struct resource s3c_hsmmc1_resource[] = { 128 .resource = s3c_hsmmc1_resource, 145 static struct resource s3c_hsmmc2_resource[] = { 160 .resource = s3c_hsmmc2_resource, 175 static struct resource s3c_hsmmc3_resource[] = { 190 .resource = s3c_hsmmc3_resource, [all …]
|
/openbmc/linux/arch/sparc/kernel/ |
H A D | central.c | 24 struct resource leds_resource; 33 struct resource leds_resource; 74 p->clock_freq_regs = of_ioremap(&op->resource[0], 0, in clock_board_probe() 75 resource_size(&op->resource[0]), in clock_board_probe() 82 p->clock_regs = of_ioremap(&op->resource[1], 0, in clock_board_probe() 83 resource_size(&op->resource[1]), in clock_board_probe() 90 if (op->resource[2].flags) { in clock_board_probe() 91 p->clock_ver_reg = of_ioremap(&op->resource[2], 0, in clock_board_probe() 92 resource_size(&op->resource[2]), in clock_board_probe() 109 p->leds_pdev.resource = &p->leds_resource; in clock_board_probe() [all …]
|
/openbmc/linux/drivers/tty/serial/8250/ |
H A D | serial_cs.c | 390 if ((p_dev->resource[1]->end != 0) && in pfc_config() 391 (resource_size(p_dev->resource[1]) == 8)) { in pfc_config() 392 port = p_dev->resource[1]->start; in pfc_config() 395 (resource_size(p_dev->resource[0]) == 0x40)) { in pfc_config() 396 port = p_dev->resource[0]->start + 0x28; in pfc_config() 411 if (p_dev->resource[0]->start == 0) in simple_config_check() 417 if (p_dev->resource[0]->end != size_table[(*try >> 1)]) in simple_config_check() 420 p_dev->resource[0]->end = 8; in simple_config_check() 421 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in simple_config_check() 422 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in simple_config_check() [all …]
|
/openbmc/linux/arch/arm/plat-orion/ |
H A D | common.c | 53 struct resource *resources, in fill_resources() 57 device->resource = resources; in fill_resources() 65 struct resource *resources, in fill_resources_irq() 90 struct resource *resources, in uart_complete() 118 static struct resource orion_uart0_resources[2]; 146 static struct resource orion_uart1_resources[2]; 174 static struct resource orion_uart2_resources[2]; 202 static struct resource orion_uart3_resources[2]; 221 static struct resource orion_rtc_resource[2]; 241 struct resource *orion_ge_resource, unsigned long irq, in ge_complete() [all …]
|
/openbmc/linux/drivers/firmware/imx/ |
H A D | misc.c | 18 u16 resource; member 25 u16 resource; member 32 u16 resource; member 51 int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_set_control() argument 64 msg.resource = resource; in imx_sc_misc_set_control() 81 int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_get_control() argument 95 msg.resource = resource; in imx_sc_misc_get_control() 119 int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_pm_cpu_start() argument 132 msg.resource = resource; in imx_sc_pm_cpu_start()
|