Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame^] | 1 | IMPORTANT NOTE - read before defining CONFIG_SYS_USE_OSCCLK in your board |
wdenk | 865f3f5 | 2001-12-27 23:05:33 +0000 | [diff] [blame] | 2 | config file!!! |
| 3 | |
| 4 | |
| 5 | WARNING: Wrong settings of this parameter have the potential to |
| 6 | damage hardware by running the MBX's CPU at frequencies that exceed |
| 7 | it's rating and/or overdriving the it's SPLL! |
| 8 | |
| 9 | |
| 10 | Ramblings: |
| 11 | 1) Motorola offered 12 different variants of the MBX, 6 823s and 6 860s. |
| 12 | 2) Of these 12 variants, only 2 were entry level boards. |
| 13 | 3) I believe that the 2 entry level boards were the only ones that |
| 14 | used OSCM clocking. I can't be completely certain of this at this |
| 15 | point. |
| 16 | 4) Motorola never offered an MBX that ran faster than 50Mhz. |
| 17 | 5) The 10, non-entry level boards, ran at 40Mhz. |
| 18 | 6) The EXTCLK input has a minimum clock of 15Mhz for the 823/860. |
| 19 | 7) Motorola no longer sells MBXs. |
| 20 | |
| 21 | Based on this information, I can surmise that the default power-on |
| 22 | reset clocking was one of the following three options. |
| 23 | |
| 24 | Multiplier SPLL Options |
| 25 | ------------------------------------ |
| 26 | 513 OSCM is SPLL input |
| 27 | 5 OSCM is SPLL input |
| 28 | 1 EXTCLK is SPLL input |
| 29 | |
| 30 | The forth option: |
| 31 | |
| 32 | 5 EXTCLK is SPLL input |
| 33 | |
| 34 | is not possible on MBXs. This is because the minimum EXTCLK input |
| 35 | frequency is 15Mhz. 5 * 15Mhz = 75 Mhz. There was no variant that ran |
| 36 | above 50 Mhz. |
| 37 | |
| 38 | The board I have borrowed definitely uses a multiplier of 1 for |
| 39 | EXTCLK and runs at 40Mhz. I even went so far as to put a scope on it. |
| 40 | |
| 41 | One of the two default OSCM modes are most likely what was used on |
| 42 | the entry level boards to cheapen them by eliminating the external |
| 43 | crystal oscillator. |
| 44 | |
| 45 | To add insult to injury, the stupid 860 PLPRCR register retains it's |
| 46 | multiplication factor through hard resets. You can't clear it out |
| 47 | because it is battery backed and once it is set wrong, it stays |
| 48 | wrong. The only way to reset it, so that it takes on it's default |
| 49 | multiplier is to disconnect all power including external, batteries, |
| 50 | as well discharging caps on the board. This precludes the fact that |
| 51 | your 860 may be quite DEAD by this time! |
| 52 | |
| 53 | If you don't setup the multiplication factor for boards that use the |
| 54 | OSCM input, they won't run correctly, but at least they won't be |
| 55 | dead. |
| 56 | |
| 57 | Addtionally, there is no good way to determine the clock input source |
| 58 | from CPU register data. The only way to deal with this is either hard |
| 59 | code it, determine the correct value with some rather NASTY timing |
| 60 | loops, or try to grok it from external data sources. Motorola |
| 61 | firmware opts for the NASTY timing loops, but needs to configure the |
| 62 | serial ports to do so. |
| 63 | |
| 64 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame^] | 65 | You may have a legitimate need to define CONFIG_SYS_USE_OSCCLK if your |
wdenk | 865f3f5 | 2001-12-27 23:05:33 +0000 | [diff] [blame] | 66 | MBX8xx board is using the OSCM clocking mode. |
| 67 | |
| 68 | You better know what you are doing here. |