Home
last modified time | relevance | path

Searched refs:bus (Results 1 – 200 of 3383) sorted by relevance

12345678910>>...17

/linux-4.4.14/sound/hda/
Dhdac_controller.c13 static void azx_clear_corbrp(struct hdac_bus *bus) in azx_clear_corbrp() argument
18 if (snd_hdac_chip_readw(bus, CORBRP) & AZX_CORBRP_RST) in azx_clear_corbrp()
23 dev_err(bus->dev, "CORB reset timeout#1, CORBRP = %d\n", in azx_clear_corbrp()
24 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
26 snd_hdac_chip_writew(bus, CORBRP, 0); in azx_clear_corbrp()
28 if (snd_hdac_chip_readw(bus, CORBRP) == 0) in azx_clear_corbrp()
33 dev_err(bus->dev, "CORB reset timeout#2, CORBRP = %d\n", in azx_clear_corbrp()
34 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
41 void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus) in snd_hdac_bus_init_cmd_io() argument
43 spin_lock_irq(&bus->reg_lock); in snd_hdac_bus_init_cmd_io()
[all …]
Dhdac_bus.c27 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_bus_init() argument
31 memset(bus, 0, sizeof(*bus)); in snd_hdac_bus_init()
32 bus->dev = dev; in snd_hdac_bus_init()
34 bus->ops = ops; in snd_hdac_bus_init()
36 bus->ops = &default_ops; in snd_hdac_bus_init()
37 bus->io_ops = io_ops; in snd_hdac_bus_init()
38 INIT_LIST_HEAD(&bus->stream_list); in snd_hdac_bus_init()
39 INIT_LIST_HEAD(&bus->codec_list); in snd_hdac_bus_init()
40 INIT_WORK(&bus->unsol_work, process_unsol_events); in snd_hdac_bus_init()
41 spin_lock_init(&bus->reg_lock); in snd_hdac_bus_init()
[all …]
Dhdac_stream.c25 void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev, in snd_hdac_stream_init() argument
28 azx_dev->bus = bus; in snd_hdac_stream_init()
30 azx_dev->sd_addr = bus->remap_addr + (0x20 * idx + 0x80); in snd_hdac_stream_init()
37 list_add_tail(&azx_dev->list, &bus->stream_list); in snd_hdac_stream_init()
50 struct hdac_bus *bus = azx_dev->bus; in snd_hdac_stream_start() local
52 trace_snd_hdac_stream_start(bus, azx_dev); in snd_hdac_stream_start()
54 azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK); in snd_hdac_stream_start()
59 snd_hdac_chip_updatel(bus, INTCTL, 0, 1 << azx_dev->index); in snd_hdac_stream_start()
88 trace_snd_hdac_stream_stop(azx_dev->bus, azx_dev); in snd_hdac_stream_stop()
92 snd_hdac_chip_updatel(azx_dev->bus, INTCTL, 1 << azx_dev->index, 0); in snd_hdac_stream_stop()
[all …]
Dhdac_i915.c39 int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) in snd_hdac_set_codec_wakeup() argument
41 struct i915_audio_component *acomp = bus->audio_component; in snd_hdac_set_codec_wakeup()
47 dev_warn(bus->dev, in snd_hdac_set_codec_wakeup()
52 dev_dbg(bus->dev, "%s codec wakeup\n", in snd_hdac_set_codec_wakeup()
74 int snd_hdac_display_power(struct hdac_bus *bus, bool enable) in snd_hdac_display_power() argument
76 struct i915_audio_component *acomp = bus->audio_component; in snd_hdac_display_power()
81 dev_dbg(bus->dev, "display power %s\n", in snd_hdac_display_power()
85 if (!bus->i915_power_refcount++) { in snd_hdac_display_power()
87 snd_hdac_set_codec_wakeup(bus, true); in snd_hdac_display_power()
88 snd_hdac_set_codec_wakeup(bus, false); in snd_hdac_display_power()
[all …]
Dtrace.h19 TP_PROTO(struct hdac_bus *bus, unsigned int cmd),
20 TP_ARGS(bus, cmd),
25 dev_name((bus)->dev), (cmd) >> 28, cmd);
31 TP_PROTO(struct hdac_bus *bus, unsigned int addr, unsigned int res),
32 TP_ARGS(bus, addr, res),
37 dev_name((bus)->dev), addr, res);
43 TP_PROTO(struct hdac_bus *bus, u32 res, u32 res_ex),
44 TP_ARGS(bus, res, res_ex),
49 dev_name((bus)->dev), res_ex & 0x0f, res, res_ex);
55 TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
[all …]
/linux-4.4.14/sound/i2c/
Di2c.c39 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus,
48 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument
53 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free()
55 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free()
56 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free()
59 if (bus->master) in snd_i2c_bus_free()
60 list_del(&bus->buses); in snd_i2c_bus_free()
62 while (!list_empty(&bus->buses)) { in snd_i2c_bus_free()
63 slave = snd_i2c_slave_bus(bus->buses.next); in snd_i2c_bus_free()
64 snd_device_free(bus->card, slave); in snd_i2c_bus_free()
[all …]
Dtea6330t.c50 struct snd_i2c_bus *bus; member
60 int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer) in snd_tea6330t_detect() argument
64 snd_i2c_lock(bus); in snd_tea6330t_detect()
65 res = snd_i2c_probeaddr(bus, TEA6330T_ADDR); in snd_tea6330t_detect()
66 snd_i2c_unlock(bus); in snd_tea6330t_detect()
77 snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
101 snd_i2c_lock(tea->bus); in snd_tea6330t_get_master_volume()
104 snd_i2c_unlock(tea->bus); in snd_tea6330t_get_master_volume()
118 snd_i2c_lock(tea->bus); in snd_tea6330t_put_master_volume()
136 snd_i2c_unlock(tea->bus); in snd_tea6330t_put_master_volume()
[all …]
Dcs8427.c153 int snd_cs8427_init(struct snd_i2c_bus *bus, in snd_cs8427_init() argument
205 snd_i2c_lock(bus); in snd_cs8427_init()
214 snd_i2c_unlock(bus); in snd_cs8427_init()
250 snd_i2c_unlock(bus); in snd_cs8427_init()
258 snd_i2c_unlock(bus); in snd_cs8427_init()
264 int snd_cs8427_create(struct snd_i2c_bus *bus, in snd_cs8427_create() argument
273 err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), in snd_cs8427_create()
288 err = snd_cs8427_init(bus, device); in snd_cs8427_create()
329 snd_i2c_lock(cs8427->bus); in snd_cs8427_reset()
341 snd_i2c_unlock(cs8427->bus); in snd_cs8427_reset()
[all …]
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
Dbit.c32 nvkm_i2c_drive_scl(struct nvkm_i2c_bus *bus, int state) in nvkm_i2c_drive_scl() argument
34 bus->func->drive_scl(bus, state); in nvkm_i2c_drive_scl()
38 nvkm_i2c_drive_sda(struct nvkm_i2c_bus *bus, int state) in nvkm_i2c_drive_sda() argument
40 bus->func->drive_sda(bus, state); in nvkm_i2c_drive_sda()
44 nvkm_i2c_sense_scl(struct nvkm_i2c_bus *bus) in nvkm_i2c_sense_scl() argument
46 return bus->func->sense_scl(bus); in nvkm_i2c_sense_scl()
50 nvkm_i2c_sense_sda(struct nvkm_i2c_bus *bus) in nvkm_i2c_sense_sda() argument
52 return bus->func->sense_sda(bus); in nvkm_i2c_sense_sda()
56 nvkm_i2c_delay(struct nvkm_i2c_bus *bus, u32 nsec) in nvkm_i2c_delay() argument
62 nvkm_i2c_raise_scl(struct nvkm_i2c_bus *bus) in nvkm_i2c_raise_scl() argument
[all …]
Dbus.c35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local
36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer()
42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local
43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer()
49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local
50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl()
56 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setsda() local
57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda()
63 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_getscl() local
64 return bus->func->sense_scl(bus); in nvkm_i2c_bus_getscl()
[all …]
Dbusnv50.c38 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_scl() local
39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl()
40 if (state) bus->data |= 0x01; in nv50_i2c_bus_drive_scl()
41 else bus->data &= 0xfe; in nv50_i2c_bus_drive_scl()
42 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_scl()
48 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_sda() local
49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda()
50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda()
51 else bus->data &= 0xfd; in nv50_i2c_bus_drive_sda()
52 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_sda()
[all …]
Dbusgf119.c35 struct gf119_i2c_bus *bus = gf119_i2c_bus(base); in gf119_i2c_bus_drive_scl() local
36 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in gf119_i2c_bus_drive_scl()
37 nvkm_mask(device, bus->addr, 0x00000001, state ? 0x00000001 : 0); in gf119_i2c_bus_drive_scl()
43 struct gf119_i2c_bus *bus = gf119_i2c_bus(base); in gf119_i2c_bus_drive_sda() local
44 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in gf119_i2c_bus_drive_sda()
45 nvkm_mask(device, bus->addr, 0x00000002, state ? 0x00000002 : 0); in gf119_i2c_bus_drive_sda()
51 struct gf119_i2c_bus *bus = gf119_i2c_bus(base); in gf119_i2c_bus_sense_scl() local
52 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in gf119_i2c_bus_sense_scl()
53 return !!(nvkm_rd32(device, bus->addr) & 0x00000010); in gf119_i2c_bus_sense_scl()
59 struct gf119_i2c_bus *bus = gf119_i2c_bus(base); in gf119_i2c_bus_sense_sda() local
[all …]
Dbusnv04.c38 struct nv04_i2c_bus *bus = nv04_i2c_bus(base); in nv04_i2c_bus_drive_scl() local
39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv04_i2c_bus_drive_scl()
40 u8 val = nvkm_rdvgac(device, 0, bus->drive); in nv04_i2c_bus_drive_scl()
43 nvkm_wrvgac(device, 0, bus->drive, val | 0x01); in nv04_i2c_bus_drive_scl()
49 struct nv04_i2c_bus *bus = nv04_i2c_bus(base); in nv04_i2c_bus_drive_sda() local
50 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv04_i2c_bus_drive_sda()
51 u8 val = nvkm_rdvgac(device, 0, bus->drive); in nv04_i2c_bus_drive_sda()
54 nvkm_wrvgac(device, 0, bus->drive, val | 0x01); in nv04_i2c_bus_drive_sda()
60 struct nv04_i2c_bus *bus = nv04_i2c_bus(base); in nv04_i2c_bus_sense_scl() local
61 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv04_i2c_bus_sense_scl()
[all …]
Dbusnv4e.c35 struct nv4e_i2c_bus *bus = nv4e_i2c_bus(base); in nv4e_i2c_bus_drive_scl() local
36 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv4e_i2c_bus_drive_scl()
37 nvkm_mask(device, bus->addr, 0x2f, state ? 0x21 : 0x01); in nv4e_i2c_bus_drive_scl()
43 struct nv4e_i2c_bus *bus = nv4e_i2c_bus(base); in nv4e_i2c_bus_drive_sda() local
44 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv4e_i2c_bus_drive_sda()
45 nvkm_mask(device, bus->addr, 0x1f, state ? 0x11 : 0x01); in nv4e_i2c_bus_drive_sda()
51 struct nv4e_i2c_bus *bus = nv4e_i2c_bus(base); in nv4e_i2c_bus_sense_scl() local
52 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv4e_i2c_bus_sense_scl()
53 return !!(nvkm_rd32(device, bus->addr) & 0x00040000); in nv4e_i2c_bus_sense_scl()
59 struct nv4e_i2c_bus *bus = nv4e_i2c_bus(base); in nv4e_i2c_bus_sense_sda() local
[all …]
Danx9805.c32 struct nvkm_i2c_bus *bus; member
45 struct anx9805_bus *bus = anx9805_bus(base); in anx9805_bus_xfer() local
46 struct anx9805_pad *pad = bus->pad; in anx9805_bus_xfer()
47 struct i2c_adapter *adap = &pad->bus->i2c; in anx9805_bus_xfer()
56 nvkm_wri2cr(adap, bus->addr, 0x43, 0x05); in anx9805_bus_xfer()
61 nvkm_wri2cr(adap, bus->addr, 0x40, msg->addr << 1); in anx9805_bus_xfer()
62 nvkm_wri2cr(adap, bus->addr, 0x41, seg); in anx9805_bus_xfer()
63 nvkm_wri2cr(adap, bus->addr, 0x42, off); in anx9805_bus_xfer()
64 nvkm_wri2cr(adap, bus->addr, 0x44, msg->len); in anx9805_bus_xfer()
65 nvkm_wri2cr(adap, bus->addr, 0x45, 0x00); in anx9805_bus_xfer()
[all …]
Dbase.c52 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local
68 list_for_each_entry(bus, &i2c->bus, head) { in nvkm_i2c_bus_find()
69 if (bus->id == id) in nvkm_i2c_bus_find()
70 return bus; in nvkm_i2c_bus_find()
181 struct nvkm_i2c_bus *bus; in nvkm_i2c_init() local
188 list_for_each_entry(bus, &i2c->bus, head) { in nvkm_i2c_init()
189 nvkm_i2c_bus_init(bus); in nvkm_i2c_init()
208 while (!list_empty(&i2c->bus)) { in nvkm_i2c_dtor()
209 struct nvkm_i2c_bus *bus = in nvkm_i2c_dtor() local
210 list_first_entry(&i2c->bus, typeof(*bus), head); in nvkm_i2c_dtor()
[all …]
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmfmac/
Dsdio.c741 static bool data_ok(struct brcmf_sdio *bus) in data_ok() argument
743 return (u8)(bus->tx_max - bus->tx_seq) != 0 && in data_ok()
744 ((u8)(bus->tx_max - bus->tx_seq) & 0x80) == 0; in data_ok()
751 static int r_sdreg32(struct brcmf_sdio *bus, u32 *regvar, u32 offset) in r_sdreg32() argument
756 core = brcmf_chip_get_core(bus->ci, BCMA_CORE_SDIO_DEV); in r_sdreg32()
757 *regvar = brcmf_sdiod_regrl(bus->sdiodev, core->base + offset, &ret); in r_sdreg32()
762 static int w_sdreg32(struct brcmf_sdio *bus, u32 regval, u32 reg_offset) in w_sdreg32() argument
767 core = brcmf_chip_get_core(bus->ci, BCMA_CORE_SDIO_DEV); in w_sdreg32()
768 brcmf_sdiod_regwl(bus->sdiodev, core->base + reg_offset, regval, &ret); in w_sdreg32()
774 brcmf_sdio_kso_control(struct brcmf_sdio *bus, bool on) in brcmf_sdio_kso_control() argument
[all …]
Dbus.h147 static inline int brcmf_bus_preinit(struct brcmf_bus *bus) in brcmf_bus_preinit() argument
149 if (!bus->ops->preinit) in brcmf_bus_preinit()
151 return bus->ops->preinit(bus->dev); in brcmf_bus_preinit()
154 static inline void brcmf_bus_stop(struct brcmf_bus *bus) in brcmf_bus_stop() argument
156 bus->ops->stop(bus->dev); in brcmf_bus_stop()
159 static inline int brcmf_bus_txdata(struct brcmf_bus *bus, struct sk_buff *skb) in brcmf_bus_txdata() argument
161 return bus->ops->txdata(bus->dev, skb); in brcmf_bus_txdata()
165 int brcmf_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint len) in brcmf_bus_txctl() argument
167 return bus->ops->txctl(bus->dev, msg, len); in brcmf_bus_txctl()
171 int brcmf_bus_rxctl(struct brcmf_bus *bus, unsigned char *msg, uint len) in brcmf_bus_rxctl() argument
[all …]
/linux-4.4.14/drivers/ssb/
Dscan.c160 static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, in scan_read32() argument
165 switch (bus->bustype) { in scan_read32()
173 ssb_pcmcia_switch_segment(bus, 1); in scan_read32()
176 ssb_pcmcia_switch_segment(bus, 0); in scan_read32()
177 lo = readw(bus->mmio + offset); in scan_read32()
178 hi = readw(bus->mmio + offset + 2); in scan_read32()
182 return ssb_sdio_scan_read32(bus, offset); in scan_read32()
184 return readl(bus->mmio + offset); in scan_read32()
187 static int scan_switchcore(struct ssb_bus *bus, u8 coreidx) in scan_switchcore() argument
189 switch (bus->bustype) { in scan_switchcore()
[all …]
Ddriver_gpio.c33 struct ssb_bus *bus = ssb_gpio_get_bus(chip); in ssb_gpio_to_irq() local
35 if (bus->bustype == SSB_BUSTYPE_SSB) in ssb_gpio_to_irq()
36 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq()
48 struct ssb_bus *bus = ssb_gpio_get_bus(chip); in ssb_gpio_chipco_get_value() local
50 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value()
56 struct ssb_bus *bus = ssb_gpio_get_bus(chip); in ssb_gpio_chipco_set_value() local
58 ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); in ssb_gpio_chipco_set_value()
64 struct ssb_bus *bus = ssb_gpio_get_bus(chip); in ssb_gpio_chipco_direction_input() local
66 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 0); in ssb_gpio_chipco_direction_input()
73 struct ssb_bus *bus = ssb_gpio_get_bus(chip); in ssb_gpio_chipco_direction_output() local
[all …]
Dsdio.c104 static inline struct device *ssb_sdio_dev(struct ssb_bus *bus) in ssb_sdio_dev() argument
106 return &bus->host_sdio->dev; in ssb_sdio_dev()
110 static int ssb_sdio_writeb(struct ssb_bus *bus, unsigned int addr, u8 val) in ssb_sdio_writeb() argument
114 sdio_writeb(bus->host_sdio, val, addr, &error); in ssb_sdio_writeb()
116 dev_dbg(ssb_sdio_dev(bus), "%08X <- %02x, error %d\n", in ssb_sdio_writeb()
124 static u8 ssb_sdio_readb(struct ssb_bus *bus, unsigned int addr)
129 val = sdio_readb(bus->host_sdio, addr, &error);
131 dev_dbg(ssb_sdio_dev(bus), "%08X -> %02x, error %d\n",
140 static int ssb_sdio_set_sbaddr_window(struct ssb_bus *bus, u32 address) in ssb_sdio_set_sbaddr_window() argument
144 error = ssb_sdio_writeb(bus, SBSDIO_FUNC1_SBADDRLOW, in ssb_sdio_set_sbaddr_window()
[all …]
Dembedded.c23 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()
[all …]
Dpcmcia.c71 static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value) in ssb_pcmcia_cfg_write() argument
75 res = pcmcia_write_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_write()
83 static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value) in ssb_pcmcia_cfg_read() argument
87 res = pcmcia_read_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_read()
94 int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus, in ssb_pcmcia_switch_coreidx() argument
106 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS0, in ssb_pcmcia_switch_coreidx()
110 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS1, in ssb_pcmcia_switch_coreidx()
114 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS2, in ssb_pcmcia_switch_coreidx()
121 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS0, &val); in ssb_pcmcia_switch_coreidx()
125 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS1, &val); in ssb_pcmcia_switch_coreidx()
[all …]
Dmain.c58 struct ssb_bus *bus; in ssb_pci_dev_to_bus() local
61 list_for_each_entry(bus, &buses, list) { in ssb_pci_dev_to_bus()
62 if (bus->bustype == SSB_BUSTYPE_PCI && in ssb_pci_dev_to_bus()
63 bus->host_pci == pdev) in ssb_pci_dev_to_bus()
66 bus = NULL; in ssb_pci_dev_to_bus()
70 return bus; in ssb_pci_dev_to_bus()
77 struct ssb_bus *bus; in ssb_pcmcia_dev_to_bus() local
80 list_for_each_entry(bus, &buses, list) { in ssb_pcmcia_dev_to_bus()
81 if (bus->bustype == SSB_BUSTYPE_PCMCIA && in ssb_pcmcia_dev_to_bus()
82 bus->host_pcmcia == pdev) in ssb_pcmcia_dev_to_bus()
[all …]
Dssb_private.h47 extern int ssb_pci_switch_core(struct ssb_bus *bus,
49 extern int ssb_pci_switch_coreidx(struct ssb_bus *bus,
51 extern int ssb_pci_xtal(struct ssb_bus *bus, u32 what,
53 extern int ssb_pci_get_invariants(struct ssb_bus *bus,
55 extern void ssb_pci_exit(struct ssb_bus *bus);
56 extern int ssb_pci_init(struct ssb_bus *bus);
61 static inline int ssb_pci_switch_core(struct ssb_bus *bus, in ssb_pci_switch_core() argument
66 static inline int ssb_pci_switch_coreidx(struct ssb_bus *bus, in ssb_pci_switch_coreidx() argument
71 static inline int ssb_pci_xtal(struct ssb_bus *bus, u32 what, in ssb_pci_xtal() argument
76 static inline void ssb_pci_exit(struct ssb_bus *bus) in ssb_pci_exit() argument
[all …]
Ddriver_mipscore.c85 struct ssb_bus *bus = rdev->bus; in find_device() local
87 for (i = 0; i < bus->nr_devices; i++) { in find_device()
89 dev = &(bus->devices[i]); in find_device()
103 struct ssb_bus *bus = dev->bus; in ssb_mips_irq() local
104 struct ssb_device *mdev = bus->mipscore.dev; in ssb_mips_irq()
113 ipsflag = ssb_read32(bus->mipscore.dev, SSB_IPSFLAG); in ssb_mips_irq()
127 static void clear_irq(struct ssb_bus *bus, unsigned int irq) in clear_irq() argument
129 struct ssb_device *dev = bus->mipscore.dev; in clear_irq()
144 struct ssb_bus *bus = dev->bus; in set_irq() local
145 struct ssb_device *mdev = bus->mipscore.dev; in set_irq()
[all …]
Dpci.c32 int ssb_pci_switch_coreidx(struct ssb_bus *bus, u8 coreidx) in ssb_pci_switch_coreidx() argument
39 err = pci_write_config_dword(bus->host_pci, SSB_BAR0_WIN, in ssb_pci_switch_coreidx()
44 err = pci_read_config_dword(bus->host_pci, SSB_BAR0_WIN, in ssb_pci_switch_coreidx()
63 int ssb_pci_switch_core(struct ssb_bus *bus, in ssb_pci_switch_core() argument
75 spin_lock_irqsave(&bus->bar_lock, flags); in ssb_pci_switch_core()
76 err = ssb_pci_switch_coreidx(bus, dev->core_index); in ssb_pci_switch_core()
78 bus->mapped_device = dev; in ssb_pci_switch_core()
79 spin_unlock_irqrestore(&bus->bar_lock, flags); in ssb_pci_switch_core()
85 int ssb_pci_xtal(struct ssb_bus *bus, u32 what, int turn_on) in ssb_pci_xtal() argument
91 if (bus->bustype != SSB_BUSTYPE_PCI) in ssb_pci_xtal()
[all …]
Dhost_soc.c17 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read8() local
20 return readb(bus->mmio + offset); in ssb_host_soc_read8()
25 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read16() local
28 return readw(bus->mmio + offset); in ssb_host_soc_read16()
33 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read32() local
36 return readl(bus->mmio + offset); in ssb_host_soc_read32()
43 struct ssb_bus *bus = dev->bus; in ssb_host_soc_block_read() local
47 addr = bus->mmio + offset; in ssb_host_soc_block_read()
90 struct ssb_bus *bus = dev->bus; in ssb_host_soc_write8() local
93 writeb(value, bus->mmio + offset); in ssb_host_soc_write8()
[all …]
Dsprom.c67 ssize_t ssb_attr_sprom_show(struct ssb_bus *bus, char *buf, in ssb_attr_sprom_show() argument
68 int (*sprom_read)(struct ssb_bus *bus, u16 *sprom)) in ssb_attr_sprom_show() argument
73 size_t sprom_size_words = bus->sprom_size; in ssb_attr_sprom_show()
83 if (mutex_lock_interruptible(&bus->sprom_mutex)) in ssb_attr_sprom_show()
85 err = sprom_read(bus, sprom); in ssb_attr_sprom_show()
86 mutex_unlock(&bus->sprom_mutex); in ssb_attr_sprom_show()
98 ssize_t ssb_attr_sprom_store(struct ssb_bus *bus, in ssb_attr_sprom_store() argument
101 int (*sprom_write)(struct ssb_bus *bus, const u16 *sprom)) in ssb_attr_sprom_store() argument
105 size_t sprom_size_words = bus->sprom_size; in ssb_attr_sprom_store()
108 sprom = kcalloc(bus->sprom_size, sizeof(u16), GFP_KERNEL); in ssb_attr_sprom_store()
[all …]
Ddriver_chipcommon.c46 struct ssb_bus *bus; in ssb_chipco_set_clockmode() local
51 bus = ccdev->bus; in ssb_chipco_set_clockmode()
80 ssb_pci_xtal(bus, SSB_GPIO_XTAL, 1); /* Force crystal on */ in ssb_chipco_set_clockmode()
106 ssb_pci_xtal(bus, SSB_GPIO_XTAL, 0); in ssb_chipco_set_clockmode()
121 struct ssb_bus *bus = cc->dev->bus; in chipco_pctl_get_slowclksrc() local
125 if (bus->bustype == SSB_BUSTYPE_SSB || in chipco_pctl_get_slowclksrc()
126 bus->bustype == SSB_BUSTYPE_PCMCIA) in chipco_pctl_get_slowclksrc()
128 if (bus->bustype == SSB_BUSTYPE_PCI) { in chipco_pctl_get_slowclksrc()
129 pci_read_config_dword(bus->host_pci, SSB_GPIO_OUT, &tmp); in chipco_pctl_get_slowclksrc()
213 struct ssb_bus *bus = cc->dev->bus; in chipco_powercontrol_init() local
[all …]
Ddriver_pcicore.c71 unsigned int bus, unsigned int dev, in get_cfgspace_addr() argument
81 if (bus == 0) { in get_cfgspace_addr()
100 addr |= (bus << 16); in get_cfgspace_addr()
110 unsigned int bus, unsigned int dev, in ssb_extpci_read_config() argument
121 addr = get_cfgspace_addr(pc, bus, dev, func, off); in ssb_extpci_read_config()
156 unsigned int bus, unsigned int dev, in ssb_extpci_write_config() argument
167 addr = get_cfgspace_addr(pc, bus, dev, func, off); in ssb_extpci_write_config()
204 static int ssb_pcicore_read_config(struct pci_bus *bus, unsigned int devfn, in ssb_pcicore_read_config() argument
211 err = ssb_extpci_read_config(extpci_core, bus->number, PCI_SLOT(devfn), in ssb_pcicore_read_config()
218 static int ssb_pcicore_write_config(struct pci_bus *bus, unsigned int devfn, in ssb_pcicore_write_config() argument
[all …]
Ddriver_chipcommon_pmu.c93 struct ssb_bus *bus = cc->dev->bus; in ssb_pmu0_pllinit_r0() local
117 switch (bus->chip_id) { in ssb_pmu0_pllinit_r0()
224 struct ssb_bus *bus = cc->dev->bus; in ssb_pmu1_pllinit_r0() local
230 if (bus->chip_id == 0x4312) { in ssb_pmu1_pllinit_r0()
256 switch (bus->chip_id) { in ssb_pmu1_pllinit_r0()
319 struct ssb_bus *bus = cc->dev->bus; in ssb_pmu_pll_init() local
322 if (bus->bustype == SSB_BUSTYPE_SSB) { in ssb_pmu_pll_init()
330 switch (bus->chip_id) { in ssb_pmu_pll_init()
353 bus->chip_id); in ssb_pmu_pll_init()
425 struct ssb_bus *bus = cc->dev->bus; in ssb_pmu_resources_init() local
[all …]
/linux-4.4.14/arch/powerpc/platforms/pasemi/
Dgpio_mdio.c47 #define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin) argument
48 #define MDIO_PIN(bus) (((struct gpio_priv *)bus->priv)->mdio_pin) argument
50 static inline void mdio_lo(struct mii_bus *bus) in mdio_lo() argument
52 out_le32(gpio_regs+0x10, 1 << MDIO_PIN(bus)); in mdio_lo()
55 static inline void mdio_hi(struct mii_bus *bus) in mdio_hi() argument
57 out_le32(gpio_regs, 1 << MDIO_PIN(bus)); in mdio_hi()
60 static inline void mdc_lo(struct mii_bus *bus) in mdc_lo() argument
62 out_le32(gpio_regs+0x10, 1 << MDC_PIN(bus)); in mdc_lo()
65 static inline void mdc_hi(struct mii_bus *bus) in mdc_hi() argument
67 out_le32(gpio_regs, 1 << MDC_PIN(bus)); in mdc_hi()
[all …]
Dpci.c36 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) argument
38 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) in pa_pxp_offset_valid() argument
44 if (bus == 0 && devfn == 0) in pa_pxp_offset_valid()
51 u8 bus, u8 devfn, int offset) in pa_pxp_cfg_addr() argument
53 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); in pa_pxp_cfg_addr()
68 static int workaround_5945(struct pci_bus *bus, unsigned int devfn, in workaround_5945() argument
76 if (!is_root_port(bus->number, devfn) || !is_5945_reg(offset)) in workaround_5945()
79 hose = pci_bus_to_host(bus); in workaround_5945()
81 addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset & ~0x3); in workaround_5945()
88 dummy = pa_pxp_cfg_addr(hose, bus->number, devfn, 0x10); in workaround_5945()
[all …]
/linux-4.4.14/drivers/bcma/
Dmain.c79 static u16 bcma_cc_core_id(struct bcma_bus *bus) in bcma_cc_core_id() argument
81 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) in bcma_cc_core_id()
86 struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, in bcma_find_core_unit() argument
91 list_for_each_entry(core, &bus->cores, list) { in bcma_find_core_unit()
113 bcma_warn(core->bus, "Timeout waiting for register 0x%04X!\n", reg); in bcma_wait_value()
192 bcma_debug(core->bus, "bcma_of_get_irq() failed with rc=%d\n", in bcma_of_get_irq()
225 struct bcma_bus *bus = core->bus; in bcma_core_irq() local
228 switch (bus->hosttype) { in bcma_core_irq()
230 return bus->host_pci->irq; in bcma_core_irq()
232 if (bus->drv_mips.core && num == 0) { in bcma_core_irq()
[all …]
Ddriver_mips.c58 return dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM47162 && in bcma_core_mips_bcm47162a0_quirk()
59 dev->bus->chipinfo.rev == 0 && dev->id.id == BCMA_CORE_MIPS_74K; in bcma_core_mips_bcm47162a0_quirk()
65 return (dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM5357 || in bcma_core_mips_bcm5357b0_quirk()
66 dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4749) && in bcma_core_mips_bcm5357b0_quirk()
67 dev->bus->chipinfo.pkg == 11 && in bcma_core_mips_bcm5357b0_quirk()
123 struct bcma_device *mdev = dev->bus->drv_mips.core; in bcma_core_mips_irq()
142 struct bcma_bus *bus = dev->bus; in bcma_core_mips_set_irq() local
143 struct bcma_device *mdev = bus->drv_mips.core; in bcma_core_mips_set_irq()
173 list_for_each_entry(core, &bus->cores, list) { in bcma_core_mips_set_irq()
185 bcma_debug(bus, "set_irq: core 0x%04x, irq %d => %d\n", in bcma_core_mips_set_irq()
[all …]
Dhost_pci.c16 int win2 = core->bus->host_is_pcie2 ? in bcma_host_pci_switch_core()
19 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_host_pci_switch_core()
21 pci_write_config_dword(core->bus->host_pci, win2, core->wrap); in bcma_host_pci_switch_core()
22 core->bus->mapped_core = core; in bcma_host_pci_switch_core()
23 bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id); in bcma_host_pci_switch_core()
37 if (core->bus->mapped_core != core) in bcma_host_pci_provide_access_to_core()
45 return ioread8(core->bus->mmio + offset); in bcma_host_pci_read8()
51 return ioread16(core->bus->mmio + offset); in bcma_host_pci_read16()
57 return ioread32(core->bus->mmio + offset); in bcma_host_pci_read32()
64 iowrite8(value, core->bus->mmio + offset); in bcma_host_pci_write8()
[all …]
Dscan.c141 static u32 bcma_scan_read32(struct bcma_bus *bus, u8 current_coreidx, in bcma_scan_read32() argument
144 return readl(bus->mmio + offset); in bcma_scan_read32()
147 static void bcma_scan_switch_core(struct bcma_bus *bus, u32 addr) in bcma_scan_switch_core() argument
149 if (bus->hosttype == BCMA_HOSTTYPE_PCI) in bcma_scan_switch_core()
150 pci_write_config_dword(bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_scan_switch_core()
154 static u32 bcma_erom_get_ent(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ent() argument
166 static s32 bcma_erom_get_ci(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ci() argument
168 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_ci()
176 static bool bcma_erom_is_end(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_is_end() argument
178 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_is_end()
[all …]
Dbcma_private.h13 #define bcma_err(bus, fmt, ...) \ argument
14 pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
15 #define bcma_warn(bus, fmt, ...) \ argument
16 pr_warn("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
17 #define bcma_info(bus, fmt, ...) \ argument
18 pr_info("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
19 #define bcma_debug(bus, fmt, ...) \ argument
20 pr_debug("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
27 void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core);
28 void bcma_init_bus(struct bcma_bus *bus);
[all …]
Dhost_soc.c170 struct bcma_bus *bus = &soc->bus; in bcma_host_soc_register() local
175 bus->mmio = ioremap_nocache(BCMA_ADDR_BASE, BCMA_CORE_SIZE * 1); in bcma_host_soc_register()
176 if (!bus->mmio) in bcma_host_soc_register()
180 bus->hosttype = BCMA_HOSTTYPE_SOC; in bcma_host_soc_register()
181 bus->ops = &bcma_host_soc_ops; in bcma_host_soc_register()
182 bus->host_pdev = NULL; in bcma_host_soc_register()
185 bcma_init_bus(bus); in bcma_host_soc_register()
192 struct bcma_bus *bus = &soc->bus; in bcma_host_soc_init() local
196 err = bcma_bus_early_register(bus); in bcma_host_soc_init()
198 iounmap(bus->mmio); in bcma_host_soc_init()
[all …]
Ddriver_chipcommon_pmu.c82 struct bcma_bus *bus = cc->core->bus; in bcma_pmu2_pll_init0() local
86 switch (bus->chipinfo.id) { in bcma_pmu2_pll_init0()
110 bcma_err(bus, "Unknown TGT frequency for xtalfreq %d\n", in bcma_pmu2_pll_init0()
120 bcma_debug(bus, "Target TGT frequency already set\n"); in bcma_pmu2_pll_init0()
125 switch (bus->chipinfo.id) { in bcma_pmu2_pll_init0()
150 struct bcma_bus *bus = cc->core->bus; in bcma_pmu_pll_init() local
153 switch (bus->chipinfo.id) { in bcma_pmu_pll_init()
164 struct bcma_bus *bus = cc->core->bus; in bcma_pmu_resources_init() local
167 switch (bus->chipinfo.id) { in bcma_pmu_resources_init()
192 bcma_debug(bus, "PMU resource config unknown or not needed for device 0x%04X\n", in bcma_pmu_resources_init()
[all …]
Dsprom.c39 int bcma_arch_register_fallback_sprom(int (*sprom_callback)(struct bcma_bus *bus, in bcma_arch_register_fallback_sprom() argument
49 static int bcma_fill_sprom_with_fallback(struct bcma_bus *bus, in bcma_fill_sprom_with_fallback() argument
59 err = get_fallback_sprom(bus, out); in bcma_fill_sprom_with_fallback()
63 bcma_debug(bus, "Using SPROM revision %d provided by platform.\n", in bcma_fill_sprom_with_fallback()
64 bus->sprom.revision); in bcma_fill_sprom_with_fallback()
67 bcma_warn(bus, "Using fallback SPROM failed (err %d)\n", err); in bcma_fill_sprom_with_fallback()
75 static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom, in bcma_sprom_read() argument
80 sprom[i] = bcma_read16(bus->drv_cc.core, offset + (i * 2)); in bcma_sprom_read()
157 static int bcma_sprom_valid(struct bcma_bus *bus, const u16 *sprom, in bcma_sprom_valid() argument
173 bus->sprom.revision = revision; in bcma_sprom_valid()
[all …]
Ddriver_pci_host.c30 struct bcma_bus *bus = pc->core->bus; in bcma_core_pci_is_in_hostmode() local
34 chipid_top = (bus->chipinfo.id & 0xFF00); in bcma_core_pci_is_in_hostmode()
155 u16 chipid = pc->core->bus->chipinfo.id; in bcma_extpci_write_config()
230 static int bcma_core_pci_hostmode_read_config(struct pci_bus *bus, in bcma_core_pci_hostmode_read_config() argument
239 pc_host = container_of(bus->ops, struct bcma_drv_pci_host, pci_ops); in bcma_core_pci_hostmode_read_config()
250 static int bcma_core_pci_hostmode_write_config(struct pci_bus *bus, in bcma_core_pci_hostmode_write_config() argument
259 pc_host = container_of(bus->ops, struct bcma_drv_pci_host, pci_ops); in bcma_core_pci_hostmode_write_config()
342 struct bcma_bus *bus = pc->core->bus; in bcma_core_pci_enable_crs() local
381 bcma_err(bus, "PCI: Broken device in slot %d\n", in bcma_core_pci_enable_crs()
389 struct bcma_bus *bus = pc->core->bus; in bcma_core_pci_hostmode_init() local
[all …]
/linux-4.4.14/arch/mn10300/unit-asb2305/
Dpci.c55 #define CONFIG_CMD(bus, devfn, where) \ argument
56 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
68 static inline int __query(const struct pci_bus *bus, unsigned int devfn) in __query() argument
71 return bus->number == 0 && (devfn == PCI_DEVFN(0, 0)); in __query()
72 return bus->number == 1; in __query()
73 return bus->number == 0 && in __query()
82 static int pci_ampci_read_config_byte(struct pci_bus *bus, unsigned int devfn, in pci_ampci_read_config_byte() argument
87 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_ampci_read_config_byte()
91 CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); in pci_ampci_read_config_byte()
94 if (__query(bus, devfn)) in pci_ampci_read_config_byte()
[all …]
/linux-4.4.14/sound/soc/intel/skylake/
Dskl.c62 static void skl_stream_update(struct hdac_bus *bus, struct hdac_stream *hstr) in skl_stream_update() argument
70 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_interrupt() local
73 if (!pm_runtime_active(bus->dev)) in skl_interrupt()
76 spin_lock(&bus->reg_lock); in skl_interrupt()
78 status = snd_hdac_chip_readl(bus, INTSTS); in skl_interrupt()
80 spin_unlock(&bus->reg_lock); in skl_interrupt()
85 status = snd_hdac_chip_readb(bus, RIRBSTS); in skl_interrupt()
88 snd_hdac_bus_update_rirb(bus); in skl_interrupt()
89 snd_hdac_chip_writeb(bus, RIRBSTS, RIRB_INT_MASK); in skl_interrupt()
92 spin_unlock(&bus->reg_lock); in skl_interrupt()
[all …]
/linux-4.4.14/drivers/net/phy/
Dmdio_bus.c51 struct mii_bus *bus; in mdiobus_alloc_size() local
52 size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN); in mdiobus_alloc_size()
59 alloc_size = sizeof(*bus); in mdiobus_alloc_size()
61 bus = kzalloc(alloc_size, GFP_KERNEL); in mdiobus_alloc_size()
62 if (bus) { in mdiobus_alloc_size()
63 bus->state = MDIOBUS_ALLOCATED; in mdiobus_alloc_size()
65 bus->priv = (void *)bus + aligned_size; in mdiobus_alloc_size()
68 return bus; in mdiobus_alloc_size()
103 struct mii_bus **ptr, *bus; in devm_mdiobus_alloc_size() local
110 bus = mdiobus_alloc_size(sizeof_priv); in devm_mdiobus_alloc_size()
[all …]
Dmdio-moxart.c37 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() argument
39 struct moxart_mdio_data *data = bus->priv; in moxart_mdio_read()
43 dev_dbg(&bus->dev, "%s\n", __func__); in moxart_mdio_read()
60 dev_dbg(&bus->dev, "%s timed out\n", __func__); in moxart_mdio_read()
65 static int moxart_mdio_write(struct mii_bus *bus, int mii_id, in moxart_mdio_write() argument
68 struct moxart_mdio_data *data = bus->priv; in moxart_mdio_write()
72 dev_dbg(&bus->dev, "%s\n", __func__); in moxart_mdio_write()
92 dev_dbg(&bus->dev, "%s timed out\n", __func__); in moxart_mdio_write()
97 static int moxart_mdio_reset(struct mii_bus *bus) in moxart_mdio_reset() argument
102 data = moxart_mdio_read(bus, i, MII_BMCR); in moxart_mdio_reset()
[all …]
Dmdio-octeon.c183 static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum) in octeon_mdiobus_read() argument
185 struct octeon_mdiobus *p = bus->priv; in octeon_mdiobus_read()
223 static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, in octeon_mdiobus_write() argument
226 struct octeon_mdiobus *p = bus->priv; in octeon_mdiobus_write()
270 struct octeon_mdiobus *bus; in octeon_mdiobus_probe() local
275 bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL); in octeon_mdiobus_probe()
276 if (!bus) in octeon_mdiobus_probe()
285 bus->mdio_phys = res_mem->start; in octeon_mdiobus_probe()
286 bus->regsize = resource_size(res_mem); in octeon_mdiobus_probe()
288 if (!devm_request_mem_region(&pdev->dev, bus->mdio_phys, bus->regsize, in octeon_mdiobus_probe()
[all …]
Dmdio-sun4i.c39 static int sun4i_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in sun4i_mdio_read() argument
41 struct sun4i_mdio_data *data = bus->priv; in sun4i_mdio_read()
66 static int sun4i_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in sun4i_mdio_write() argument
69 struct sun4i_mdio_data *data = bus->priv; in sun4i_mdio_write()
96 struct mii_bus *bus; in sun4i_mdio_probe() local
101 bus = mdiobus_alloc_size(sizeof(*data)); in sun4i_mdio_probe()
102 if (!bus) in sun4i_mdio_probe()
105 bus->name = "sun4i_mii_bus"; in sun4i_mdio_probe()
106 bus->read = &sun4i_mdio_read; in sun4i_mdio_probe()
107 bus->write = &sun4i_mdio_write; in sun4i_mdio_probe()
[all …]
Dmdio-bcm-unimac.c60 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() argument
62 struct unimac_mdio_priv *priv = bus->priv; in unimac_mdio_read()
90 if (!(bus->phy_ignore_ta_mask & 1 << phy_id) && (cmd & MDIO_READ_FAIL)) in unimac_mdio_read()
96 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() argument
99 struct unimac_mdio_priv *priv = bus->priv; in unimac_mdio_write()
138 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() argument
140 struct device_node *np = bus->dev.of_node; in unimac_mdio_reset()
146 read_mask = ~bus->phy_mask; in unimac_mdio_reset()
149 addr = of_mdio_parse_addr(&bus->dev, child); in unimac_mdio_reset()
159 mdiobus_read(bus, addr, MII_BMSR); in unimac_mdio_reset()
[all …]
Dmdio-bitbang.c155 static int mdiobb_read(struct mii_bus *bus, int phy, int reg) in mdiobb_read() argument
157 struct mdiobb_ctrl *ctrl = bus->priv; in mdiobb_read()
172 !(bus->phy_ignore_ta_mask & (1 << phy))) { in mdiobb_read()
187 static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val) in mdiobb_write() argument
189 struct mdiobb_ctrl *ctrl = bus->priv; in mdiobb_write()
208 static int mdiobb_reset(struct mii_bus *bus) in mdiobb_reset() argument
210 struct mdiobb_ctrl *ctrl = bus->priv; in mdiobb_reset()
212 ctrl->reset(bus); in mdiobb_reset()
218 struct mii_bus *bus; in alloc_mdio_bitbang() local
220 bus = mdiobus_alloc(); in alloc_mdio_bitbang()
[all …]
Dmdio-bcm-iproc.c74 static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg) in iproc_mdio_read() argument
76 struct iproc_mdio_priv *priv = bus->priv; in iproc_mdio_read()
104 static int iproc_mdio_write(struct mii_bus *bus, int phy_id, in iproc_mdio_write() argument
107 struct iproc_mdio_priv *priv = bus->priv; in iproc_mdio_write()
137 struct mii_bus *bus; in iproc_mdio_probe() local
158 bus = priv->mii_bus; in iproc_mdio_probe()
159 bus->priv = priv; in iproc_mdio_probe()
160 bus->name = "iProc MDIO bus"; in iproc_mdio_probe()
161 snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d", pdev->name, pdev->id); in iproc_mdio_probe()
162 bus->parent = &pdev->dev; in iproc_mdio_probe()
[all …]
/linux-4.4.14/drivers/video/fbdev/via/
Dvia_aux.c30 struct via_aux_bus *bus; in via_aux_probe() local
35 bus = kmalloc(sizeof(*bus), GFP_KERNEL); in via_aux_probe()
36 if (!bus) in via_aux_probe()
39 bus->adap = adap; in via_aux_probe()
40 INIT_LIST_HEAD(&bus->drivers); in via_aux_probe()
42 via_aux_edid_probe(bus); in via_aux_probe()
43 via_aux_vt1636_probe(bus); in via_aux_probe()
44 via_aux_vt1632_probe(bus); in via_aux_probe()
45 via_aux_vt1631_probe(bus); in via_aux_probe()
46 via_aux_vt1625_probe(bus); in via_aux_probe()
[all …]
Dvia_aux.h41 struct via_aux_bus *bus; /* the I2C bus used */ member
54 void via_aux_free(struct via_aux_bus *bus);
55 const struct fb_videomode *via_aux_get_preferred_mode(struct via_aux_bus *bus);
66 list_add_tail(&data->chain, &data->bus->drivers); in via_aux_add()
77 return i2c_transfer(drv->bus->adap, msg, 2) == 2; in via_aux_read()
82 void via_aux_ch7301_probe(struct via_aux_bus *bus);
83 void via_aux_edid_probe(struct via_aux_bus *bus);
84 void via_aux_sii164_probe(struct via_aux_bus *bus);
85 void via_aux_vt1636_probe(struct via_aux_bus *bus);
86 void via_aux_vt1632_probe(struct via_aux_bus *bus);
[all …]
Dvia_aux_vt1622.c31 static void probe(struct via_aux_bus *bus, u8 addr) in probe() argument
34 .bus = bus, in probe()
46 void via_aux_vt1622_probe(struct via_aux_bus *bus) in via_aux_vt1622_probe() argument
48 probe(bus, 0x20); in via_aux_vt1622_probe()
49 probe(bus, 0x21); in via_aux_vt1622_probe()
Dvia_aux_ch7301.c31 static void probe(struct via_aux_bus *bus, u8 addr) in probe() argument
34 .bus = bus, in probe()
46 void via_aux_ch7301_probe(struct via_aux_bus *bus) in via_aux_ch7301_probe() argument
48 probe(bus, 0x75); in via_aux_ch7301_probe()
49 probe(bus, 0x76); in via_aux_ch7301_probe()
Dvia_aux_vt1625.c31 static void probe(struct via_aux_bus *bus, u8 addr) in probe() argument
34 .bus = bus, in probe()
46 void via_aux_vt1625_probe(struct via_aux_bus *bus) in via_aux_vt1625_probe() argument
48 probe(bus, 0x20); in via_aux_vt1625_probe()
49 probe(bus, 0x21); in via_aux_vt1625_probe()
/linux-4.4.14/drivers/pci/
Dof.c22 if (!dev->bus->dev.of_node) in pci_set_of_node()
24 dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node, in pci_set_of_node()
34 void pci_set_bus_of_node(struct pci_bus *bus) in pci_set_bus_of_node() argument
36 if (bus->self == NULL) in pci_set_bus_of_node()
37 bus->dev.of_node = pcibios_get_phb_of_node(bus); in pci_set_bus_of_node()
39 bus->dev.of_node = of_node_get(bus->self->dev.of_node); in pci_set_bus_of_node()
42 void pci_release_bus_of_node(struct pci_bus *bus) in pci_release_bus_of_node() argument
44 of_node_put(bus->dev.of_node); in pci_release_bus_of_node()
45 bus->dev.of_node = NULL; in pci_release_bus_of_node()
48 struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus) in pcibios_get_phb_of_node() argument
[all …]
Dremove.c29 if (dev->bus->self) in pci_stop_dev()
48 void pci_remove_bus(struct pci_bus *bus) in pci_remove_bus() argument
50 pci_proc_detach_bus(bus); in pci_remove_bus()
53 list_del(&bus->node); in pci_remove_bus()
54 pci_bus_release_busn_res(bus); in pci_remove_bus()
56 pci_remove_legacy_files(bus); in pci_remove_bus()
57 pcibios_remove_bus(bus); in pci_remove_bus()
58 device_unregister(&bus->dev); in pci_remove_bus()
64 struct pci_bus *bus = dev->subordinate; in pci_stop_bus_device() local
73 if (bus) { in pci_stop_bus_device()
[all …]
Dbus.c48 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, in pci_bus_add_resource() argument
55 dev_err(&bus->dev, "can't add %pR resource\n", res); in pci_bus_add_resource()
61 list_add_tail(&bus_res->list, &bus->resources); in pci_bus_add_resource()
64 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n) in pci_bus_resource_n() argument
69 return bus->resource[n]; in pci_bus_resource_n()
72 list_for_each_entry(bus_res, &bus->resources, list) { in pci_bus_resource_n()
80 void pci_bus_remove_resources(struct pci_bus *bus) in pci_bus_remove_resources() argument
86 bus->resource[i] = NULL; in pci_bus_remove_resources()
88 list_for_each_entry_safe(bus_res, tmp, &bus->resources, list) { in pci_bus_remove_resources()
108 static void pci_clip_resource_to_region(struct pci_bus *bus, in pci_clip_resource_to_region() argument
[all …]
Dsearch.c32 struct pci_bus *bus; in pci_for_each_dma_alias() local
35 ret = fn(pdev, PCI_DEVID(pdev->bus->number, pdev->devfn), data); in pci_for_each_dma_alias()
44 ret = fn(pdev, PCI_DEVID(pdev->bus->number, in pci_for_each_dma_alias()
50 for (bus = pdev->bus; !pci_is_root_bus(bus); bus = bus->parent) { in pci_for_each_dma_alias()
54 if (!bus->self) in pci_for_each_dma_alias()
57 tmp = bus->self; in pci_for_each_dma_alias()
83 PCI_DEVID(tmp->bus->number, in pci_for_each_dma_alias()
96 PCI_DEVID(tmp->bus->number, in pci_for_each_dma_alias()
106 static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) in pci_do_find_bus() argument
111 if (bus->number == busnr) in pci_do_find_bus()
[all …]
Dprobe.c284 pcibios_bus_to_resource(dev->bus, res, &region); in __pci_read_base()
285 pcibios_resource_to_bus(dev->bus, &inverted_region, res); in __pci_read_base()
375 pcibios_bus_to_resource(dev->bus, res, &region); in pci_read_bridge_io()
397 pcibios_bus_to_resource(dev->bus, res, &region); in pci_read_bridge_mmio()
450 pcibios_bus_to_resource(dev->bus, res, &region); in pci_read_bridge_mmio_pref()
532 bridge->bus = b; in pci_alloc_host_bridge()
574 void pcie_update_link_speed(struct pci_bus *bus, u16 linksta) in pcie_update_link_speed() argument
576 bus->cur_bus_speed = pcie_link_speed[linksta & PCI_EXP_LNKSTA_CLS]; in pcie_update_link_speed()
611 static void pci_set_bus_speed(struct pci_bus *bus) in pci_set_bus_speed() argument
613 struct pci_dev *bridge = bus->self; in pci_set_bus_speed()
[all …]
Dxen-pcifront.c32 struct pci_bus *bus; member
67 unsigned int domain, unsigned int bus, in pcifront_init_sd() argument
177 static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_read() argument
183 .domain = pci_domain_nr(bus), in pcifront_bus_read()
184 .bus = bus->number, in pcifront_bus_read()
189 struct pcifront_sd *sd = bus->sysdata; in pcifront_bus_read()
195 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pcifront_bus_read()
216 static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_write() argument
221 .domain = pci_domain_nr(bus), in pcifront_bus_write()
222 .bus = bus->number, in pcifront_bus_write()
[all …]
Dsetup-bus.c512 static void pbus_assign_resources_sorted(const struct pci_bus *bus, in pbus_assign_resources_sorted() argument
519 list_for_each_entry(dev, &bus->devices, bus_list) in pbus_assign_resources_sorted()
525 void pci_setup_cardbus(struct pci_bus *bus) in pci_setup_cardbus() argument
527 struct pci_dev *bridge = bus->self; in pci_setup_cardbus()
532 &bus->busn_res); in pci_setup_cardbus()
534 res = bus->resource[0]; in pci_setup_cardbus()
535 pcibios_resource_to_bus(bridge->bus, &region, res); in pci_setup_cardbus()
548 res = bus->resource[1]; in pci_setup_cardbus()
549 pcibios_resource_to_bus(bridge->bus, &region, res); in pci_setup_cardbus()
558 res = bus->resource[2]; in pci_setup_cardbus()
[all …]
Dhost-bridge.c11 static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) in find_pci_root_bus() argument
13 while (bus->parent) in find_pci_root_bus()
14 bus = bus->parent; in find_pci_root_bus()
16 return bus; in find_pci_root_bus()
19 struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) in pci_find_host_bridge() argument
21 struct pci_bus *root_bus = find_pci_root_bus(bus); in pci_find_host_bridge()
28 struct pci_bus *root_bus = find_pci_root_bus(dev->bus); in pci_get_host_bridge_device()
48 void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, in pcibios_resource_to_bus() argument
51 struct pci_host_bridge *bridge = pci_find_host_bridge(bus); in pcibios_resource_to_bus()
73 void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, in pcibios_bus_to_resource() argument
[all …]
Dpci-acpi.c264 for (pbus = dev->bus; pbus; pbus = pbus->parent) { in pci_get_hp_params()
305 pci_pme_wakeup_bus(root->bus); in pci_acpi_wake_bus()
459 static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) in acpi_pci_propagate_wakeup_enable() argument
461 while (bus->parent) { in acpi_pci_propagate_wakeup_enable()
462 if (!acpi_pm_device_sleep_wake(&bus->self->dev, enable)) in acpi_pci_propagate_wakeup_enable()
464 bus = bus->parent; in acpi_pci_propagate_wakeup_enable()
468 if (bus->bridge) in acpi_pci_propagate_wakeup_enable()
469 acpi_pm_device_sleep_wake(bus->bridge, enable); in acpi_pci_propagate_wakeup_enable()
477 acpi_pci_propagate_wakeup_enable(dev->bus, enable); in acpi_pci_sleep_wake()
481 static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) in acpi_pci_propagate_run_wake() argument
[all …]
/linux-4.4.14/drivers/base/
Dbus.c40 static struct bus_type *bus_get(struct bus_type *bus) in bus_get() argument
42 if (bus) { in bus_get()
43 kset_get(&bus->p->subsys); in bus_get()
44 return bus; in bus_get()
49 static void bus_put(struct bus_type *bus) in bus_put() argument
51 if (bus) in bus_put()
52 kset_put(&bus->p->subsys); in bus_put()
108 ret = bus_attr->show(subsys_priv->bus, buf); in bus_attr_show()
120 ret = bus_attr->store(subsys_priv->bus, buf, count); in bus_attr_store()
129 int bus_create_file(struct bus_type *bus, struct bus_attribute *attr) in bus_create_file() argument
[all …]
/linux-4.4.14/drivers/media/pci/cx23885/
Dcx23885-i2c.c49 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local
50 struct cx23885_dev *dev = bus->dev; in i2c_slave_did_ack()
51 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack()
56 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local
57 struct cx23885_dev *dev = bus->dev; in i2c_is_busy()
58 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy()
80 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local
81 struct cx23885_dev *dev = bus->dev; in i2c_sendbytes()
93 cx_write(bus->reg_addr, msg->addr << 25); in i2c_sendbytes()
94 cx_write(bus->reg_ctrl, bus->i2c_period | (1 << 2)); in i2c_sendbytes()
[all …]
/linux-4.4.14/arch/powerpc/platforms/powermac/
Dlow_i2c.c95 int (*open)(struct pmac_i2c_bus *bus);
96 void (*close)(struct pmac_i2c_bus *bus);
97 int (*xfer)(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
386 static int kw_i2c_open(struct pmac_i2c_bus *bus) in kw_i2c_open() argument
388 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_open()
393 static void kw_i2c_close(struct pmac_i2c_bus *bus) in kw_i2c_close() argument
395 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_close()
399 static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize, in kw_i2c_xfer() argument
402 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_xfer()
404 int use_irq = host->irq != NO_IRQ && !bus->polled; in kw_i2c_xfer()
[all …]
Dpci.c132 #define MACRISC_CFA1(bus, devfn, off) \ argument
133 ((((unsigned int)(bus)) << 16) \
138 static void __iomem *macrisc_cfg_map_bus(struct pci_bus *bus, in macrisc_cfg_map_bus() argument
145 hose = pci_bus_to_host(bus); in macrisc_cfg_map_bus()
149 if (bus->number == hose->first_busno) { in macrisc_cfg_map_bus()
154 caddr = MACRISC_CFA1(bus->number, dev_fn, offset); in macrisc_cfg_map_bus()
176 static void __iomem *chaos_map_bus(struct pci_bus *bus, unsigned int devfn, in chaos_map_bus() argument
184 np = of_pci_find_child_device(bus->dev.of_node, devfn); in chaos_map_bus()
197 return macrisc_cfg_map_bus(bus, devfn, offset); in chaos_map_bus()
233 struct pci_bus *bus, unsigned int devfn) in u3_ht_skip_device() argument
[all …]
/linux-4.4.14/drivers/media/pci/saa7164/
Dsaa7164-i2c.c32 struct saa7164_i2c *bus = i2c_adap->algo_data; in i2c_xfer() local
33 struct saa7164_dev *dev = bus->dev; in i2c_xfer()
42 retval = saa7164_api_i2c_read(bus, in i2c_xfer()
50 retval = saa7164_api_i2c_read(bus, msgs[i].addr, in i2c_xfer()
61 retval = saa7164_api_i2c_write(bus, msgs[i].addr, in i2c_xfer()
95 int saa7164_i2c_register(struct saa7164_i2c *bus) in saa7164_i2c_register() argument
97 struct saa7164_dev *dev = bus->dev; in saa7164_i2c_register()
99 dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr); in saa7164_i2c_register()
101 bus->i2c_adap = saa7164_i2c_adap_template; in saa7164_i2c_register()
102 bus->i2c_client = saa7164_i2c_client_template; in saa7164_i2c_register()
[all …]
Dsaa7164-bus.c29 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_setup()
58 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_dump()
86 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_verify()
137 struct tmComResBusInfo *bus = &dev->bus; in saa7164_bus_set() local
152 if (msg->size > dev->bus.m_wMaxReqSize) { in saa7164_bus_set()
164 mutex_lock(&bus->lock); in saa7164_bus_set()
169 curr_srp = saa7164_readl(bus->m_dwSetReadPos); in saa7164_bus_set()
170 curr_swp = saa7164_readl(bus->m_dwSetWritePos); in saa7164_bus_set()
178 free_write_space = (curr_srp + bus->m_dwSizeSetRing) - curr_swp; in saa7164_bus_set()
203 curr_srp = saa7164_readl(bus->m_dwSetReadPos); in saa7164_bus_set()
[all …]
/linux-4.4.14/drivers/media/pci/cx25821/
Dcx25821-i2c.c52 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local
53 struct cx25821_dev *dev = bus->dev; in i2c_slave_did_ack()
54 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack()
59 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local
60 struct cx25821_dev *dev = bus->dev; in i2c_is_busy()
61 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy()
83 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local
84 struct cx25821_dev *dev = bus->dev; in i2c_sendbytes()
96 cx_write(bus->reg_addr, msg->addr << 25); in i2c_sendbytes()
97 cx_write(bus->reg_ctrl, bus->i2c_period | (1 << 2)); in i2c_sendbytes()
[all …]
/linux-4.4.14/drivers/net/ethernet/arc/
Demac_mdio.c54 static int arc_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in arc_mdio_read() argument
56 struct arc_emac_priv *priv = bus->priv; in arc_mdio_read()
86 static int arc_mdio_write(struct mii_bus *bus, int phy_addr, in arc_mdio_write() argument
89 struct arc_emac_priv *priv = bus->priv; in arc_mdio_write()
112 struct mii_bus *bus; in arc_mdio_probe() local
115 bus = mdiobus_alloc(); in arc_mdio_probe()
116 if (!bus) in arc_mdio_probe()
119 priv->bus = bus; in arc_mdio_probe()
120 bus->priv = priv; in arc_mdio_probe()
121 bus->parent = priv->dev; in arc_mdio_probe()
[all …]
/linux-4.4.14/arch/powerpc/kernel/
Dio-workarounds.c35 struct iowa_bus *bus = &iowa_busses[i]; in iowa_pci_find() local
36 struct pci_controller *phb = bus->phb; in iowa_pci_find()
42 return bus; in iowa_pci_find()
49 return bus; in iowa_pci_find()
60 struct iowa_bus *bus; in iowa_mem_find_bus() local
66 bus = &iowa_busses[token - 1]; in iowa_mem_find_bus()
86 bus = iowa_pci_find(vaddr, paddr); in iowa_mem_find_bus()
88 if (bus == NULL) in iowa_mem_find_bus()
92 return bus; in iowa_mem_find_bus()
117 struct iowa_bus *bus; \
[all …]
Dpci_of_scan.c114 pcibios_bus_to_resource(dev->bus, res, &region); in of_pci_parse_addrs()
125 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument
130 dev = pci_alloc_dev(bus); in of_create_pci_dev()
140 dev->dev.parent = bus->bridge; in of_create_pci_dev()
141 dev->dev.bus = &pci_bus_type; in of_create_pci_dev()
155 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), in of_create_pci_dev()
156 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev()
188 pci_device_add(dev, bus); in of_create_pci_dev()
208 struct pci_bus *bus; in of_scan_pci_bridge() local
233 bus = pci_find_bus(pci_domain_nr(dev->bus), in of_scan_pci_bridge()
[all …]
Dpci-hotplug.c32 struct pci_controller *phb = pci_bus_to_host(dev->bus); in pcibios_release_device()
47 void pcibios_remove_pci_devices(struct pci_bus *bus) in pcibios_remove_pci_devices() argument
53 list_for_each_entry(child_bus, &bus->children, node) in pcibios_remove_pci_devices()
57 pci_domain_nr(bus), bus->number); in pcibios_remove_pci_devices()
58 list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) { in pcibios_remove_pci_devices()
77 void pcibios_add_pci_devices(struct pci_bus * bus) in pcibios_add_pci_devices() argument
82 struct device_node *dn = pci_bus_to_OF_node(bus); in pcibios_add_pci_devices()
86 phb = pci_bus_to_host(bus); in pcibios_add_pci_devices()
90 mode = phb->controller_ops.probe_mode(bus); in pcibios_add_pci_devices()
94 of_rescan_bus(dn, bus); in pcibios_add_pci_devices()
[all …]
Dpci-common.c111 resource_size_t pcibios_window_alignment(struct pci_bus *bus, in pcibios_window_alignment() argument
114 struct pci_controller *phb = pci_bus_to_host(bus); in pcibios_window_alignment()
117 return phb->controller_ops.window_alignment(bus, type); in pcibios_window_alignment()
129 struct pci_controller *phb = pci_bus_to_host(dev->bus); in pcibios_reset_secondary_bus()
203 int pci_domain_nr(struct pci_bus *bus) in pci_domain_nr() argument
205 struct pci_controller *hose = pci_bus_to_host(bus); in pci_domain_nr()
310 struct pci_controller *hose = pci_bus_to_host(dev->bus); in __pci_mmap_make_offset()
472 int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val, size_t size) in pci_legacy_read() argument
475 struct pci_controller *hose = pci_bus_to_host(bus); in pci_legacy_read()
512 int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, size_t size) in pci_legacy_write() argument
[all …]
Dpci_64.c63 pci_bus_add_devices(hose->bus); in pcibios_init()
76 int pcibios_unmap_io_space(struct pci_bus *bus) in pcibios_unmap_io_space() argument
80 WARN_ON(bus == NULL); in pcibios_unmap_io_space()
92 if (bus->self) { in pcibios_unmap_io_space()
94 struct resource *res = bus->resource[0]; in pcibios_unmap_io_space()
98 pci_name(bus->self)); in pcibios_unmap_io_space()
108 hose = pci_bus_to_host(bus); in pcibios_unmap_io_space()
175 int pcibios_map_io_space(struct pci_bus *bus) in pcibios_map_io_space() argument
177 WARN_ON(bus == NULL); in pcibios_map_io_space()
182 if (bus->self) { in pcibios_map_io_space()
[all …]
/linux-4.4.14/arch/mips/pci/
Dops-rc32434.c41 #define PCI_CFG_SET(bus, slot, func, off) \ argument
43 ((bus) << 16) | ((slot)<<11) | \
47 struct pci_bus *bus, unsigned int devfn, in config_access() argument
54 PCI_CFG_SET(bus->number, slot, func, where); in config_access()
72 static int read_config_byte(struct pci_bus *bus, unsigned int devfn, in read_config_byte() argument
78 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte()
83 static int read_config_word(struct pci_bus *bus, unsigned int devfn, in read_config_word() argument
89 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word()
94 static int read_config_dword(struct pci_bus *bus, unsigned int devfn, in read_config_dword() argument
104 if (bus->number == 0 && PCI_SLOT(devfn) > 21) in read_config_dword()
[all …]
Dpci-xlp.c60 #define pci_cfg_addr(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) argument
63 static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_read_32bit() argument
72 if (bus->number == 0) { in pci_cfg_read_32bit()
77 } else if (bus->parent->number == 0) { /* SoC bus */ in pci_cfg_read_32bit()
83 } else if (bus->number == 0 && PCI_SLOT(devfn) == 1 && where == 0x954) { in pci_cfg_read_32bit()
87 pci_cfg_addr(bus->number, devfn, where)); in pci_cfg_read_32bit()
92 static inline void pci_cfg_write_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_write_32bit() argument
98 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit()
102 static int nlm_pcibios_read(struct pci_bus *bus, unsigned int devfn, in nlm_pcibios_read() argument
112 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_read()
[all …]
Dops-pmcmsp.c361 struct pci_bus *bus, in msp_pcibios_config_access() argument
367 unsigned char bus_num = bus->number; in msp_pcibios_config_access()
490 msp_pcibios_read_config_byte(struct pci_bus *bus, in msp_pcibios_read_config_byte() argument
502 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_byte()
538 msp_pcibios_read_config_word(struct pci_bus *bus, in msp_pcibios_read_config_word() argument
561 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_word()
595 msp_pcibios_read_config_dword(struct pci_bus *bus, in msp_pcibios_read_config_dword() argument
613 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_dword()
648 msp_pcibios_write_config_byte(struct pci_bus *bus, in msp_pcibios_write_config_byte() argument
656 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_write_config_byte()
[all …]
Dops-loongson2.c36 struct pci_bus *bus, in loongson_pcibios_config_access() argument
40 u32 busnum = bus->number; in loongson_pcibios_config_access()
121 static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_read() argument
131 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read()
145 static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_write() argument
158 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in loongson_pcibios_write()
170 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in loongson_pcibios_write()
187 struct pci_bus bus = { in _rdmsr() local
194 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); in _rdmsr()
195 loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_LO, 4, lo); in _rdmsr()
[all …]
Dpci-bcm1480ht.c51 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) argument
52 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument
88 static int bcm1480ht_can_access(struct pci_bus *bus, int devfn) in bcm1480ht_can_access() argument
95 if (bus->number == 0) { in bcm1480ht_can_access()
109 static int bcm1480ht_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_read() argument
119 if (bcm1480ht_can_access(bus, devfn)) in bcm1480ht_pcibios_read()
120 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read()
134 static int bcm1480ht_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_write() argument
137 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480ht_pcibios_write()
145 if (!bcm1480ht_can_access(bus, devfn)) in bcm1480ht_pcibios_write()
Dops-bcm63xx.c147 static int bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, in bcm63xx_pci_read() argument
152 type = bus->parent ? 1 : 0; in bcm63xx_pci_read()
157 return bcm63xx_do_cfg_read(type, bus->number, devfn, in bcm63xx_pci_read()
161 static int bcm63xx_pci_write(struct pci_bus *bus, unsigned int devfn, in bcm63xx_pci_write() argument
166 type = bus->parent ? 1 : 0; in bcm63xx_pci_write()
171 return bcm63xx_do_cfg_write(type, bus->number, devfn, in bcm63xx_pci_write()
362 static int bcm63xx_cb_read(struct pci_bus *bus, unsigned int devfn, in bcm63xx_cb_read() argument
367 if (!bus->parent && PCI_SLOT(devfn) == FAKE_CB_BRIDGE_SLOT) { in bcm63xx_cb_read()
368 fake_cb_bridge_bus_number = bus->number; in bcm63xx_cb_read()
377 bus->number == fake_cb_bridge_regs.cardbus_busn && in bcm63xx_cb_read()
[all …]
Dpci-xlr.c59 #define pci_cfg_addr(bus, devfn, off) (((bus) << 16) | ((devfn) << 8) | (off)) argument
62 static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_read_32bit() argument
69 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_read_32bit()
74 static inline void pci_cfg_write_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_write_32bit() argument
80 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit()
84 static int nlm_pcibios_read(struct pci_bus *bus, unsigned int devfn, in nlm_pcibios_read() argument
94 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_read()
107 static int nlm_pcibios_write(struct pci_bus *bus, unsigned int devfn, in nlm_pcibios_write() argument
117 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_write()
128 pci_cfg_write_32bit(bus, devfn, where, data); in nlm_pcibios_write()
[all …]
Dpci-sb1250.c53 #define CFGOFFSET(bus, devfn, where) (((bus)<<16) + ((devfn)<<8) + (where)) argument
54 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument
104 static int sb1250_pci_can_access(struct pci_bus *bus, int devfn) in sb1250_pci_can_access() argument
111 if (bus->number == 0) { in sb1250_pci_can_access()
129 static int sb1250_pcibios_read(struct pci_bus *bus, unsigned int devfn, in sb1250_pcibios_read() argument
139 if (sb1250_pci_can_access(bus, devfn)) in sb1250_pcibios_read()
140 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read()
154 static int sb1250_pcibios_write(struct pci_bus *bus, unsigned int devfn, in sb1250_pcibios_write() argument
157 u32 cfgaddr = CFGADDR(bus, devfn, where); in sb1250_pcibios_write()
165 if (!sb1250_pci_can_access(bus, devfn)) in sb1250_pcibios_write()
Dpci-bcm1480.c53 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) argument
54 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument
97 static int bcm1480_pci_can_access(struct pci_bus *bus, int devfn) in bcm1480_pci_can_access() argument
104 if (bus->number == 0) { in bcm1480_pci_can_access()
120 static int bcm1480_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bcm1480_pcibios_read() argument
130 if (bcm1480_pci_can_access(bus, devfn)) in bcm1480_pcibios_read()
131 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read()
145 static int bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bcm1480_pcibios_write() argument
148 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480_pcibios_write()
156 if (!bcm1480_pci_can_access(bus, devfn)) in bcm1480_pcibios_write()
Dpci-alchemy.c98 static int config_access(unsigned char access_type, struct pci_bus *bus, in config_access() argument
101 struct alchemy_pci_context *ctx = bus->sysdata; in config_access()
128 if (bus->number == 0) in config_access()
131 cfg_base = 0x80000000 | (bus->number << 16) | (device << 11); in config_access()
160 access_type, bus->number, device, where, *data, offset); in config_access()
168 access_type, bus->number, device); in config_access()
187 static int read_config_byte(struct pci_bus *bus, unsigned int devfn, in read_config_byte() argument
191 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte()
201 static int read_config_word(struct pci_bus *bus, unsigned int devfn, in read_config_word() argument
205 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word()
[all …]
Dfixup-tb0287.c27 unsigned char bus; in pcibios_map_irq() local
30 bus = dev->bus->number; in pcibios_map_irq()
31 if (bus == 0) { in pcibios_map_irq()
42 } else if (bus == 1) { in pcibios_map_irq()
54 } else if (bus > 1) { in pcibios_map_irq()
Dops-sni.c40 static int pcimt_read(struct pci_bus *bus, unsigned int devfn, int reg, in pcimt_read() argument
45 if ((res = set_config_address(bus->number, devfn, reg))) in pcimt_read()
63 static int pcimt_write(struct pci_bus *bus, unsigned int devfn, int reg, in pcimt_write() argument
68 if ((res = set_config_address(bus->number, devfn, reg))) in pcimt_write()
100 static int pcit_read(struct pci_bus *bus, unsigned int devfn, int reg, in pcit_read() argument
110 if (bus->number == 0) { in pcit_read()
120 if ((res = pcit_set_config_address(bus->number, devfn, reg))) in pcit_read()
137 static int pcit_write(struct pci_bus *bus, unsigned int devfn, int reg, in pcit_write() argument
142 if ((res = pcit_set_config_address(bus->number, devfn, reg))) in pcit_write()
Dops-bridge.c43 static int pci_conf0_read_config(struct pci_bus *bus, unsigned int devfn, in pci_conf0_read_config() argument
46 struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); in pci_conf0_read_config()
103 static int pci_conf1_read_config(struct pci_bus *bus, unsigned int devfn, in pci_conf1_read_config() argument
106 struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); in pci_conf1_read_config()
108 int busno = bus->number; in pci_conf1_read_config()
167 static int pci_read_config(struct pci_bus *bus, unsigned int devfn, in pci_read_config() argument
170 if (bus->number > 0) in pci_read_config()
171 return pci_conf1_read_config(bus, devfn, where, size, value); in pci_read_config()
173 return pci_conf0_read_config(bus, devfn, where, size, value); in pci_read_config()
176 static int pci_conf0_write_config(struct pci_bus *bus, unsigned int devfn, in pci_conf0_write_config() argument
[all …]
/linux-4.4.14/drivers/bus/
Dmips_cdmm.c223 drv->drv.bus = &mips_cdmm_bustype; in BUILD_PERCPU_HELPER()
289 struct mips_cdmm_bus *bus, **bus_p; in mips_cdmm_get_bus() local
304 bus = *bus_p; in mips_cdmm_get_bus()
306 if (unlikely(!bus)) { in mips_cdmm_get_bus()
307 bus = kzalloc(sizeof(*bus), GFP_ATOMIC); in mips_cdmm_get_bus()
308 if (unlikely(!bus)) in mips_cdmm_get_bus()
309 bus = ERR_PTR(-ENOMEM); in mips_cdmm_get_bus()
311 *bus_p = bus; in mips_cdmm_get_bus()
314 return bus; in mips_cdmm_get_bus()
356 static int mips_cdmm_setup(struct mips_cdmm_bus *bus) in mips_cdmm_setup() argument
[all …]
/linux-4.4.14/drivers/gpu/drm/i915/
Dintel_i2c.c137 static u32 get_reserved(struct intel_gmbus *bus) in get_reserved() argument
139 struct drm_i915_private *dev_priv = bus->dev_priv; in get_reserved()
145 reserved = I915_READ_NOTRACE(bus->gpio_reg) & in get_reserved()
154 struct intel_gmbus *bus = data; in get_clock() local
155 struct drm_i915_private *dev_priv = bus->dev_priv; in get_clock()
156 u32 reserved = get_reserved(bus); in get_clock()
157 I915_WRITE_NOTRACE(bus->gpio_reg, reserved | GPIO_CLOCK_DIR_MASK); in get_clock()
158 I915_WRITE_NOTRACE(bus->gpio_reg, reserved); in get_clock()
159 return (I915_READ_NOTRACE(bus->gpio_reg) & GPIO_CLOCK_VAL_IN) != 0; in get_clock()
164 struct intel_gmbus *bus = data; in get_data() local
[all …]
/linux-4.4.14/arch/x86/kernel/
Daperture_64.c95 static u32 __init find_cap(int bus, int slot, int func, int cap) in find_cap() argument
100 if (!(read_pci_config_16(bus, slot, func, PCI_STATUS) & in find_cap()
104 pos = read_pci_config_byte(bus, slot, func, PCI_CAPABILITY_LIST); in find_cap()
109 id = read_pci_config_byte(bus, slot, func, pos+PCI_CAP_LIST_ID); in find_cap()
114 pos = read_pci_config_byte(bus, slot, func, in find_cap()
121 static u32 __init read_agp(int bus, int slot, int func, int cap, u32 *order) in read_agp() argument
130 pr_info("pci 0000:%02x:%02x:%02x: AGP bridge\n", bus, slot, func); in read_agp()
131 apsizereg = read_pci_config_16(bus, slot, func, cap + 0x14); in read_agp()
134 bus, slot, func); in read_agp()
150 aper_low = read_pci_config(bus, slot, func, 0x10); in read_agp()
[all …]
Dpci-calgary_64.c327 pbus = pdev->bus; in find_iommu_table()
586 unsigned char bus = tbl->it_busno; in calioc2_tce_cache_blast() local
590 "sequence - count %d\n", bus, count); in calioc2_tce_cache_blast()
593 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL); in calioc2_tce_cache_blast()
602 target = calgary_reg(bbar, split_queue_offset(bus)); in calioc2_tce_cache_blast()
611 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_DEBUG); in calioc2_tce_cache_blast()
626 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL); in calioc2_tce_cache_blast()
630 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_DEBUG); in calioc2_tce_cache_blast()
636 target = calgary_reg(bbar, tar_offset(bus)); in calioc2_tce_cache_blast()
641 target = calgary_reg(bbar, phb_offset(bus) | PHB_PAGE_MIG_CTRL); in calioc2_tce_cache_blast()
[all …]
/linux-4.4.14/arch/alpha/kernel/
Dsys_nautilus.c75 dev->bus->self && dev->bus->self->device == 0x700f) in nautilus_map_irq()
84 struct pci_bus *bus = pci_isa_hose->bus; in nautilus_kill_arch() local
92 pci_bus_read_config_byte(bus, 0x38, 0x43, &t8); in nautilus_kill_arch()
93 pci_bus_write_config_byte(bus, 0x38, 0x43, t8 | 0x80); in nautilus_kill_arch()
103 pci_bus_read_config_dword(bus, 0x88, 0x10, &pmuport); in nautilus_kill_arch()
107 pci_bus_read_config_dword(bus, 0x88, 0xe0, &pmuport); in nautilus_kill_arch()
202 struct pci_bus *bus; in nautilus_init_pci() local
208 bus = pci_scan_bus(0, alpha_mv.pci_ops, hose); in nautilus_init_pci()
209 if (!bus) in nautilus_init_pci()
212 hose->bus = bus; in nautilus_init_pci()
[all …]
Dpci.c243 void pcibios_fixup_bus(struct pci_bus *bus) in pcibios_fixup_bus() argument
245 struct pci_dev *dev = bus->self; in pcibios_fixup_bus()
249 pci_read_bridge_bases(bus); in pcibios_fixup_bus()
252 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_fixup_bus()
315 struct pci_bus *bus; in common_init_pci() local
339 bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, in common_init_pci()
341 if (!bus) in common_init_pci()
343 hose->bus = bus; in common_init_pci()
345 next_busno = bus->busn_res.end + 1; in common_init_pci()
359 bus = hose->bus; in common_init_pci()
[all …]
/linux-4.4.14/arch/x86/pci/
Dearly.c10 u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset) in read_pci_config() argument
13 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); in read_pci_config()
18 u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset) in read_pci_config_byte() argument
21 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); in read_pci_config_byte()
26 u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset) in read_pci_config_16() argument
29 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); in read_pci_config_16()
34 void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, in write_pci_config() argument
37 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); in write_pci_config()
41 void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) in write_pci_config_byte() argument
43 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); in write_pci_config_byte()
[all …]
Dintel_mid_pci.c60 static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) in fixed_bar_cap() argument
71 if (raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, in fixed_bar_cap()
80 raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, in fixed_bar_cap()
92 static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn, in pci_device_update_fixed() argument
99 domain = pci_domain_nr(bus); in pci_device_update_fixed()
100 busnum = bus->number; in pci_device_update_fixed()
146 static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg) in type1_access_ok() argument
158 if (bus == 0 && (devfn == PCI_DEVFN(2, 0) in type1_access_ok()
165 static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_read() argument
168 if (type1_access_ok(bus->number, devfn, where)) in pci_read()
[all …]
Di386.c135 !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA)) in skip_isa_ioresource_align()
232 static void pcibios_allocate_bus_resources(struct pci_bus *bus) in pcibios_allocate_bus_resources() argument
237 if (bus->self) in pcibios_allocate_bus_resources()
238 pcibios_allocate_bridge_resources(bus->self); in pcibios_allocate_bus_resources()
239 list_for_each_entry(child, &bus->children, node) in pcibios_allocate_bus_resources()
306 static void pcibios_allocate_resources(struct pci_bus *bus, int pass) in pcibios_allocate_resources() argument
311 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_allocate_resources()
340 static void pcibios_allocate_rom_resources(struct pci_bus *bus) in pcibios_allocate_rom_resources() argument
345 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_allocate_rom_resources()
356 struct pci_bus *bus; in pcibios_assign_resources() local
[all …]
Dbroadcom_bus.c22 static void __init cnb20le_res(u8 bus, u8 slot, u8 func) in cnb20le_res() argument
31 fbus = read_pci_config_byte(bus, slot, func, 0x44); in cnb20le_res()
32 lbus = read_pci_config_byte(bus, slot, func, 0x45); in cnb20le_res()
50 word1 = read_pci_config_16(bus, slot, func, 0xc0); in cnb20le_res()
51 word2 = read_pci_config_16(bus, slot, func, 0xc2); in cnb20le_res()
60 word1 = read_pci_config_16(bus, slot, func, 0xc4); in cnb20le_res()
61 word2 = read_pci_config_16(bus, slot, func, 0xc6); in cnb20le_res()
70 word1 = read_pci_config_16(bus, slot, func, 0xd0); in cnb20le_res()
71 word2 = read_pci_config_16(bus, slot, func, 0xd2); in cnb20le_res()
91 u8 bus = 0, slot = 0; in broadcom_postcore_init() local
[all …]
Dnumachip.c21 static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument
23 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in pci_dev_base()
26 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base()
30 static int pci_mmcfg_read_numachip(unsigned int seg, unsigned int bus, in pci_mmcfg_read_numachip() argument
36 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read_numachip()
42 if (unlikely(bus == 0 && devfn >= limit)) { in pci_mmcfg_read_numachip()
48 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read_numachip()
70 static int pci_mmcfg_write_numachip(unsigned int seg, unsigned int bus, in pci_mmcfg_write_numachip() argument
76 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write_numachip()
80 if (unlikely(bus == 0 && devfn >= limit)) in pci_mmcfg_write_numachip()
[all …]
Dmmconfig_32.c28 static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) in get_base_addr() argument
30 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in get_base_addr()
40 static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) in pci_exp_set_dev_base() argument
42 u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12); in pci_exp_set_dev_base()
52 static int pci_mmcfg_read(unsigned int seg, unsigned int bus, in pci_mmcfg_read() argument
58 if ((bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_mmcfg_read()
64 base = get_base_addr(seg, bus, devfn); in pci_mmcfg_read()
72 pci_exp_set_dev_base(base, bus, devfn); in pci_mmcfg_read()
91 static int pci_mmcfg_write(unsigned int seg, unsigned int bus, in pci_mmcfg_write() argument
97 if ((bus > 255) || (devfn > 255) || (reg > 4095)) in pci_mmcfg_write()
[all …]
Ddirect.c16 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \ argument
17 (0x80000000 | ((reg & 0xF00) << 16) | (bus << 16) \
20 static int pci_conf1_read(unsigned int seg, unsigned int bus, in pci_conf1_read() argument
25 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_conf1_read()
32 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_read()
51 static int pci_conf1_write(unsigned int seg, unsigned int bus, in pci_conf1_write() argument
56 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) in pci_conf1_write()
61 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_write()
94 static int pci_conf2_read(unsigned int seg, unsigned int bus, in pci_conf2_read() argument
101 if ((bus > 255) || (devfn > 255) || (reg > 255)) { in pci_conf2_read()
[all …]
Dcommon.c41 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, in raw_pci_read() argument
45 return raw_pci_ops->read(domain, bus, devfn, reg, len, val); in raw_pci_read()
47 return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); in raw_pci_read()
51 int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, in raw_pci_write() argument
55 return raw_pci_ops->write(domain, bus, devfn, reg, len, val); in raw_pci_write()
57 return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); in raw_pci_write()
61 static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) in pci_read() argument
63 return raw_pci_read(pci_domain_nr(bus), bus->number, in pci_read()
67 static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) in pci_write() argument
69 return raw_pci_write(pci_domain_nr(bus), bus->number, in pci_write()
[all …]
/linux-4.4.14/drivers/net/ethernet/freescale/
Dfec_mpc52xx_phy.c28 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_id, in mpc52xx_fec_mdio_transfer() argument
31 struct mpc52xx_fec_mdio_priv *priv = bus->priv; in mpc52xx_fec_mdio_transfer()
52 static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg) in mpc52xx_fec_mdio_read() argument
54 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg, FEC_MII_READ_FRAME); in mpc52xx_fec_mdio_read()
57 static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, in mpc52xx_fec_mdio_write() argument
60 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg, in mpc52xx_fec_mdio_write()
68 struct mii_bus *bus; in mpc52xx_fec_mdio_probe() local
73 bus = mdiobus_alloc(); in mpc52xx_fec_mdio_probe()
74 if (bus == NULL) in mpc52xx_fec_mdio_probe()
82 bus->name = "mpc52xx MII bus"; in mpc52xx_fec_mdio_probe()
[all …]
Dxgmac_mdio.c128 static int xgmac_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 value) in xgmac_mdio_write() argument
130 struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; in xgmac_mdio_write()
150 ret = xgmac_wait_until_free(&bus->dev, regs, endian); in xgmac_mdio_write()
162 ret = xgmac_wait_until_free(&bus->dev, regs, endian); in xgmac_mdio_write()
170 ret = xgmac_wait_until_done(&bus->dev, regs, endian); in xgmac_mdio_write()
182 static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in xgmac_mdio_read() argument
184 struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv; in xgmac_mdio_read()
204 ret = xgmac_wait_until_free(&bus->dev, regs, endian); in xgmac_mdio_read()
216 ret = xgmac_wait_until_free(&bus->dev, regs, endian); in xgmac_mdio_read()
224 ret = xgmac_wait_until_done(&bus->dev, regs, endian); in xgmac_mdio_read()
[all …]
/linux-4.4.14/include/sound/
Di2c.h28 struct snd_i2c_bus *bus; /* I2C bus */ member
40 void (*start)(struct snd_i2c_bus *bus); /* transfer start */
41 void (*stop)(struct snd_i2c_bus *bus); /* transfer stop */
42 …void (*direction)(struct snd_i2c_bus *bus, int clock, int data); /* set line direction (0 = write…
43 void (*setlines)(struct snd_i2c_bus *bus, int clock, int data);
44 int (*getclock)(struct snd_i2c_bus *bus);
45 int (*getdata)(struct snd_i2c_bus *bus, int ack);
51 int (*probeaddr)(struct snd_i2c_bus *bus, unsigned short addr);
73 void (*private_free)(struct snd_i2c_bus *bus);
80 int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name,
[all …]
Dhda_i915.h10 int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
11 int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
12 int snd_hdac_get_display_clk(struct hdac_bus *bus);
13 int snd_hdac_i915_init(struct hdac_bus *bus);
14 int snd_hdac_i915_exit(struct hdac_bus *bus);
17 static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) in snd_hdac_set_codec_wakeup() argument
21 static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable) in snd_hdac_display_power() argument
25 static inline int snd_hdac_get_display_clk(struct hdac_bus *bus) in snd_hdac_get_display_clk() argument
29 static inline int snd_hdac_i915_init(struct hdac_bus *bus) in snd_hdac_i915_init() argument
33 static inline int snd_hdac_i915_exit(struct hdac_bus *bus) in snd_hdac_i915_exit() argument
Dhdaudio.h48 struct hdac_bus *bus; member
106 int snd_hdac_device_init(struct hdac_device *dev, struct hdac_bus *bus,
199 int (*command)(struct hdac_bus *bus, unsigned int cmd);
201 int (*get_response)(struct hdac_bus *bus, unsigned int addr,
204 int (*link_power)(struct hdac_bus *bus, bool enable);
219 int (*dma_alloc_pages)(struct hdac_bus *bus, int type, size_t size,
221 void (*dma_free_pages)(struct hdac_bus *bus,
309 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,
312 void snd_hdac_bus_exit(struct hdac_bus *bus);
313 int snd_hdac_bus_exec_verb(struct hdac_bus *bus, unsigned int addr,
[all …]
/linux-4.4.14/drivers/pcmcia/
Dcardbus.c30 static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq) in cardbus_config_irq_and_cls() argument
34 list_for_each_entry(dev, &bus->devices, bus_list) { in cardbus_config_irq_and_cls()
69 struct pci_bus *bus = s->cb_dev->subordinate; in cb_alloc() local
75 s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); in cb_alloc()
76 pci_fixup_cardbus(bus); in cb_alloc()
78 max = bus->busn_res.start; in cb_alloc()
80 list_for_each_entry(dev, &bus->devices, bus_list) in cb_alloc()
82 max = pci_scan_bridge(bus, dev, max, pass); in cb_alloc()
87 pci_bus_size_bridges(bus); in cb_alloc()
88 pci_bus_assign_resources(bus); in cb_alloc()
[all …]
/linux-4.4.14/drivers/misc/mei/
Dbus.c46 struct mei_device *bus; in __mei_cl_send() local
53 bus = cl->dev; in __mei_cl_send()
55 mutex_lock(&bus->device_lock); in __mei_cl_send()
56 if (bus->dev_state != MEI_DEV_ENABLED) { in __mei_cl_send()
88 mutex_unlock(&bus->device_lock); in __mei_cl_send()
106 struct mei_device *bus; in __mei_cl_recv() local
114 bus = cl->dev; in __mei_cl_recv()
116 mutex_lock(&bus->device_lock); in __mei_cl_recv()
117 if (bus->dev_state != MEI_DEV_ENABLED) { in __mei_cl_recv()
133 mutex_unlock(&bus->device_lock); in __mei_cl_recv()
[all …]
Dbus-fixup.c124 struct mei_device *bus; in mei_nfc_if_version() local
134 bus = cl->dev; in mei_nfc_if_version()
136 WARN_ON(mutex_is_locked(&bus->device_lock)); in mei_nfc_if_version()
140 dev_err(bus->dev, "Could not send IF version cmd\n"); in mei_nfc_if_version()
155 dev_err(bus->dev, "Could not read IF version\n"); in mei_nfc_if_version()
162 dev_info(bus->dev, "NFC MEI VERSION: IVN 0x%x Vendor ID 0x%x Type 0x%x\n", in mei_nfc_if_version()
202 struct mei_device *bus; in mei_nfc() local
209 bus = cldev->bus; in mei_nfc()
211 dev_dbg(bus->dev, "running hook %s: %pUl match=%d\n", in mei_nfc()
214 mutex_lock(&bus->device_lock); in mei_nfc()
[all …]
/linux-4.4.14/sound/hda/ext/
Dhdac_ext_controller.c42 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_bus_parse_capabilities() local
45 offset = snd_hdac_chip_readl(bus, LLCH); in snd_hdac_ext_bus_parse_capabilities()
49 cur_cap = _snd_hdac_chip_read(l, bus, offset); in snd_hdac_ext_bus_parse_capabilities()
51 dev_dbg(bus->dev, "Capability version: 0x%x\n", in snd_hdac_ext_bus_parse_capabilities()
54 dev_dbg(bus->dev, "HDA capability ID: 0x%x\n", in snd_hdac_ext_bus_parse_capabilities()
59 dev_dbg(bus->dev, "Found ML capability\n"); in snd_hdac_ext_bus_parse_capabilities()
60 ebus->mlcap = bus->remap_addr + offset; in snd_hdac_ext_bus_parse_capabilities()
64 dev_dbg(bus->dev, "Found GTS capability offset=%x\n", offset); in snd_hdac_ext_bus_parse_capabilities()
65 ebus->gtscap = bus->remap_addr + offset; in snd_hdac_ext_bus_parse_capabilities()
70 dev_dbg(bus->dev, "Found PP capability offset=%x\n", offset); in snd_hdac_ext_bus_parse_capabilities()
[all …]
Dhdac_ext_stream.c41 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_stream_init() local
63 snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag); in snd_hdac_ext_stream_init()
105 struct hdac_bus *bus = ebus_to_hbus(ebus); in snd_hdac_stream_free_all() local
107 while (!list_empty(&bus->stream_list)) { in snd_hdac_stream_free_all()
108 s = list_first_entry(&bus->stream_list, struct hdac_stream, list); in snd_hdac_stream_free_all()
126 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_stream_decouple() local
128 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
136 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
252 struct hdac_bus *hbus = &ebus->bus; in hdac_ext_link_stream_assign()
293 struct hdac_bus *hbus = &ebus->bus; in hdac_ext_host_stream_assign()
[all …]
/linux-4.4.14/drivers/mcb/
Dmcb-core.c118 drv->driver.bus = &mcb_bus_type; in __mcb_register_driver()
141 mcb_bus_put(mdev->bus); in mcb_release_dev()
152 int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev) in mcb_device_register() argument
158 dev->dev.bus = &mcb_bus_type; in mcb_device_register()
159 dev->dev.parent = bus->dev.parent; in mcb_device_register()
164 bus->bus_nr, device_id, dev->inst, dev->group, dev->var); in mcb_device_register()
169 device_id, bus->bus_nr, ret); in mcb_device_register()
188 struct mcb_bus *bus; in mcb_alloc_bus() local
191 bus = kzalloc(sizeof(struct mcb_bus), GFP_KERNEL); in mcb_alloc_bus()
192 if (!bus) in mcb_alloc_bus()
[all …]
Dmcb-pci.c19 struct mcb_bus *bus; member
26 struct mcb_bus *mbus = mdev->bus; in mcb_pci_get_irq()
83 priv->bus = mcb_alloc_bus(&pdev->dev); in mcb_pci_probe()
84 if (IS_ERR(priv->bus)) { in mcb_pci_probe()
85 ret = PTR_ERR(priv->bus); in mcb_pci_probe()
89 priv->bus->get_irq = mcb_pci_get_irq; in mcb_pci_probe()
91 ret = chameleon_parse_cells(priv->bus, priv->mapbase, priv->base); in mcb_pci_probe()
98 mcb_bus_add_devices(priv->bus); in mcb_pci_probe()
103 mcb_release_bus(priv->bus); in mcb_pci_probe()
117 mcb_release_bus(priv->bus); in mcb_pci_remove()
/linux-4.4.14/drivers/net/ethernet/marvell/
Dmvmdio.c74 static int orion_mdio_wait_ready(struct mii_bus *bus) in orion_mdio_wait_ready() argument
76 struct orion_mdio_dev *dev = bus->priv; in orion_mdio_wait_ready()
108 dev_err(bus->parent, "Timeout: SMI busy for too long\n"); in orion_mdio_wait_ready()
112 static int orion_mdio_read(struct mii_bus *bus, int mii_id, in orion_mdio_read() argument
115 struct orion_mdio_dev *dev = bus->priv; in orion_mdio_read()
121 ret = orion_mdio_wait_ready(bus); in orion_mdio_read()
130 ret = orion_mdio_wait_ready(bus); in orion_mdio_read()
136 dev_err(bus->parent, "SMI bus read not valid\n"); in orion_mdio_read()
147 static int orion_mdio_write(struct mii_bus *bus, int mii_id, in orion_mdio_write() argument
150 struct orion_mdio_dev *dev = bus->priv; in orion_mdio_write()
[all …]
/linux-4.4.14/sound/pci/hda/
Dhda_controller.c214 struct hdac_bus *bus = azx_bus(chip); in azx_pcm_trigger() local
257 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
273 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
277 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
282 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
527 struct hdac_bus *bus = &_bus->core; in snd_hda_attach_pcm_stream() local
528 struct azx *chip = bus_to_azx(bus); in snd_hda_attach_pcm_stream()
589 static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr, in azx_rirb_get_response() argument
592 struct azx *chip = bus_to_azx(bus); in azx_rirb_get_response()
593 struct hda_bus *hbus = &chip->bus; in azx_rirb_get_response()
[all …]
/linux-4.4.14/drivers/xen/
Dpci.c49 .add.seg = pci_domain_nr(pci_dev->bus), in xen_add_device()
50 .add.bus = pci_dev->bus->number, in xen_add_device()
62 add->physfn.bus = physfn->bus->number; in xen_add_device()
66 if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) in xen_add_device()
73 handle = ACPI_HANDLE(physfn->bus->bridge); in xen_add_device()
81 for (pbus = pci_dev->bus; pbus; pbus = pbus->parent) { in xen_add_device()
111 if (pci_domain_nr(pci_dev->bus)) in xen_add_device()
116 .bus = pci_dev->bus->number, in xen_add_device()
119 .physfn.bus = physfn->bus->number, in xen_add_device()
127 else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) { in xen_add_device()
[all …]
/linux-4.4.14/drivers/scsi/
Dqla1280.c676 nv->bus[i].selection_timeout = cpu_to_le16(nv->bus[i].selection_timeout); in qla1280_read_nvram()
677 nv->bus[i].max_queue_depth = cpu_to_le16(nv->bus[i].max_queue_depth); in qla1280_read_nvram()
802 qla1280_wait_for_pending_commands(struct scsi_qla_host *ha, int bus, int target) in qla1280_wait_for_pending_commands() argument
820 if (bus >= 0 && SCSI_BUS_32(cmd) != bus) in qla1280_wait_for_pending_commands()
851 int bus, target, lun; in qla1280_error_action() local
863 bus = SCSI_BUS_32(cmd); in qla1280_error_action()
899 "already completed.\n", ha->host_no, bus, in qla1280_error_action()
921 "command.\n", ha->host_no, bus, target, lun); in qla1280_error_action()
922 if (qla1280_device_reset(ha, bus, target) == 0) { in qla1280_error_action()
924 wait_for_bus = bus; in qla1280_error_action()
[all …]
/linux-4.4.14/drivers/gpu/drm/gma500/
Dintel_gmbus.c249 struct intel_gmbus *bus = container_of(adapter, in gmbus_xfer() local
255 if (bus->force_bit) in gmbus_xfer()
257 bus->force_bit, msgs, num); in gmbus_xfer()
261 GMBUS_REG_WRITE(GMBUS0 + reg_offset, bus->reg0); in gmbus_xfer()
349 bus->reg0 & 0xff, bus->adapter.name); in gmbus_xfer()
353 bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff); in gmbus_xfer()
354 if (!bus->force_bit) in gmbus_xfer()
357 return intel_i2c_quirk_xfer(dev_priv, bus->force_bit, msgs, num); in gmbus_xfer()
362 struct intel_gmbus *bus = container_of(adapter, in gmbus_func() local
366 if (bus->force_bit) in gmbus_func()
[all …]
/linux-4.4.14/drivers/net/ethernet/xilinx/
Dll_temac_mdio.c22 static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in temac_mdio_read() argument
24 struct temac_local *lp = bus->priv; in temac_mdio_read()
41 static int temac_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 val) in temac_mdio_write() argument
43 struct temac_local *lp = bus->priv; in temac_mdio_write()
61 struct mii_bus *bus; in temac_mdio_setup() local
83 bus = mdiobus_alloc(); in temac_mdio_setup()
84 if (!bus) in temac_mdio_setup()
88 snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx", in temac_mdio_setup()
90 bus->priv = lp; in temac_mdio_setup()
91 bus->name = "Xilinx TEMAC MDIO"; in temac_mdio_setup()
[all …]
Dxilinx_axienet_mdio.c46 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() argument
50 struct axienet_local *lp = bus->priv; in axienet_mdio_read()
89 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() argument
93 struct axienet_local *lp = bus->priv; in axienet_mdio_write()
132 struct mii_bus *bus; in axienet_mdio_setup() local
201 bus = mdiobus_alloc(); in axienet_mdio_setup()
202 if (!bus) in axienet_mdio_setup()
207 snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx", in axienet_mdio_setup()
210 bus->priv = lp; in axienet_mdio_setup()
211 bus->name = "Xilinx Axi Ethernet MDIO"; in axienet_mdio_setup()
[all …]
/linux-4.4.14/drivers/pci/hotplug/
Dcpci_hotplug_pci.c54 hs_cap = pci_bus_find_capability(slot->bus, in cpci_get_attention_status()
60 if (pci_bus_read_config_word(slot->bus, in cpci_get_attention_status()
74 hs_cap = pci_bus_find_capability(slot->bus, in cpci_set_attention_status()
79 if (pci_bus_read_config_word(slot->bus, in cpci_set_attention_status()
88 if (pci_bus_write_config_word(slot->bus, in cpci_set_attention_status()
101 hs_cap = pci_bus_find_capability(slot->bus, in cpci_get_hs_csr()
106 if (pci_bus_read_config_word(slot->bus, in cpci_get_hs_csr()
120 hs_cap = pci_bus_find_capability(slot->bus, in cpci_check_and_clear_ins()
125 if (pci_bus_read_config_word(slot->bus, in cpci_check_and_clear_ins()
132 if (pci_bus_write_config_word(slot->bus, in cpci_check_and_clear_ins()
[all …]
Dacpiphp_glue.c63 static void acpiphp_sanitize_bus(struct pci_bus *bus);
198 struct pci_bus *bus; in acpiphp_post_dock_fixup() local
204 bus = context->func.slot->bus; in acpiphp_post_dock_fixup()
205 if (!bus->self) in acpiphp_post_dock_fixup()
211 pci_read_config_dword(bus->self, PCI_PRIMARY_BUS, &buses); in acpiphp_post_dock_fixup()
213 if (((buses >> 8) & 0xff) != bus->busn_res.start) { in acpiphp_post_dock_fixup()
215 | ((unsigned int)(bus->primary) << 0) in acpiphp_post_dock_fixup()
216 | ((unsigned int)(bus->busn_res.start) << 8) in acpiphp_post_dock_fixup()
217 | ((unsigned int)(bus->busn_res.end) << 16); in acpiphp_post_dock_fixup()
218 pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); in acpiphp_post_dock_fixup()
[all …]
Dshpchp_sysfs.c44 struct pci_bus *bus; in show_ctrl() local
47 bus = pdev->subordinate; in show_ctrl()
50 pci_bus_for_each_resource(bus, res, index) { in show_ctrl()
59 pci_bus_for_each_resource(bus, res, index) { in show_ctrl()
68 pci_bus_for_each_resource(bus, res, index) { in show_ctrl()
76 for (busnr = bus->busn_res.start; busnr <= bus->busn_res.end; busnr++) { in show_ctrl()
77 if (!pci_find_bus(pci_domain_nr(bus), busnr)) in show_ctrl()
80 if (busnr < bus->busn_res.end) in show_ctrl()
82 busnr, (int)(bus->busn_res.end - busnr)); in show_ctrl()
Drpaphp_pci.c79 struct pci_bus *bus; in rpaphp_enable_slot() local
96 bus = pcibios_find_pci_bus(slot->dn); in rpaphp_enable_slot()
97 if (!bus) { in rpaphp_enable_slot()
103 slot->bus = bus; in rpaphp_enable_slot()
104 slot->pci_devs = &bus->devices; in rpaphp_enable_slot()
118 if (list_empty(&bus->devices)) in rpaphp_enable_slot()
119 pcibios_add_pci_devices(bus); in rpaphp_enable_slot()
121 if (!list_empty(&bus->devices)) { in rpaphp_enable_slot()
129 list_for_each_entry (dev, &bus->devices, bus_list) in rpaphp_enable_slot()
Dcpqphp_core.c186 tbus = cpqhp_routing_table->slots[loop].bus; in pci_print_IRQ_route()
334 get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot) in get_slot_mapping() argument
342 dbg("%s: %p, %d, %d, %p\n", __func__, bus, bus_num, dev_num, slot); in get_slot_mapping()
348 tbus = cpqhp_routing_table->slots[loop].bus; in get_slot_mapping()
365 bus->number = tbus; in get_slot_mapping()
366 pci_bus_read_config_dword(bus, PCI_DEVFN(tdevice, 0), in get_slot_mapping()
370 pci_bus_read_config_dword(bus, in get_slot_mapping()
447 u8 bus; in set_attention_status() local
454 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) in set_attention_status()
459 dbg("bus, dev, fn = %d, %d, %d\n", bus, device, function); in set_attention_status()
[all …]
/linux-4.4.14/arch/microblaze/pci/
Dpci-common.c129 int pci_domain_nr(struct pci_bus *bus) in pci_domain_nr() argument
131 struct pci_controller *hose = pci_bus_to_host(bus); in pci_domain_nr()
182 struct pci_controller *hose = pci_bus_to_host(dev->bus); in __pci_mmap_make_offset()
340 int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val, size_t size) in pci_legacy_read() argument
343 struct pci_controller *hose = pci_bus_to_host(bus); in pci_legacy_read()
380 int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, size_t size) in pci_legacy_write() argument
383 struct pci_controller *hose = pci_bus_to_host(bus); in pci_legacy_write()
425 int pci_mmap_legacy_page_range(struct pci_bus *bus, in pci_mmap_legacy_page_range() argument
429 struct pci_controller *hose = pci_bus_to_host(bus); in pci_mmap_legacy_page_range()
436 pci_domain_nr(bus), bus->number, in pci_mmap_legacy_page_range()
[all …]
Dindirect_pci.c23 indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, in indirect_read_config() argument
26 struct pci_controller *hose = pci_bus_to_host(bus); in indirect_read_config()
32 if (bus->number != hose->first_busno) in indirect_read_config()
39 if (bus->number != hose->first_busno) in indirect_read_config()
42 bus_no = (bus->number == hose->first_busno) ? in indirect_read_config()
43 hose->self_busno : bus->number; in indirect_read_config()
77 indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, in indirect_write_config() argument
80 struct pci_controller *hose = pci_bus_to_host(bus); in indirect_write_config()
86 if (bus->number != hose->first_busno) in indirect_write_config()
93 if (bus->number != hose->first_busno) in indirect_write_config()
[all …]
/linux-4.4.14/drivers/misc/cxl/
Dvphb.c25 static int cxl_pci_probe_mode(struct pci_bus *bus) in cxl_pci_probe_mode() argument
49 phb = pci_bus_to_host(dev->bus); in cxl_pci_enable_device_hook()
86 static resource_size_t cxl_pci_window_alignment(struct pci_bus *bus, in cxl_pci_window_alignment() argument
97 static int cxl_pcie_cfg_record(u8 bus, u8 devfn) in cxl_pcie_cfg_record() argument
99 return (bus << 8) + devfn; in cxl_pcie_cfg_record()
103 u8 bus, u8 devfn, int offset) in cxl_pcie_cfg_addr() argument
105 int record = cxl_pcie_cfg_record(bus, devfn); in cxl_pcie_cfg_addr()
111 static int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument
120 phb = pci_bus_to_host(bus); in cxl_pcie_config_info()
125 if (cxl_pcie_cfg_record(bus->number, devfn) > afu->crs_num) in cxl_pcie_config_info()
[all …]
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bus/
Dbase.c29 struct nvkm_bus *bus = nvkm_bus(subdev); in nvkm_bus_intr() local
30 bus->func->intr(bus); in nvkm_bus_intr()
36 struct nvkm_bus *bus = nvkm_bus(subdev); in nvkm_bus_init() local
37 bus->func->init(bus); in nvkm_bus_init()
58 struct nvkm_bus *bus; in nvkm_bus_new_() local
59 if (!(bus = *pbus = kzalloc(sizeof(*bus), GFP_KERNEL))) in nvkm_bus_new_()
61 nvkm_subdev_ctor(&nvkm_bus, device, index, 0, &bus->subdev); in nvkm_bus_new_()
62 bus->func = func; in nvkm_bus_new_()
DKbuild1 nvkm-y += nvkm/subdev/bus/base.o
2 nvkm-y += nvkm/subdev/bus/hwsq.o
3 nvkm-y += nvkm/subdev/bus/nv04.o
4 nvkm-y += nvkm/subdev/bus/nv31.o
5 nvkm-y += nvkm/subdev/bus/nv50.o
6 nvkm-y += nvkm/subdev/bus/g94.o
7 nvkm-y += nvkm/subdev/bus/gf100.o
/linux-4.4.14/arch/arm/mach-orion5x/
Dpci.c49 static int pcie_valid_config(int bus, int dev) in pcie_valid_config() argument
56 if (bus == 0 && dev == 0) in pcie_valid_config()
62 if (bus == 0 && dev != 1) in pcie_valid_config()
76 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in pcie_rd_conf() argument
82 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf()
88 ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val); in pcie_rd_conf()
94 static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn, in pcie_rd_conf_wa() argument
99 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf_wa()
115 bus, devfn, where, size, val); in pcie_rd_conf_wa()
120 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, in pcie_wr_conf() argument
[all …]
/linux-4.4.14/drivers/media/usb/cx231xx/
Dcx231xx-i2c.c64 static inline bool is_tuner(struct cx231xx *dev, struct cx231xx_i2c *bus, in is_tuner() argument
67 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner()
87 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_send_bytes() local
88 struct cx231xx *dev = bus->dev; in cx231xx_i2c_send_bytes()
98 if (is_tuner(dev, bus, msg, TUNER_XC5000)) { in cx231xx_i2c_send_bytes()
157 bus->i2c_nostop = (size > 16) ? 1 : 0; in cx231xx_i2c_send_bytes()
158 bus->i2c_reserve = (loop == 0) ? 0 : 1; in cx231xx_i2c_send_bytes()
161 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_send_bytes()
171 bus->i2c_nostop = 0; in cx231xx_i2c_send_bytes()
172 bus->i2c_reserve = 0; in cx231xx_i2c_send_bytes()
[all …]
/linux-4.4.14/drivers/staging/most/hdm-dim2/
Ddim2_sysfs.c23 ssize_t (*show)(struct medialb_bus *bus, char *buf);
24 ssize_t (*store)(struct medialb_bus *bus, const char *buf,
28 static ssize_t state_show(struct medialb_bus *bus, char *buf) in state_show() argument
53 struct medialb_bus *bus = in bus_kobj_attr_show() local
60 return xattr->show(bus, buf); in bus_kobj_attr_show()
67 struct medialb_bus *bus = in bus_kobj_attr_store() local
74 ret = xattr->store(bus, buf, count); in bus_kobj_attr_store()
88 int dim2_sysfs_probe(struct medialb_bus *bus, struct kobject *parent_kobj) in dim2_sysfs_probe() argument
92 kobject_init(&bus->kobj_group, &bus_ktype); in dim2_sysfs_probe()
93 err = kobject_add(&bus->kobj_group, parent_kobj, "bus"); in dim2_sysfs_probe()
[all …]
/linux-4.4.14/drivers/pci/pcie/aer/
Daer_inject.c35 u8 bus; member
50 unsigned int bus; member
66 struct pci_bus *bus; member
78 unsigned int bus, unsigned int devfn, in aer_error_init() argument
83 err->bus = bus; in aer_error_init()
89 static struct aer_error *__find_aer_error(u16 domain, unsigned int bus, in __find_aer_error() argument
96 bus == err->bus && in __find_aer_error()
106 int domain = pci_domain_nr(dev->bus); in __find_aer_error_by_dev()
109 return __find_aer_error((u16)domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev()
113 static struct pci_ops *__find_pci_bus_ops(struct pci_bus *bus) in __find_pci_bus_ops() argument
[all …]
/linux-4.4.14/drivers/i2c/busses/
Di2c-cros-ec-tunnel.c180 struct ec_i2c_device *bus = adap->algo_data; in ec_i2c_xfer() local
181 struct device *dev = bus->dev; in ec_i2c_xfer()
182 const u16 bus_num = bus->remote_bus; in ec_i2c_xfer()
218 result = cros_ec_cmd_xfer(bus->ec, msg); in ec_i2c_xfer()
252 struct ec_i2c_device *bus = NULL; in ec_i2c_probe() local
261 bus = devm_kzalloc(dev, sizeof(*bus), GFP_KERNEL); in ec_i2c_probe()
262 if (bus == NULL) in ec_i2c_probe()
270 bus->remote_bus = remote_bus; in ec_i2c_probe()
272 bus->ec = ec; in ec_i2c_probe()
273 bus->dev = dev; in ec_i2c_probe()
[all …]
Di2c-powermac.c44 struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); in i2c_powermac_smbus_xfer() local
106 rc = pmac_i2c_open(bus, 0); in i2c_powermac_smbus_xfer()
112 rc = pmac_i2c_setmode(bus, mode); in i2c_powermac_smbus_xfer()
119 rc = pmac_i2c_xfer(bus, addrdir, subsize, subaddr, buf, len); in i2c_powermac_smbus_xfer()
138 pmac_i2c_close(bus); in i2c_powermac_smbus_xfer()
151 struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); in i2c_powermac_master_xfer() local
161 rc = pmac_i2c_open(bus, 0); in i2c_powermac_master_xfer()
166 rc = pmac_i2c_setmode(bus, pmac_i2c_mode_std); in i2c_powermac_master_xfer()
172 rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len); in i2c_powermac_master_xfer()
184 pmac_i2c_close(bus); in i2c_powermac_master_xfer()
[all …]
/linux-4.4.14/drivers/xen/xen-pciback/
Dpassthrough.c21 unsigned int bus, in __xen_pcibk_get_pci_dev() argument
31 if (domain == (unsigned int)pci_domain_nr(dev_entry->dev->bus) in __xen_pcibk_get_pci_dev()
32 && bus == (unsigned int)dev_entry->dev->bus->number in __xen_pcibk_get_pci_dev()
50 unsigned int domain, bus, devfn; in __xen_pcibk_add_pci_dev() local
63 domain = (unsigned int)pci_domain_nr(dev->bus); in __xen_pcibk_add_pci_dev()
64 bus = (unsigned int)dev->bus->number; in __xen_pcibk_add_pci_dev()
66 err = publish_cb(pdev, domain, bus, devfn, devid); in __xen_pcibk_add_pci_dev()
124 unsigned int domain, bus; in __xen_pcibk_publish_pci_roots() local
133 dev = dev_entry->dev->bus->self; in __xen_pcibk_publish_pci_roots()
134 for (; !found && dev != NULL; dev = dev->bus->self) { in __xen_pcibk_publish_pci_roots()
[all …]
Dpci_stub.c39 unsigned char bus; member
114 .seg = pci_domain_nr(dev->bus), in pcistub_device_release()
115 .bus = dev->bus->number, in pcistub_device_release()
152 static struct pcistub_device *pcistub_device_find(int domain, int bus, in pcistub_device_find() argument
162 && domain == pci_domain_nr(psdev->dev->bus) in pcistub_device_find()
163 && bus == psdev->dev->bus->number in pcistub_device_find()
201 int domain, int bus, in pcistub_get_pci_dev_by_slot() argument
212 && domain == pci_domain_nr(psdev->dev->bus) in pcistub_get_pci_dev_by_slot()
213 && bus == psdev->dev->bus->number in pcistub_get_pci_dev_by_slot()
320 for (; dev != NULL; dev = dev->bus->self) { in pcistub_match_one()
[all …]
/linux-4.4.14/arch/powerpc/include/asm/
Dpci-bridge.h22 void (*dma_bus_setup)(struct pci_bus *bus);
54 struct pci_bus *bus; member
134 extern int early_read_config_byte(struct pci_controller *hose, int bus,
136 extern int early_read_config_word(struct pci_controller *hose, int bus,
138 extern int early_read_config_dword(struct pci_controller *hose, int bus,
140 extern int early_write_config_byte(struct pci_controller *hose, int bus,
142 extern int early_write_config_word(struct pci_controller *hose, int bus,
144 extern int early_write_config_dword(struct pci_controller *hose, int bus,
147 extern int early_find_capability(struct pci_controller *hose, int bus,
154 extern int indirect_read_config(struct pci_bus *bus, unsigned int devfn,
[all …]
Dpmac_low_i2c.h69 extern struct device_node *pmac_i2c_get_controller(struct pmac_i2c_bus *bus);
70 extern struct device_node *pmac_i2c_get_bus_node(struct pmac_i2c_bus *bus);
71 extern int pmac_i2c_get_type(struct pmac_i2c_bus *bus);
72 extern int pmac_i2c_get_flags(struct pmac_i2c_bus *bus);
73 extern int pmac_i2c_get_channel(struct pmac_i2c_bus *bus);
76 extern struct i2c_adapter *pmac_i2c_get_adapter(struct pmac_i2c_bus *bus);
92 extern int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled);
93 extern void pmac_i2c_close(struct pmac_i2c_bus *bus);
94 extern int pmac_i2c_setmode(struct pmac_i2c_bus *bus, int mode);
95 extern int pmac_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize,
Dpci.h76 extern int pci_domain_nr(struct pci_bus *bus);
79 extern int pci_proc_domain(struct pci_bus *bus);
89 extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
91 extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
93 extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
119 extern void pcibios_finish_adding_to_bus(struct pci_bus *bus);
127 struct pci_bus *bus, int devfn);
131 extern void of_scan_bus(struct device_node *node, struct pci_bus *bus);
132 extern void of_rescan_bus(struct device_node *node, struct pci_bus *bus);
146 extern void pcibios_setup_bus_devices(struct pci_bus *bus);
[all …]
/linux-4.4.14/drivers/net/ethernet/hisilicon/
Dhns_mdio.c175 static int hns_mdio_wait_ready(struct mii_bus *bus) in hns_mdio_wait_ready() argument
177 struct hns_mdio_device *mdio_dev = bus->priv; in hns_mdio_wait_ready()
219 static int hns_mdio_write(struct mii_bus *bus, in hns_mdio_write() argument
223 struct hns_mdio_device *mdio_dev = (struct hns_mdio_device *)bus->priv; in hns_mdio_write()
230 dev_dbg(&bus->dev, "mdio write %s,base is %p\n", in hns_mdio_write()
231 bus->id, mdio_dev->vbase); in hns_mdio_write()
232 dev_dbg(&bus->dev, "phy id=%d, is_c45=%d, devad=%d, reg=%#x, write data=%d\n", in hns_mdio_write()
236 ret = hns_mdio_wait_ready(bus); in hns_mdio_write()
238 dev_err(&bus->dev, "MDIO bus is busy\n"); in hns_mdio_write()
254 ret = hns_mdio_wait_ready(bus); in hns_mdio_write()
[all …]
/linux-4.4.14/Documentation/devicetree/bindings/arm/omap/
Dl4.txt3 These bindings describe the OMAP SoCs L4 interconnect bus.
6 - compatible : Should be "ti,omap2-l4" for OMAP2 family l4 core bus
7 Should be "ti,omap2-l4-wkup" for OMAP2 family l4 wkup bus
8 Should be "ti,omap3-l4-core" for OMAP3 family l4 core bus
9 Should be "ti,omap4-l4-cfg" for OMAP4 family l4 cfg bus
10 Should be "ti,omap4-l4-wkup" for OMAP4 family l4 wkup bus
11 Should be "ti,omap5-l4-cfg" for OMAP5 family l4 cfg bus
12 Should be "ti,omap5-l4-wkup" for OMAP5 family l4 wkup bus
13 Should be "ti,dra7-l4-cfg" for DRA7 family l4 cfg bus
14 Should be "ti,dra7-l4-wkup" for DRA7 family l4 wkup bus
[all …]
/linux-4.4.14/Documentation/driver-model/
Dbus.txt8 int bus_register(struct bus_type * bus);
14 Each bus type in the kernel (PCI, USB, etc) should declare one static
31 When a bus driver is initialized, it calls bus_register. This
32 initializes the rest of the fields in the bus object and inserts it
33 into a global list of bus types. Once the bus object is registered,
34 the fields in it are usable by the bus driver.
44 them are inherently bus-specific. Drivers typically declare an array
45 of device IDs of devices they support that reside in a bus-specific
48 The purpose of the match callback is to give the bus an opportunity to
51 particular device, without sacrificing bus-specific functionality or
[all …]
Dporting.txt15 at the bus driver layer. This was intentional, to minimize the
17 of bus drivers.
20 be embedded in larger, bus-specific objects. Fields in these generic
21 objects can replace fields in the bus-specific objects.
35 Step 1: Registering the bus driver.
38 - Define a struct bus_type for the bus driver.
45 - Register the bus type.
46 This should be done in the initialization function for the bus type,
57 The bus type may be unregistered (if the bus driver may be compiled
63 - Export the bus type for others to use.
[all …]
/linux-4.4.14/include/linux/
Dpci-acpi.h29 struct pci_bus *pbus = pdev->bus; in acpi_find_root_bridge_handle()
79 void acpi_pci_add_bus(struct pci_bus *bus);
80 void acpi_pci_remove_bus(struct pci_bus *bus);
84 void acpi_pci_slot_enumerate(struct pci_bus *bus);
85 void acpi_pci_slot_remove(struct pci_bus *bus);
88 static inline void acpi_pci_slot_enumerate(struct pci_bus *bus) { } in acpi_pci_slot_enumerate() argument
89 static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } in acpi_pci_slot_remove() argument
94 void acpiphp_enumerate_slots(struct pci_bus *bus);
95 void acpiphp_remove_slots(struct pci_bus *bus);
99 static inline void acpiphp_enumerate_slots(struct pci_bus *bus) { } in acpiphp_enumerate_slots() argument
[all …]
Dpci.h49 #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn)) argument
55 struct pci_bus *bus; /* The bus this slot is on */ member
260 struct pci_bus *bus; /* bus this device is on */ member
399 struct pci_dev *pci_alloc_dev(struct pci_bus *bus);
411 struct pci_bus *bus; /* root bus */ member
426 struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
524 if (pci_is_root_bus(dev->bus)) in pci_upstream_bridge()
527 return dev->bus->self; in pci_upstream_bridge()
582 void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where);
583 int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val);
[all …]
/linux-4.4.14/arch/sh/drivers/pci/
Dops-sh7786.c23 struct pci_bus *bus, unsigned int devfn, int where, u32 *data) in sh7786_pcie_config_access() argument
25 struct pci_channel *chan = bus->sysdata; in sh7786_pcie_config_access()
30 type = !!bus->parent; in sh7786_pcie_config_access()
33 if (bus->number > 255 || dev > 31 || func > 7) in sh7786_pcie_config_access()
51 if (pci_is_root_bus(bus)) { in sh7786_pcie_config_access()
67 pci_write_reg(chan, (bus->number << 24) | (dev << 19) | in sh7786_pcie_config_access()
92 static int sh7786_pcie_read(struct pci_bus *bus, unsigned int devfn, in sh7786_pcie_read() argument
105 ret = sh7786_pcie_config_access(PCI_ACCESS_READ, bus, in sh7786_pcie_read()
119 dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x " in sh7786_pcie_read()
120 "where=0x%04x size=%d val=0x%08lx\n", bus->number, in sh7786_pcie_read()
[all …]
Dpci.c43 struct pci_bus *bus; in pcibios_scanbus() local
55 bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose, in pcibios_scanbus()
57 hose->bus = bus; in pcibios_scanbus()
62 if (!bus) { in pcibios_scanbus()
67 next_busno = bus->busn_res.end + 1; in pcibios_scanbus()
75 pci_bus_size_bridges(bus); in pcibios_scanbus()
76 pci_bus_assign_resources(bus); in pcibios_scanbus()
77 pci_bus_add_devices(bus); in pcibios_scanbus()
161 void pcibios_fixup_bus(struct pci_bus *bus) in pcibios_fixup_bus() argument
225 pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask, in pcibios_bus_report_status() argument
[all …]
Dops-sh4.c19 #define CONFIG_CMD(bus, devfn, where) \ argument
20 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
25 static int sh4_pci_read(struct pci_bus *bus, unsigned int devfn, in sh4_pci_read() argument
28 struct pci_channel *chan = bus->sysdata; in sh4_pci_read()
37 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_read()
63 static int sh4_pci_write(struct pci_bus *bus, unsigned int devfn, in sh4_pci_write() argument
66 struct pci_channel *chan = bus->sysdata; in sh4_pci_write()
72 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_write()
Dcommon.c14 static struct pci_bus bus; in fake_pci_dev() local
16 dev.bus = &bus; in fake_pci_dev()
19 bus.number = busnr; in fake_pci_dev()
20 bus.sysdata = hose; in fake_pci_dev()
21 bus.ops = hose->pci_ops; in fake_pci_dev()
25 bus.parent = &bus; in fake_pci_dev()
27 bus.parent = NULL; in fake_pci_dev()
34 int top_bus, int bus, int devfn, int offset, type value) \
37 fake_pci_dev(hose, top_bus, bus, devfn), \
/linux-4.4.14/drivers/usb/core/
Dusb.c282 hcd = bus_to_hcd(udev->bus); in usb_release_dev()
299 if (add_uevent_var(env, "BUSNUM=%03d", usb_dev->bus->busnum)) in usb_dev_uevent()
382 usb_dev->bus->busnum, usb_dev->devnum); in usb_devnode()
397 static unsigned usb_bus_is_wusb(struct usb_bus *bus) in usb_bus_is_wusb() argument
399 struct usb_hcd *hcd = container_of(bus, struct usb_hcd, self); in usb_bus_is_wusb()
420 struct usb_bus *bus, unsigned port1) in usb_alloc_dev() argument
423 struct usb_hcd *usb_hcd = bus_to_hcd(bus); in usb_alloc_dev()
437 usb_put_hcd(bus_to_hcd(bus)); in usb_alloc_dev()
443 dev->dev.bus = &usb_bus_type; in usb_alloc_dev()
446 dev->dev.dma_mask = bus->controller->dma_mask; in usb_alloc_dev()
[all …]
/linux-4.4.14/arch/frv/mb93090-mb00/
Dpci-vdk.c57 #define CONFIG_CMD(bus, dev, where) \ argument
58 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
96 static int pci_frv_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size, in pci_frv_read_config() argument
101 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_read_config()
105 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_read_config()
129 static int pci_frv_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, in pci_frv_write_config() argument
134 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_write_config()
138 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_write_config()
144 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_write_config()
148 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_write_config()
[all …]
/linux-4.4.14/arch/powerpc/platforms/pseries/
Dpci.c102 && dev->bus->number == 0 && dev->devfn == 0x81) in fixup_winbond_82c105()
116 struct pci_bus *bus; in pseries_root_bridge_prepare() local
120 bus = bridge->bus; in pseries_root_bridge_prepare()
122 dn = pcibios_get_phb_of_node(bus); in pseries_root_bridge_prepare()
143 bus->max_bus_speed = PCIE_SPEED_2_5GT; in pseries_root_bridge_prepare()
146 bus->max_bus_speed = PCIE_SPEED_5_0GT; in pseries_root_bridge_prepare()
149 bus->max_bus_speed = PCIE_SPEED_8_0GT; in pseries_root_bridge_prepare()
152 bus->max_bus_speed = PCI_SPEED_UNKNOWN; in pseries_root_bridge_prepare()
158 bus->cur_bus_speed = PCIE_SPEED_2_5GT; in pseries_root_bridge_prepare()
161 bus->cur_bus_speed = PCIE_SPEED_5_0GT; in pseries_root_bridge_prepare()
[all …]
Dpci_dlpar.c38 find_bus_among_children(struct pci_bus *bus, in find_bus_among_children() argument
45 busdn = pci_bus_to_OF_node(bus); in find_bus_among_children()
47 return bus; in find_bus_among_children()
49 list_for_each_entry(tmp, &bus->children, node) { in find_bus_among_children()
62 if (!pdn || !pdn->phb || !pdn->phb->bus) in pcibios_find_pci_bus()
65 return find_bus_among_children(pdn->phb->bus, dn); in pcibios_find_pci_bus()
91 pcibios_finish_adding_to_bus(phb->bus); in init_phb_dynamic()
100 struct pci_bus *b = phb->bus; in remove_phb_dynamic()
125 phb->bus = NULL; in remove_phb_dynamic()
/linux-4.4.14/drivers/pci/host/
Dpcie-iproc.c81 static inline struct iproc_pcie *iproc_data(struct pci_bus *bus) in iproc_data() argument
85 struct pci_sys_data *sys = bus->sysdata; in iproc_data()
89 pcie = bus->sysdata; in iproc_data()
98 static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, in iproc_pcie_map_cfg_bus() argument
102 struct iproc_pcie *pcie = iproc_data(bus); in iproc_pcie_map_cfg_bus()
105 unsigned busno = bus->number; in iproc_pcie_map_cfg_bus()
156 static int iproc_pcie_check_link(struct iproc_pcie *pcie, struct pci_bus *bus) in iproc_pcie_check_link() argument
170 pci_bus_read_config_byte(bus, 0, PCI_HEADER_TYPE, &hdr_type); in iproc_pcie_check_link()
180 pci_bus_read_config_dword(bus, 0, PCI_BRIDGE_CTRL_REG_OFFSET, &class); in iproc_pcie_check_link()
183 pci_bus_write_config_dword(bus, 0, PCI_BRIDGE_CTRL_REG_OFFSET, class); in iproc_pcie_check_link()
[all …]
Dpcie-altera.c55 #define TLP_CFG_DW2(bus, devfn, offset) \ argument
56 (((bus) << 24) | ((devfn) << 16) | (offset))
57 #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn)) argument
112 static bool altera_pcie_hide_rc_bar(struct pci_bus *bus, unsigned int devfn, in altera_pcie_hide_rc_bar() argument
115 if (pci_is_root_bus(bus) && (devfn == 0) && in altera_pcie_hide_rc_bar()
147 struct pci_bus *bus, int dev) in altera_pcie_valid_config() argument
150 if (bus->number != pcie->root_bus_nr) { in altera_pcie_valid_config()
156 if (bus->number == pcie->root_bus_nr && dev > 0) in altera_pcie_valid_config()
163 if (bus->primary == pcie->root_bus_nr && dev > 0) in altera_pcie_valid_config()
235 static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_read() argument
[all …]
/linux-4.4.14/arch/powerpc/platforms/maple/
Dpci.c91 static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) in u3_agp_cfa1() argument
93 return ((unsigned long)bus << 16) | in u3_agp_cfa1()
100 u8 bus, u8 dev_fn, u8 offset) in u3_agp_cfg_access() argument
104 if (bus == hose->first_busno) { in u3_agp_cfg_access()
109 caddr = u3_agp_cfa1(bus, dev_fn, offset); in u3_agp_cfg_access()
120 static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_read_config() argument
126 hose = pci_bus_to_host(bus); in u3_agp_read_config()
130 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_read_config()
151 static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_write_config() argument
157 hose = pci_bus_to_host(bus); in u3_agp_write_config()
[all …]
/linux-4.4.14/arch/sparc/kernel/
Dpci_common.c19 unsigned long bus, in config_out_of_range() argument
23 if (bus < pbm->pci_first_busno || in config_out_of_range()
24 bus > pbm->pci_last_busno) in config_out_of_range()
30 unsigned long bus, in sun4u_config_mkaddr() argument
36 if (config_out_of_range(pbm, bus, devfn, reg)) in sun4u_config_mkaddr()
41 bus <<= rbits + 8; in sun4u_config_mkaddr()
43 return (void *) (pbm->config_space | bus | devfn | reg); in sun4u_config_mkaddr()
52 unsigned char bus, unsigned int devfn, in sun4u_read_pci_cfg_host() argument
59 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg_host()
94 sun4u_read_pci_cfg_host(pbm, bus, devfn, in sun4u_read_pci_cfg_host()
[all …]
Dpci.c250 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument
258 dev = pci_alloc_dev(bus); in of_create_pci_dev()
286 dev->dev.parent = bus->bridge; in of_create_pci_dev()
287 dev->dev.bus = &pci_bus_type; in of_create_pci_dev()
313 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), in of_create_pci_dev()
314 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev()
351 pci_device_add(dev, bus); in of_create_pci_dev()
379 struct pci_bus *bus, in apb_fake_ranges() argument
389 res = bus->resource[0]; in apb_fake_ranges()
393 pcibios_bus_to_resource(dev->bus, res, &region); in apb_fake_ranges()
[all …]
/linux-4.4.14/drivers/media/v4l2-core/
Dv4l2-of.c26 struct v4l2_of_bus_mipi_csi2 *bus = &endpoint->bus.mipi_csi2; in v4l2_of_parse_csi_bus() local
37 for (i = 0; i < ARRAY_SIZE(bus->data_lanes); i++) { in v4l2_of_parse_csi_bus()
41 bus->data_lanes[i] = v; in v4l2_of_parse_csi_bus()
43 bus->num_data_lanes = i; in v4l2_of_parse_csi_bus()
51 for (i = 0; i < ARRAY_SIZE(bus->lane_polarities); i++) { in v4l2_of_parse_csi_bus()
55 bus->lane_polarities[i] = v; in v4l2_of_parse_csi_bus()
58 if (i < 1 + bus->num_data_lanes /* clock + data */) { in v4l2_of_parse_csi_bus()
60 node->full_name, 1 + bus->num_data_lanes, i); in v4l2_of_parse_csi_bus()
66 bus->clock_lane = v; in v4l2_of_parse_csi_bus()
72 else if (have_clk_lane || bus->num_data_lanes > 0) in v4l2_of_parse_csi_bus()
[all …]
/linux-4.4.14/arch/sh/include/asm/
Dpci.h18 struct pci_bus *bus; member
47 int bus, int devfn, int offset, u8 *value);
49 int bus, int devfn, int offset, u16 *value);
51 int bus, int devfn, int offset, u32 *value);
53 int bus, int devfn, int offset, u8 value);
55 int bus, int devfn, int offset, u16 value);
57 int bus, int devfn, int offset, u32 value);
94 #define pci_domain_nr(bus) ((struct pci_channel *)(bus)->sysdata)->index argument
96 static inline int pci_proc_domain(struct pci_bus *bus) in pci_proc_domain() argument
98 struct pci_channel *hose = bus->sysdata; in pci_proc_domain()
/linux-4.4.14/arch/mips/lib/
Diomap-pci.c16 struct pci_controller *ctrl = dev->bus->sysdata; in __pci_ioport_map()
21 struct pci_bus *bus = dev->bus; in __pci_ioport_map() local
24 while (bus->parent) in __pci_ioport_map()
25 bus = bus->parent; in __pci_ioport_map()
29 sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); in __pci_ioport_map()
/linux-4.4.14/drivers/zorro/
Dzorro.c130 struct zorro_bus *bus; in amiga_zorro_probe() local
138 bus = kzalloc(sizeof(*bus) + in amiga_zorro_probe()
139 zorro_num_autocon * sizeof(bus->devices[0]), in amiga_zorro_probe()
141 if (!bus) in amiga_zorro_probe()
144 zorro_autocon = bus->devices; in amiga_zorro_probe()
145 bus->dev.parent = &pdev->dev; in amiga_zorro_probe()
146 dev_set_name(&bus->dev, zorro_bus_type.name); in amiga_zorro_probe()
147 error = device_register(&bus->dev); in amiga_zorro_probe()
150 put_device(&bus->dev); in amiga_zorro_probe()
151 kfree(bus); in amiga_zorro_probe()
[all …]
/linux-4.4.14/Documentation/ABI/testing/
Dsysfs-platform-chipidea-usb-otg1 What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
6 Set a_bus_req(A-device bus request) input to be 1 if
7 the application running on the A-device wants to use the bus,
9 the bus(or wants to work as peripheral). a_bus_req can also
11 from the B-device, the A-device should decide to resume the bus.
16 is using the bus as host role, otherwise 0.
18 What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
23 The a_bus_drop(A-device bus drop) input is 1 when the
25 the bus, and is 0 otherwise, When a_bus_drop is 1, then
30 Reading: returns 1 if the bus is off(vbus is turned off) by
[all …]
Dsysfs-bus-coresight-devices-etm4x1 What: /sys/bus/coresight/devices/<memory_map>.etm/enable_source
11 What: /sys/bus/coresight/devices/<memory_map>.etm/cpu
17 What: /sys/bus/coresight/devices/<memory_map>.etm/nr_pe_cmp
24 What: /sys/bus/coresight/devices/<memory_map>.etm/nr_addr_cmp
31 What: /sys/bus/coresight/devices/<memory_map>.etm/nr_cntr
38 What: /sys/bus/coresight/devices/<memory_map>.etm/nr_ext_inp
44 What: /sys/bus/coresight/devices/<memory_map>.etm/numcidc
51 What: /sys/bus/coresight/devices/<memory_map>.etm/numvmidc
58 What: /sys/bus/coresight/devices/<memory_map>.etm/nrseqstate
65 What: /sys/bus/coresight/devices/<memory_map>.etm/nr_resource
[all …]
Dsysfs-driver-wacom1 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed
6 The /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed file
12 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/led
23 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance
32 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance
40 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select
49 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select
57 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/buttons_luminance
64 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/button<n>_rawimg
81 What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/unpair_remote
[all …]
Dsysfs-bus-iio1 What: /sys/bus/iio/devices/iio:deviceX
9 What: /sys/bus/iio/devices/triggerX
22 What: /sys/bus/iio/devices/iio:deviceX/buffer
28 What: /sys/bus/iio/devices/iio:deviceX/name
35 What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency
36 What: /sys/bus/iio/devices/iio:deviceX/buffer/sampling_frequency
37 What: /sys/bus/iio/devices/triggerX/sampling_frequency
50 What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
52 What: /sys/bus/iio/devices/triggerX/sampling_frequency_available
59 What: /sys/bus/iio/devices/iio:deviceX/oversampling_ratio
[all …]
/linux-4.4.14/sound/pci/ac97/
Dac97_pcm.c300 tmp = (rate * ac97->bus->clock) / 48000; in snd_ac97_set_rate()
446 int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, in snd_ac97_pcm_assign() argument
467 codec = bus->codec[i]; in snd_ac97_pcm_assign()
474 if (bus->codec[j]) in snd_ac97_pcm_assign()
492 rpcm->bus = bus; in snd_ac97_pcm_assign()
496 if (!bus->codec[j]) in snd_ac97_pcm_assign()
516 rpcm->r[0].codec[j] = bus->codec[j]; in snd_ac97_pcm_assign()
518 if (bus->no_vra) in snd_ac97_pcm_assign()
531 bus->codec[0] && (bus->codec[0]->flags & AC97_DOUBLE_RATE) && in snd_ac97_pcm_assign()
539 rpcm->r[1].codec[0] = bus->codec[0]; in snd_ac97_pcm_assign()
[all …]
/linux-4.4.14/arch/x86/include/asm/
Dpci.h32 static inline int pci_domain_nr(struct pci_bus *bus) in pci_domain_nr() argument
34 struct pci_sysdata *sd = bus->sysdata; in pci_domain_nr()
38 static inline int pci_proc_domain(struct pci_bus *bus) in pci_proc_domain() argument
40 return pci_domain_nr(bus); in pci_proc_domain()
68 void pcibios_scan_root(int bus);
116 static inline int __pcibus_to_node(const struct pci_bus *bus) in __pcibus_to_node() argument
118 const struct pci_sysdata *sd = bus->sysdata; in __pcibus_to_node()
124 cpumask_of_pcibus(const struct pci_bus *bus) in cpumask_of_pcibus() argument
128 node = __pcibus_to_node(bus); in cpumask_of_pcibus()
140 unsigned long bus; member
Dpci-direct.h9 extern u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset);
10 extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset);
11 extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset);
12 extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val);
13 extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val);
14 extern void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val);
19 extern void early_dump_pci_device(u8 bus, u8 slot, u8 func);
Dpci_64.h7 static inline void *pci_iommu(struct pci_bus *bus) in pci_iommu() argument
9 struct pci_sysdata *sd = bus->sysdata; in pci_iommu()
13 static inline void set_pci_iommu(struct pci_bus *bus, void *val) in set_pci_iommu() argument
15 struct pci_sysdata *sd = bus->sysdata; in set_pci_iommu()
20 extern int (*pci_config_read)(int seg, int bus, int dev, int fn,
22 extern int (*pci_config_write)(int seg, int bus, int dev, int fn,
/linux-4.4.14/drivers/parisc/
Ddino.c164 #define DINO_CFG_TOK(bus,dfn,pos) ((u32) ((bus)<<16 | (dfn)<<8 | (pos))) argument
173 static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, in dino_cfg_read() argument
176 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); in dino_cfg_read()
177 u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; in dino_cfg_read()
208 static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, in dino_cfg_write() argument
211 struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); in dino_cfg_write()
212 u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; in dino_cfg_write()
458 dino_card_setup(struct pci_bus *bus, void __iomem *base_addr) in dino_card_setup() argument
461 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); in dino_card_setup()
469 dev_name(bus->bridge)); in dino_card_setup()
[all …]
/linux-4.4.14/drivers/media/usb/em28xx/
Dem28xx-i2c.c500 unsigned bus = i2c_bus->bus; in em28xx_i2c_xfer() local
515 if (bus != dev->cur_i2c_bus && in em28xx_i2c_xfer()
517 if (bus == 1) in em28xx_i2c_xfer()
523 dev->cur_i2c_bus = bus; in em28xx_i2c_xfer()
616 static int em28xx_i2c_read_block(struct em28xx *dev, unsigned bus, u16 addr, in em28xx_i2c_read_block() argument
628 ret = i2c_master_send(&dev->i2c_client[bus], buf + !addr_w16, 1 + addr_w16); in em28xx_i2c_read_block()
642 ret = i2c_master_recv(&dev->i2c_client[bus], data, rsize); in em28xx_i2c_read_block()
653 static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, in em28xx_i2c_eeprom() argument
671 dev->i2c_client[bus].addr = 0xa0 >> 1; in em28xx_i2c_eeprom()
674 err = i2c_master_recv(&dev->i2c_client[bus], &buf, 0); in em28xx_i2c_eeprom()
[all …]
/linux-4.4.14/arch/alpha/include/asm/
Dpci.h26 struct pci_bus *bus; member
82 #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index argument
84 static inline int pci_proc_domain(struct pci_bus *bus) in pci_proc_domain() argument
86 struct pci_controller *hose = bus->sysdata; in pci_proc_domain()
103 extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
105 extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
107 extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
110 extern void pci_adjust_legacy_attr(struct pci_bus *bus,
/linux-4.4.14/arch/microblaze/include/asm/
Dpci-bridge.h30 struct pci_bus *bus; member
95 static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) in pci_bus_to_host() argument
97 return bus->sysdata; in pci_bus_to_host()
111 extern int early_read_config_byte(struct pci_controller *hose, int bus,
113 extern int early_read_config_word(struct pci_controller *hose, int bus,
115 extern int early_read_config_dword(struct pci_controller *hose, int bus,
117 extern int early_write_config_byte(struct pci_controller *hose, int bus,
119 extern int early_write_config_word(struct pci_controller *hose, int bus,
121 extern int early_write_config_dword(struct pci_controller *hose, int bus,
124 extern int early_find_capability(struct pci_controller *hose, int bus,
Dpci.h45 extern int pci_domain_nr(struct pci_bus *bus);
48 extern int pci_proc_domain(struct pci_bus *bus);
58 extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
60 extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
62 extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
76 extern void pcibios_finish_adding_to_bus(struct pci_bus *bus);
91 extern void pcibios_setup_bus_devices(struct pci_bus *bus);
92 extern void pcibios_setup_bus_self(struct pci_bus *bus);
/linux-4.4.14/drivers/of/unittest-data/
Dtests-overlay.dtsi6 /* test bus */
7 unittestbus: test-bus {
8 compatible = "simple-bus";
72 i2c-test-bus {
73 compatible = "unittest-i2c-bus";
119 target-path = "/testcase-data/overlay-node/test-bus/test-unittest0";
129 target-path = "/testcase-data/overlay-node/test-bus/test-unittest1";
178 target-path = "/testcase-data/overlay-node/test-bus/test-unittest5";
188 target-path = "/testcase-data/overlay-node/test-bus/test-unittest6";
196 target-path = "/testcase-data/overlay-node/test-bus/test-unittest7";
[all …]
/linux-4.4.14/arch/ia64/pci/
Dpci.c40 #define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ argument
41 (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg))
45 #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ argument
46 (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg))
48 int raw_pci_read(unsigned int seg, unsigned int bus, unsigned int devfn, in raw_pci_read() argument
54 if (!value || (seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) in raw_pci_read()
58 addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg); in raw_pci_read()
61 addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg); in raw_pci_read()
75 int raw_pci_write(unsigned int seg, unsigned int bus, unsigned int devfn, in raw_pci_write() argument
81 if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) in raw_pci_write()
[all …]
Dfixup.c33 struct pci_bus *bus; in pci_fixup_video() local
42 bus = pdev->bus; in pci_fixup_video()
43 while (bus) { in pci_fixup_video()
44 bridge = bus->self; in pci_fixup_video()
59 bus = bus->parent; in pci_fixup_video()
/linux-4.4.14/include/linux/ssb/
Dssb_embedded.h8 extern int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks);
11 u32 ssb_gpio_in(struct ssb_bus *bus, u32 mask);
12 u32 ssb_gpio_out(struct ssb_bus *bus, u32 mask, u32 value);
13 u32 ssb_gpio_outen(struct ssb_bus *bus, u32 mask, u32 value);
14 u32 ssb_gpio_control(struct ssb_bus *bus, u32 mask, u32 value);
15 u32 ssb_gpio_intmask(struct ssb_bus *bus, u32 mask, u32 value);
16 u32 ssb_gpio_polarity(struct ssb_bus *bus, u32 mask, u32 value);
/linux-4.4.14/Documentation/devicetree/bindings/i2c/
Di2c-mux-pinctrl.txt3 This binding describes an I2C bus multiplexer that uses pin multiplexing to
12 | +---+ +------+ | child bus A, on first set of pins
14 | +---+ +------+ | child bus B, on second set of pins
23 - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
29 bus. See ../pinctrl/pinctrl-bindings.txt.
33 * I2C child bus nodes. See mux.txt in this directory.
35 For each named state defined in the pinctrl-names property, an I2C child bus
36 will be created. I2C child bus numbers are assigned based on the index into
39 The only exception is that no bus will be created for a state named "idle". If
43 pinctrl-names = "ddc", "pta", "idle" -> ddc = bus 0, pta = bus 1
[all …]
/linux-4.4.14/arch/arm/kernel/
Dbios32.c25 static void pcibios_bus_report_status(struct pci_bus *bus, u_int status_mask, int warn) in pcibios_bus_report_status() argument
29 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_bus_report_status()
36 if (dev->bus->number == 0 && dev->devfn == 0) in pcibios_bus_report_status()
53 list_for_each_entry(dev, &bus->devices, bus_list) in pcibios_bus_report_status()
60 struct pci_bus *bus; in pcibios_report_status() local
62 list_for_each_entry(bus, &pci_root_buses, node) in pcibios_report_status()
63 pcibios_bus_report_status(bus, status_mask, warn); in pcibios_report_status()
289 void pcibios_fixup_bus(struct pci_bus *bus) in pcibios_fixup_bus() argument
298 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_fixup_bus()
334 list_for_each_entry(dev, &bus->devices, bus_list) { in pcibios_fixup_bus()
[all …]
/linux-4.4.14/drivers/pci/pcie/
Dpme.c78 static bool pcie_pme_walk_bus(struct pci_bus *bus) in pcie_pme_walk_bus() argument
83 list_for_each_entry(dev, &bus->devices, bus_list) { in pcie_pme_walk_bus()
110 static bool pcie_pme_from_pci_bridge(struct pci_bus *bus, u8 devfn) in pcie_pme_from_pci_bridge() argument
118 dev = pci_dev_get(bus->self); in pcie_pme_from_pci_bridge()
124 if (pcie_pme_walk_bus(bus)) in pcie_pme_from_pci_bridge()
141 struct pci_bus *bus; in pcie_pme_handle_request() local
146 if (port->devfn == devfn && port->bus->number == busnr) { in pcie_pme_handle_request()
170 bus = pci_find_bus(pci_domain_nr(port->bus), busnr); in pcie_pme_handle_request()
171 if (!bus) in pcie_pme_handle_request()
175 found = pcie_pme_from_pci_bridge(bus, devfn); in pcie_pme_handle_request()
[all …]
/linux-4.4.14/Documentation/usb/
Dchipidea.txt27 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
31 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
37 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
47 if A-device wants to use bus:
49 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
50 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
52 if B-device wants to use bus:
54 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
56 7) A-device power down the bus.
58 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
[all …]
/linux-4.4.14/drivers/net/ethernet/ti/
Ddavinci_mdio.c96 struct mii_bus *bus; member
137 static int davinci_mdio_reset(struct mii_bus *bus) in davinci_mdio_reset() argument
139 struct davinci_mdio_data *data = bus->priv; in davinci_mdio_reset()
166 data->bus->phy_mask = phy_mask; in davinci_mdio_reset()
219 static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in davinci_mdio_read() argument
221 struct davinci_mdio_data *data = bus->priv; in davinci_mdio_read()
263 static int davinci_mdio_write(struct mii_bus *bus, int phy_id, in davinci_mdio_write() argument
266 struct davinci_mdio_data *data = bus->priv; in davinci_mdio_write()
336 data->bus = devm_mdiobus_alloc(dev); in davinci_mdio_probe()
337 if (!data->bus) { in davinci_mdio_probe()
[all …]
/linux-4.4.14/Documentation/devicetree/bindings/bus/
Dsimple-pm-bus.txt4 A Simple Power-Managed Bus is a transparent bus that doesn't need a real
7 However, its bus controller is part of a PM domain, or under the control of a
8 functional clock. Hence, the bus controller's PM domain and/or clock must be
9 enabled for child devices connected to the bus (either on-SoC or externally)
12 While "simple-pm-bus" follows the "simple-bus" set of properties, as specified
13 in ePAPR, it is not an extension of "simple-bus".
17 - compatible: Must contain at least "simple-pm-bus".
18 Must not contain "simple-bus".
34 bsc: bus@fec10000 {
36 "simple-pm-bus";
/linux-4.4.14/drivers/xen/xenbus/
Dxenbus_probe.c136 struct xen_bus_type *bus = in watch_otherend() local
137 container_of(dev->dev.bus, struct xen_bus_type, bus); in watch_otherend()
140 bus->otherend_changed, in watch_otherend()
301 struct xen_bus_type *bus, in xenbus_register_driver_common() argument
305 drv->driver.bus = &bus->bus; in xenbus_register_driver_common()
338 struct bus_type *bus) in xenbus_device_find() argument
342 bus_for_each_dev(bus, NULL, &info, cmp_dev); in xenbus_device_find()
367 static void xenbus_cleanup_devices(const char *path, struct bus_type *bus) in xenbus_cleanup_devices() argument
373 bus_for_each_dev(bus, NULL, &info, cleanup_dev); in xenbus_cleanup_devices()
404 return sprintf(buf, "%s:%s\n", dev->bus->name, in modalias_show()
[all …]
/linux-4.4.14/include/linux/bcma/
Dbcma.h259 struct bcma_bus *bus; member
322 int (*sprom_callback)(struct bcma_bus *bus,
365 return core->bus->ops->read8(core, offset); in bcma_read8()
369 return core->bus->ops->read16(core, offset); in bcma_read16()
373 return core->bus->ops->read32(core, offset); in bcma_read32()
378 core->bus->ops->write8(core, offset, value); in bcma_write8()
383 core->bus->ops->write16(core, offset, value); in bcma_write16()
388 core->bus->ops->write32(core, offset, value); in bcma_write32()
394 core->bus->ops->block_read(core, buffer, count, offset, reg_width); in bcma_block_read()
400 core->bus->ops->block_write(core, buffer, count, offset, reg_width); in bcma_block_write()
[all …]
/linux-4.4.14/arch/unicore32/kernel/
Dpci.c25 #define CONFIG_CMD(bus, devfn, where) \ argument
26 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
29 puv3_read_config(struct pci_bus *bus, unsigned int devfn, int where, in puv3_read_config() argument
32 writel(CONFIG_CMD(bus, devfn, where), PCICFG_ADDR); in puv3_read_config()
48 puv3_write_config(struct pci_bus *bus, unsigned int devfn, int where, in puv3_write_config() argument
51 writel(CONFIG_CMD(bus, devfn, where), PCICFG_ADDR); in puv3_write_config()
106 if (dev->bus->number == 0) { in pci_puv3_map_irq()
170 void pcibios_fixup_bus(struct pci_bus *bus) in pcibios_fixup_bus() argument
177 bus->resource[0] = &ioport_resource; in pcibios_fixup_bus()
178 bus->resource[1] = &iomem_resource; in pcibios_fixup_bus()
[all …]
/linux-4.4.14/drivers/net/wireless/b43/
Dbus.c112 bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4716) in b43_bus_dev_bcma_init()
120 dev->board_vendor = core->bus->boardinfo.vendor; in b43_bus_dev_bcma_init()
121 dev->board_type = core->bus->boardinfo.type; in b43_bus_dev_bcma_init()
122 dev->board_rev = core->bus->sprom.board_rev; in b43_bus_dev_bcma_init()
124 dev->chip_id = core->bus->chipinfo.id; in b43_bus_dev_bcma_init()
125 dev->chip_rev = core->bus->chipinfo.rev; in b43_bus_dev_bcma_init()
126 dev->chip_pkg = core->bus->chipinfo.pkg; in b43_bus_dev_bcma_init()
128 dev->bus_sprom = &core->bus->sprom; in b43_bus_dev_bcma_init()
141 return ssb_bus_may_powerdown(dev->sdev->bus); in b43_bus_ssb_bus_may_powerdown()
146 return ssb_bus_powerup(dev->sdev->bus, dynamic_pctl); in b43_bus_ssb_bus_powerup()
[all …]
/linux-4.4.14/drivers/sh/superhyway/
Dsuperhyway.c54 struct superhyway_bus *bus) in superhyway_add_device() argument
65 dev->bus = bus; in superhyway_add_device()
81 dev->dev.bus = &superhyway_bus_type; in superhyway_add_device()
93 int superhyway_add_devices(struct superhyway_bus *bus, in superhyway_add_devices() argument
101 ret |= superhyway_add_device(dev->resource[0].start, dev, bus); in superhyway_add_devices()
109 struct superhyway_bus *bus; in superhyway_init() local
116 for (bus = superhyway_channels; bus->ops; bus++) in superhyway_init()
117 ret |= superhyway_scan_bus(bus); in superhyway_init()
177 drv->drv.bus = &superhyway_bus_type; in superhyway_register_driver()
/linux-4.4.14/drivers/staging/iio/addac/
Dadt7316.c179 struct adt7316_bus bus; member
240 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG1, config1); in _adt7316_store_enabled()
305 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG1, config1); in adt7316_store_select_ex_temp()
346 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG2, config2); in adt7316_store_mode()
440 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG2, config2); in adt7316_store_ad_channel()
501 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG2, config2); in adt7316_store_disable_averaging()
540 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG2, config2); in adt7316_store_enable_smbus_timeout()
578 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG1, config1); in adt7316_store_powerdown()
616 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3); in adt7316_store_fast_ad_clock()
668 ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3); in adt7316_store_da_high_resolution()
[all …]
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
Dic.c30 probe_monitoring_device(struct nvkm_i2c_bus *bus, in probe_monitoring_device() argument
39 client = i2c_new_device(&bus->i2c, info); in probe_monitoring_device()
88 struct nvkm_i2c_bus *bus; in nvkm_therm_ic_ctor() local
91 bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_PRI); in nvkm_therm_ic_ctor()
92 if (!bus) in nvkm_therm_ic_ctor()
101 nvkm_i2c_bus_probe(bus, "monitoring device", board, in nvkm_therm_ic_ctor()
113 nvkm_i2c_bus_probe(bus, "monitoring device", board, in nvkm_therm_ic_ctor()
122 nvkm_i2c_bus_probe(bus, "monitoring device", nv_board_infos, in nvkm_therm_ic_ctor()
/linux-4.4.14/drivers/ipack/
Dipack.c213 struct ipack_bus_device *bus; in ipack_bus_register() local
215 bus = kzalloc(sizeof(struct ipack_bus_device), GFP_KERNEL); in ipack_bus_register()
216 if (!bus) in ipack_bus_register()
221 kfree(bus); in ipack_bus_register()
225 bus->bus_nr = bus_nr; in ipack_bus_register()
226 bus->parent = parent; in ipack_bus_register()
227 bus->slots = slots; in ipack_bus_register()
228 bus->ops = ops; in ipack_bus_register()
229 bus->owner = owner; in ipack_bus_register()
230 return bus; in ipack_bus_register()
[all …]

12345678910>>...17