Lines Matching +full:bus +full:- +full:num

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * init_ohci1394_dma.c - Initializes physical DMA on all OHCI 1394 controllers
5 * Copyright (C) 2006-2007 Bernhard Kaindl <bk@suse.de>
7 * Derived from drivers/ieee1394/ohci1394.c and arch/x86/kernel/early-quirks.c
9 * - scan the PCI very early on boot for all OHCI 1394-compliant controllers
10 * - reset and initialize them and make them join the IEEE1394 bus and
11 * - enable physical DMA on them to allow remote debugging
18 * be sure that the stack enables it and (re-)attach after the bus reset
28 #include <asm/pci-direct.h> /* for direct PCI config space access */
42 writel(data, ohci->registers + offset); in reg_write()
47 return readl(ohci->registers + offset); in reg_read()
52 /* Reads a PHY register of an OHCI-1394 controller */
70 /* Writes to a PHY register of an OHCI-1394 controller */
84 /* Resets an OHCI-1394 controller (for sane state before initialization) */
103 /* Basic OHCI-1394 register and port inititalization */
109 /* Put some defaults to these undefined bus options */ in init_ohci1394_initialize()
116 /* Set the bus number */ in init_ohci1394_initialize()
169 * init_ohci1394_wait_for_busresets - wait until bus resets are completed
171 * OHCI1394 initialization itself and any device going on- or offline
172 * and any cable issue cause a IEEE1394 bus reset. The OHCI1394 spec
173 * specifies that physical DMA is disabled on each bus reset and it
174 * has to be enabled after each bus reset when needed. We resort
191 * init_ohci1394_enable_physical_dma - Enable physical DMA for remote debugging
203 * init_ohci1394_reset_and_init_dma - init controller and enable DMA
222 * The initialization causes at least one IEEE1394 bus reset. Enabling in init_ohci1394_reset_and_init_dma()
223 * physical DMA only works *after* *all* bus resets have calmed down: in init_ohci1394_reset_and_init_dma()
232 * init_ohci1394_controller - Map the registers of the controller and init DMA
235 static inline void __init init_ohci1394_controller(int num, int slot, int func) in init_ohci1394_controller() argument
240 printk(KERN_INFO "init_ohci1394_dma: initializing OHCI-1394" in init_ohci1394_controller()
241 " at %02x:%02x.%x\n", num, slot, func); in init_ohci1394_controller()
243 ohci_base = read_pci_config(num, slot, func, PCI_BASE_ADDRESS_0+(0<<2)) in init_ohci1394_controller()
254 * init_ohci1394_dma_on_all_controllers - scan for OHCI1394 controllers and init DMA on them
259 int num, slot, func; in init_ohci1394_dma_on_all_controllers() local
266 for (num = 0; num < 32; num++) { in init_ohci1394_dma_on_all_controllers()
269 class = read_pci_config(num, slot, func, in init_ohci1394_dma_on_all_controllers()
275 continue; /* Not an OHCI-1394 device */ in init_ohci1394_dma_on_all_controllers()
277 init_ohci1394_controller(num, slot, func); in init_ohci1394_dma_on_all_controllers()
286 * setup_ohci1394_dma - enables early OHCI1394 DMA initialization