My Project
Classes | Typedefs | Functions
Configuration API and Attributes

Classes

struct  kbase_platform_funcs_conf
 
struct  kbase_pm_callback_conf
 
struct  kbase_io_memory_region
 
struct  kbase_io_resources
 
struct  kbase_platform_config
 

Typedefs

typedef struct kbase_platform_funcs_conf kbase_platform_funcs_conf
 
typedef int(* kbase_cpu_clk_speed_func) (u32 *clock_speed)
 
typedef int(* kbase_gpu_clk_speed_func) (u32 *clock_speed)
 

Functions

int kbase_cpuprops_get_default_clock_speed (u32 *const clock_speed)
 
struct kbase_platform_configkbase_get_platform_config (void)
 Gets the pointer to platform config. More...
 
int kbasep_platform_device_init (struct kbase_device *kbdev)
 
void kbasep_platform_device_term (struct kbase_device *kbdev)
 
int kbase_platform_early_init (void)
 

Detailed Description

Typedef Documentation

◆ kbase_cpu_clk_speed_func

typedef int(* kbase_cpu_clk_speed_func) (u32 *clock_speed)

kbase_cpu_clk_speed_func - Type of the function pointer for CPU_SPEED_FUNC

Parameters
clock_speed- pointer to store the current CPU clock speed in MHz

Returns 0 on success, otherwise negative error code.

This is mainly used to implement OpenCL's clGetDeviceInfo().

◆ kbase_gpu_clk_speed_func

typedef int(* kbase_gpu_clk_speed_func) (u32 *clock_speed)

kbase_gpu_clk_speed_func - Type of the function pointer for GPU_SPEED_FUNC

Parameters
clock_speed- pointer to store the current GPU clock speed in MHz

Returns 0 on success, otherwise negative error code. When an error is returned the caller assumes maximum GPU speed stored in gpu_freq_khz_max.

If the system timer is not available then this function is required for the OpenCL queue profiling to return correct timing information.

◆ kbase_platform_funcs_conf

kbase_platform_funcs_conf - Specifies platform init/term function pointers

Specifies the functions pointers for platform specific initialization and termination. By default no functions are required. No additional platform specific control is necessary.

Function Documentation

◆ kbase_cpuprops_get_default_clock_speed()

int kbase_cpuprops_get_default_clock_speed ( u32 *const  clock_speed)

kbase_cpuprops_get_default_clock_speed - default for CPU_SPEED_FUNC - see kbase_cpu_clk_speed_func for details on the parameters

Returns 0 on success, negative error code otherwise.

Default implementation of CPU_SPEED_FUNC. This function sets clock_speed to 100, so will be an underestimate for any real system.

◆ kbase_get_platform_config()

struct kbase_platform_config* kbase_get_platform_config ( void  )

Gets the pointer to platform config.

Returns
Pointer to the platform config

◆ kbase_platform_early_init()

int kbase_platform_early_init ( void  )

kbase_platform_early_init - Early initialisation of the platform code

This function will be called when the module is loaded to perform any early initialisation required by the platform code. Such as reading platform specific device tree entries for the GPU.

Return: 0 for success, any other fail causes module initialisation to fail

◆ kbasep_platform_device_init()

int kbasep_platform_device_init ( struct kbase_device kbdev)

kbasep_platform_device_init: - Platform specific call to initialize hardware : kbase device pointer

Function calls a platform defined routine if specified in the configuration attributes. The routine can initialize any hardware and context state that is required for the GPU block to function.

Return: 0 if no errors have been found in the config. Negative error code otherwise.

◆ kbasep_platform_device_term()

void kbasep_platform_device_term ( struct kbase_device kbdev)

kbasep_platform_device_term - Platform specific call to terminate hardware : Kbase device pointer

Function calls a platform defined routine if specified in the configuration attributes. The routine can destroy any platform specific context state and shut down any hardware functionality that are outside of the Power Management callbacks.