bsp_common.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 95 行
H
95 行
/*******************************************************************
*
* Copyright C 2005 by Amlogic, Inc. All Rights Reserved.
*
* Description: Common BSP functions that all BSPs must provide.
*
* Author: Amlogic Software
* Created: Wed Nov 23 15:17:51 2005
*
*******************************************************************/
#ifndef BSP_COMMON_H
#define BSP_COMMON_H
/**
* @file bsp_common.h
*/
/** @defgroup bsp Board specific functions
What is a BSP?
BSP is an acronym for Board Support Package. This concept was created to allow separating board specific configuration from the AVOS library build.
What must go into the BSP?
There should be very few things that are board specific. This list may include things like external chip addressing and GPIO information such as reset and IRQ lines. External analog mute control requires a GPIO line, so that is one of the standard BSP functions. Also, different chips and boards have different DRAM capacities, requiring different memory maps.
So, how do I make a BSP of my own?
The first thing to do is make sure there isn't a BSP in the trunk/bsp directory that already fits your needs.
After that, try to find one that's close to the board you have. Then, copy this directory and give it a name that tries to describe your board type (right now there are two directories - 3278_skyworth and 3433_l91_usb_dev).
Then, edit the memmap.c file for your board (Need a document from Tim describing how to edit this file).
After modifying the memmap.c file, you will have to modify the BSP itself, in bsp.c.
The following functions are required in a BSP:
void set_bsp_mute(int on);
Use the chipsupport library to modify this function to use the proper GPIO for controlling analog muting.
void bsp_init(void);
This function sets up system clocks and PLLs, and, if the board has peripherals external to the Amlogic chip or more than one flash, the size of the first flash chip is also set here by calling set_flash_max_address().
*Need more documentation on how to set up the board specific PLL parameters*.
There are several other functions in the bsp C file, but these aren't usually necessary for the application builder to modify.
*/
/*@{*/
/**
* Set up memory and PLLs, etc specific to this board.
*/
extern void
bsp_init(void);
/**
* Retrieve the maximum address for the system DRAM.
* bsp_init() must be called first.
*/
extern unsigned char *
sys_max_address(void);
/**
* Retrieve the base address for the system DRAM.
* bsp_init() must be called first.
*/
extern unsigned char *
sys_base_address(void);
/**
* Set system mute parameter
* @param [in] on TRUE of muted, FALSE if not.
*/
extern void
set_bsp_mute(int on);
/**
* Get system mute parameter
* @return on TRUE of muted, FALSE if not.
*/
extern int
get_bsp_mute(void);
/**
* hvd decrypt_req_fun
*
*/
extern void
(*hvd_decrypt_req_fun)(unsigned reqtype, unsigned reqdata);
/**
* hvd decrypt_req
*
*/
extern void
hvd_decrypt_req(unsigned reqtype, unsigned reqdata);
#endif
/*@}*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?