From owner-p4-projects@FreeBSD.ORG Thu May 29 03:31:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CDD5F1065679; Thu, 29 May 2008 03:31:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C9901065670 for ; Thu, 29 May 2008 03:31:46 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4628FC18 for ; Thu, 29 May 2008 03:31:46 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4T3Vkom010391 for ; Thu, 29 May 2008 03:31:46 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4T3VkPY010388 for perforce@freebsd.org; Thu, 29 May 2008 03:31:46 GMT (envelope-from andrew@freebsd.org) Date: Thu, 29 May 2008 03:31:46 GMT Message-Id: <200805290331.m4T3VkPY010388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 142509 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2008 03:31:47 -0000 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;