~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to board/mpc8540eval/mpc8540eval.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-20 15:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120154126-7bha1jeyjegu7xm5
Tags: 2009.08+really2009.01-0ubuntu1
* revert to the 2009.01 upstream version, 2009.08 has still to 
  many work in progress items in the freescale patchset (MMC and NIC
  dont work at all)
* add the latest patchset from freescale for 2009.01
* add 1002_enable_hush_shell_and_ext2.patch to enable hush shell and ext2 
* add 1003_fix_board_revision_numbers to make sure babbage 2.5 boards have 
  revision 51120 and babbage 3.0 boards have revision 51130 properly set in 
  their cpuinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        get_sys_info (&sysinfo);
51
51
 
52
52
        printf ("Board: Freescale MPC8540EVAL Board\n");
53
 
        printf ("\tCPU: %lu MHz\n", sysinfo.freqProcessor[0] / 1000000);
 
53
        printf ("\tCPU: %lu MHz\n", sysinfo.freqProcessor / 1000000);
54
54
        printf ("\tCCB: %lu MHz\n", sysinfo.freqSystemBus / 1000000);
55
55
        printf ("\tDDR: %lu MHz\n", sysinfo.freqSystemBus / 2000000);
56
56
        if((CONFIG_SYS_LBC_LCRR & 0x0f) == 2 || (CONFIG_SYS_LBC_LCRR & 0x0f) == 4 \
137
137
        {
138
138
                /* Initialize all of memory for ECC, then
139
139
                 * enable errors */
 
140
                uint *p = 0;
 
141
                uint i = 0;
140
142
                volatile ccsr_ddr_t *ddr= (void *)(CONFIG_SYS_MPC85xx_DDR_ADDR);
141
 
 
142
 
                dma_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
 
143
                dma_init();
 
144
                for (*p = 0; p < (uint *)(8 * 1024); p++) {
 
145
                        if (((unsigned int)p & 0x1f) == 0) { dcbz(p); }
 
146
                        *p = (unsigned int)0xdeadbeef;
 
147
                        if (((unsigned int)p & 0x1c) == 0x1c) { dcbf(p); }
 
148
                }
 
149
 
 
150
                /* 8K */
 
151
                dma_xfer((uint *)0x2000,0x2000,(uint *)0);
 
152
                /* 16K */
 
153
                dma_xfer((uint *)0x4000,0x4000,(uint *)0);
 
154
                /* 32K */
 
155
                dma_xfer((uint *)0x8000,0x8000,(uint *)0);
 
156
                /* 64K */
 
157
                dma_xfer((uint *)0x10000,0x10000,(uint *)0);
 
158
                /* 128k */
 
159
                dma_xfer((uint *)0x20000,0x20000,(uint *)0);
 
160
                /* 256k */
 
161
                dma_xfer((uint *)0x40000,0x40000,(uint *)0);
 
162
                /* 512k */
 
163
                dma_xfer((uint *)0x80000,0x80000,(uint *)0);
 
164
                /* 1M */
 
165
                dma_xfer((uint *)0x100000,0x100000,(uint *)0);
 
166
                /* 2M */
 
167
                dma_xfer((uint *)0x200000,0x200000,(uint *)0);
 
168
                /* 4M */
 
169
                dma_xfer((uint *)0x400000,0x400000,(uint *)0);
 
170
 
 
171
                for (i = 1; i < dram_size / 0x800000; i++) {
 
172
                        dma_xfer((uint *)(0x800000*i),0x800000,(uint *)0);
 
173
                }
143
174
 
144
175
                /* Enable errors for ECC */
145
176
                ddr->err_disable = 0x00000000;