Skip to contentSkip to conversation

linux-2.6 jejb

parisc-linux James Bottomley 1 participant 1 message Jan 13, 2004 1 message not in the archive PA-RISC architecture

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 12 lines · James Bottomley

CVSROOT: /var/cvs
Module name: linux-2.6
Changes by: jejb 04/01/13 08:56:03

Modified files:
. : Makefile
drivers/parisc : ccio-dma.c dino.c
include/asm-parisc: pci.h

Log message:
Add Dino support for extended and non-contiguous PCI windows.

Quoted 6 lines

The current code assumes the dino has a single 8MB window. However, this isn't sufficient to support PCI video cards, which can have much bigger windows.

This code adds the ability to translate an arbitrary dino map (which must still be correctly set up by firmware) into the PCI resource table.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1531 -> 1.1532
# drivers/parisc/dino.c 1.13 -> 1.14
# drivers/parisc/ccio-dma.c 1.15 -> 1.16
# include/asm-parisc/pci.h 1.10 -> 1.11
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/01/13 [email protected] 1.1532
# Add support for extended and non-contiguous dino PCI windows
# --------------------------------------------
#

drivers/parisc/ccio-dma.c +4 -4
diff -Nru a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
@@ -1627,11 +1627,11 @@
 
 	if (!ioc) {
 		parent = &iomem_resource;
-	} else if ((ioc->mmio_region->start <= dev->hpa) &&
-			(dev->hpa < ioc->mmio_region->end)) {
+	} else if ((ioc->mmio_region->start <= res->start) &&
+			(res->end <= ioc->mmio_region->end)) {
 		parent = ioc->mmio_region;
-	} else if (((ioc->mmio_region + 1)->start <= dev->hpa) &&
-			(dev->hpa < (ioc->mmio_region + 1)->end)) {
+	} else if (((ioc->mmio_region + 1)->start <= res->start) &&
+			(res->end <= (ioc->mmio_region + 1)->end)) {
 		parent = ioc->mmio_region + 1;
 	} else {
 		return -EBUSY;
drivers/parisc/dino.c +52 -16

100 lines not on this page · raw message

include/asm-parisc/pci.h +5 -0
diff -Nru a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h
@@ -56,6 +56,11 @@
 	struct resource lmmio_space;	/* bus addresses < 4Gb */
 	struct resource elmmio_space;	/* additional bus addresses < 4Gb */
 	struct resource gmmio_space;	/* bus addresses > 4Gb */
+	/* NOTE: Dino code assumes it can use *all* of the lmmio_space,
+	 * elmmio_space and gmmio_space as a contiguous array of
+	 * resources.  This #define represents the array size */
+	#define DINO_MAX_LMMIO_RESOURCES	3
+
 	unsigned long   lmmio_space_offset;  /* CPU view - PCI view */
 	void *          iommu;          /* IOMMU this device is under */
 	/* REVISIT - spinlock to protect resources? */