drivers/staging/media/atomisp/pci/hive_isp_css_include/device_access/device_access.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/hive_isp_css_include/device_access/device_access.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/hive_isp_css_include/device_access/device_access.h
Extension
.h
Size
4284 bytes
Lines
171
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

Support for Intel Camera Imaging ISP subsystem.
Copyright (c) 2010 - 2015, Intel Corporation.

*/

#ifndef __DEVICE_ACCESS_H_INCLUDED__
#define __DEVICE_ACCESS_H_INCLUDED__

/*!
 * \brief
 * Define the public interface for physical system
 * access functions to SRAM and registers. Access
 * types are limited to those defined in <stdint.h>
 * All accesses are aligned
 *
 * The address representation is private to the system
 * and represented as/stored in "hrt_address".
 *
 * The system global address can differ by an offset;
 * The device base address. This offset must be added
 * by the implementation of the access function
 *
 * "store" is a transfer to the device
 * "load" is a transfer from the device
 */

#include <type_support.h>

/*
 * User provided file that defines the system address types:
 *	- hrt_address	a type that can hold the (sub)system address range
 */
#include "system_local.h"
/*
 * We cannot assume that the global system address size is the size of
 * a pointer because a (say) 64-bit host can be simulated in a 32-bit
 * environment. Only if the host environment is modelled as on the target
 * we could use a pointer. Even then, prototyping may need to be done
 * before the target environment is available. AS we cannot wait for that
 * we are stuck with integer addresses
 */

/*typedef	char *sys_address;*/
typedef	hrt_address		sys_address;

/*! Set the (sub)system base address

 \param	base_addr[in]		The offset on which the (sub)system is located
							in the global address map

 \return none,
 */
void device_set_base_address(
    const sys_address		base_addr);

/*! Get the (sub)system base address

 \return base_address,
 */
sys_address device_get_base_address(void);

/*! Read an 8-bit value from a device register or memory in the device

 \param	addr[in]			Local address

 \return device[addr]
 */
uint8_t ia_css_device_load_uint8(
    const hrt_address		addr);

/*! Read a 16-bit value from a device register or memory in the device

 \param	addr[in]			Local address

 \return device[addr]
 */
uint16_t ia_css_device_load_uint16(
    const hrt_address		addr);

/*! Read a 32-bit value from a device register or memory in the device

 \param	addr[in]			Local address

 \return device[addr]
 */
uint32_t ia_css_device_load_uint32(
    const hrt_address		addr);

/*! Read a 64-bit value from a device register or memory in the device

Annotation

Implementation Notes