From owner-cvs-all@FreeBSD.ORG Tue Nov 22 16:37:46 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62CD716A41F; Tue, 22 Nov 2005 16:37:46 +0000 (GMT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2281E43D58; Tue, 22 Nov 2005 16:37:46 +0000 (GMT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jAMGbkvQ057229; Tue, 22 Nov 2005 16:37:46 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jAMGbkTQ057228; Tue, 22 Nov 2005 16:37:46 GMT (envelope-from marius) Message-Id: <200511221637.jAMGbkTQ057228@repoman.freebsd.org> From: Marius Strobl Date: Tue, 22 Nov 2005 16:37:45 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/conf files.powerpc files.sparc64 src/sys/dev/ofw ofw_bus_if.m ofw_bus_subr.c ofw_bus_subr.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2005 16:37:46 -0000 marius 2005-11-22 16:37:45 UTC FreeBSD src repository Modified files: sys/conf files.powerpc files.sparc64 sys/dev/ofw ofw_bus_if.m Added files: sys/dev/ofw ofw_bus_subr.c ofw_bus_subr.h Log: - Add a new method ofw_bus_default_get_devinfo() that allows to retrieve a newly introduced struct ofw_bus_devinfo which can hold the OFW info of a device recallable via the ofw_bus KOBJ interface. Introduce a set of functions ofw_bus_gen_get_*() which use ofw_bus_default_get_devinfo() to provide generic subroutines for implementing the rest of the ofw_bus KOBJ interface in a bus driver. This is inspired by bus_get_resource_list() and bus_generic_rl_*_resource() and allows to reduce code duplication in bus drivers as they only have to provide an ofw_bus_default_get_devinfo() implementation in order to provide the ofw_bus KOBJ interface via ofw_bus_gen_get_*(). - While here add a comment to ofw_bus_if.m describing the intention of the ofw_bus KOBJ interface. Reviewed by: marcel Revision Changes Path 1.46 +1 -0 src/sys/conf/files.powerpc 1.75 +1 -0 src/sys/conf/files.sparc64 1.3 +36 -2 src/sys/dev/ofw/ofw_bus_if.m 1.1 +128 -0 src/sys/dev/ofw/ofw_bus_subr.c (new) 1.1 +49 -0 src/sys/dev/ofw/ofw_bus_subr.h (new)