From owner-svn-src-head@freebsd.org Fri Jul 15 13:25:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF9EB988E7; Fri, 15 Jul 2016 13:25:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F95617B0; Fri, 15 Jul 2016 13:25:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6FDPl2i053087; Fri, 15 Jul 2016 13:25:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6FDPl21053086; Fri, 15 Jul 2016 13:25:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201607151325.u6FDPl21053086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 15 Jul 2016 13:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302896 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 13:25:48 -0000 Author: andrew Date: Fri Jul 15 13:25:47 2016 New Revision: 302896 URL: https://svnweb.freebsd.org/changeset/base/302896 Log: Implement bus_print_child to print the resources used by the ITS driver. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/gic_v3_fdt.c Modified: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c Fri Jul 15 09:44:48 2016 (r302895) +++ head/sys/arm64/arm64/gic_v3_fdt.c Fri Jul 15 13:25:47 2016 (r302896) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); */ static int gic_v3_fdt_probe(device_t); static int gic_v3_fdt_attach(device_t); +static int gic_v3_fdt_print_child(device_t, device_t); static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); @@ -64,6 +65,7 @@ static device_method_t gic_v3_fdt_method DEVMETHOD(device_attach, gic_v3_fdt_attach), /* Bus interface */ + DEVMETHOD(bus_print_child, gic_v3_fdt_print_child), DEVMETHOD(bus_alloc_resource, gic_v3_ofw_bus_alloc_res), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -183,6 +185,20 @@ struct gic_v3_ofw_devinfo { struct resource_list di_rl; }; +static int +gic_v3_fdt_print_child(device_t bus, device_t child) +{ + struct gic_v3_ofw_devinfo *di = device_get_ivars(child); + struct resource_list *rl = &di->di_rl; + int retval = 0; + + retval += bus_print_child_header(bus, child); + retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx"); + retval += bus_print_child_footer(bus, child); + + return (retval); +} + static const struct ofw_bus_devinfo * gic_v3_ofw_get_devinfo(device_t bus __unused, device_t child) {