Lines Matching refs:ctrl
261 struct controller *ctrl;
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)
474 misc = readw(ctrl->hpc_reg + MISC);
476 writew(misc, ctrl->hpc_reg + MISC);
480 static inline void amber_LED_on(struct controller *ctrl, u8 slot)
484 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
486 writel(led_control, ctrl->hpc_reg + LED_CONTROL);
490 static inline void amber_LED_off(struct controller *ctrl, u8 slot)
494 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
496 writel(led_control, ctrl->hpc_reg + LED_CONTROL);
500 static inline int read_amber_LED(struct controller *ctrl, u8 slot)
504 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
511 static inline void green_LED_on(struct controller *ctrl, u8 slot)
515 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
517 writel(led_control, ctrl->hpc_reg + LED_CONTROL);
520 static inline void green_LED_off(struct controller *ctrl, u8 slot)
524 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
526 writel(led_control, ctrl->hpc_reg + LED_CONTROL);
530 static inline void green_LED_blink(struct controller *ctrl, u8 slot)
534 led_control = readl(ctrl->hpc_reg + LED_CONTROL);
537 writel(led_control, ctrl->hpc_reg + LED_CONTROL);
541 static inline void slot_disable(struct controller *ctrl, u8 slot)
545 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE);
547 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE);
551 static inline void slot_enable(struct controller *ctrl, u8 slot)
555 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE);
557 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE);
561 static inline u8 is_slot_enabled(struct controller *ctrl, u8 slot)
565 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE);
571 static inline u8 read_slot_enable(struct controller *ctrl)
573 return readb(ctrl->hpc_reg + SLOT_ENABLE);
580 * @ctrl: controller to get frequency/mode for.
584 static inline u8 get_controller_speed(struct controller *ctrl)
589 if (ctrl->pcix_support) {
590 curr_freq = readb(ctrl->hpc_reg + NEXT_CURR_FREQ);
603 misc = readw(ctrl->hpc_reg + MISC);
611 * @ctrl: hotplug controller.
616 static inline u8 get_adapter_speed(struct controller *ctrl, u8 hp_slot)
618 u32 temp_dword = readl(ctrl->hpc_reg + NON_INT_INPUT);
620 if (ctrl->pcix_support) {
633 static inline void enable_slot_power(struct controller *ctrl, u8 slot)
637 slot_power = readb(ctrl->hpc_reg + SLOT_POWER);
639 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER);
642 static inline void disable_slot_power(struct controller *ctrl, u8 slot)
646 slot_power = readb(ctrl->hpc_reg + SLOT_POWER);
648 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER);
652 static inline int cpq_get_attention_status(struct controller *ctrl, struct slot *slot)
656 hp_slot = slot->device - ctrl->slot_device_offset;
658 return read_amber_LED(ctrl, hp_slot);
662 static inline int get_slot_enabled(struct controller *ctrl, struct slot *slot)
666 hp_slot = slot->device - ctrl->slot_device_offset;
668 return is_slot_enabled(ctrl, hp_slot);
672 static inline int cpq_get_latch_status(struct controller *ctrl,
678 hp_slot = slot->device - ctrl->slot_device_offset;
679 dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d\n",
680 __func__, slot->device, ctrl->slot_device_offset);
682 status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot));
688 static inline int get_presence_status(struct controller *ctrl,
695 hp_slot = slot->device - ctrl->slot_device_offset;
697 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
704 static inline int wait_for_ctrl_irq(struct controller *ctrl)
710 add_wait_queue(&ctrl->queue, &wait);
713 remove_wait_queue(&ctrl->queue, &wait);