Freescale有些关于怎么样处理freescale芯片上外围设备的惯例

在fsl_devices.h中发现一段说明，声明了飞思卡尔提供的内核文件中对自己芯片特有的外围设备的处理方法.

/*

 * include/linux/fsl_devices.h  *  * Definitions for any platform device related flags or structures for  * Freescale processor devices  *  * Some conventions on how we handle peripherals on Freescale chips  *  * unique device: a platform_device entry in fsl_plat_devs[] plus  * associated device information in its platform_data structure.  *  * A chip is described by a set of unique devices.  *  * Each sub-arch has its own master list of unique devices and  * enumerates them by enum fsl_devices in a sub-arch specific header <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * The platform data structure is broken into two parts. The <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * first is device specific information that help identify any <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * unique features of a peripheral. The second is any <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * information that may be defined by the board or how the device <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * is connected externally of the chip. <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * naming conventions: <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * - platform data structures: _platform_data <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * - platform data device flags: FSL_ _DEV_<FLAG> <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * - platform data board flags: FSL_ _BRD_<FLAG> <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> */ <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> /*上段译文：有些关于怎么样处理freescale芯片上外围设备的惯例 <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *独有的设备：在fsl_plat_devs[]数组中的一个platform_device入口 <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *添加关联设备信息到其platform_data结构体中. <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *一个芯片被一系列特有的设备描述. <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *每个子架构有其独有设备的master表，并且由枚举类型fsl_devices在一个子架构特有的头文件中枚举这些设备 <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *platform 数据结构（platform data structure）被分成两部分. 第一部分是设备特有信息，能够帮助识别任何 <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *一个外围设备独有特性. 第二部分是任何由板子定义的信息，或者设备是怎样从外部 连接到芯片的. <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> * <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *命名惯例： <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *-platform数据结构： _platform_data <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *-platform数据设备标识：FSL_ _DEV_<FLAG> <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> *-platform数据板子标识：FSL_ _BRD_<FLAG> <span style="color:rgb(51,51,51);font-family:Arial;font-size:14px;line-height:26px;"> */