freebsd-skq/sys/dev/bhnd
Landon J. Fuller 664a749708 Implement a generic bhnd(4) device enumeration table API.
This defines a new bhnd_erom_if API, providing a common interface to device
enumeration on siba(4) and bcma(4) devices, for use both in the bhndb bridge
and SoC early boot contexts, and migrates mips/broadcom over to the new API.

This also replaces the previous adhoc device enumeration support implemented
for mips/broadcom.

Migration of bhndb to the new API will be implemented in a follow-up commit.


- Defined new bhnd_erom_if interface for bhnd(4) device enumeration, along
  with bcma(4) and siba(4)-specific implementations.
- Fixed a minor bug in bhndb that logged an error when we attempted to map the
  full siba(4) bus space (18000000-17FFFFFF) in the siba EROM parser.
- Reverted use of the resource's start address as the ChipCommon enum_addr in
  bhnd_read_chipid(). When called from bhndb, this address is found within the
  host address space, resulting in an invalid bridged enum_addr.
- Added support for falling back on standard bus_activate_resource() in
  bhnd_bus_generic_activate_resource(), enabling allocation of the bhnd_erom's
  bhnd_resource directly from a nexus-attached bhnd(4) device.
- Removed BHND_BUS_GET_CORE_TABLE(); it has been replaced by the erom API.
- Added support for statically initializing bhnd_erom instances, for use prior
  to malloc availability. The statically allocated buffer size is verified both
  at runtime, and via a compile-time assertion (see BHND_EROM_STATIC_BYTES).
- bhnd_erom classes are registered within a module via a linker set, allowing
  mips/broadcom to probe available EROM parser instances without creating a
  strong reference to bcma/siba-specific symbols.
- Migrated mips/broadcom to bhnd_erom_if, replacing the previous MIPS-specific
  device enumeration implementation.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7748
2016-09-03 23:57:17 +00:00
..
bcma Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhndb Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
cores [BHND/PMU] Correct shift of bits in BHND_PMU_SET_BITS macro 2016-09-01 13:38:46 +00:00
nvram bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
siba Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
tools bhnd(4): Implement NVRAM support required for PMU bring-up. 2016-08-16 21:32:05 +00:00
bhnd_bus_if.m Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_core.h bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
bhnd_debug.h [bhnd] Add logging macros to BHND. 2016-05-16 23:40:32 +00:00
bhnd_erom_if.m Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_erom_types.h Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_erom.c Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_erom.h Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_ids.h bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
bhnd_match.h [bhnd] Normalize bhnd(4) device matching API 2016-05-24 21:20:17 +00:00
bhnd_nexus.c bhnd(4): Fix resource allocation issues exposed by chipc PMU support. 2016-06-16 19:57:24 +00:00
bhnd_nexusvar.h Switch mips/sentry5 to bhnd(4), and unify with mips/broadcom 2016-06-04 19:53:47 +00:00
bhnd_subr.c Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_types.h bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
bhnd.c bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
bhnd.h Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhndreg.h
bhndvar.h bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00