FreeBSD/sys/dev/bhnd/bhnd_nexus.c
/**
 * Map ChipCommon's register block and read the chip identifier data.
 * 
 * @param dev A bhnd_nexus device.
 * @param chipid On success, will be populated with the chip identifier.
 * @retval 0 success
 * @retval non-zero An error occurred reading the chip identifier..
 */
Map ChipCommon's register block and read the chip identifier data.

@param dev A bhnd_nexus device.
@param chipid On success, will be populated with the chip identifier.
@retval 0 success
@retval non-zero An error occurred reading the chip identifier
Map ChipCommon ' s register block and read the chip identifier data . @param dev A bhnd_nexus device . @param chipid On success will be populated with the chip identifier . @retval 0 success @retval non - zero An error occurred reading the chip identifier
int
bhnd_nexus_read_chipid(device_t dev, struct bhnd_chipid *chipid)
{
	struct resource_spec	rspec[nitems(bhnd_nexus_res_spec)];
	int			error;
	memcpy(rspec, bhnd_nexus_res_spec, sizeof(rspec));
	error = bhnd_read_chipid(dev, rspec, 0, chipid);
	if (error)
		device_printf(dev, "error %d reading chip ID\n", error);
	return (error);
}
int bhnd_nexus_read_chipid ( device_t dev , struct bhnd_chipid * chipid ) { struct resource_spec rspec [ nitems ( bhnd_nexus_res_spec ) ] ; int error ; memcpy ( rspec , bhnd_nexus_res_spec , sizeof ( rspec ) ) ; error = bhnd_read_chipid ( dev , rspec , 0 , chipid ) ; if ( error ) device_printf ( dev , " \n " , error ) ; return ( error ) ; }
Map ChipCommon's register block and read the chip identifier data.
Map ChipCommon ' s register block and read the chip identifier data .