Lines Matching +full:power +full:- +full:domains
2 * PCI Hot Plug Controller Driver for RPA-compliant PPC64 platform.
35 #include <asm/pci-bridge.h> /* for pci_controller */
56 * set_attention_status - set attention LED
60 * echo 0 > attention -- set LED OFF
61 * echo 1 > attention -- set LED ON
62 * echo 2 > attention -- set LED ID(identify, light is blinking)
67 struct slot *slot = (struct slot *)hotplug_slot->private; in set_attention_status()
79 rc = rtas_set_indicator(DR_INDICATOR, slot->index, value); in set_attention_status()
81 hotplug_slot->info->attention_status = value; in set_attention_status()
87 * get_power_status - get power status of a slot
94 struct slot *slot = (struct slot *)hotplug_slot->private; in get_power_status()
96 retval = rtas_get_power_level (slot->power_domain, &level); in get_power_status()
103 * get_attention_status - get attention LED status
109 struct slot *slot = (struct slot *)hotplug_slot->private; in get_attention_status()
110 *value = slot->hotplug_slot->info->attention_status; in get_attention_status()
116 struct slot *slot = (struct slot *)hotplug_slot->private; in get_adapter_status()
128 *value = slot->state; in get_adapter_status()
136 switch (slot->type) { in get_max_bus_speed()
143 speed = PCI_SPEED_33MHz; /* speed for case 1-6 */ in get_max_bus_speed()
173 const int *indexes, *names, *types, *domains; in get_children_props() local
175 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in get_children_props()
176 names = of_get_property(dn, "ibm,drc-names", NULL); in get_children_props()
177 types = of_get_property(dn, "ibm,drc-types", NULL); in get_children_props()
178 domains = of_get_property(dn, "ibm,drc-power-domains", NULL); in get_children_props()
180 if (!indexes || !names || !types || !domains) { in get_children_props()
181 /* Slot does not have dynamically-removable children */ in get_children_props()
182 return -EINVAL; in get_children_props()
193 *drc_power_domains = domains; in get_children_props()
199 * my-drc-index property. Next obtain the DRC list from it's parent. Use
200 * the my-drc-index for correlation, and obtain the requested properties.
206 const int *types, *domains; in rpaphp_get_drc_props() local
211 my_index = of_get_property(dn, "ibm,my-drc-index", NULL); in rpaphp_get_drc_props()
214 return -EINVAL; in rpaphp_get_drc_props()
217 rc = get_children_props(dn->parent, &indexes, &names, &types, &domains); in rpaphp_get_drc_props()
219 return -EINVAL; in rpaphp_get_drc_props()
225 /* Iterate through parent properties, looking for my-drc-index */ in rpaphp_get_drc_props()
235 *drc_power_domain = domains[i+1]; in rpaphp_get_drc_props()
242 return -EINVAL; in rpaphp_get_drc_props()
259 * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0
268 * for built-in pci slots (even when the built-in slots are
289 * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem.
298 * If the device node points at an embedded (built-in) slot, this
312 if (!dn->name || strcmp(dn->name, "pci")) in rpaphp_add_slot()
319 dbg("Entry %s: dn->full_name=%s\n", __func__, dn->full_name); in rpaphp_add_slot()
328 return -ENOMEM; in rpaphp_add_slot()
330 slot->type = simple_strtoul(type, NULL, 10); in rpaphp_add_slot()
332 dbg("Found drc-index:0x%x drc-name:%s drc-type:%s\n", in rpaphp_add_slot()
345 dbg("%s - Exit: rc[%d]\n", __func__, retval); in rpaphp_add_slot()
364 list_del(&slot->rpaphp_slot_list); in cleanup_slots()
365 pci_hp_deregister(slot->hotplug_slot); in cleanup_slots()
389 struct slot *slot = (struct slot *)hotplug_slot->private; in enable_slot()
393 if (slot->state == CONFIGURED) in enable_slot()
401 pcibios_add_pci_devices(slot->bus); in enable_slot()
402 slot->state = CONFIGURED; in enable_slot()
404 slot->state = EMPTY; in enable_slot()
406 err("%s: slot[%s] is in invalid state\n", __func__, slot->name); in enable_slot()
407 slot->state = NOT_VALID; in enable_slot()
408 return -EINVAL; in enable_slot()
411 slot->bus->max_bus_speed = get_max_bus_speed(slot); in enable_slot()
417 struct slot *slot = (struct slot *)hotplug_slot->private; in disable_slot()
418 if (slot->state == NOT_CONFIGURED) in disable_slot()
419 return -EINVAL; in disable_slot()
421 pcibios_remove_pci_devices(slot->bus); in disable_slot()
424 slot->state = NOT_CONFIGURED; in disable_slot()