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
This commit is contained in:
parent
18e980c0e0
commit
05ed3f9063
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326291
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
81
share/man/man4/bhnd_chipc.4
Normal file
81
share/man/man4/bhnd_chipc.4
Normal file
@ -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 .
|
74
share/man/man4/bhnd_pmu.4
Normal file
74
share/man/man4/bhnd_pmu.4
Normal file
@ -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 .
|
@ -1,6 +1,10 @@
|
||||
.\" Copyright (c) 2015 Landon Fuller
|
||||
.\" Copyright (c) 2015 Landon Fuller <landonf@FreeBSD.org>
|
||||
.\" 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
|
||||
|
75
share/man/man4/bhndb_pci.4
Normal file
75
share/man/man4/bhndb_pci.4
Normal file
@ -0,0 +1,75 @@
|
||||
.\" Copyright (c) 2015 Landon Fuller <landonf@FreeBSD.org>
|
||||
.\" 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 .
|
@ -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 (MIPS),
|
||||
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
|
||||
|
@ -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 \
|
||||
|
2644
share/man/man9/bhnd.9
Normal file
2644
share/man/man9/bhnd.9
Normal file
File diff suppressed because it is too large
Load Diff
488
share/man/man9/bhnd_erom.9
Normal file
488
share/man/man9/bhnd_erom.9
Normal file
@ -0,0 +1,488 @@
|
||||
.\" Copyright (c) 2015-2016 Landon Fuller <landonf@FreeBSD.org>
|
||||
.\" 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_EROM 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bhnd_erom ,
|
||||
.Nm bhnd_erom_alloc ,
|
||||
.Nm bhnd_erom_dump ,
|
||||
.Nm bhnd_erom_fini_static ,
|
||||
.Nm bhnd_erom_free ,
|
||||
.Nm bhnd_erom_free_core_table ,
|
||||
.Nm bhnd_erom_get_core_table ,
|
||||
.Nm bhnd_erom_init_static ,
|
||||
.Nm bhnd_erom_io ,
|
||||
.Nm bhnd_erom_io_fini ,
|
||||
.Nm bhnd_erom_io_map ,
|
||||
.Nm bhnd_erom_io_read ,
|
||||
.Nm bhnd_erom_iobus_init ,
|
||||
.Nm bhnd_erom_iores_new ,
|
||||
.Nm bhnd_erom_lookup_core ,
|
||||
.Nm bhnd_erom_lookup_core_addr ,
|
||||
.Nm bhnd_erom_probe ,
|
||||
.Nm bhnd_erom_probe_driver_classes
|
||||
.Nd BHND device enumeration table parsing
|
||||
.Sh SYNOPSIS
|
||||
.In dev/bhnd/bhnd.h
|
||||
.In dev/bhnd/bhnd_erom.h
|
||||
.\"
|
||||
.Vt typedef struct bhnd_erom bhnd_erom_t ;
|
||||
.Vt typedef struct kobj_class bhnd_erom_class_t ;
|
||||
.Vt typedef struct bhnd_erom_static bhnd_erom_static_t ;
|
||||
.Ft int
|
||||
.Fo bhnd_erom_probe
|
||||
.Fa "bhnd_erom_class_t *cls"
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "const struct bhnd_chipid *hint"
|
||||
.Fa "struct bhnd_chipid *cid"
|
||||
.Fc
|
||||
.Ft bhnd_erom_class_t *
|
||||
.Fo bhnd_erom_probe_driver_classes
|
||||
.Fa "devclass_t bus_devclass"
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "const struct bhnd_chipid *hint"
|
||||
.Fa "struct bhnd_chipid *cid"
|
||||
.Fc
|
||||
.Ft bhnd_erom_t *
|
||||
.Fo bhnd_erom_alloc
|
||||
.Fa "bhnd_erom_class_t *cls"
|
||||
.Fa "const struct bhnd_chipid *cid"
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fo bhnd_erom_free
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_init_static
|
||||
.Fa "bhnd_erom_class_t *cls"
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fa "size_t esize"
|
||||
.Fa "const struct bhnd_chipid *cid"
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fo bhnd_erom_fini_static
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_dump
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_get_core_table
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fa "struct bhnd_core_info **cores"
|
||||
.Fa "u_int *num_cores"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fo bhnd_erom_free_core_table
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fa "struct bhnd_core_info *cores"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_lookup_core
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fa "const struct bhnd_core_match *desc"
|
||||
.Fa "struct bhnd_core_info *core"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_lookup_core_addr
|
||||
.Fa "bhnd_erom_t *erom"
|
||||
.Fa "const struct bhnd_core_match *desc"
|
||||
.Fa "bhnd_port_type type"
|
||||
.Fa "u_int port"
|
||||
.Fa "u_int region"
|
||||
.Fa "struct bhnd_core_info *core"
|
||||
.Fa "bhnd_addr_t *addr"
|
||||
.Fa "bhnd_size_t *size"
|
||||
.Fc
|
||||
.\"
|
||||
.Ss Bus Space I/O
|
||||
.Ft struct bhnd_erom_io *
|
||||
.Fo bhnd_erom_iores_new
|
||||
.Fa "device_t dev"
|
||||
.Fa "int rid"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_iobus_init
|
||||
.Fa "struct bhnd_erom_iobus *iobus"
|
||||
.Fa "bhnd_addr_t addr"
|
||||
.Fa "bhnd_size_t size"
|
||||
.Fa "bus_space_tag_t bst"
|
||||
.Fa "bus_space_handle_t bsh"
|
||||
.Fc
|
||||
.Ft void
|
||||
.Fo bhnd_erom_io_fini
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo bhnd_erom_io_map
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "bhnd_addr_t addr"
|
||||
.Fa "bhnd_size_t size"
|
||||
.Fc
|
||||
.Ft uint32_t
|
||||
.Fo bhnd_erom_io_read
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "bhnd_size_t offset"
|
||||
.Fa "u_int width"
|
||||
.Fc
|
||||
.In dev/bhnd/bhnd_eromvar.h
|
||||
.Bd -literal
|
||||
struct bhnd_erom_io {
|
||||
bhnd_erom_io_map_t *map;
|
||||
bhnd_erom_io_read_t *read;
|
||||
bhnd_erom_io_fini_t *fini;
|
||||
};
|
||||
.Ed
|
||||
.Ft typedef int
|
||||
.Fo \*(lpbhnd_erom_io_map_t\*(rp
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "bhnd_addr_t addr"
|
||||
.Fa "bhnd_size_t size"
|
||||
.Fc
|
||||
.Ft typedef uint32_t
|
||||
.Fo \*(lpbhnd_erom_io_read_t\*(rp
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fa "bhnd_size_t offset"
|
||||
.Fa "u_int width"
|
||||
.Fc
|
||||
.Ft typedef void
|
||||
.Fo "\*(lpbhnd_erom_io_fini_t\*(rp
|
||||
.Fa "struct bhnd_erom_io *eio"
|
||||
.Fc
|
||||
.\"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
framework provides a common parser interface to the BHND device enumeration
|
||||
table formats supported by
|
||||
.Xr bhnd 4
|
||||
bus drivers.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_probe
|
||||
function is used to identify a
|
||||
.Xr bhnd 4
|
||||
bus device and determine whether the erom class
|
||||
.Fa cls
|
||||
is capable of parsing its device enumeration table.
|
||||
If successful, the probed chip identification is written to the location
|
||||
pointed to by
|
||||
.Fa cid .
|
||||
.Pp
|
||||
A pointer to a bus I/O instance mapping the device registers of the first
|
||||
hardware core must be provided using the
|
||||
.Fa eio
|
||||
argument.
|
||||
The registers can be mapped using
|
||||
.Xr bhnd_erom_io_map 9 .
|
||||
.Pp
|
||||
On devices that do not provide standard
|
||||
.Xr bhnd_chipc 4
|
||||
chip identification registers via the first hardware core, a pointer to chip
|
||||
information for the device must be specified using the
|
||||
.Fa hint
|
||||
argument.
|
||||
Otherwise, the
|
||||
.Fa hint
|
||||
argument should be
|
||||
.Dv NULL .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_probe_driver_classes
|
||||
function is a convenience wrapper for
|
||||
.Fn bhnd_erom_probe .
|
||||
This function will iterate over all drivers instances in the device class
|
||||
.Fa bus_devclass ,
|
||||
using
|
||||
.Xr bhnd_driver_get_erom_class 9
|
||||
to fetch each driver's erom class and probe the hardware core mapped by
|
||||
.Fa eio .
|
||||
A pointer to the erom class with the highest probe priority is returned on
|
||||
success.
|
||||
If there are no successful probe results from the erom classes,
|
||||
.Dv NULL
|
||||
is returned.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_alloc
|
||||
function allocates and returns a new parser instance of the device enumeration
|
||||
class
|
||||
.Fa cls
|
||||
for the chip identified by
|
||||
.Fa cid ,
|
||||
using the bus I/O instance
|
||||
.Fa eio
|
||||
to map and read the device table.
|
||||
On success, the returned
|
||||
.Vt bhnd_erom_t
|
||||
assumes ownership of
|
||||
.Fa eio .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_free
|
||||
function releases all resources held by an erom parser successfully allocated
|
||||
using
|
||||
.Fn bhnd_erom_alloc .
|
||||
.Pp
|
||||
Clients can manage the allocation of memory themselves with
|
||||
.Fn bhnd_erom_init_static .
|
||||
This is useful in cases like performing device enumeration before
|
||||
.Xr malloc 9
|
||||
initialization.
|
||||
.Fn bhnd_erom_init_static
|
||||
is called with
|
||||
.Fa erom
|
||||
set to a pointer to the memory for the instance, and the total available bytes
|
||||
in
|
||||
.Fa esize .
|
||||
.Pp
|
||||
The
|
||||
.Vt bhnd_erom_static
|
||||
structure is large enough to statically allocate any supported parser class
|
||||
instance state.
|
||||
Pointers to a
|
||||
.Vt bhnd_erom_static
|
||||
structure can be cast to
|
||||
.Vt bhnd_erom_t .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_fini_static
|
||||
function releases all resources held by an erom parser successfully
|
||||
initialized using
|
||||
.Fn bhnd_erom_init_static .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_dump
|
||||
function enumerates and prints all device table entries in
|
||||
.Fa erom .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_get_core_table
|
||||
function enumerates all device table entries in
|
||||
.Fa erom ,
|
||||
returning a table of core information structures in
|
||||
.Fa cores
|
||||
and the count in
|
||||
.Fa num_cores .
|
||||
The memory allocated for the table must be freed using
|
||||
.Fn bhnd_erom_free_core_table .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_free_core_table
|
||||
function frees any memory allocated in a previous call to
|
||||
.Fn bhnd_erom_get_core_table .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_lookup_core
|
||||
function locates the first device table entry in
|
||||
.Fa erom
|
||||
that matches core match descriptor
|
||||
.Fa desc ,
|
||||
writing the core information of the matching entry to
|
||||
.Fa core .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_lookup_core_addr
|
||||
function locates the first device table entry in
|
||||
.Fa erom
|
||||
that matches core match descriptor
|
||||
.Fa desc ,
|
||||
fetching the base address and size of the memory region
|
||||
.Fa region
|
||||
mapped to the port
|
||||
.Fa port
|
||||
of type
|
||||
.Fa type .
|
||||
On success, the core information of the matching entry is written to
|
||||
.Fa core ,
|
||||
the base address of the port region is written to
|
||||
.Fa addr ,
|
||||
and the total size of the port region is written to
|
||||
.Fa size .
|
||||
If the core information is not desired, set
|
||||
.Fa core
|
||||
to
|
||||
.Dv NULL .
|
||||
.Ss Bus Space I/O
|
||||
.Pp
|
||||
The
|
||||
.Vt bhnd_erom_io
|
||||
structure provides a set of I/O callbacks used by
|
||||
.Nm
|
||||
to map and read the device enumeration table.
|
||||
Clients may either use the existing
|
||||
.Fn bhnd_erom_iores_new
|
||||
or
|
||||
.Fn bhnd_erom_iobus_init
|
||||
functions to allocate a bus I/O instance, or implement the
|
||||
.Vt bhnd_erom_io
|
||||
callbacks directly.
|
||||
.Pp
|
||||
The
|
||||
.Vt bhnd_erom_io
|
||||
structure contains these required fields:
|
||||
.Pp
|
||||
.Bl -tag -width "read" -offset indent
|
||||
.It Fa map
|
||||
A function implementing
|
||||
.Fn bhnd_erom_io_map .
|
||||
.It Fa read
|
||||
A function implementing
|
||||
.Fn bhnd_erom_io_read .
|
||||
.It Fa fini
|
||||
A function implementing
|
||||
.Fn bhnd_erom_io_fini .
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_iores_new
|
||||
function allocates and returns a new bus I/O instance that will perform mapping
|
||||
by using
|
||||
.Xr bhnd_alloc_resource 9
|
||||
to allocate
|
||||
.Dv SYS_RES_MEMORY
|
||||
bus resources on demand from the device
|
||||
.Fa dev
|
||||
using a resource ID of
|
||||
.Fa rid .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_iobus_init
|
||||
function initializes a caller-allocated bus I/O instance
|
||||
.Fa iobus
|
||||
that will perform bus I/O using the bus space tag
|
||||
.Fa bst
|
||||
and handle
|
||||
.Fa bsh .
|
||||
The base address and total size mapped by
|
||||
.Fa bsh
|
||||
should be specified using the
|
||||
.Fa addr
|
||||
and
|
||||
.Fa size
|
||||
arguments.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_io_fini
|
||||
function frees all resources held by the bus I/O instance
|
||||
.Fa eio .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_io_map
|
||||
function is used to request that the bus I/O instance
|
||||
.Fa eio
|
||||
map
|
||||
.Xr bhnd 4
|
||||
bus space at bus address
|
||||
.Fa addr
|
||||
with a mapping of size
|
||||
.Fa size .
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_io_read
|
||||
function is used to read a data item of
|
||||
.Fa width
|
||||
bytes from the bus I/O instance
|
||||
.Fa eio
|
||||
at
|
||||
.Fa offset ,
|
||||
relative to the bus address previously mapped using
|
||||
.Fn bhnd_erom_io_map .
|
||||
.Pp
|
||||
The
|
||||
.Fa width
|
||||
must be one of 1, 2, or 4 bytes.
|
||||
.Pp
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn bhnd_erom_probe
|
||||
function returns a standard
|
||||
.Xr DEVICE_PROBE 9
|
||||
result.
|
||||
.Pp
|
||||
A return value equal to or less than zero indicates success.
|
||||
Values greater than zero indicates an error, and will be an appropriate error
|
||||
code.
|
||||
For values less than or equal to zero, the erom class returning the highest
|
||||
value should be used to parse the erom table.
|
||||
.Er ENXIO
|
||||
is returned if the device is not supported by the parser.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_probe_driver_classes
|
||||
function returns a pointer to the probed
|
||||
.Vt bhnd_erom_class_t
|
||||
instance on success, a null pointer otherwise.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_alloc
|
||||
function returns a pointer to
|
||||
.Vt bhnd_erom_t
|
||||
on success, or
|
||||
.Dv NULL
|
||||
if an error occurred allocating or initializing the EROM parser.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_init_static
|
||||
function returns 0 on success,
|
||||
.Er ENOMEM
|
||||
if the allocation size is smaller than required by the erom class, or
|
||||
an appropriate error code if initialization otherwise fails.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_lookup_core
|
||||
function returns 0 on success,
|
||||
.Er ENOENT
|
||||
if no matching core is found, or an appropriate error code if parsing the device
|
||||
table otherwise fails.
|
||||
.Pp
|
||||
The
|
||||
.Fn bhnd_erom_dump ,
|
||||
.Fn bhnd_erom_get_core_table ,
|
||||
.Fn bhnd_erom_iobus_init ,
|
||||
.Fn bhnd_erom_io_map ,
|
||||
functions return 0 on success, otherwise an appropriate error code is returned.
|
||||
.Sh SEE ALSO
|
||||
.Xr bhnd 4 ,
|
||||
.Xr bhnd 9 ,
|
||||
.Xr bhnd_alloc_resource 9
|
||||
.Xr bhnd_driver_get_erom_class 9
|
||||
.Xr bus_space 9
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
.Nm
|
||||
framework and this manual page were written by
|
||||
.An Landon Fuller Aq Mt landonf@FreeBSD.org .
|
@ -270,7 +270,7 @@ struct bhnd_dma_translation {
|
||||
bhnd_addr_t addrext_mask;
|
||||
|
||||
/**
|
||||
* Translation flags (see bhnd_dma_translation_flags)
|
||||
* Translation flags (see bhnd_dma_translation_flags).
|
||||
*/
|
||||
uint32_t flags;
|
||||
};
|
||||
@ -909,8 +909,7 @@ bhnd_get_dma_translation(device_t dev, u_int width, uint32_t flags,
|
||||
* This relies on NVRAM access, and will fail if a valid NVRAM device cannot
|
||||
* be found, or is not yet attached.
|
||||
*
|
||||
* @param dev The parent of @p child.
|
||||
* @param child The bhnd device requesting board info.
|
||||
* @param dev The bhnd device requesting board info.
|
||||
* @param[out] info On success, will be populated with the bhnd(4) device's
|
||||
* board information.
|
||||
*
|
||||
@ -986,8 +985,7 @@ bhnd_map_intr(device_t dev, u_int intr, rman_res_t *irq)
|
||||
* Unmap an bus interrupt previously mapped via bhnd_map_intr().
|
||||
*
|
||||
* @param dev The requesting device.
|
||||
* @param intr The interrupt number being unmapped. This is equivalent to the
|
||||
* bus resource ID for the interrupt.
|
||||
* @param irq The interrupt value being unmapped.
|
||||
*/
|
||||
static inline void
|
||||
bhnd_unmap_intr(device_t dev, rman_res_t irq)
|
||||
@ -1374,15 +1372,15 @@ bhnd_release_resource(device_t dev, int type, int rid,
|
||||
*
|
||||
* @param dev A bhnd bus child device.
|
||||
* @param type The port type being queried.
|
||||
* @param port_num The port number being queried.
|
||||
* @param region_num The region number being queried.
|
||||
* @param port The port number being queried.
|
||||
* @param region The region number being queried.
|
||||
*/
|
||||
static inline bool
|
||||
bhnd_is_region_valid(device_t dev, bhnd_port_type type, u_int port_num,
|
||||
u_int region_num)
|
||||
bhnd_is_region_valid(device_t dev, bhnd_port_type type, u_int port,
|
||||
u_int region)
|
||||
{
|
||||
return (BHND_BUS_IS_REGION_VALID(device_get_parent(dev), dev, type,
|
||||
port_num, region_num));
|
||||
port, region));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -652,7 +652,7 @@ METHOD int reset_hw {
|
||||
*
|
||||
* The hardware may be brought out of reset via bhnd_reset_hw().
|
||||
*
|
||||
* @param dev The bhnd bus parent of @P child.
|
||||
* @param dev The bhnd bus parent of @p child.
|
||||
* @param dev The device to be suspended.
|
||||
*
|
||||
* @retval 0 success
|
||||
@ -973,7 +973,7 @@ METHOD int deactivate_resource {
|
||||
*
|
||||
* @param dev The device whose child is being examined.
|
||||
* @param child The child device.
|
||||
* @parem self If true, return @p child's interrupt domain, rather than the
|
||||
* @param self If true, return @p child's interrupt domain, rather than the
|
||||
* domain in which @p child resides.
|
||||
*
|
||||
* On Non-OFW targets, this should either return:
|
||||
|
@ -398,6 +398,7 @@ bhnd_erom_iores_fini(struct bhnd_erom_io *eio)
|
||||
* Initialize an I/O instance that will perform mapping directly from the
|
||||
* given bus space tag and handle.
|
||||
*
|
||||
* @param iobus The I/O instance to be initialized.
|
||||
* @param addr The base address mapped by @p bsh.
|
||||
* @param size The total size mapped by @p bsh.
|
||||
* @param bst Bus space tag for @p bsh.
|
||||
|
@ -222,6 +222,8 @@ bhnd_vendor_name(uint16_t vendor)
|
||||
|
||||
/**
|
||||
* Return the name of a port type.
|
||||
*
|
||||
* @param port_type The port type to look up.
|
||||
*/
|
||||
const char *
|
||||
bhnd_port_type_name(bhnd_port_type port_type)
|
||||
@ -240,6 +242,8 @@ bhnd_port_type_name(bhnd_port_type port_type)
|
||||
|
||||
/**
|
||||
* Return the name of an NVRAM source.
|
||||
*
|
||||
* @param nvram_src The NVRAM source type to look up.
|
||||
*/
|
||||
const char *
|
||||
bhnd_nvram_src_name(bhnd_nvram_src nvram_src)
|
||||
@ -277,7 +281,7 @@ bhnd_find_core_desc(uint16_t vendor, uint16_t device)
|
||||
/**
|
||||
* Return a human-readable name for a BHND core.
|
||||
*
|
||||
* @param vendor The core designer's JEDEC-106 Manufacturer ID
|
||||
* @param vendor The core designer's JEDEC-106 Manufacturer ID.
|
||||
* @param device The core identifier.
|
||||
*/
|
||||
const char *
|
||||
@ -294,7 +298,7 @@ bhnd_find_core_name(uint16_t vendor, uint16_t device)
|
||||
/**
|
||||
* Return the device class for a BHND core.
|
||||
*
|
||||
* @param vendor The core designer's JEDEC-106 Manufacturer ID
|
||||
* @param vendor The core designer's JEDEC-106 Manufacturer ID.
|
||||
* @param device The core identifier.
|
||||
*/
|
||||
bhnd_devclass_t
|
||||
@ -338,9 +342,9 @@ bhnd_core_class(const struct bhnd_core_info *ci)
|
||||
* @param size Capacity of @p buffer, in bytes.
|
||||
* @param chip_id Chip ID to be formatted.
|
||||
*
|
||||
* @return Returns the required number of bytes on success, or a negative
|
||||
* integer on failure. No more than @p size-1 characters be written, with
|
||||
* the @p size'th set to '\0'.
|
||||
* @return The required number of bytes on success, or a negative integer on
|
||||
* failure. No more than @p size-1 characters be written, with the @p size'th
|
||||
* set to '\0'.
|
||||
*
|
||||
* @sa BHND_CHIPID_MAX_NAMELEN
|
||||
*/
|
||||
@ -355,10 +359,11 @@ bhnd_format_chip_id(char *buffer, size_t size, uint16_t chip_id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a core info record with data from from a bhnd-attached @p dev.
|
||||
* Return a core info record populated from a bhnd-attached @p dev.
|
||||
*
|
||||
* @param dev A bhnd device.
|
||||
* @param core The record to be initialized.
|
||||
*
|
||||
* @return A core info record for @p dev.
|
||||
*/
|
||||
struct bhnd_core_info
|
||||
bhnd_get_core_info(device_t dev) {
|
||||
@ -486,6 +491,9 @@ bhnd_bus_free_children(device_t *devlist)
|
||||
* @param devlist An array of bhnd devices.
|
||||
* @param devcount The number of devices in @p devs.
|
||||
* @param order The sort order to be used.
|
||||
*
|
||||
* @retval 0 success
|
||||
* @retval EINVAL if the sort order is unknown.
|
||||
*/
|
||||
int
|
||||
bhnd_sort_devices(device_t *devlist, size_t devcount, bhnd_device_order order)
|
||||
@ -584,8 +592,8 @@ bhnd_bus_probe_children(device_t bus)
|
||||
* should be attached.
|
||||
*
|
||||
* @retval device_t if a matching parent device is found.
|
||||
* @retval NULL @p dev is not attached via a bhndb bus
|
||||
* @retval NULL no parent device is attached via @p bus_class.
|
||||
* @retval NULL if @p dev is not attached via a bhndb bus.
|
||||
* @retval NULL if no parent device is attached via @p bus_class.
|
||||
*/
|
||||
device_t
|
||||
bhnd_find_bridge_root(device_t dev, devclass_t bus_class)
|
||||
@ -650,9 +658,9 @@ bhnd_match_core(const struct bhnd_core_info *cores, u_int num_cores,
|
||||
*
|
||||
* @param cores The table to search.
|
||||
* @param num_cores The length of @p cores.
|
||||
* @param desc A match descriptor.
|
||||
* @param class The device class to match on.
|
||||
*
|
||||
* @retval bhnd_core_info if a matching core is found.
|
||||
* @retval non-NULL if a matching core is found.
|
||||
* @retval NULL if no matching core is found.
|
||||
*/
|
||||
const struct bhnd_core_info *
|
||||
@ -671,7 +679,8 @@ bhnd_find_core(const struct bhnd_core_info *cores, u_int num_cores,
|
||||
* Create an equality match descriptor for @p core.
|
||||
*
|
||||
* @param core The core info to be matched on.
|
||||
* @param desc On return, will be populated with a match descriptor for @p core.
|
||||
*
|
||||
* @return an equality match descriptor for @p core.
|
||||
*/
|
||||
struct bhnd_core_match
|
||||
bhnd_core_get_match_desc(const struct bhnd_core_info *core)
|
||||
@ -688,7 +697,7 @@ bhnd_core_get_match_desc(const struct bhnd_core_info *core)
|
||||
|
||||
|
||||
/**
|
||||
* Return true if the @p lhs is equal to @p rhs
|
||||
* Return true if the @p lhs is equal to @p rhs.
|
||||
*
|
||||
* @param lhs The first bhnd core descriptor to compare.
|
||||
* @param rhs The second bhnd core descriptor to compare.
|
||||
@ -713,7 +722,7 @@ bhnd_cores_equal(const struct bhnd_core_info *lhs,
|
||||
* @param core A bhnd core descriptor.
|
||||
* @param desc A match descriptor to compare against @p core.
|
||||
*
|
||||
* @retval true if @p core matches @p match
|
||||
* @retval true if @p core matches @p match.
|
||||
* @retval false if @p core does not match @p match.
|
||||
*/
|
||||
bool
|
||||
@ -749,7 +758,7 @@ bhnd_core_matches(const struct bhnd_core_info *core,
|
||||
* @param chip A bhnd chip identifier.
|
||||
* @param desc A match descriptor to compare against @p chip.
|
||||
*
|
||||
* @retval true if @p chip matches @p match
|
||||
* @retval true if @p chip matches @p match.
|
||||
* @retval false if @p chip does not match @p match.
|
||||
*/
|
||||
bool
|
||||
@ -778,7 +787,7 @@ bhnd_chip_matches(const struct bhnd_chipid *chip,
|
||||
* @param board The bhnd board info.
|
||||
* @param desc A match descriptor to compare against @p board.
|
||||
*
|
||||
* @retval true if @p chip matches @p match
|
||||
* @retval true if @p chip matches @p match.
|
||||
* @retval false if @p chip does not match @p match.
|
||||
*/
|
||||
bool
|
||||
@ -809,7 +818,7 @@ bhnd_board_matches(const struct bhnd_board_info *board,
|
||||
* @param hwrev A bhnd hardware revision.
|
||||
* @param desc A match descriptor to compare against @p core.
|
||||
*
|
||||
* @retval true if @p hwrev matches @p match
|
||||
* @retval true if @p hwrev matches @p match.
|
||||
* @retval false if @p hwrev does not match @p match.
|
||||
*/
|
||||
bool
|
||||
@ -832,7 +841,7 @@ bhnd_hwrev_matches(uint16_t hwrev, const struct bhnd_hwrev_match *desc)
|
||||
* @param dev A bhnd device.
|
||||
* @param desc A match descriptor to compare against @p dev.
|
||||
*
|
||||
* @retval true if @p dev matches @p match
|
||||
* @retval true if @p dev matches @p match.
|
||||
* @retval false if @p dev does not match @p match.
|
||||
*/
|
||||
bool
|
||||
@ -898,7 +907,7 @@ bhnd_device_matches(device_t dev, const struct bhnd_device_match *desc)
|
||||
* @param table The device table to search.
|
||||
* @param entry_size The @p table entry size, in bytes.
|
||||
*
|
||||
* @retval bhnd_device the first matching device, if any.
|
||||
* @retval non-NULL the first matching device, if any.
|
||||
* @retval NULL if no matching device is found in @p table.
|
||||
*/
|
||||
const struct bhnd_device *
|
||||
@ -953,8 +962,9 @@ bhnd_device_lookup(device_t dev, const struct bhnd_device *table,
|
||||
*
|
||||
* @param dev A bhnd device to match against @p table.
|
||||
* @param table The device table to search.
|
||||
* @param entry_size The @p table entry size, in bytes.
|
||||
*
|
||||
* @return returns all matching quirk flags.
|
||||
* @return all matching quirk flags.
|
||||
*/
|
||||
uint32_t
|
||||
bhnd_device_quirks(device_t dev, const struct bhnd_device *table,
|
||||
@ -1135,7 +1145,7 @@ bhnd_chipid_fixed_ncores(const struct bhnd_chipid *cid, uint16_t chipc_hwrev,
|
||||
* @param dev The device owning @p rs.
|
||||
* @param rs A resource spec that encompasses the ChipCommon register block.
|
||||
* @param chipc_offset The offset of the ChipCommon registers within @p rs.
|
||||
* @param[out] result the chip identification data.
|
||||
* @param[out] result The chip identification data.
|
||||
*
|
||||
* @retval 0 success
|
||||
* @retval non-zero if the ChipCommon identification data could not be read.
|
||||
@ -1768,7 +1778,7 @@ bhnd_service_registry_free_entry(struct bhnd_service_entry *entry)
|
||||
* registrations for @p provider.
|
||||
*
|
||||
* @retval 0 success
|
||||
* @retval EBUSY if active references to @p provider exist; @see
|
||||
* @retval EBUSY if active references to @p provider exist; see
|
||||
* bhnd_service_registry_retain() and
|
||||
* bhnd_service_registry_release().
|
||||
*/
|
||||
@ -1858,7 +1868,7 @@ bhnd_service_registry_retain(struct bhnd_service_registry *bsr,
|
||||
* bhnd_service_registry_retain().
|
||||
*
|
||||
* If this is the last reference to an inherited service provider registration
|
||||
* (@see BHND_SPF_INHERITED), the registration will also be removed, and
|
||||
* (see BHND_SPF_INHERITED), the registration will also be removed, and
|
||||
* true will be returned.
|
||||
*
|
||||
* @param bsr The service registry from which @p provider
|
||||
@ -1871,6 +1881,8 @@ bhnd_service_registry_retain(struct bhnd_service_registry *bsr,
|
||||
* provider.
|
||||
* @retval false The service provider was not inherited, or active
|
||||
* references to the provider remain.
|
||||
*
|
||||
* @see BHND_SPF_INHERITED
|
||||
*/
|
||||
bool
|
||||
bhnd_service_registry_release(struct bhnd_service_registry *bsr,
|
||||
@ -1917,7 +1929,7 @@ bhnd_service_registry_release(struct bhnd_service_registry *bsr,
|
||||
* populate @p dev's device description.
|
||||
*
|
||||
* @param dev A bhnd-bus attached device.
|
||||
* @param dev_name The core's name (e.g. "SDIO Device Core")
|
||||
* @param dev_name The core's name (e.g. "SDIO Device Core").
|
||||
*/
|
||||
void
|
||||
bhnd_set_custom_core_desc(device_t dev, const char *dev_name)
|
||||
@ -1955,6 +1967,7 @@ bhnd_set_default_core_desc(device_t dev)
|
||||
* description.
|
||||
*
|
||||
* @param dev A bhnd-bus attached device.
|
||||
* @param chip_id The chip identification.
|
||||
*/
|
||||
void
|
||||
bhnd_set_default_bus_desc(device_t dev, const struct bhnd_chipid *chip_id)
|
||||
|
@ -523,8 +523,8 @@ bhnd_nvram_type_host_align(bhnd_nvram_type type)
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate over all strings in the @p inp string array (@see
|
||||
* BHNF_NVRAM_TYPE_STRING_ARRAY).
|
||||
* Iterate over all strings in the @p inp string array (see
|
||||
* BHND_NVRAM_TYPE_STRING_ARRAY).
|
||||
*
|
||||
* @param inp The string array to be iterated. This must be a
|
||||
* buffer of one or more NUL-terminated strings.
|
||||
@ -540,6 +540,8 @@ bhnd_nvram_type_host_align(bhnd_nvram_type type)
|
||||
*
|
||||
* @retval non-NULL A reference to the next NUL-terminated string
|
||||
* @retval NULL If the end of the string array is reached.
|
||||
*
|
||||
* @see BHND_NVRAM_TYPE_STRING_ARRAY
|
||||
*/
|
||||
const char *
|
||||
bhnd_nvram_string_array_next(const char *inp, size_t ilen, const char *prev,
|
||||
|
Loading…
Reference in New Issue
Block a user