⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.ppc440

📁 u-boot-1.1.6 源码包
💻 PPC440
字号:
			   PowerPC 440		    Last Update: September 11, 2002=======================================================================OVERVIEW============Support for the ppc440 is contained in the cpu/ppc44x directoryand enabled via the CONFIG_440 flag. It is largely based on the405gp code. A sample board support implementation is containedin the board/ebony directory.All testing was performed using the AMCC Ebony board using bothRev B and Rev C silicon. However, since the Rev B. silicon hasextensive errata, support for Rev B. is minimal (it boots, andfeatures such as i2c, pci, tftpboot, etc. seem to work ok).The expectation is that all new board designs will be usingRev C or later parts -- if not, you may be in for a rough ride ;-)The ppc440 port does a fair job of keeping "board-specific" codeout of the "cpu-specific" source. The goal of course was toprovide mechanisms for each board to customize without havingto clutter the cpu-specific source with a lot of ifdefs. Mostof these mechanisms are described in the following sections.MEMORY MANAGEMENT=================The ppc440 doesn't run in "real mode". The MMU must be activeat all times. Additionally, the 440 implements a 36-bit physicalmemory space that gets mapped into the PowerPC 32-bit virtualaddress space. So things like memory-mapped peripherals, etc mustall be mapped in. Once this is done, the 32-bit virtual addressspace is then viewed as though it were physical memory.However, this means that memory, peripherals, etc can be configuredto appear (mostly) anywhere in the virtual address space. Each boardmust define its own mappings using the tlbtab (see board/ebony/init.S).The actual TLB setup is performed by the cpu-specific code.Although each board is free to define its own mappings, there areseveral definitions to be aware of. These definitions may be used inthe cpu-specific code (vs. board-specific code), so you shouldat least review these before deciding to make any changes ... itwill probably save you some headaches ;-)CFG_SDRAM_BASE - The virtual address where SDRAM is mapped (always 0)CFG_FLASH_BASE - The virtual address where FLASH is mapped.CFG_PCI_MEMBASE - The virtual address where PCI-bus memory is mapped.    This mapping provides access to PCI-bus memory.CFG_PERIPHERAL_BASE - The virtual address where the 440 memory-mapped    peripherals are mapped. (e.g. -- UART registers, IIC registers, etc).CFG_ISRAM_BASE - The virtual address where the 440 internal SRAM is    mapped. The internal SRAM is equivalent to 405gp OCM and is used    for the initial stack.CFG_PCI_BASE - The virtual address where the 440 PCI-x bridge config    registers are mapped.CFG_PCI_TARGBASE - The PCI address that is mapped to the virtual address    defined by CFG_PCI_MEMBASE.UART / SERIAL=================The UART port works fine when an external serial clock is provided(like the one on the Ebony board) and when using internal clocking.This is controlled with the CFG_EXT_SERIAL_CLOCK flag. When usinginternal clocking, the "ideal baud rate" settings in the 440GPuser manual are automatically calculated.CONFIG_SERIAL_SOFTWARE_FIFO enables interrupt-driven serial operation.But the last time I checked, interrupts were initialized after theserial port causing the interrupt handler to be removed from thehandler table. This will probably be fixed soon ... or fix ityourself and submit a patch :-)I2C=================The i2c utilities have been tested on both Rev B. and Rev C. andlook good. The iprobe command implementation has been updated toallow for 'skipped' addresses. Some i2c slaves are write only andcause problems when a probe (read) is performed (for example theCDCV850 clock controller at address 0x69 on the ebony board).To prevent probing certain addresses you can define theCFG_I2C_NOPROBES macro in your board-specific header file. Whendefined, all specified addresses are skipped during a probe.The addresses that are skipped will be displayed in the outputof the iprobe command.For example, to prevent probing address 0x69, define the macro asfollows:#define CFG_I2C_NOPROBES {0x69}Similarly, to prevent probing addresses 0x69 and 0x70, define themacro a:#define CFG_I2C_NOPROBES {0x69, 0x70}DDR SDRAM CONTROLLER====================SDRAM controller intialization using Serial Presence Detect (SPD) isnow supported (thanks Jun). It is enabled by defining CONFIG_SPD_EEPROM.The i2c eeprom addresses are controlled by the SPD_EEPROM_ADDRESS macro.NOTE: The SPD_EEPROM_ADDRESS macro is defined differently than for otherprocessors. Traditionally, it defined a single address. For the 440 itdefines an array of addresses to support multiple banks. Address orderis significant: the addresses are used in order to program the BankNregisters. For example, two banks with i2c addresses of 0x53 (bank 0)and 0x52 (bank 1) would be defined as follows:#define SPD_EEPROM_ADDRESS {0x53,0x52}PCI-X BRIDGE====================PCI is an area that requires lots of flexibility since every board hasits own set of constraints and configuration. This section describes the440 implementation.CPC0_STRP1[PISE] -- if the PISE strap bit is not asserted, PCI initis aborted and an indication is printed. This is NOT considered anerror -- only an indication that PCI shouldn't be initialized. Thisgives you a chance to edit the i2c bootstrap eeproms using the i2cutilities once you get to the U-Boot command prompt. NOTE: the default440 bootstrap options (not using i2c eeprom) negates this bit.The cpu-specific code sets up a default pci_controller structurethat maps in a single PCI I/O space and PCI memory space. The I/Ospace begins at PCI I/O address 0 and the PCI memory space is256 MB starting at PCI address CFG_PCI_TARGBASE. After thepci_controller structure is initialized, the cpu-specific code willcall the routine pci_pre_init() if the CFG_PCI_PRE_INIT flag isdefined. This routine is implemented by board-specific code & is wherethe board can over-ride/extend the default pci_controller structuresettings and do other pre-initialization tasks. If pci_pre_init()returns a value of zero, PCI initialization is aborted; otherwise thecontroller structure is registered and initialization continues.The default 440GP PCI target configuration is minimal -- it assumes thatthe strapping registers are set as necessary. Since the strapping bitsprovide very limited flexibility, you may want to customize the boardstarget configuration. If CFG_PCI_TARGET_INIT is defined, the cpu-specificcode will call the routine pci_target_init() which you must implementin your board-specific code.Target initialization is completed by the cpu-specific code byinitializing the subsystem id and subsystem vendor id, and then ensuringthat the 'enable host configuration' bit in the PCIX0_BRDGOPT2 is set.The default PCI master initialization maps in 256 MB of pci memorystarting at PCI address CFG_PCI_MEMBASE. To customize this, definePCI_MASTER_INIT. This will call the routine pci_master_init() in yourboard-specific code rather than performing the default masterinitialization.The decision to perform PCI host configuration must often be determinedat run time. The ppc440 port differs from most other implementations inthat it requires the board to determine its host configuration at runtime rather than by using compile-time flags. This shouldn't create alarge impact on the board-specific code since the board only needs toimplement a single routine that returns a zero or non-zero value:is_pci_host().Justification for this becomes clear when considering systems runningin a cPCI environment:1. Arbiter strapping: Many cPCI boards provide an external arbiter (oftenpart of the PCI-to-PCI bridge). Even though the arbiter is external (thearbiter strapping is negated), the CPU may still be required to performlocal PCI bus configuration.2. Host only: PPMC boards must sample the MONARCH# signal at run-time.Depending on the configuration of the carrier boar, the PPMC board mustdetermine if it should configure the PCI bus at run-time. And in mostcases, access to the MONARCH# signal is board-specific (e.g. viaboard-specific FPGA registers, etc).In any event, the is_pci_host() routine gives each board the opportunityto decide at run-time. If your board is always configured a certain way,then just hardcode a return of 1 or 0 as appropriate.Regards,--Scott<smcnutt@artesyncp.com>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -