From owner-cvs-all@FreeBSD.ORG Thu Aug 12 17:41:33 2004 Return-Path: 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 9593216A4CE; Thu, 12 Aug 2004 17:41:33 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B88943D1F; Thu, 12 Aug 2004 17:41:33 +0000 (GMT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7CHfXm7035259; Thu, 12 Aug 2004 17:41:33 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7CHfXON035258; Thu, 12 Aug 2004 17:41:33 GMT (envelope-from marius) Message-Id: <200408121741.i7CHfXON035258@repoman.freebsd.org> From: Marius Strobl Date: Thu, 12 Aug 2004 17:41:33 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf files.powerpc files.sparc64 kmod.mk src/sys/dev/esp esp_sbus.c src/sys/dev/hme if_hme_sbus.c src/sys/dev/isp isp_sbus.c src/sys/dev/ofw ofw_bus.h ofw_bus_if.m... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 12 Aug 2004 17:41:33 -0000 marius 2004-08-12 17:41:33 UTC FreeBSD src repository Modified files: sys/conf files.powerpc files.sparc64 kmod.mk sys/dev/esp esp_sbus.c sys/dev/hme if_hme_sbus.c sys/dev/isp isp_sbus.c sys/dev/pcf envctrl.c pcf_ebus.c sys/dev/puc puc_ebus.c puc_sbus.c sys/dev/sab sab.c sys/dev/uart uart_bus_ebus.c sys/dev/zs zs_macio.c zs_sbus.c sys/modules/esp Makefile sys/modules/hme Makefile sys/modules/isp Makefile sys/modules/uart Makefile sys/powerpc/powermac ata_macio.c hrowpic.c macio.c maciovar.h openpic_macio.c sys/sparc64/central central.c sys/sparc64/ebus ebus.c sys/sparc64/fhc fhc.c fhc_central.c fhc_nexus.c fhcvar.h sys/sparc64/include eeprom.h sys/sparc64/isa isa.c sys/sparc64/pci apb.c ofw_pci.h ofw_pci_if.m ofw_pcib.c ofw_pcib_subr.c ofw_pcib_subr.h ofw_pcibus.c psycho.c sys/sparc64/sbus sbus.c sbusvar.h sys/sparc64/sparc64 eeprom.c eeprom_ebus.c eeprom_sbus.c ofw_machdep.c Added files: sys/dev/ofw ofw_bus.h ofw_bus_if.m Removed files: sys/sparc64/central centralvar.h sys/sparc64/ebus ebusvar.h sys/sparc64/sparc64 eeprom_fhc.c Log: - Introduce an ofw_bus kobj-interface for retrieving the OFW node and a subset ("compatible", "device_type", "model" and "name") of the standard properties in drivers for devices on Open Firmware supported busses. The standard properties "reg", "interrupts" und "address" are not covered by this interface because they are only of interest in the respective bridge code. There's a remaining standard property "status" which is unclear how to support properly but which also isn't used in FreeBSD at present. This ofw_bus kobj-interface allows to replace the various (ebus_get_node(), ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type() vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one. This in turn allows to simplify and remove code-duplication in drivers for devices that can hang off of more than one OFW supported bus. - Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the drivers for their children to use the ofw_bus kobj-interface. The IVAR- interfaces of the Central, EBus and FHC are entirely replaced by this. The PCI bus driver used its own kobj-interface and now also uses the ofw_bus one. The IVARs special to the SBus, e.g. for retrieving the burst size, remain. Beware: this causes an ABI-breakage for modules of drivers which used the IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be recompiled. The style-inconsistencies introduced in some of the bus drivers will be fixed by tmm@ in a generic clean-up of the respective drivers later (he requested to add the changes in the "new" style). - Convert the powerpc MacIO bus driver and the drivers for its children to use the ofw_bus kobj-interface. This invloves removing the IVARs related to the "reg" property which were unused and a leftover from the NetBSD origini of the code. There's no ABI-breakage caused by this because none of these driver are currently built as modules. There are other powerpc bus drivers which can be converted to the ofw_bus kobj-interface, e.g. the PCI bus driver, which should be done together with converting powerpc to use the OFW PCI code from sparc64. - Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take advantage of the ofw_bus kobj-interface and simplify them a bit. Reviewed by: grehan, tmm Approved by: re (scottl) Discussed with: tmm Tested with: Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386 Revision Changes Path 1.40 +1 -0 src/sys/conf/files.powerpc 1.57 +2 -1 src/sys/conf/files.sparc64 1.164 +1 -0 src/sys/conf/kmod.mk 1.6 +5 -4 src/sys/dev/esp/esp_sbus.c 1.13 +4 -3 src/sys/dev/hme/if_hme_sbus.c 1.15 +6 -5 src/sys/dev/isp/isp_sbus.c 1.1 +73 -0 src/sys/dev/ofw/ofw_bus.h (new) 1.1 +110 -0 src/sys/dev/ofw/ofw_bus_if.m (new) 1.4 +3 -5 src/sys/dev/pcf/envctrl.c 1.3 +7 -8 src/sys/dev/pcf/pcf_ebus.c 1.3 +4 -4 src/sys/dev/puc/puc_ebus.c 1.4 +4 -4 src/sys/dev/puc/puc_sbus.c 1.35 +12 -9 src/sys/dev/sab/sab.c 1.5 +5 -5 src/sys/dev/uart/uart_bus_ebus.c 1.6 +5 -9 src/sys/dev/zs/zs_macio.c 1.8 +12 -61 src/sys/dev/zs/zs_sbus.c 1.3 +1 -1 src/sys/modules/esp/Makefile 1.2 +2 -2 src/sys/modules/hme/Makefile 1.2 +1 -1 src/sys/modules/isp/Makefile 1.10 +3 -2 src/sys/modules/uart/Makefile 1.11 +2 -3 src/sys/powerpc/powermac/ata_macio.c 1.8 +2 -2 src/sys/powerpc/powermac/hrowpic.c 1.16 +69 -53 src/sys/powerpc/powermac/macio.c 1.5 +4 -27 src/sys/powerpc/powermac/maciovar.h 1.8 +2 -2 src/sys/powerpc/powermac/openpic_macio.c 1.4 +64 -46 src/sys/sparc64/central/central.c 1.2 +0 -47 src/sys/sparc64/central/centralvar.h (dead) 1.19 +71 -49 src/sys/sparc64/ebus/ebus.c 1.3 +0 -56 src/sys/sparc64/ebus/ebusvar.h (dead) 1.9 +52 -41 src/sys/sparc64/fhc/fhc.c 1.4 +10 -5 src/sys/sparc64/fhc/fhc_central.c 1.4 +8 -2 src/sys/sparc64/fhc/fhc_nexus.c 1.3 +5 -17 src/sys/sparc64/fhc/fhcvar.h 1.3 +2 -1 src/sys/sparc64/include/eeprom.h 1.13 +2 -1 src/sys/sparc64/isa/isa.c 1.10 +4 -1 src/sys/sparc64/pci/apb.c 1.8 +0 -7 src/sys/sparc64/pci/ofw_pci.h 1.5 +0 -17 src/sys/sparc64/pci/ofw_pci_if.m 1.4 +5 -2 src/sys/sparc64/pci/ofw_pcib.c 1.4 +4 -3 src/sys/sparc64/pci/ofw_pcib_subr.c 1.3 +1 -1 src/sys/sparc64/pci/ofw_pcib_subr.h 1.3 +67 -9 src/sys/sparc64/pci/ofw_pcibus.c 1.52 +7 -4 src/sys/sparc64/pci/psycho.c 1.31 +67 -25 src/sys/sparc64/sbus/sbus.c 1.4 +0 -8 src/sys/sparc64/sbus/sbusvar.h 1.5 +16 -9 src/sys/sparc64/sparc64/eeprom.c 1.7 +4 -19 src/sys/sparc64/sparc64/eeprom_ebus.c 1.7 +0 -136 src/sys/sparc64/sparc64/eeprom_fhc.c (dead) 1.7 +6 -20 src/sys/sparc64/sparc64/eeprom_sbus.c 1.10 +3 -1 src/sys/sparc64/sparc64/ofw_machdep.c