Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux Save the location of the...
details: https://anonhg.NetBSD.org/src/rev/2e737b89d6a6
branches: trunk
changeset: 809207:2e737b89d6a6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jun 24 18:20:36 2015 +0000
description:
Save the location of the found ROM so caller can bus_space_read it.
diffstat:
sys/external/bsd/drm2/include/linux/pci.h | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (48 lines):
diff -r 327f5fabd96e -r 2e737b89d6a6 sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Wed Jun 24 16:10:54 2015 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Wed Jun 24 18:20:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.h,v 1.17 2015/04/06 02:29:18 riastradh Exp $ */
+/* $NetBSD: pci.h,v 1.18 2015/06/24 18:20:36 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -126,6 +126,8 @@
bus_space_tag_t pd_rom_bst;
bus_space_handle_t pd_rom_bsh;
bus_size_t pd_rom_size;
+ bus_space_handle_t pd_rom_found_bsh;
+ bus_space_handle_t pd_rom_found_size;
void *pd_rom_vaddr;
device_t pd_dev;
struct drm_device *pd_drm_dev; /* XXX Nouveau kludge! */
@@ -504,8 +506,6 @@
static inline void __pci_rom_iomem *
pci_map_rom(struct pci_dev *pdev, size_t *sizep)
{
- bus_space_handle_t bsh;
- bus_size_t size;
KASSERT(!ISSET(pdev->pd_kludges, NBPCI_KLUDGE_MAP_ROM));
@@ -519,14 +519,16 @@
/* XXX This type is obviously wrong in general... */
if (pci_find_rom(&pdev->pd_pa, pdev->pd_rom_bst, pdev->pd_rom_bsh,
- pdev->pd_rom_size, PCI_ROM_CODE_TYPE_X86, &bsh, &size)) {
+ pdev->pd_rom_size, PCI_ROM_CODE_TYPE_X86,
+ &pdev->pd_rom_found_bsh, &pdev->pd_rom_found_size)) {
pci_unmap_rom(pdev, NULL);
return NULL;
}
- KASSERT(size <= SIZE_T_MAX);
- *sizep = size;
- pdev->pd_rom_vaddr = bus_space_vaddr(pdev->pd_rom_bst, bsh);
+ KASSERT(pdev->pd_rom_found_size <= SIZE_T_MAX);
+ *sizep = pdev->pd_rom_found_size;
+ pdev->pd_rom_vaddr = bus_space_vaddr(pdev->pd_rom_bst,
+ pdev->pd_rom_found_bsh);
return pdev->pd_rom_vaddr;
}
Home |
Main Index |
Thread Index |
Old Index