Date: Thu, 29 May 2008 03:31:46 GMT From: Andrew Turner <andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142509 for review Message-ID: <200805290331.m4T3VkPY010388@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142509 Change 142509 by andrew@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805290331.m4T3VkPY010388>