Lines Matching full:bus
23 int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks) in ssb_watchdog_timer_set() argument
25 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_timer_set()
26 ssb_chipco_watchdog_timer_set(&bus->chipco, ticks); in ssb_watchdog_timer_set()
29 if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_timer_set()
30 ssb_extif_watchdog_timer_set(&bus->extif, ticks); in ssb_watchdog_timer_set()
37 int ssb_watchdog_register(struct ssb_bus *bus) in ssb_watchdog_register() argument
42 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_register()
43 wdt.driver_data = &bus->chipco; in ssb_watchdog_register()
46 wdt.max_timer_ms = bus->chipco.max_timer_ms; in ssb_watchdog_register()
47 } else if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_register()
48 wdt.driver_data = &bus->extif; in ssb_watchdog_register()
57 bus->busnumber, &wdt, in ssb_watchdog_register()
65 bus->watchdog = pdev; in ssb_watchdog_register()
69 u32 ssb_gpio_in(struct ssb_bus *bus, u32 mask) in ssb_gpio_in() argument
74 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_in()
75 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_in()
76 res = ssb_chipco_gpio_in(&bus->chipco, mask); in ssb_gpio_in()
77 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_in()
78 res = ssb_extif_gpio_in(&bus->extif, mask); in ssb_gpio_in()
81 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_in()
87 u32 ssb_gpio_out(struct ssb_bus *bus, u32 mask, u32 value) in ssb_gpio_out() argument
92 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_out()
93 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_out()
94 res = ssb_chipco_gpio_out(&bus->chipco, mask, value); in ssb_gpio_out()
95 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_out()
96 res = ssb_extif_gpio_out(&bus->extif, mask, value); in ssb_gpio_out()
99 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_out()
105 u32 ssb_gpio_outen(struct ssb_bus *bus, u32 mask, u32 value) in ssb_gpio_outen() argument
110 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_outen()
111 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_outen()
112 res = ssb_chipco_gpio_outen(&bus->chipco, mask, value); in ssb_gpio_outen()
113 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_outen()
114 res = ssb_extif_gpio_outen(&bus->extif, mask, value); in ssb_gpio_outen()
117 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_outen()
123 u32 ssb_gpio_control(struct ssb_bus *bus, u32 mask, u32 value) in ssb_gpio_control() argument
128 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_control()
129 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_control()
130 res = ssb_chipco_gpio_control(&bus->chipco, mask, value); in ssb_gpio_control()
131 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_control()
137 u32 ssb_gpio_intmask(struct ssb_bus *bus, u32 mask, u32 value) in ssb_gpio_intmask() argument
142 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_intmask()
143 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_intmask()
144 res = ssb_chipco_gpio_intmask(&bus->chipco, mask, value); in ssb_gpio_intmask()
145 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_intmask()
146 res = ssb_extif_gpio_intmask(&bus->extif, mask, value); in ssb_gpio_intmask()
149 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_intmask()
155 u32 ssb_gpio_polarity(struct ssb_bus *bus, u32 mask, u32 value) in ssb_gpio_polarity() argument
160 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_polarity()
161 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_polarity()
162 res = ssb_chipco_gpio_polarity(&bus->chipco, mask, value); in ssb_gpio_polarity()
163 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_polarity()
164 res = ssb_extif_gpio_polarity(&bus->extif, mask, value); in ssb_gpio_polarity()
167 spin_unlock_irqrestore(&bus->gpio_lock, flags); in ssb_gpio_polarity()
174 static int gige_pci_init_callback(struct ssb_bus *bus, unsigned long data) in gige_pci_init_callback() argument
181 for (i = 0; i < bus->nr_devices; i++) { in gige_pci_init_callback()
182 dev = &(bus->devices[i]); in gige_pci_init_callback()
216 static int gige_map_irq_callback(struct ssb_bus *bus, unsigned long data) in gige_map_irq_callback() argument
223 for (i = 0; i < bus->nr_devices; i++) { in gige_map_irq_callback()
224 dev = &(bus->devices[i]); in gige_map_irq_callback()
244 /* Check if this PCI device is a device on a SSB bus or device in ssb_pcibios_map_irq()