664a749708
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
50 lines
983 B
Makefile
50 lines
983 B
Makefile
# $FreeBSD$
|
|
|
|
.PATH: ${.CURDIR}/../../dev/bhnd
|
|
.PATH: ${.CURDIR}/../../dev/bhnd/cores/chipc
|
|
.PATH: ${.CURDIR}/../../dev/bhnd/cores/chipc/pwrctl
|
|
.PATH: ${.CURDIR}/../../dev/bhnd/cores/pmu
|
|
.PATH: ${.CURDIR}/../../dev/bhnd/nvram
|
|
|
|
KMOD= bhnd
|
|
SRCS= bhnd.c bhnd_subr.c
|
|
SRCS+= bhnd_bus_if.c bhnd_bus_if.h
|
|
|
|
SRCS+= bhnd_erom.c
|
|
SRCS+= bhnd_erom_if.c bhnd_erom_if.h
|
|
|
|
# ChipCommon
|
|
SRCS+= chipc.c chipc_subr.c
|
|
SRCS+= bhnd_sprom_chipc.c \
|
|
bhnd_pmu_chipc.c \
|
|
bhnd_pwrctl.c bhnd_pwrctl_subr.c
|
|
SRCS+= bhnd_chipc_if.c bhnd_chipc_if.h
|
|
|
|
# PMU
|
|
SRCS+= bhnd_pmu.c \
|
|
bhnd_pmu_core.c \
|
|
bhnd_pmu_subr.c
|
|
SRCS+= bhnd_pmu_if.c bhnd_pmu_if.h
|
|
|
|
# NVRAM/SPROM
|
|
SRCS+= bhnd_nvram.c \
|
|
bhnd_nvram_parser.c \
|
|
bhnd_sprom.c \
|
|
bhnd_sprom_parser.c
|
|
SRCS+= bhnd_nvram_common.c
|
|
SRCS+= bhnd_nvram_map.h bhnd_nvram_map_data.h
|
|
SRCS+= bhnd_nvram_if.c bhnd_nvram_if.h
|
|
|
|
SRCS+= device_if.h bus_if.h
|
|
|
|
SUBDIR= bcma \
|
|
bcma_bhndb \
|
|
bhndb \
|
|
bhndb_pci \
|
|
cores \
|
|
siba \
|
|
siba_bhndb
|
|
|
|
.include <bsd.kmod.mk>
|
|
.include <bsd.subdir.mk>
|