Lines Matching +full:flags +full:- +full:mask
5 * Copyright 2005-2008, Broadcom Corporation
6 * Copyright 2006-2008, Michael Buesch <m@bues.ch>
7 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de>
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()
33 return -ENODEV; in ssb_watchdog_timer_set()
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()
53 return -ENODEV; in ssb_watchdog_register()
56 pdev = platform_device_register_data(NULL, "bcm47xx-wdt", 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
71 unsigned long flags; in ssb_gpio_in() local
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
89 unsigned long flags; in ssb_gpio_out() local
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
107 unsigned long flags; in ssb_gpio_outen() local
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
125 unsigned long flags; in ssb_gpio_control() local
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
139 unsigned long flags; in ssb_gpio_intmask() local
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
157 unsigned long flags; in ssb_gpio_polarity() local
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()
181 for (i = 0; i < bus->nr_devices; i++) { in gige_pci_init_callback()
182 dev = &(bus->devices[i]); in gige_pci_init_callback()
183 if (dev->id.coreid != SSB_DEV_ETHERNET_GBIT) in gige_pci_init_callback()
185 if (!dev->dev || in gige_pci_init_callback()
186 !dev->dev->driver || in gige_pci_init_callback()
187 !device_is_registered(dev->dev)) in gige_pci_init_callback()
194 return -ENODEV; in gige_pci_init_callback()
212 return -ENODEV; in ssb_pcibios_plat_dev_init()
223 for (i = 0; i < bus->nr_devices; i++) { in gige_map_irq_callback()
224 dev = &(bus->devices[i]); in gige_map_irq_callback()
225 if (dev->id.coreid != SSB_DEV_ETHERNET_GBIT) in gige_map_irq_callback()
227 if (!dev->dev || in gige_map_irq_callback()
228 !dev->dev->driver || in gige_map_irq_callback()
229 !device_is_registered(dev->dev)) in gige_map_irq_callback()
236 return -ENODEV; in gige_map_irq_callback()
257 return -ENODEV; in ssb_pcibios_map_irq()