PERFORCE change 142509 for review

Andrew Turner andrew at FreeBSD.org
Thu May 29 03:31:47 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=142509

Change 142509 by andrew at andrew_bender on 2008/05/29 03:31:05

	Rename the rman to be IRQ specific in preperation to add a memory rman

Affected files ...

.. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#8 edit
.. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2xx0var.h#4 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#8 (text+ko) ====

@@ -114,10 +114,16 @@
 s3c2410_alloc_resource(device_t bus, device_t child, int type, int *rid,
         u_long start, u_long end, u_long count, u_int flags)
 {
-	struct resource *res;
-	
-	res = rman_reserve_resource(&s3c2xx0_softc->s3c2xx0_rman, *rid, *rid,
-	    count, flags, child);
+	struct resource *res = NULL;
+
+	switch (type) {
+	case SYS_RES_IRQ:
+		res = rman_reserve_resource(
+		    &s3c2xx0_softc->s3c2xx0_irq_rman, start, end,
+		    count, flags, child);
+		break;
+	}
+
 	if (res != NULL)
 		rman_set_rid(res, *rid);
 
@@ -194,11 +200,11 @@
 	/*
 	 * Attach children devices
 	 */
-	s3c2xx0_softc->s3c2xx0_rman.rm_type = RMAN_ARRAY;
-	s3c2xx0_softc->s3c2xx0_rman.rm_descr = "S3C2410 IRQs";
-	if (rman_init(&s3c2xx0_softc->s3c2xx0_rman) != 0 ||
-	    rman_manage_region(&s3c2xx0_softc->s3c2xx0_rman, 0, 32) != 0)
-		panic("s3c2410_attach: failed to set up rman");
+	s3c2xx0_softc->s3c2xx0_irq_rman.rm_type = RMAN_ARRAY;
+	s3c2xx0_softc->s3c2xx0_irq_rman.rm_descr = "S3C2410 IRQs";
+	if (rman_init(&s3c2xx0_softc->s3c2xx0_irq_rman) != 0 ||
+	    rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, 0, 32) != 0)
+		panic("s3c2410_attach: failed to set up IRQ rman");
 	device_add_child(dev, "timer", 0);
 	device_add_child(dev, "nand", 0);
 	bus_generic_probe(dev);

==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2xx0var.h#4 (text+ko) ====

@@ -56,7 +56,7 @@
 	int sc_hclk;			/* AHB bus clock */
 	int sc_pclk;			/* peripheral clock */
 
-	struct rman s3c2xx0_rman;
+	struct rman s3c2xx0_irq_rman;
 };
 
 typedef void *s3c2xx0_chipset_tag_t;


More information about the p4-projects mailing list