FreeBSD/sys/dev/bhnd/bcma/bcma_subr.c
/**
 * Populate the resource list and bcma_map RIDs using the maps defined on
 * @p ports.
 * 
 * @param bus The requesting bus device.
 * @param dinfo The device info instance to be initialized.
 * @param ports The set of ports to be enumerated
 */
Populate the resource list and bcma_map RIDs using the maps defined on
@p ports.

@param bus The requesting bus device.
@param dinfo The device info instance to be initialized.
@param ports The set of ports to be enumerated
Populate the resource list and bcma_map RIDs using the maps defined on @p ports . @param bus The requesting bus device . @param dinfo The device info instance to be initialized . @param ports The set of ports to be enumerated
static void
bcma_dinfo_init_resource_info(device_t bus, struct bcma_devinfo *dinfo,
    struct bcma_sport_list *ports)
{
	struct bcma_map		*map;
	struct bcma_sport	*port;
	bhnd_addr_t		 end;
	STAILQ_FOREACH(port, ports, sp_link) {
		STAILQ_FOREACH(map, &port->sp_maps, m_link) {
			end = map->m_base + map->m_size;
			if (map->m_base <= RM_MAX_END && end <= RM_MAX_END) {
				map->m_rid = resource_list_add_next(
				    &dinfo->resources, SYS_RES_MEMORY,
				    map->m_base, end, map->m_size);
			} else if (bootverbose) {
				device_printf(bus,
				    "core%u %s%u.%u: region %llx-%llx extends "
				        "beyond supported addressable range\n",
				    dinfo->corecfg->core_info.core_idx,
				    bhnd_port_type_name(port->sp_type),
				    port->sp_num, map->m_region_num,
				    (unsigned long long) map->m_base,
				    (unsigned long long) end);
			}
		}
	}
}
static void bcma_dinfo_init_resource_info ( device_t bus , struct bcma_devinfo * dinfo , struct bcma_sport_list * ports ) { struct bcma_map * map ; struct bcma_sport * port ; bhnd_addr_t end ; STAILQ_FOREACH ( port , ports , sp_link ) { STAILQ_FOREACH ( map , & port -> sp_maps , m_link ) { end = map -> m_base + map -> m_size ; if ( map -> m_base <= RM_MAX_END && end <= RM_MAX_END ) { map -> m_rid = resource_list_add_next ( & dinfo -> resources , SYS_RES_MEMORY , map -> m_base , end , map -> m_size ) ; } else if ( bootverbose ) { device_printf ( bus , " " " \n " , dinfo -> corecfg -> core_info . core_idx , bhnd_port_type_name ( port -> sp_type ) , port -> sp_num , map -> m_region_num , ( unsigned long long ) map -> m_base , ( unsigned long long ) end ) ; } } } }
Populate the resource list and bcma_map RIDs using the maps defined on
 @p ports.
Populate the resource list and bcma_map RIDs using the maps defined on @p ports .
/*
			 * Create the corresponding device resource list entry.
			 * 
			 * We necessarily skip registration if the region's
			 * device memory range is not representable via
			 * rman_res_t.
			 * 
			 * When rman_res_t is migrated to uintmax_t, any
			 * range should be representable.
			 */