• Home
  • Raw
  • Download

Lines Matching refs:ctrl

275 	struct controller *ctrl;  member
409 void cpqhp_create_debugfs_files(struct controller *ctrl);
410 void cpqhp_remove_debugfs_files(struct controller *ctrl);
415 int cpqhp_find_available_resources(struct controller *ctrl,
422 int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func);
423 int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func);
424 int cpqhp_hardware_test(struct controller *ctrl, int test_num);
431 int cpqhp_get_bus_dev(struct controller *ctrl, u8 *bus_num, u8 *dev_num,
433 int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug);
434 int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func);
435 int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func);
436 int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func);
437 int cpqhp_save_slot_config(struct controller *ctrl, struct pci_func *new_slot);
438 int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func);
443 int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func);
479 static inline void set_SOGO(struct controller *ctrl) in set_SOGO() argument
483 misc = readw(ctrl->hpc_reg + MISC); in set_SOGO()
485 writew(misc, ctrl->hpc_reg + MISC); in set_SOGO()
489 static inline void amber_LED_on(struct controller *ctrl, u8 slot) in amber_LED_on() argument
493 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in amber_LED_on()
495 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in amber_LED_on()
499 static inline void amber_LED_off(struct controller *ctrl, u8 slot) in amber_LED_off() argument
503 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in amber_LED_off()
505 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in amber_LED_off()
509 static inline int read_amber_LED(struct controller *ctrl, u8 slot) in read_amber_LED() argument
513 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in read_amber_LED()
520 static inline void green_LED_on(struct controller *ctrl, u8 slot) in green_LED_on() argument
524 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_on()
526 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_on()
529 static inline void green_LED_off(struct controller *ctrl, u8 slot) in green_LED_off() argument
533 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_off()
535 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_off()
539 static inline void green_LED_blink(struct controller *ctrl, u8 slot) in green_LED_blink() argument
543 led_control = readl(ctrl->hpc_reg + LED_CONTROL); in green_LED_blink()
546 writel(led_control, ctrl->hpc_reg + LED_CONTROL); in green_LED_blink()
550 static inline void slot_disable(struct controller *ctrl, u8 slot) in slot_disable() argument
554 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in slot_disable()
556 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE); in slot_disable()
560 static inline void slot_enable(struct controller *ctrl, u8 slot) in slot_enable() argument
564 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in slot_enable()
566 writeb(slot_enable, ctrl->hpc_reg + SLOT_ENABLE); in slot_enable()
570 static inline u8 is_slot_enabled(struct controller *ctrl, u8 slot) in is_slot_enabled() argument
574 slot_enable = readb(ctrl->hpc_reg + SLOT_ENABLE); in is_slot_enabled()
580 static inline u8 read_slot_enable(struct controller *ctrl) in read_slot_enable() argument
582 return readb(ctrl->hpc_reg + SLOT_ENABLE); in read_slot_enable()
593 static inline u8 get_controller_speed(struct controller *ctrl) in get_controller_speed() argument
598 if (ctrl->pcix_support) { in get_controller_speed()
599 curr_freq = readb(ctrl->hpc_reg + NEXT_CURR_FREQ); in get_controller_speed()
612 misc = readw(ctrl->hpc_reg + MISC); in get_controller_speed()
625 static inline u8 get_adapter_speed(struct controller *ctrl, u8 hp_slot) in get_adapter_speed() argument
627 u32 temp_dword = readl(ctrl->hpc_reg + NON_INT_INPUT); in get_adapter_speed()
629 if (ctrl->pcix_support) { in get_adapter_speed()
642 static inline void enable_slot_power(struct controller *ctrl, u8 slot) in enable_slot_power() argument
646 slot_power = readb(ctrl->hpc_reg + SLOT_POWER); in enable_slot_power()
648 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER); in enable_slot_power()
651 static inline void disable_slot_power(struct controller *ctrl, u8 slot) in disable_slot_power() argument
655 slot_power = readb(ctrl->hpc_reg + SLOT_POWER); in disable_slot_power()
657 writeb(slot_power, ctrl->hpc_reg + SLOT_POWER); in disable_slot_power()
661 static inline int cpq_get_attention_status(struct controller *ctrl, struct slot *slot) in cpq_get_attention_status() argument
665 hp_slot = slot->device - ctrl->slot_device_offset; in cpq_get_attention_status()
667 return read_amber_LED(ctrl, hp_slot); in cpq_get_attention_status()
671 static inline int get_slot_enabled(struct controller *ctrl, struct slot *slot) in get_slot_enabled() argument
675 hp_slot = slot->device - ctrl->slot_device_offset; in get_slot_enabled()
677 return is_slot_enabled(ctrl, hp_slot); in get_slot_enabled()
681 static inline int cpq_get_latch_status(struct controller *ctrl, in cpq_get_latch_status() argument
687 hp_slot = slot->device - ctrl->slot_device_offset; in cpq_get_latch_status()
689 __func__, slot->device, ctrl->slot_device_offset); in cpq_get_latch_status()
691 status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot)); in cpq_get_latch_status()
697 static inline int get_presence_status(struct controller *ctrl, in get_presence_status() argument
704 hp_slot = slot->device - ctrl->slot_device_offset; in get_presence_status()
706 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR); in get_presence_status()
713 static inline int wait_for_ctrl_irq(struct controller *ctrl) in wait_for_ctrl_irq() argument
719 add_wait_queue(&ctrl->queue, &wait); in wait_for_ctrl_irq()
722 remove_wait_queue(&ctrl->queue, &wait); in wait_for_ctrl_irq()