Home
last modified time | relevance | path

Searched refs:dev (Results 1 – 25 of 1604) sorted by relevance

12345678910>>...65

/arch/parisc/kernel/
Ddrivers.c50 static inline int check_dev(struct device *dev) in check_dev() argument
52 if (dev->bus == &parisc_bus_type) { in check_dev()
54 pdev = to_parisc_device(dev); in check_dev()
68 static int descend_children(struct device * dev, void * data) in descend_children() argument
72 if (recurse_data->fn(dev, recurse_data->obj)) in descend_children()
75 return device_for_each_child(dev, recurse_data, descend_children); in descend_children()
102 static int match_device(struct parisc_driver *driver, struct parisc_device *dev) in match_device() argument
108 (ids->sversion != dev->id.sversion)) in match_device()
112 (ids->hw_type != dev->id.hw_type)) in match_device()
116 (ids->hversion != dev->id.hversion)) in match_device()
[all …]
/arch/arm/include/asm/
Ddma-mapping.h19 static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) in __generic_dma_ops() argument
21 if (dev && dev->archdata.dma_ops) in __generic_dma_ops()
22 return dev->archdata.dma_ops; in __generic_dma_ops()
26 static inline struct dma_map_ops *get_dma_ops(struct device *dev) in get_dma_ops() argument
31 return __generic_dma_ops(dev); in get_dma_ops()
34 static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) in set_dma_ops() argument
36 BUG_ON(!dev); in set_dma_ops()
37 dev->archdata.dma_ops = ops; in set_dma_ops()
41 extern int dma_supported(struct device *dev, u64 mask);
53 static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) in pfn_to_dma() argument
[all …]
/arch/powerpc/platforms/
Dfsl_uli1575.c62 static void early_uli5249(struct pci_dev *dev) in early_uli5249() argument
69 pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO | in early_uli5249()
73 pci_read_config_byte(dev, 0x7c, &temp); in early_uli5249()
74 pci_write_config_byte(dev, 0x7c, 0x80); in early_uli5249()
77 pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01); in early_uli5249()
78 dev->class |= 0x1; in early_uli5249()
81 pci_write_config_byte(dev, 0x7c, temp); in early_uli5249()
85 static void quirk_uli1575(struct pci_dev *dev) in quirk_uli1575() argument
99 pci_write_config_byte(dev, 0x48 + i, val); in quirk_uli1575()
103 pci_write_config_byte(dev, 0x86, ULI_PIRQD); in quirk_uli1575()
[all …]
/arch/xtensa/platforms/iss/
Dsimdisk.c72 static void simdisk_transfer(struct simdisk *dev, unsigned long sector, in simdisk_transfer() argument
78 if (offset > dev->size || dev->size - offset < nbytes) { in simdisk_transfer()
84 spin_lock(&dev->lock); in simdisk_transfer()
88 simc_lseek(dev->fd, offset, SEEK_SET); in simdisk_transfer()
91 io = simc_write(dev->fd, buffer, nbytes); in simdisk_transfer()
93 io = simc_read(dev->fd, buffer, nbytes); in simdisk_transfer()
102 spin_unlock(&dev->lock); in simdisk_transfer()
107 struct simdisk *dev = q->queuedata; in simdisk_make_request() local
116 simdisk_transfer(dev, sector, len, buffer, in simdisk_make_request()
128 struct simdisk *dev = bdev->bd_disk->private_data; in simdisk_open() local
[all …]
/arch/arm/kernel/
Dbios32.c27 struct pci_dev *dev; in pcibios_bus_report_status() local
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()
39 pci_read_config_word(dev, PCI_STATUS, &status); in pcibios_bus_report_status()
47 pci_write_config_word(dev, PCI_STATUS, status & status_mask); in pcibios_bus_report_status()
50 printk("(%s: %04X) ", pci_name(dev), status); in pcibios_bus_report_status()
53 list_for_each_entry(dev, &bus->devices, bus_list) in pcibios_bus_report_status()
54 if (dev->subordinate) in pcibios_bus_report_status()
55 pcibios_bus_report_status(dev->subordinate, status_mask, warn); in pcibios_bus_report_status()
78 static void pci_fixup_83c553(struct pci_dev *dev) in pci_fixup_83c553() argument
[all …]
/arch/powerpc/include/asm/
Dmacio.h48 #define to_macio_device(d) container_of(d, struct macio_dev, ofdev.dev)
51 extern struct macio_dev *macio_dev_get(struct macio_dev *dev);
52 extern void macio_dev_put(struct macio_dev *dev);
59 static inline int macio_resource_count(struct macio_dev *dev) in macio_resource_count() argument
61 return dev->n_resources; in macio_resource_count()
64 static inline unsigned long macio_resource_start(struct macio_dev *dev, int resource_no) in macio_resource_start() argument
66 return dev->resource[resource_no].start; in macio_resource_start()
69 static inline unsigned long macio_resource_end(struct macio_dev *dev, int resource_no) in macio_resource_end() argument
71 return dev->resource[resource_no].end; in macio_resource_end()
74 static inline unsigned long macio_resource_len(struct macio_dev *dev, int resource_no) in macio_resource_len() argument
[all …]
Ddma-mapping.h25 extern void *__dma_direct_alloc_coherent(struct device *dev, size_t size,
28 extern void __dma_direct_free_coherent(struct device *dev, size_t size,
31 extern int dma_direct_mmap_coherent(struct device *dev,
45 extern void *__dma_alloc_coherent(struct device *dev, size_t size,
58 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument
65 static inline unsigned long device_to_mask(struct device *dev) in device_to_mask() argument
67 if (dev->dma_mask && *dev->dma_mask) in device_to_mask()
68 return *dev->dma_mask; in device_to_mask()
81 static inline struct dma_map_ops *get_dma_ops(struct device *dev) in get_dma_ops() argument
88 if (unlikely(dev == NULL)) in get_dma_ops()
[all …]
/arch/powerpc/kernel/
Dpci_of_scan.c74 static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev) in of_pci_parse_addrs() argument
102 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; in of_pci_parse_addrs()
103 } else if (i == dev->rom_base_reg) { in of_pci_parse_addrs()
104 res = &dev->resource[PCI_ROM_RESOURCE]; in of_pci_parse_addrs()
111 res->name = pci_name(dev); in of_pci_parse_addrs()
114 pcibios_bus_to_resource(dev->bus, res, &region); in of_pci_parse_addrs()
127 struct pci_dev *dev; in of_create_pci_dev() local
130 dev = pci_alloc_dev(bus); in of_create_pci_dev()
131 if (!dev) in of_create_pci_dev()
139 dev->dev.of_node = of_node_get(node); in of_create_pci_dev()
[all …]
Dibmebus.c64 static void *ibmebus_alloc_coherent(struct device *dev, in ibmebus_alloc_coherent() argument
78 static void ibmebus_free_coherent(struct device *dev, in ibmebus_free_coherent() argument
86 static dma_addr_t ibmebus_map_page(struct device *dev, in ibmebus_map_page() argument
96 static void ibmebus_unmap_page(struct device *dev, in ibmebus_unmap_page() argument
105 static int ibmebus_map_sg(struct device *dev, in ibmebus_map_sg() argument
121 static void ibmebus_unmap_sg(struct device *dev, in ibmebus_unmap_sg() argument
129 static int ibmebus_dma_supported(struct device *dev, u64 mask) in ibmebus_dma_supported() argument
134 static u64 ibmebus_dma_get_required_mask(struct device *dev) in ibmebus_dma_get_required_mask() argument
150 static int ibmebus_match_path(struct device *dev, void *data) in ibmebus_match_path() argument
152 struct device_node *dn = to_platform_device(dev)->dev.of_node; in ibmebus_match_path()
[all …]
Ddma.c30 static u64 __maybe_unused get_pfn_limit(struct device *dev) in get_pfn_limit() argument
32 u64 pfn = (dev->coherent_dma_mask >> PAGE_SHIFT) + 1; in get_pfn_limit()
33 struct dev_archdata __maybe_unused *sd = &dev->archdata; in get_pfn_limit()
43 static int dma_direct_dma_supported(struct device *dev, u64 mask) in dma_direct_dma_supported() argument
46 u64 limit = get_dma_offset(dev) + (memblock_end_of_DRAM() - 1); in dma_direct_dma_supported()
65 void *__dma_direct_alloc_coherent(struct device *dev, size_t size, in __dma_direct_alloc_coherent() argument
71 ret = __dma_alloc_coherent(dev, size, dma_handle, flag); in __dma_direct_alloc_coherent()
74 *dma_handle += get_dma_offset(dev); in __dma_direct_alloc_coherent()
78 int node = dev_to_node(dev); in __dma_direct_alloc_coherent()
80 u64 pfn = get_pfn_limit(dev); in __dma_direct_alloc_coherent()
[all …]
Ddma-iommu.c19 static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, in dma_iommu_alloc_coherent() argument
23 return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size, in dma_iommu_alloc_coherent()
24 dma_handle, dev->coherent_dma_mask, flag, in dma_iommu_alloc_coherent()
25 dev_to_node(dev)); in dma_iommu_alloc_coherent()
28 static void dma_iommu_free_coherent(struct device *dev, size_t size, in dma_iommu_free_coherent() argument
32 iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle); in dma_iommu_free_coherent()
40 static dma_addr_t dma_iommu_map_page(struct device *dev, struct page *page, in dma_iommu_map_page() argument
45 return iommu_map_page(dev, get_iommu_table_base(dev), page, offset, in dma_iommu_map_page()
46 size, device_to_mask(dev), direction, attrs); in dma_iommu_map_page()
50 static void dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle, in dma_iommu_unmap_page() argument
[all …]
/arch/powerpc/sysdev/
Dppc4xx_msi.c60 static int ppc4xx_msi_init_allocator(struct platform_device *dev, in ppc4xx_msi_init_allocator() argument
66 dev->dev.of_node); in ppc4xx_msi_init_allocator()
79 static int ppc4xx_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in ppc4xx_setup_msi_irqs() argument
87 dev_dbg(&dev->dev, "PCIE-MSI:%s called. vec %x type %d\n", in ppc4xx_setup_msi_irqs()
96 for_each_pci_msi_entry(entry, dev) { in ppc4xx_setup_msi_irqs()
106 dev_err(&dev->dev, "%s: fail mapping irq\n", __func__); in ppc4xx_setup_msi_irqs()
110 dev_dbg(&dev->dev, "%s: virq = %d\n", __func__, virq); in ppc4xx_setup_msi_irqs()
123 void ppc4xx_teardown_msi_irqs(struct pci_dev *dev) in ppc4xx_teardown_msi_irqs() argument
129 dev_dbg(&dev->dev, "PCIE-MSI: tearing down msi irqs\n"); in ppc4xx_teardown_msi_irqs()
131 for_each_pci_msi_entry(entry, dev) { in ppc4xx_teardown_msi_irqs()
[all …]
/arch/arm/mach-integrator/
Dlm.c17 #define to_lm_device(d) container_of(d, struct lm_device, dev)
20 static int lm_match(struct device *dev, struct device_driver *drv) in lm_match() argument
25 static int lm_bus_probe(struct device *dev) in lm_bus_probe() argument
27 struct lm_device *lmdev = to_lm_device(dev); in lm_bus_probe()
28 struct lm_driver *lmdrv = to_lm_driver(dev->driver); in lm_bus_probe()
33 static int lm_bus_remove(struct device *dev) in lm_bus_remove() argument
35 struct lm_device *lmdev = to_lm_device(dev); in lm_bus_remove()
36 struct lm_driver *lmdrv = to_lm_driver(dev->driver); in lm_bus_remove()
70 static void lm_device_release(struct device *dev) in lm_device_release() argument
72 struct lm_device *d = to_lm_device(dev); in lm_device_release()
[all …]
/arch/arm64/include/asm/
Ddma-mapping.h30 static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) in __generic_dma_ops() argument
32 if (dev && dev->archdata.dma_ops) in __generic_dma_ops()
33 return dev->archdata.dma_ops; in __generic_dma_ops()
42 static inline struct dma_map_ops *get_dma_ops(struct device *dev) in get_dma_ops() argument
47 return __generic_dma_ops(dev); in get_dma_ops()
50 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
55 void arch_teardown_dma_ops(struct device *dev);
60 static inline bool is_device_dma_coherent(struct device *dev) in is_device_dma_coherent() argument
62 if (!dev) in is_device_dma_coherent()
64 return dev->archdata.dma_coherent; in is_device_dma_coherent()
[all …]
/arch/powerpc/platforms/pseries/
Dpci.c35 void pcibios_name_device(struct pci_dev *dev)
42 dn = pci_device_to_OF_node(dev);
48 if (loc_len < sizeof(dev->dev.name)) {
49 memmove(dev->dev.name+loc_len+1, dev->dev.name,
50 sizeof(dev->dev.name)-loc_len-1);
51 memcpy(dev->dev.name, loc_code, loc_len);
52 dev->dev.name[loc_len] = ' ';
53 dev->dev.name[sizeof(dev->dev.name)-1] = '\0';
86 static void fixup_winbond_82c105(struct pci_dev* dev) in fixup_winbond_82c105() argument
95 pci_read_config_dword(dev, 0x40, &reg); in fixup_winbond_82c105()
[all …]
/arch/x86/kernel/
Dquirks.c11 static void quirk_intel_irqbalance(struct pci_dev *dev) in quirk_intel_irqbalance() argument
21 if (dev->revision > 0x9) in quirk_intel_irqbalance()
25 pci_read_config_byte(dev, 0xf4, &config); in quirk_intel_irqbalance()
26 pci_write_config_byte(dev, 0xf4, config|0x2); in quirk_intel_irqbalance()
32 pci_bus_read_config_word(dev->bus, PCI_DEVFN(8, 0), 0x4c, &word); in quirk_intel_irqbalance()
35 dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " in quirk_intel_irqbalance()
45 pci_write_config_byte(dev, 0xf4, config); in quirk_intel_irqbalance()
94 static void ich_force_enable_hpet(struct pci_dev *dev) in ich_force_enable_hpet() argument
103 pci_read_config_dword(dev, 0xF0, &rcba); in ich_force_enable_hpet()
106 dev_printk(KERN_DEBUG, &dev->dev, "RCBA disabled; " in ich_force_enable_hpet()
[all …]
/arch/m68k/emu/
Dnfblock.c64 struct nfhd_device *dev = queue->queuedata; in nfhd_make_request() local
71 shift = dev->bshift; in nfhd_make_request()
75 nfhd_read_write(dev->id, 0, dir, sec >> shift, len >> shift, in nfhd_make_request()
85 struct nfhd_device *dev = bdev->bd_disk->private_data; in nfhd_getgeo() local
87 geo->cylinders = dev->blocks >> (6 - dev->bshift); in nfhd_getgeo()
101 struct nfhd_device *dev; in nfhd_init_one() local
112 dev = kmalloc(sizeof(struct nfhd_device), GFP_KERNEL); in nfhd_init_one()
113 if (!dev) in nfhd_init_one()
116 dev->id = id; in nfhd_init_one()
117 dev->blocks = blocks; in nfhd_init_one()
[all …]
/arch/ia64/hp/sim/
Dsimeth.c48 static int simeth_open(struct net_device *dev);
49 static int simeth_close(struct net_device *dev);
50 static int simeth_tx(struct sk_buff *skb, struct net_device *dev);
51 static int simeth_rx(struct net_device *dev);
52 static struct net_device_stats *simeth_get_stats(struct net_device *dev);
54 static void set_multicast_list(struct net_device *dev);
183 struct net_device *dev; in simeth_probe1() local
200 dev = alloc_etherdev(sizeof(struct simeth_local)); in simeth_probe1()
201 if (!dev) in simeth_probe1()
204 memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); in simeth_probe1()
[all …]
/arch/mips/pci/
Dpci-bcm47xx.c31 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) in pcibios_map_irq() argument
37 static int bcm47xx_pcibios_plat_dev_init_ssb(struct pci_dev *dev) in bcm47xx_pcibios_plat_dev_init_ssb() argument
42 res = ssb_pcibios_plat_dev_init(dev); in bcm47xx_pcibios_plat_dev_init_ssb()
45 pci_name(dev)); in bcm47xx_pcibios_plat_dev_init_ssb()
49 pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); in bcm47xx_pcibios_plat_dev_init_ssb()
50 slot = PCI_SLOT(dev->devfn); in bcm47xx_pcibios_plat_dev_init_ssb()
51 res = ssb_pcibios_map_irq(dev, slot, pin); in bcm47xx_pcibios_plat_dev_init_ssb()
56 pci_name(dev)); in bcm47xx_pcibios_plat_dev_init_ssb()
60 dev->irq = res; in bcm47xx_pcibios_plat_dev_init_ssb()
66 static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev) in bcm47xx_pcibios_plat_dev_init_bcma() argument
[all …]
Dfixup-cobalt.c39 static void qube_raq_galileo_early_fixup(struct pci_dev *dev) in qube_raq_galileo_early_fixup() argument
41 if (dev->devfn == PCI_DEVFN(0, 0) && in qube_raq_galileo_early_fixup()
42 (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) { in qube_raq_galileo_early_fixup()
44 dev->class = (PCI_CLASS_BRIDGE_HOST << 8) | (dev->class & 0xff); in qube_raq_galileo_early_fixup()
53 static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev) in qube_raq_via_bmIDE_fixup() argument
59 pci_read_config_word(dev, PCI_COMMAND, &cfgword); in qube_raq_via_bmIDE_fixup()
61 pci_write_config_word(dev, PCI_COMMAND, cfgword); in qube_raq_via_bmIDE_fixup()
64 pci_write_config_byte(dev, 0x40, 0xb); in qube_raq_via_bmIDE_fixup()
67 pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lt); in qube_raq_via_bmIDE_fixup()
69 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); in qube_raq_via_bmIDE_fixup()
[all …]
/arch/arm/common/
Ddmabounce.c70 struct device *dev; member
87 static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr, in dmabounce_show() argument
90 struct dmabounce_device_info *device_info = dev->archdata.dmabounce; in dmabounce_show()
112 struct device *dev = device_info->dev; in alloc_safe_buffer() local
115 dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", in alloc_safe_buffer()
128 dev_warn(dev, "%s: kmalloc failed\n", __func__); in alloc_safe_buffer()
141 buf->safe = dma_alloc_coherent(dev, size, &buf->safe_dma_addr, in alloc_safe_buffer()
146 dev_warn(dev, in alloc_safe_buffer()
191 dev_dbg(device_info->dev, "%s(buf=%p)\n", __func__, buf); in free_safe_buffer()
202 dma_free_coherent(device_info->dev, buf->size, buf->safe, in free_safe_buffer()
[all …]
/arch/powerpc/platforms/ps3/
Dsystem-bus.c47 static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id, in ps3_is_device() argument
50 return dev->bus_id == bus_id && dev->dev_id == dev_id; in ps3_is_device()
53 static int ps3_open_hv_device_sb(struct ps3_system_bus_device *dev) in ps3_open_hv_device_sb() argument
57 BUG_ON(!dev->bus_id); in ps3_open_hv_device_sb()
60 if (ps3_is_device(dev, 1, 1)) { in ps3_open_hv_device_sb()
68 if (ps3_is_device(dev, 1, 2)) { in ps3_open_hv_device_sb()
76 result = lv1_open_device(dev->bus_id, dev->dev_id, 0); in ps3_open_hv_device_sb()
89 static int ps3_close_hv_device_sb(struct ps3_system_bus_device *dev) in ps3_close_hv_device_sb() argument
93 BUG_ON(!dev->bus_id); in ps3_close_hv_device_sb()
96 if (ps3_is_device(dev, 1, 1)) { in ps3_close_hv_device_sb()
[all …]
/arch/xtensa/lib/
Dpci-auto.c76 pciauto_setup_bars(struct pci_dev *dev, int bar_limit) in pciauto_setup_bars() argument
88 pci_write_config_dword(dev, bar, 0xffffffff); in pciauto_setup_bars()
89 pci_read_config_dword(dev, bar, &bar_size); in pciauto_setup_bars()
117 pci_write_config_dword(dev, bar, *upper_limit); in pciauto_setup_bars()
126 pci_write_config_dword(dev, (bar+=4), 0x00000000); in pciauto_setup_bars()
135 pciauto_setup_irq(struct pci_controller* pci_ctrl,struct pci_dev *dev,int devfn) in pciauto_setup_irq() argument
140 pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); in pciauto_setup_irq()
148 irq = pci_ctrl->map_irq(dev, PCI_SLOT(devfn), pin); in pciauto_setup_irq()
155 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); in pciauto_setup_irq()
160 pciauto_prescan_setup_bridge(struct pci_dev *dev, int current_bus, in pciauto_prescan_setup_bridge() argument
[all …]
/arch/sh/drivers/dma/
Ddma-sysfs.c26 static ssize_t dma_show_devices(struct device *dev, in dma_show_devices() argument
61 static ssize_t dma_show_dev_id(struct device *dev, in dma_show_dev_id() argument
64 struct dma_channel *channel = to_dma_channel(dev); in dma_show_dev_id()
68 static ssize_t dma_store_dev_id(struct device *dev, in dma_store_dev_id() argument
72 struct dma_channel *channel = to_dma_channel(dev); in dma_store_dev_id()
79 static ssize_t dma_store_config(struct device *dev, in dma_store_config() argument
83 struct dma_channel *channel = to_dma_channel(dev); in dma_store_config()
94 static ssize_t dma_show_mode(struct device *dev, in dma_show_mode() argument
97 struct dma_channel *channel = to_dma_channel(dev); in dma_show_mode()
101 static ssize_t dma_store_mode(struct device *dev, in dma_store_mode() argument
[all …]
/arch/x86/include/asm/xen/
Dpci.h18 int xen_find_device_domain_owner(struct pci_dev *dev);
19 int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
20 int xen_unregister_device_domain_owner(struct pci_dev *dev);
26 static inline int xen_find_device_domain_owner(struct pci_dev *dev) in xen_find_device_domain_owner() argument
30 static inline int xen_register_device_domain_owner(struct pci_dev *dev, in xen_register_device_domain_owner() argument
35 static inline int xen_unregister_device_domain_owner(struct pci_dev *dev) in xen_unregister_device_domain_owner() argument
47 int (*enable_msi)(struct pci_dev *dev, int vectors[]);
48 void (*disable_msi)(struct pci_dev *dev);
49 int (*enable_msix)(struct pci_dev *dev, int vectors[], int nvec);
50 void (*disable_msix)(struct pci_dev *dev);
[all …]

12345678910>>...65