Lines Matching full:ctrl
261 struct controller *ctrl; member
395 void cpqhp_create_debugfs_files(struct controller *ctrl);
396 void cpqhp_remove_debugfs_files(struct controller *ctrl);
401 int cpqhp_find_available_resources(struct controller *ctrl,
408 int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func);
409 int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func);
410 int cpqhp_hardware_test(struct controller *ctrl, int test_num);
417 int cpqhp_get_bus_dev(struct controller *ctrl, u8 *bus_num, u8 *dev_num,
419 int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug);
420 int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func);
421 int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func);
422 int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func);
423 int cpqhp_save_slot_config(struct controller *ctrl, struct pci_func *new_slot);
424 int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func);
429 int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func);
470 static inline void set_SOGO(struct controller *ctrl) in set_SOGO() argument
474 misc = readw(ctrl->hpc_reg + MISC); in set_SOGO()
476 writew(misc, ctrl->hpc_reg + MISC); in set_SOGO()
480 static inline void amber_LED_on(struct controller *ctrl, u8 slot) in amber_LED_on() argument
484 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in amber_LED_on()
486 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in amber_LED_on()
490 static inline void amber_LED_off(struct controller *ctrl, u8 slot) in amber_LED_off() argument
494 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in amber_LED_off()
496 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in amber_LED_off()
500 static inline int read_amber_LED(struct controller *ctrl, u8 slot) in read_amber_LED() argument
504 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in read_amber_LED()
511 static inline void green_LED_on(struct controller *ctrl, u8 slot) in green_LED_on() argument
515 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_on()
517 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_on()
520 static inline void green_LED_off(struct controller *ctrl, u8 slot) in green_LED_off() argument
524 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_off()
526 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_off()
530 static inline void green_LED_blink(struct controller *ctrl, u8 slot) in green_LED_blink() argument
534 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_blink()
537 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_blink()
541 static inline void slot_disable(struct controller *ctrl, u8 slot) in slot_disable() argument
545 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in slot_disable()
547 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE); in slot_disable()
551 static inline void slot_enable(struct controller *ctrl, u8 slot) in slot_enable() argument
555 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in slot_enable()
557 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE); in slot_enable()
561 static inline u8 is_slot_enabled(struct controller *ctrl, u8 slot) in is_slot_enabled() argument
565 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in is_slot_enabled()
571 static inline u8 read_slot_enable(struct controller *ctrl) in read_slot_enable() argument
573 return readb(ctrl->hpc_reg + SLOT_ENABLE); in read_slot_enable()
580 * @ctrl: controller to get frequency/mode for.
584 static inline u8 get_controller_speed(struct controller *ctrl) in get_controller_speed() argument
589 if (ctrl->pcix_support) { in get_controller_speed()
590 curr_freq = readb(ctrl->hpc_reg + NEXT_CURR_FREQ); in get_controller_speed()
603 misc = readw(ctrl->hpc_reg + MISC); in get_controller_speed()
611 * @ctrl: hotplug controller.
616 static inline u8 get_adapter_speed(struct controller *ctrl, u8 hp_slot) in get_adapter_speed() argument
618 u32 temp_dword = readl(ctrl->hpc_reg + NON_INT_INPUT); in get_adapter_speed()
620 if (ctrl->pcix_support) { in get_adapter_speed()
633 static inline void enable_slot_power(struct controller *ctrl, u8 slot) in enable_slot_power() argument
637 slot_power = readb(ctrl->hpc_reg + SLOT_POWER); in enable_slot_power()
639 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER); in enable_slot_power()
642 static inline void disable_slot_power(struct controller *ctrl, u8 slot) in disable_slot_power() argument
646 slot_power = readb(ctrl->hpc_reg + SLOT_POWER); in disable_slot_power()
648 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER); in disable_slot_power()
652 static inline int cpq_get_attention_status(struct controller *ctrl, struct slot *slot) in cpq_get_attention_status() argument
656 hp_slot = slot->device - ctrl->slot_device_offset; in cpq_get_attention_status()
658 return read_amber_LED(ctrl, hp_slot); in cpq_get_attention_status()
662 static inline int get_slot_enabled(struct controller *ctrl, struct slot *slot) in get_slot_enabled() argument
666 hp_slot = slot->device - ctrl->slot_device_offset; in get_slot_enabled()
668 return is_slot_enabled(ctrl, hp_slot); in get_slot_enabled()
672 static inline int cpq_get_latch_status(struct controller *ctrl, in cpq_get_latch_status() argument
678 hp_slot = slot->device - ctrl->slot_device_offset; in cpq_get_latch_status()
679 dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d\n", in cpq_get_latch_status()
680 __func__, slot->device, ctrl->slot_device_offset); in cpq_get_latch_status()
682 status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot)); in cpq_get_latch_status()
688 static inline int get_presence_status(struct controller *ctrl, in get_presence_status() argument
695 hp_slot = slot->device - ctrl->slot_device_offset; in get_presence_status()
697 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR); in get_presence_status()
704 static inline int wait_for_ctrl_irq(struct controller *ctrl) in wait_for_ctrl_irq() argument
710 add_wait_queue(&ctrl->queue, &wait); in wait_for_ctrl_irq()
713 remove_wait_queue(&ctrl->queue, &wait); in wait_for_ctrl_irq()