From owner-svn-src-head@freebsd.org Mon Nov 27 21:30:52 2017 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 424BADE8E3E; Mon, 27 Nov 2017 21:30:52 +0000 (UTC) (envelope-from landonf@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 E054B6549A; Mon, 27 Nov 2017 21:30:51 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vARLUp06080001; Mon, 27 Nov 2017 21:30:51 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vARLUoqm078232; Mon, 27 Nov 2017 21:30:50 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201711272130.vARLUoqm078232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Mon, 27 Nov 2017 21:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326291 - in head: share/man/man4 share/man/man9 sys/dev/bhnd sys/dev/bhnd/nvram X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: in head: share/man/man4 share/man/man9 sys/dev/bhnd sys/dev/bhnd/nvram X-SVN-Commit-Revision: 326291 X-SVN-Commit-Repository: base 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.25 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: Mon, 27 Nov 2017 21:30:52 -0000 Author: landonf Date: Mon Nov 27 21:30:49 2017 New Revision: 326291 URL: https://svnweb.freebsd.org/changeset/base/326291 Log: bhnd(4) update inline documentation comments and man pages. This includes a number of copyedits for the inline code documentation comments, updates to the existing bhnd(4), bhndb(4), bcma(4), and siba(4) man pages, and new man pages for bhnd_chipc(4), bhnd_pmu(4), bhndb_pci(4), bhnd(9), and bhnd_erom(9). Approved by: adrian (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13021 Added: head/share/man/man4/bhnd_chipc.4 (contents, props changed) head/share/man/man4/bhnd_pmu.4 (contents, props changed) head/share/man/man4/bhndb_pci.4 (contents, props changed) head/share/man/man9/bhnd.9 (contents, props changed) head/share/man/man9/bhnd_erom.9 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/bcma.4 head/share/man/man4/bhnd.4 head/share/man/man4/bhndb.4 head/share/man/man4/siba.4 head/share/man/man9/Makefile head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/bhnd_bus_if.m head/sys/dev/bhnd/bhnd_erom.c head/sys/dev/bhnd/bhnd_subr.c head/sys/dev/bhnd/nvram/bhnd_nvram_subr.c Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man4/Makefile Mon Nov 27 21:30:49 2017 (r326291) @@ -78,7 +78,10 @@ MAN= aac.4 \ bge.4 \ ${_bhyve.4} \ bhnd.4 \ + bhnd_chipc.4 \ + bhnd_pmu.4 \ bhndb.4 \ + bhndb_pci.4 \ bktr.4 \ blackhole.4 \ bnxt.4 \ Modified: head/share/man/man4/bcma.4 ============================================================================== --- head/share/man/man4/bcma.4 Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man4/bcma.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -32,15 +32,14 @@ .Nm bcma .Nd Broadcom AMBA Backplane driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your kernel configuration file: +To compile this driver into the kernel, add the following lines to the +kernel configuration file: .Bd -ragged -offset indent .Cd "device bhnd" .Cd "device bcma" .Ed .Pp -Alternatively, to load the driver as a module at boot time, -place the following line in +To load the driver as a module at boot, add this line to .Xr loader.conf 5 : .Bd -literal -offset indent bcma_load="YES" @@ -51,8 +50,8 @@ The driver provides .Xr bhnd 4 support for devices using the ARM AMBA-based backplane architecture found -in later Broadcom Home Networking Division's (HND) wireless chipsets and -embedded systems. +in later Broadcom Home Networking Division's network chipsets and embedded +systems. .Pp A common interconnect connects all of the backplane's functional blocks. @@ -64,7 +63,9 @@ The IP cores used in devices were adapted by Broadcom for compatibility with the new interconnect. .Sh SEE ALSO -.Xr bhnd 4 +.Xr bhnd 4 , +.Xr intro 4 , +.Xr siba 4 .Sh HISTORY The .Nm Modified: head/share/man/man4/bhnd.4 ============================================================================== --- head/share/man/man4/bhnd.4 Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man4/bhnd.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -31,14 +31,13 @@ .Nm bhnd .Nd Broadcom Home Networking Division interconnect bus .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your kernel configuration file: +To compile this driver into the kernel, add the following lines to the +kernel configuration file: .Bd -ragged -offset indent .Cd "device bhnd" .Ed .Pp -Alternatively, to load the driver as a module at boot time, -place the following line in +To load the driver as a module at boot, add this line to .Xr loader.conf 5 : .Bd -literal -offset indent bhnd_load="YES" @@ -69,6 +68,7 @@ BHND driver. .Sh SEE ALSO .Xr bcma 4 , .Xr bhndb 4 , +.Xr intro 4 , .Xr siba 4 .Sh HISTORY The Added: head/share/man/man4/bhnd_chipc.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bhnd_chipc.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -0,0 +1,81 @@ +.\" Copyright (c) 2017 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by Landon Fuller under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 16, 2017 +.Dt BHND_CHIPC 4 +.Os +.Sh NAME +.Nm bhnd_chipc +.Nd Broadcom Home Networking Division ChipCommon Driver +.Sh SYNOPSIS +To compile this driver into the kernel, add this line to the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bhnd" +.Ed +.Pp +To compile driver support for all additional devices found in embedded systems, +add the following additional lines to the kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cfi" +.Cd "device gpio" +.Cd "device spibus" +.Cd "device uart" +.Ed +.Pp +To load the driver as a module at boot, add this line to +.Xr loader.conf 5 : +.Bd -literal -offset indent +bhnd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports the ChipCommon core found in Broadcom Home Networking +Division network chipsets and embedded systems. +.Pp +The ChipCommon core provides an interface to common hardware facilities, +including device identification, UARTs, CFI and SPI flash, One-time Programmable +(OTP) Memory, and GPIO. +.Sh SEE ALSO +.Xr bhnd 4 , +.Xr intro 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Landon Fuller Aq Mt landonf@FreeBSD.org , +and +.An Michael Zhilin Aq Mt mizhka@FreeBSD.org . Added: head/share/man/man4/bhnd_pmu.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bhnd_pmu.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -0,0 +1,74 @@ +.\" Copyright (c) 2017 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by Landon Fuller under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 16, 2017 +.Dt BHND_PMU 4 +.Os +.Sh NAME +.Nm bhnd_pmu +.Nd Broadcom Home Networking Division PMU Driver +.Sh SYNOPSIS +To compile this driver into the kernel, add this line to the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bhnd" +.Ed +.Pp +To load the driver as a module at boot, add this line to +.Xr loader.conf 5 : +.Bd -literal -offset indent +bhnd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports the Power Management Unit (PMU) found in Broadcom Home +Networking Division network chipsets and embedded systems. +.Pp +The PMU provides a hardware interface for managing the device's clock and power +topology. +.Sh SEE ALSO +.Xr bhnd 4 , +.Xr intro 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was derived from Broadcom's ISC-licensed Linux PMU drivers, and was +ported to +.Fx +and +.Xr bhnd 4 +by +.An Landon Fuller Aq Mt landonf@FreeBSD.org . Modified: head/share/man/man4/bhndb.4 ============================================================================== --- head/share/man/man4/bhndb.4 Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man4/bhndb.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -1,6 +1,10 @@ -.\" Copyright (c) 2015 Landon Fuller +.\" Copyright (c) 2015 Landon Fuller +.\" Copyright (c) 2017 The FreeBSD Foundation .\" All rights reserved. .\" +.\" Portions of this documentation were written by Landon Fuller +.\" under sponsorship from the FreeBSD Foundation. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -24,37 +28,41 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2016 +.Dd October 16th, 2017 .Dt BHNDB 4 .Os .Sh NAME .Nm bhndb .Nd Broadcom Home Networking Division interconnect bridge driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your kernel configuration file: +To compile this driver into the kernel, add the following lines to the +kernel configuration file: .Bd -ragged -offset indent .Cd "device bhnd" .Cd "device bhndb" .Ed .Pp -Alternatively, to load the driver as a module at boot time, -place the following line in +To load the driver as a module at boot, add this line to .Xr loader.conf 5 : .Bd -literal -offset indent bhndb_load="YES" -bhndb_pci_load="YES" .Ed .Sh DESCRIPTION The .Nm -driver supports +driver provides .Xr bhnd 4 -host bridge cores such as those used by Broadcom HND PCI, -PCMCIA, and SDIO network adapters. +host bridge support for Broadcom Home Networking Division's wireless chipsets +and network adapters. +.Pp +To enable use for PCI/PCIe systems, see the +.Xr bhndb_pci 4 +driver. .Sh SEE ALSO .Xr bhnd 4 , -.Xr bwn 4 +.Xr bhndb_pci 4 , +.Xr bwn 4 , +.Xr intro 4 .Sh HISTORY The .Nm Added: head/share/man/man4/bhndb_pci.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bhndb_pci.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -0,0 +1,75 @@ +.\" Copyright (c) 2015 Landon Fuller +.\" Copyright (c) 2017 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written by Landon Fuller +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 16, 2017 +.Dt BHNDB_PCI 4 +.Os +.Sh NAME +.Nm bhndb_pci +.Nd Broadcom Home Networking Division PCI host bridge driver +.Sh SYNOPSIS +To compile this driver into the kernel, add the following lines to the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bhnd" +.Cd "device bhndb" +.Cd "device bhndb_pci" +.Cd "device pci" +.Ed +.Pp +To load the driver as a module at boot, add this line to +.Xr loader.conf 5 : +.Bd -literal -offset indent +bhndb_pci_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr bhndb 4 +support for the PCI and PCIe host bridge cores found in Broadcom Home Networking +Division's wireless chipsets and network adapters. +.Sh SEE ALSO +.Xr bhnd 4 , +.Xr bhndb 4 , +.Xr bwn 4 , +.Xr intro 4 , +.Xr pci 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Landon Fuller Aq Mt landonf@FreeBSD.org . Modified: head/share/man/man4/siba.4 ============================================================================== --- head/share/man/man4/siba.4 Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man4/siba.4 Mon Nov 27 21:30:49 2017 (r326291) @@ -31,15 +31,14 @@ .Nm siba .Nd Sonic Inc. Silicon Backplane driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your kernel configuration file: +To compile this driver into the kernel, add the following lines to the +kernel configuration file: .Bd -ragged -offset indent .Cd "device bhnd" .Cd "device siba" .Ed .Pp -Alternatively, to load the driver as a module at boot time, -place the following line in +To load the driver as a module at boot, add this line to .Xr loader.conf 5 : .Bd -literal -offset indent siba_load="YES" @@ -68,7 +67,8 @@ host interfaces (PCI, PCMCIA), embedded processors (MI or DMA processors associated with communications cores. .Sh SEE ALSO .Xr bcma 4 , -.Xr bhnd 4 +.Xr bhnd 4 , +.Xr intro 4 .Sh HISTORY The .Nm Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Nov 27 21:10:50 2017 (r326290) +++ head/share/man/man9/Makefile Mon Nov 27 21:30:49 2017 (r326291) @@ -12,6 +12,8 @@ MAN= accept_filter.9 \ alq.9 \ altq.9 \ atomic.9 \ + bhnd.9 \ + bhnd_erom.9 \ bios.9 \ bitset.9 \ boot.9 \ @@ -444,6 +446,124 @@ MLINKS+=atomic.9 atomic_add.9 \ atomic.9 atomic_subtract.9 \ atomic.9 atomic_swap.9 \ atomic.9 atomic_testandset.9 +MLINKS+=bhnd.9 BHND_MATCH_BOARD_TYPE.9 \ + bhnd.9 BHND_MATCH_BOARD_VENDOR.9 \ + bhnd.9 BHND_MATCH_CHIP_ID.9 \ + bhnd.9 BHND_MATCH_CHIP_PKG.9 \ + bhnd.9 BHND_MATCH_CHIP_REV.9 \ + bhnd.9 BHND_MATCH_CORE_ID.9 \ + bhnd.9 BHND_MATCH_CORE_VENDOR.9 \ + bhnd.9 bhnd_activate_resource.9 \ + bhnd.9 bhnd_alloc_pmu.9 \ + bhnd.9 bhnd_alloc_resource.9 \ + bhnd.9 bhnd_alloc_resource_any.9 \ + bhnd.9 bhnd_alloc_resources.9 \ + bhnd.9 bhnd_board_matches.9 \ + bhnd.9 bhnd_bus_match_child.9 \ + bhnd.9 bhnd_bus_read_1.9 \ + bhnd.9 bhnd_bus_read_2.9 \ + bhnd.9 bhnd_bus_read_4.9 \ + bhnd.9 bhnd_bus_read_stream_1.9 \ + bhnd.9 bhnd_bus_read_stream_2.9 \ + bhnd.9 bhnd_bus_read_stream_4.9 \ + bhnd.9 bhnd_bus_write_1.9 \ + bhnd.9 bhnd_bus_write_2.9 \ + bhnd.9 bhnd_bus_write_4.9 \ + bhnd.9 bhnd_bus_write_stream_1.9 \ + bhnd.9 bhnd_bus_write_stream_2.9 \ + bhnd.9 bhnd_bus_write_stream_4.9 \ + bhnd.9 bhnd_chip_matches.9 \ + bhnd.9 bhnd_core_class.9 \ + bhnd.9 bhnd_core_get_match_desc.9 \ + bhnd.9 bhnd_core_matches.9 \ + bhnd.9 bhnd_core_name.9 \ + bhnd.9 bhnd_cores_equal.9 \ + bhnd.9 bhnd_deactivate_resource.9 \ + bhnd.9 bhnd_decode_port_rid.9 \ + bhnd.9 bhnd_deregister_provider.9 \ + bhnd.9 bhnd_device_lookup.9 \ + bhnd.9 bhnd_device_matches.9 \ + bhnd.9 bhnd_device_quirks.9 \ + bhnd.9 bhnd_driver_get_erom_class.9 \ + bhnd.9 bhnd_enable_clocks.9 \ + bhnd.9 bhnd_find_core_class.9 \ + bhnd.9 bhnd_find_core_name.9 \ + bhnd.9 bhnd_format_chip_id.9 \ + bhnd.9 bhnd_get_attach_type.9 \ + bhnd.9 bhnd_get_chipid.9 \ + bhnd.9 bhnd_get_class.9 \ + bhnd.9 bhnd_get_clock_freq.9 \ + bhnd.9 bhnd_get_clock_latency.9 \ + bhnd.9 bhnd_get_core_index.9 \ + bhnd.9 bhnd_get_core_info.9 \ + bhnd.9 bhnd_get_core_unit.9 \ + bhnd.9 bhnd_get_device.9 \ + bhnd.9 bhnd_get_device_name.9 \ + bhnd.9 bhnd_get_dma_translation.9 \ + bhnd.9 bhnd_get_hwrev.9 \ + bhnd.9 bhnd_get_intr_count.9 \ + bhnd.9 bhnd_get_intr_ivec.9 \ + bhnd.9 bhnd_get_port_count.9 \ + bhnd.9 bhnd_get_port_rid.9 \ + bhnd.9 bhnd_get_region_addr.9 \ + bhnd.9 bhnd_get_region_count.9 \ + bhnd.9 bhnd_get_vendor.9 \ + bhnd.9 bhnd_get_vendor_name.9 \ + bhnd.9 bhnd_hwrev_matches.9 \ + bhnd.9 bhnd_is_hw_suspended.9 \ + bhnd.9 bhnd_is_region_valid.9 \ + bhnd.9 bhnd_map_intr.9 \ + bhnd.9 bhnd_match_core.9 \ + bhnd.9 bhnd_nvram_getvar.9 \ + bhnd.9 bhnd_nvram_getvar_array.9 \ + bhnd.9 bhnd_nvram_getvar_int.9 \ + bhnd.9 bhnd_nvram_getvar_int16.9 \ + bhnd.9 bhnd_nvram_getvar_int32.9 \ + bhnd.9 bhnd_nvram_getvar_int8.9 \ + bhnd.9 bhnd_nvram_getvar_str.9 \ + bhnd.9 bhnd_nvram_getvar_uint.9 \ + bhnd.9 bhnd_nvram_getvar_uint16.9 \ + bhnd.9 bhnd_nvram_getvar_uint32.9 \ + bhnd.9 bhnd_nvram_getvar_uint8.9 \ + bhnd.9 bhnd_nvram_string_array_next.9 \ + bhnd.9 bhnd_read_board_info.9 \ + bhnd.9 bhnd_read_config.9 \ + bhnd.9 bhnd_read_ioctl.9 \ + bhnd.9 bhnd_read_iost.9 \ + bhnd.9 bhnd_register_provider.9 \ + bhnd.9 bhnd_release_ext_rsrc.9 \ + bhnd.9 bhnd_release_pmu.9 \ + bhnd.9 bhnd_release_provider.9 \ + bhnd.9 bhnd_release_resource.9 \ + bhnd.9 bhnd_release_resources.9 \ + bhnd.9 bhnd_request_clock.9 \ + bhnd.9 bhnd_request_ext_rsrc.9 \ + bhnd.9 bhnd_reset_hw.9 \ + bhnd.9 bhnd_retain_provider.9 \ + bhnd.9 bhnd_set_custom_core_desc.9 \ + bhnd.9 bhnd_set_default_core_desc.9 \ + bhnd.9 bhnd_suspend_hw.9 \ + bhnd.9 bhnd_unmap_intr.9 \ + bhnd.9 bhnd_vendor_name.9 \ + bhnd.9 bhnd_write_config.9 \ + bhnd.9 bhnd_write_ioctl.9 +MLINKS+=bhnd_erom.9 bhnd_erom_alloc.9 \ + bhnd_erom.9 bhnd_erom_dump.9 \ + bhnd_erom.9 bhnd_erom_fini_static.9 \ + bhnd_erom.9 bhnd_erom_free.9 \ + bhnd_erom.9 bhnd_erom_free_core_table.9 \ + bhnd_erom.9 bhnd_erom_get_core_table.9 \ + bhnd_erom.9 bhnd_erom_init_static.9 \ + bhnd_erom.9 bhnd_erom_io.9 \ + bhnd_erom.9 bhnd_erom_io_fini.9 \ + bhnd_erom.9 bhnd_erom_io_map.9 \ + bhnd_erom.9 bhnd_erom_io_read.9 \ + bhnd_erom.9 bhnd_erom_iobus_init.9 \ + bhnd_erom.9 bhnd_erom_iores_new.9 \ + bhnd_erom.9 bhnd_erom_lookup_core.9 \ + bhnd_erom.9 bhnd_erom_lookup_core_addr.9 \ + bhnd_erom.9 bhnd_erom_probe.9 \ + bhnd_erom.9 bhnd_erom_probe_driver_classes.9 MLINKS+=bitset.9 BITSET_DEFINE.9 \ bitset.9 BITSET_T_INITIALIZER.9 \ bitset.9 BITSET_FSET.9 \ Added: head/share/man/man9/bhnd.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/bhnd.9 Mon Nov 27 21:30:49 2017 (r326291) @@ -0,0 +1,2644 @@ +.\" Copyright (c) 2015-2016 Landon Fuller +.\" Copyright (c) 2017 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written by Landon Fuller +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 9, 2017 +.Dt BHND 9 +.Os +.Sh NAME +.Nm bhnd +.Nd BHND driver programming interface +.Sh SYNOPSIS +.In dev/bhnd/bhnd.h +.\" +.Ss Bus Resource Functions +.Ft int +.Fo bhnd_activate_resource +.Fa "device_t dev" "int type" "int rid" "struct bhnd_resource *r" +.Fc +.Ft "struct bhnd_resource *" +.Fo bhnd_alloc_resource +.Fa "device_t dev" "int type" "int *rid" "rman_res_t start" "rman_res_t end" +.Fa "rman_res_t count" "u_int flags" +.Fc +.Ft "struct bhnd_resource *" +.Fo bhnd_alloc_resource_any +.Fa "device_t dev" "int type" "int *rid" "u_int flags" +.Fc +.Ft int +.Fo bhnd_alloc_resources +.Fa "device_t dev" "struct resource_spec *rs" "struct bhnd_resource **res" +.Fc +.Ft int +.Fo bhnd_deactivate_resource +.Fa "device_t dev" "int type" "int rid" "struct bhnd_resource *r" +.Fc +.Ft int +.Fo bhnd_release_resource +.Fa "device_t dev" "int type" "int rid" "struct bhnd_resource *r" +.Fc +.Ft void +.Fo bhnd_release_resources +.Fa "device_t dev" "const struct resource_spec *rs" +.Fa "struct bhnd_resource **res" +.Fc +.\" +.Ss "Bus Space Functions" +.Ft void +.Fo bhnd_bus_barrier +.Fa "struct bhnd_resource *r" "bus_size_t offset" +.Fa "bus_size_t length" "int flags" +.Fc +.Ft uint8_t +.Fn bhnd_bus_read_1 "struct bhnd_resource *r" "bus_size_t offset" +.Ft uint16_t +.Fn bhnd_bus_read_2 "struct bhnd_resource *r" "bus_size_t offset" +.Ft uint32_t +.Fn bhnd_bus_read_4 "struct bhnd_resource *r" "bus_size_t offset" +.Ft void +.Fo bhnd_bus_read_multi_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_multi_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_multi_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_multi_stream_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_multi_stream_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_multi_stream_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_stream_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_stream_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_read_region_stream_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fn bhnd_bus_read_stream_1 "struct bhnd_resource *r" "bus_size_t offset" +.Ft void +.Fn bhnd_bus_read_stream_2 "struct bhnd_resource *r" "bus_size_t offset" +.Ft uint32_t +.Fn bhnd_bus_read_stream_4 "struct bhnd_resource *r" "bus_size_t offset" +.Ft void +.Fo bhnd_bus_set_multi_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_set_multi_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_set_multi_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_set_region_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_set_region_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_set_region_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t value" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fn bhnd_bus_write_1 "struct bhnd_resource *r" "uint8_t value" +.Ft void +.Fn bhnd_bus_write_2 "struct bhnd_resource *r" "uint16_t value" +.Ft void +.Fn bhnd_bus_write_4 "struct bhnd_resource *r" "uint32_t value" +.Ft void +.Fo bhnd_bus_write_multi_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_multi_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_multi_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_multi_stream_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_multi_stream_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_multi_stream_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_stream_1 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint8_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_stream_2 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint16_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fo bhnd_bus_write_region_stream_4 +.Fa "struct bhnd_resource *r" "bus_size_t offset" "uint32_t *datap" +.Fa "bus_size_t count" +.Fc +.Ft void +.Fn bhnd_bus_write_stream_1 "struct bhnd_resource *r" "uint8_t value" +.Ft void +.Fn bhnd_bus_write_stream_2 "struct bhnd_resource *r" "uint16_t value" +.Ft void +.Fn bhnd_bus_write_stream_4 "struct bhnd_resource *r" "uint32_t value" +.\" +.Ss "Device Configuration Functions" +.Ft int +.Fn bhnd_read_ioctl "device_t dev" "uint16_t *ioctl" +.Ft int +.Fn bhnd_write_ioctl "device_t dev" "uint16_t value" "uint16_t mask" +.Ft int +.Fn bhnd_read_iost "device_t dev" "uint16_t *iost" +.Ft uint32_t +.Fo bhnd_read_config +.Fa "device_t dev" "bus_size_t offset" "void *value" "u_int width" +.Fc +.Ft int +.Fo bhnd_write_config +.Fa "device_t dev" "bus_size_t offset" "const void *value" "u_int width" +.Fc +.Ft int +.Fn bhnd_reset_hw "device_t dev" "uint16_t ioctl" +.Ft int +.Fn bhnd_suspend_hw "device_t dev" +.Ft bool +.Fn bhnd_is_hw_suspended "device_t dev" +.\" +.Ss "Device Information Functions" +.Ft bhnd_attach_type +.Fo bhnd_get_attach_type +.Fa "device_t dev" +.Fc +.Ft "const struct bhnd_chipid *" +.Fo bhnd_get_chipid +.Fa "device_t dev" +.Fc +.Ft bhnd_devclass_t +.Fo bhnd_get_class +.Fa "device_t dev" +.Fc +.Ft u_int +.Fo bhnd_get_core_index +.Fa "device_t dev" +.Fc +.Ft "struct bhnd_core_info" +.Fo bhnd_get_core_info +.Fa "device_t dev" +.Fc +.Ft int +.Fo bhnd_get_core_unit +.Fa "device_t dev" +.Fc +.Ft uint16_t +.Fo bhnd_get_device +.Fa "device_t dev" +.Fc +.Ft const char * +.Fo bhnd_get_device_name +.Fa "device_t dev" +.Fc +.Ft uint8_t +.Fo bhnd_get_hwrev +.Fa "device_t dev" +.Fc +.Ft uint16_t +.Fo bhnd_get_vendor +.Fa "device_t dev" +.Fc +.Ft const char * +.Fo bhnd_get_vendor_name +.Fa "device_t dev" +.Fc +.Ft int +.Fo bhnd_read_board_info +.Fa "device_t dev" "struct bhnd_board_info *info" +.Fc +.\" +.Ss "Device Matching Functions" +.Ft bool +.Fo bhnd_board_matches +.Fa "const struct bhnd_board_info *board" "const struct bhnd_board_match *desc" +.Fc +.Ft device_t +.Fo bhnd_bus_match_child +.Fa "device_t bus" "const struct bhnd_core_match *desc" +.Fc +.Ft bool +.Fo bhnd_chip_matches +.Fa "const struct bhnd_chipid *chip" "const struct bhnd_chip_match *desc" +.Fc +.Ft "struct bhnd_core_match" +.Fo bhnd_core_get_match_desc +.Fa "const struct bhnd_core_info *core" +.Fc +.Ft bool +.Fo bhnd_core_matches +.Fa "const struct bhnd_core_info *core" "const struct bhnd_core_match *desc" +.Fc +.Ft bool +.Fo bhnd_cores_equal +.Fa "const struct bhnd_core_info *lhs" "const struct bhnd_core_info *rhs" +.Fc +.Ft bool +.Fo bhnd_hwrev_matches +.Fa "uint16_t hwrev" "const struct bhnd_hwrev_match *desc" +.Fc +.Ft "const struct bhnd_core_info *" +.Fo bhnd_match_core +.Fa "const struct bhnd_core_info *cores" "u_int num_cores" +.Fa "const struct bhnd_core_match *desc" +.Fc +.\" +.Ss "Device Table Functions" +.Ft "const struct bhnd_device *" +.Fo bhnd_device_lookup +.Fa "device_t dev" "const struct bhnd_device *table" "size_t entry_size" +.Fc +.Ft bool +.Fo bhnd_device_matches +.Fa "device_t dev" "const struct bhnd_device_match *desc" +.Fc +.Ft uint32_t +.Fo bhnd_device_quirks +.Fa "device_t dev" "const struct bhnd_device *table" "size_t entry_size" +.Fc +.Fo BHND_BOARD_QUIRK +.Fa "board" "flags" +.Fc +.Fo BHND_CHIP_QUIRK +.Fa "chip" "hwrev" "flags" +.Fc +.Fo BHND_CORE_QUIRK +.Fa "hwrev" "flags" +.Fc +.Fo BHND_DEVICE +.Fa "vendor" "device" "desc" "quirks" "..." +.Fc +.Fo BHND_DEVICE_IS_END +.Fa "struct bhnd_device *d" +.Fc +.Fo BHND_DEVICE_QUIRK_IS_END +.Fa "struct bhnd_device_quirk *q" +.Fc +.Fo BHND_PKG_QUIRK +.Fa "chip" "pkg" "flags" +.Fc +.Bd -literal +struct bhnd_device_quirk { + struct bhnd_device_match desc; + uint32_t quirks; +}; +.Ed +.Bd -literal +struct bhnd_device { + const struct bhnd_device_match core; + const char *desc; + const struct bhnd_device_quirk *quirks_table; + uint32_t device_flags; +}; +.Ed +.Bd -literal +enum { + BHND_DF_ANY = 0, + BHND_DF_HOSTB = (1 << 0), + BHND_DF_SOC = (1 << 1), + BHND_DF_ADAPTER = (1 << 2) +}; +.Ed +.Bd -literal +#define BHND_DEVICE_END { { BHND_MATCH_ANY }, NULL, NULL, 0 } +.Ed +.Bd -literal +#define BHND_DEVICE_QUIRK_END { { BHND_MATCH_ANY }, 0 } +.Ed +.\" +.Ss "DMA Address Translation Functions" +.Ft int +.Fo bhnd_get_dma_translation +.Fa "device_t dev" "u_int width" "uint32_t flags" "bus_dma_tag_t *dmat" +.Fa "struct bhnd_dma_translation *translation" +.Fc +.Bd -literal +struct bhnd_dma_translation { + bhnd_addr_t base_addr; + bhnd_addr_t addr_mask; + bhnd_addr_t addrext_mask; + uint32_t flags; +}; +.Ed +.Bd -literal +typedef enum { + BHND_DMA_ADDR_30BIT = 30, + BHND_DMA_ADDR_32BIT = 32, + BHND_DMA_ADDR_64BIT = 64 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***