-- Introduction -- This is a small porting guide for OMAPFlash. It contains an
-- Introduction -- This is a small porting guide for OMAPFlash. It contains an introduction to the modifications that may be necessary in order to get OMAPFlash working on a new board or with a new memory device. -- Porting to a new platform -- The main goal when trying to get OMAPFlash to work on a new plaform is to get th e second loader ported to the platform. In general this should not require the recompilation of the code or modification of the sec ond loader's code base. The starting point will be to create a board configuration file for the new platform. For the binary installed version of OMAPFlash, board configuration files are fou nd in .\Targets\Configurations. For the source code version of OMAPFlash, board configurations files are found in .\host\Targets\Con figurations. In order to add support for a new platform it is necessary to add a new board configuration file to the configuration folde r. Once the board configuration file has been created, it will need to be added to the content of omapflash2nd.txt, present in .\ of the binary release or .\host o f the source code release. This file allows OMAPFlash to find the board configur ation file and pairs it with a platform tag to be used with the -p option for OM APFlash. When modifying the file, simply add a new line to it: <platform> <omap id> <omap version> <omap type> <second loader file> -pheriphe ralboot_reopen -board_config <board configuration file> where <platform> is the platform name (use a new name for the new platform), <om ap id> is an id number provided by the OMAP device during perfipheral boot over UART or USB along with the <omap version> number, <omap type> specifies whether the OMAP detected should be a High Security 'HS' or General Purpose 'GP' type, < second loader file> specifies the second loader to use with the combination of < platform>, <omap id>, <omap version> and <omap type> and the <board configuratio n file> is the newly added board configuration. An example could be: SDP_MDDR_HYNIX_4G 363007 07 GP Targets\2nd-Downloaders\dnld_startup_omap3_gp_4 g.2nd -pheriphalboot_reopen -board_config Targets\Configurations\configuration_sdp3630_hynix_4g.txt which specifies that if you specify the platform SDP_MDDR_HYNIX_4G through the - p option to OMAPFlash and the OMAP device detected is 363007v07GP, the second lo ader to use is 'Targets\2nd-Downloaders\dnld_startup_omap3_gp_4g.2nd' and the bo ard configuration to use is 'Targets\Configurations\configuration_sdp3630_hynix_ 4g.txt'. Note that the binary installation currently comes with second loaders supporting memory sizes of (512 Mb, 1 Gb) 2 Gb, 4 Gb and 8 Gb for GP and HS devices: dnld_startup_omap3_gp_512m.2nd - OMAP3 GP w 512 Mb SDRAM dnld_startup_omap3_gp_1g.2nd - OMAP3 GP w 1 Gb SDRAM dnld_startup_omap3_gp_2g.2nd - OMAP3 GP w 2 Gb SDRAM dnld_startup_omap3_gp_4g.2nd - OMAP3 GP w 4 Gb SDRAM dnld_startup_omap3_gp_8g.2nd - OMAP3 GP w 8 Gb SDRAM dnld_startup_omap3_hs_512m.2nd - OMAP3 HS w 512 Mb SDRAM dnld_startup_omap3_hs_1g.2nd - OMAP3 HS w 1 Gb SDRAM dnld_startup_omap3_hs_2g.2nd - OMAP3 HS w 2 Gb SDRAM dnld_startup_omap3_hs_4g.2nd - OMAP3 HS w 4 Gb SDRAM dnld_startup_omap3_hs_8g.2nd - OMAP3 HS w 8 Gb SDRAM dnld_startup_omap4_gp_2g.2nd - OMAP4 GP w 2 Gb SDRAM dnld_startup_omap4_gp_4g.2nd - OMAP4 GP w 4 Gb SDRAM dnld_startup_omap4_gp_8g.2nd - OMAP4 GP w 8 Gb SDRAM dnld_startup_omap4_hs_2g_es1.s1.2nd - OMAP4 ES1.0 HS w 2 Gb SDRAM dnld_startup_omap4_hs_4g_es1.s1.2nd - OMAP4 ES1.0 HS w 4 Gb SDRAM dnld_startup_omap4_hs_8g_es1.s1.2nd - OMAP4 ES1.0 HS w 8 Gb SDRAM dnld_startup_omap4_hs_2g_es2.s1.2nd - OMAP4 ES2.0 / ES2.1 HS w 2 Gb SDRAM dnld_startup_omap4_hs_4g_es2.s1.2nd - OMAP4 ES2.0 / ES2.1 HS w 4 Gb SDRAM dnld_startup_omap4_hs_8g_es2.s1.2nd - OMAP4 ES2.0 / ES2.1 HS w 8 Gb SDRAM dnld_startup_omap4_hs_2g_es2.s2.2nd - OMAP4 ES2.2 HS w 2 Gb SDRAM dnld_startup_omap4_hs_4g_es2.s2.2nd - OMAP4 ES2.2 HS w 4 Gb SDRAM dnld_startup_omap4_hs_8g_es2.s2.2nd - OMAP4 ES2.2 HS w 8 Gb SDRAM The reason for this is that there is a link-time dependency on the placment of t he heap and external memory for the memory device drivers in SDRAM and on the lo cation of the second loader components in internal memory between HS and GP devi ces. Pick the right one - e.g. if you have a 4 Gbit memory on an OMAP3 GP based board, use 'dnld_startup_omap3_gp_4g.2nd'. -- Board configuration -- In order to create the new file it is often useful to start with a copy of one o f the existing files. The file has three main sections: 1) 'use' directive, pointing to a definition file listing a number of OMAP reg isters and their addresses 2) 'memory' directives, specifying the memories on the platform 3) initialization commands, modifying registers to control the configuration o f the OMAP to match the platform -- Definitions -- A 'use' directive can be used to point to a device definition file, e.g.: use definitions_omap3.txt Only one definition file can be used and it must be indicated before the first e lement using its definitions occurs in the configuration file. The device definition file basically holds a set of paired of labels and values. The labels can be used in the device configuration fil in place of the values in order to make the device configuration file more readable. The syntax is as follows PRM_CLKSRC_CTRL 0x48307270 CM_CLKEN_PLL 0x48004D00 PRM_CLKSEL 0x48306D40 CM_CLKSEL1_PLL 0x48004D40 CM_CLKSEL2_PLL 0x48004D44 CM_CLKSEL3_PLL 0x48004D48 A maximum of 1000 definition pairs can be present in a definition file. -- Memories -- Memories are specified using the 'memory' directive: memory NAME [driver DRIVER] [parameters PARAMETER1 VALUE1 PARAMETER2 VALUE2 .. . PARAMETERN VALUEN] An example of a memory specification could be: memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters g pmc 0x6E000000 cs 1 address 0x28000000 bberase 0 where the device name is NAND and the driver required to access it is present in the binary file nand_onfi_16bit_8bit.bin (part of this distribution). The driver needs a number of configuration parameters for correct operation. These are passed directly to driver as written on the line following the 'parameters' keyword. This distribution contai ns a number of driver binaries for various memory types. At present these are: File : nand_onfi_16bit_8bit.bin Type : NAND Parameters: gpmc (mandatory) Base address of the GPMC in th e OMAP cs (mandatory) Chip select where the device i s present (or GPMC-config index) address (mandatory) Address of the device as mappe d in the GPMC bberase (mandatory) Erase bad blocks in the device (0 for no, 1 for yes). Caution: erasing bad blocks may cause an irreversible loss of manufacturing information. onfi (optional) Read and use ONFI device descr iption from the device (0 for no, 1 for yes). bpp (mandatory if onfi = 0) Bytes per page if ONFI informa tion is not used. sbpp (mandatory if onfi = 0) Spare bytes per page if ONFI i nformation is not used. ppb (mandatory if onfi = 0) Pages per block if ONFI inform ation is not used bpl (mandatory if onfi = 0) Blocks per logical unit if ONF I information is not used l (mandatory if onfi = 0) Logical unit count (only 1 sup ported by the driver) acv (mandatory if onfi = 0) Address cycle values - 8 bit v alue with lower 4 bits for row and upper 4 bits for column. f (mandatory if onfi = 0) Features - 16 bit value with b it 0 = 16 bit data operation, rest are don't-care Examples : memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000 bberase 0 memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000 bberase 0 onfi 0 bpp 2048 sbpp 64 ppb 64 bpl 4096 l 1 acv 0x23 f 0 x0019 File : nor_intel_sibley_drv.bin Type : NOR Parameters: address (mandatory) Base address of the device in the memory map Examples : memory SIBLEY0 driver Targets\Flash-Drivers\nor_intel_sibley_drv.b in parameters address 0x10000000 File : onenand_drv.bin Type : OneNAND (inherently supports Samsung KFM1G16Q2M and KFM2G16Q2M, bu t parameters can be set to allow the driver to function with other devices) Parameters: address (mandatory) Base address of the device as configured bberase (mandatory) Erase bad blocks in the device (0 for no, 1 for yes). Caution: erasing bad blocks may cause an irreversible loss of manufacturing information. w (optional) Sets the bus-width for the dev ice and controls whether additional parameters are given. Currently only a 16-bit bus wi dth is supported (value must be 16). b (mandatory if w) Number of blocks if device is not inherently supported ppb (mandatory if w) Pages per block if device is n ot inherently supported spp (mandatory if w) Sectors per page if device is not inherently supported ssize (mandatory if w) Sector size in butes if device is not inherently supported Examples : memory ONENAND driver Targets\Flash-Drivers\onenand_drv.bin parame ters address 0x20000000 bberase 0 memory ONENAND driver Targets\Flash-Drivers\onenand_drv.bin parame ters address 0x20000000 bberase 0 w 16 b 2048 ppb 64 spp 4 ssize 512 File : emmc_drv.bin Type : EMMC (OMAP4) Parameters: sid (mandatory) MMC slot ID width (mandatory) Width of data bus in bits delay (mandatory) Loop delay on command access ( default should be 9) rpapi (mandatory) Set the base address of the RO M code Public API uploads/Politique/ porting-guide 1 .pdf
-
8
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Mai 22, 2021
- Catégorie Politics / Politiq...
- Langue French
- Taille du fichier 0.0184MB