From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Schwarz Date: Fri, 28 Mar 2008 13:34:51 +0100 Subject: [U-Boot-Users] MPC83xx HRCW In-Reply-To: <47ECE360.8080802@ge.com> References: <47ECD295.3090707@matrix-vision.de> <47ECDCBB.7050508@ge.com> <47ECE17A.9060906@matrix-vision.de> <47ECE360.8080802@ge.com> Message-ID: <47ECE5EB.9070109@matrix-vision.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jerry Van Baren schrieb: > Andre Schwarz wrote: >> Jerry Van Baren schrieb: >>> Andre Schwarz wrote: >>>> In "cpu/mpc83xx/start.S" there is a comment : >>>> >>>> /* >>>> * The Hard Reset Configuration Word (HRCW) table is in the first 64 >>>> * (0x40) bytes of flash. It has 8 bytes, but each byte is repeated 8 >>>> * times so the processor can fetch it out of flash whether the flash >>>> * is 8, 16, 32, or 64 bits wide (hardware trickery). >>>> */ >>>> >>>> This does _not_ hold true for all configurations. Flash is simply >>>> one of many options ... >>>> Maybe it's true for the Freescale boards. >>>> >>>> Other sources of the HRCW can be hard-coded strapping pins or an >>>> I2C EEPROM. >>>> >>>> Why is there a need to define the HRCW ? >>>> >>>> regards, >>>> Andre Schwarz >>> >>> Hi Andre, >>> >>> The HRCW in flash (could be other memory or a FPGA register) is a >>> processor feature which a board may or may not use. I am not >>> familiar with the whole 83xx family, but I presume the feature is >>> part of the whole family. >>> >>> As you point out, there are other ways of configuring the processor >>> on power up, and it is board-specific which way is used on the >>> particular board. >>> >>> For the boards that support the HRCW, obviously the definition in >>> the first 64 bytes of flash is necessary. For other boards, it is >>> unnecessary. FWIIW, the Freescale eval boards that I have >>> experience with allow the HRCW to come from flash, i2c, or an FPGA >>> (BCSR). >>> >>> To date, having a potentially unused HRCW definition in memory has >>> not been an issue - people either use it or ignore it. If it is an >>> issue, you could use conditionals to disable it. I'm sure the 83xx >>> custodian (Kim Phillips) would consider patches to do that. ;-) >>> Note that there is a possibility that some of the code assumes the >>> presence of a HRCW, so you would have to inspect and/or regression >>> test as part of a conditionalization patch. >>> >> ok - so should be no problem to #define the HRCW to "0x0" since it >> won't be used at all - just occupies some memory. >> I just wanted to be sure that the #defined HRCW is not used as a >> reference at all in any code ! > > Theoretically, there is no problem. I don't know if there are any > implicit uses of the HRCW - that would be part of the need to inspect > and/or regression test. > > I suspect that the CPU frequency determination code uses it, since > part of the CPU PLL multiplier comes from the HRCW (IIRC - I get > confused between the 82xx and 83xx families sometimes). > Using the HRCW during SystemInit is no problem - but the _real_ one from the CPU register and not a #defined one. The CPU won't start anyway if the HRCW is invalid. I've just #defined my HRCW to "0" without any problems. Sorry for the confusion. regards, Andre > [snip] > > Best regards, > gvb MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner