📄 readme
字号:
sets the cpu up as a master node and so its address should therefore be cleared to 0 (See, eg, MPC823e User's Manual p.16-473). So, set CFG_I2C_SLAVE to 0. That's all that's required for CONFIG_HARD_I2C. If you use the software i2c interface (CONFIG_SOFT_I2C) then the following macros need to be defined (examples are from include/configs/lwmon.h): I2C_INIT (Optional). Any commands necessary to enable the I2C controller or configure ports. eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) I2C_PORT (Only for MPC8260 CPU). The I/O port to use (the code assumes both bits are on the same port). Valid values are 0..3 for ports A..D. I2C_ACTIVE The code necessary to make the I2C data line active (driven). If the data line is open collector, this define can be null. eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) I2C_TRISTATE The code necessary to make the I2C data line tri-stated (inactive). If the data line is open collector, this define can be null. eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) I2C_READ Code that returns TRUE if the I2C data line is high, FALSE if it is low. eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) I2C_SDA(bit) If <bit> is TRUE, sets the I2C data line high. If it is FALSE, it clears it (low). eg: #define I2C_SDA(bit) \ if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ else immr->im_cpm.cp_pbdat &= ~PB_SDA I2C_SCL(bit) If <bit> is TRUE, sets the I2C clock line high. If it is FALSE, it clears it (low). eg: #define I2C_SCL(bit) \ if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL I2C_DELAY This delay is invoked four times per clock cycle so this controls the rate of data transfer. The data rate thus is 1 / (I2C_DELAY * 4). Often defined to be something like: #define I2C_DELAY udelay(2) CFG_I2C_INIT_BOARD When a board is reset during an i2c bus transfer chips might think that the current transfer is still in progress. On some boards it is possible to access the i2c SCLK line directly, either by using the processor pin as a GPIO or by having a second pin connected to the bus. If this option is defined a custom i2c_init_board() routine in boards/xxx/board.c is run early in the boot sequence. CONFIG_I2CFAST (PPC405GP|PPC405EP only) This option enables configuration of bi_iic_fast[] flags in u-boot bd_info structure based on u-boot environment variable "i2cfast". (see also i2cfast)- SPI Support: CONFIG_SPI Enables SPI driver (so far only tested with SPI EEPROM, also an instance works with Crystal A/D and D/As on the SACSng board) CONFIG_SPI_X Enables extended (16-bit) SPI EEPROM addressing. (symmetrical to CONFIG_I2C_X) CONFIG_SOFT_SPI Enables a software (bit-bang) SPI driver rather than using hardware support. This is a general purpose driver that only requires three general I/O port pins (two outputs, one input) to function. If this is defined, the board configuration must define several SPI configuration items (port pins to use, etc). For an example, see include/configs/sacsng.h.- FPGA Support: CONFIG_FPGA_COUNT Specify the number of FPGA devices to support. CONFIG_FPGA Used to specify the types of FPGA devices. For example, #define CONFIG_FPGA CFG_XILINX_VIRTEX2 CFG_FPGA_PROG_FEEDBACK Enable printing of hash marks during FPGA configuration. CFG_FPGA_CHECK_BUSY Enable checks on FPGA configuration interface busy status by the configuration function. This option will require a board or device specific function to be written. CONFIG_FPGA_DELAY If defined, a function that provides delays in the FPGA configuration driver. CFG_FPGA_CHECK_CTRLC Allow Control-C to interrupt FPGA configuration CFG_FPGA_CHECK_ERROR Check for configuration errors during FPGA bitfile loading. For example, abort during Virtex II configuration if the INIT_B line goes low (which indicated a CRC error). CFG_FPGA_WAIT_INIT Maximum time to wait for the INIT_B line to deassert after PROB_B has been deasserted during a Virtex II FPGA configuration sequence. The default time is 500 mS. CFG_FPGA_WAIT_BUSY Maximum time to wait for BUSY to deassert during Virtex II FPGA configuration. The default is 5 mS. CFG_FPGA_WAIT_CONFIG Time to wait after FPGA configuration. The default is 200 mS.- Configuration Management: CONFIG_IDENT_STRING If defined, this string will be added to the U-Boot version information (U_BOOT_VERSION)- Vendor Parameter Protection: U-Boot considers the values of the environment variables "serial#" (Board Serial Number) and "ethaddr" (Ethernet Address) to be parameters that are set once by the board vendor / manufacturer, and protects these variables from casual modification by the user. Once set, these variables are read-only, and write or delete attempts are rejected. You can change this behviour: If CONFIG_ENV_OVERWRITE is #defined in your config file, the write protection for vendor parameters is completely disabled. Anybody can change or delete these parameters. Alternatively, if you #define _both_ CONFIG_ETHADDR _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default ethernet address is installed in the environment, which can be changed exactly ONCE by the user. [The serial# is unaffected by this, i. e. it remains read-only.]- Protected RAM: CONFIG_PRAM Define this variable to enable the reservation of "protected RAM", i. e. RAM which is not overwritten by U-Boot. Define CONFIG_PRAM to hold the number of kB you want to reserve for pRAM. You can overwrite this default value by defining an environment variable "pram" to the number of kB you want to reserve. Note that the board info structure will still show the full amount of RAM. If pRAM is reserved, a new environment variable "mem" will automatically be defined to hold the amount of remaining RAM in a form that can be passed as boot argument to Linux, for instance like that: setenv bootargs ... mem=\${mem} saveenv This way you can tell Linux not to use this memory, either, which results in a memory region that will not be affected by reboots. *WARNING* If your board configuration uses automatic detection of the RAM size, you must make sure that this memory test is non-destructive. So far, the following board configurations are known to be "pRAM-clean": ETX094, IVMS8, IVML24, SPD8xx, TQM8xxL, HERMES, IP860, RPXlite, LWMON, LANTEC, PCU_E, FLAGADM, TQM8260- Error Recovery: CONFIG_PANIC_HANG Define this variable to stop the system in case of a fatal error, so that you have to reset it manually. This is probably NOT a good idea for an embedded system where you want to system to reboot automatically as fast as possible, but it may be useful during development since you can try to debug the conditions that lead to the situation. CONFIG_NET_RETRY_COUNT This variable defines the number of retries for network operations like ARP, RARP, TFTP, or BOOTP before giving up the operation. If not defined, a default value of 5 is used.- Command Interpreter: CONFIG_AUTO_COMPLETE Enable auto completion of commands using TAB. Note that this feature has NOT been implemented yet for the "hush" shell. CFG_HUSH_PARSER Define this variable to enable the "hush" shell (from Busybox) as command line interpreter, thus enabling powerful command line syntax like if...then...else...fi conditionals or `&&' and '||' constructs ("shell scripts"). If undefined, you get the old, much simpler behaviour with a somewhat smaller memory footprint. CFG_PROMPT_HUSH_PS2 This defines the secondary prompt string, which is printed when the command interpreter needs more input to complete a command. Usually "> ". Note: In the current implementation, the local variables space and global environment variables space are separated. Local variables are those you define by simply typing `name=value'. To access a local variable later on, you have write `$name' or `${name}'; to execute the contents of a variable directly type `$name' at the command prompt. Global environment variables are those you use setenv/printenv to work with. To run a command stored in such a variable, you need to use the run command, and you must not use the '$' sign to access them. To store commands and special characters in a variable, please use double quotation marks surrounding the whole text of the variable, instead of the backslashes before semicolons and special symbols.- Commandline Editing and History: CONFIG_CMDLINE_EDITING Enable editiong and History functions for interactive commandline input operations- Default Environment: CONFIG_EXTRA_ENV_SETTINGS Define this to contain any number of null terminated strings (variable = value pairs) that will be part of the default environment compiled into the boot image. For example, place something like this in your board's config file: #define CONFIG_EXTRA_ENV_SETTINGS \ "myvar1=value1\0" \ "myvar2=value2\0" Warning: This method is based on knowledge about the internal format how the environment is stored by the U-Boot code. This is NOT an official, exported interface! Although it is unlikely that this format will change soon, there is no guarantee either. You better know what you are doing here. Note: overly (ab)use of the default environment is discouraged. Make sure to check other ways to preset the environment like the autoscript function or the boot command first.- DataFlash Support: CONFIG_HAS_DATAFLASH Defining this option enables DataFlash features and allows to read/write in Dataflash via the standard commands cp, md...- SystemACE Support: CONFIG_SYSTEMACE Adding this option adds support for Xilinx SystemACE chips attached via some sort of local bus. The address of the chip must alsh be defined in the CFG_SYSTEMACE_BASE macro. For example: #define CONFIG_SYSTEMACE #define CFG_SYSTEMACE_BASE 0xf0000000 When SystemACE support is added, the "ace" device type becomes available to the fat commands, i.e. fatls.- TFTP Fixed UDP Port: CONFIG_TFTP_PORT If this is defined, the environment variable tftpsrcp is used to supply the TFTP UDP source port value. If tftpsrcp isn't defined, the normal pseudo-random port number generator is used. Also, the environment variable tftpdstp is used to supply the TFTP UDP destination port value. If tftpdstp isn't defined, the normal port 69 is used. The purpose for tftpsrcp is to allow a TFTP server to blindly start the TFTP transfer using the pre-configured target IP address and UDP port. This has the effect of "punching through" the (Windows XP) firewall, allowing the remainder of the TFTP transfer to proceed normally. A better solution is to properly configure the firewall, but sometimes that is not allowed.- Show boot progress: CONFIG_SHOW_BOOT_PROGRESS Defining this option allows to add some board- specific code (calling a user-provided function "show_boot_progress(int)") that enables you to show the system's boot progress on some display (for example, some LED's) on your board. At the moment, the following checkpoints are implemented: Arg Where When 1 common/cmd_bootm.c before attempting to boot an image -1 common/cmd_bootm.c Image header has bad magic number 2 common/cmd_bootm.c Image header has correct magic number -2 common/cmd_bootm.c Image header has bad checksum 3 common/cmd_bootm.c Image header has correct checksum -3 common/cmd_bootm.c Image data has bad checksum 4 common/cmd_bootm.c Image data has correct checksum -4 common/cmd_bootm.c Image is for unsupported architecture 5 common/cmd_bootm.c Architecture check OK -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi, standalone) 6 common/cmd_bootm.c Image Type check OK -6 common/cmd_bootm.c gunzip uncompression error -7 common/cmd_bootm.c Unimplemented compression type 7 common/cmd_bootm.c Uncompression OK -8 common/cmd_bootm.c Wrong Image Type (not kernel, multi, standalone) 8 common/cmd_bootm.c Image Type check OK -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX) 9 common/cmd_bootm.c Start initial ramdisk verification -10 common/cmd_bootm.c Ramdisk header has bad magic number -11 common/cmd_bootm.c Ramdisk header has bad checksum 10 common/cmd_bootm.c Ramdisk header is OK -12 common/cmd_bootm.c Ramdisk data has bad checksum 11 common/cmd_bootm.c Ramdisk data has correct checksum 12 common/cmd_bootm.c Ramdisk verification complete, start loading -13 common/cmd_bootm.c Wrong Image Type (not PPC Linux Ramdisk) 13 common/cmd_bootm.c Start multifile image verification 14 common/cmd_bootm.c No initial ramdisk, no multifile, continue. 15 common/cmd_bootm.c All preparation done, transferring control to OS -30 lib_ppc/board.c Fatal error, hang the system -31 post/post.c POST test failed, detected by post_output_backlog() -32 post/post.c POST test failed, detected by post_run_single()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -