Commit 387184252951e3125f43c151ab0841e2b4942c06

Authored by stroese
1 parent b6d9e4f5af

Code cleanup.

Showing 2 changed files with 3 additions and 126 deletions Side-by-side Diff

board/esd/pci405/cmd_pci405.c
... ... @@ -36,66 +36,7 @@
36 36  
37 37 extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
38 38  
39   -#if 0 /* test-only */
40   -#include "../common/fpga.c"
41   -void error_print(void)
42   -{
43   - int i;
44   - volatile unsigned char *ptr;
45   - volatile unsigned long *ptr2;
46   -
47   - printf("\n 2nd SJA1000:\n");
48   - ptr = 0xf0000100;
49   - for (i=0; i<0x20; i++) {
50   - printf("%02x ", *ptr++);
51   - }
52 39  
53   - ptr2 = 0xf0400008;
54   - printf("\nTimestamp = %x\n", *ptr2);
55   - udelay(1000);
56   - printf("Timestamp = %x\n", *ptr2);
57   - udelay(1000);
58   - printf("Timestamp = %x\n", *ptr2);
59   -
60   -#if 0 /* test-only */
61   - /*
62   - * Reset FPGA via FPGA_DATA pin
63   - */
64   - printf("Resetting FPGA...\n");
65   - SET_FPGA(FPGA_PRG | FPGA_CLK);
66   - udelay(1000); /* wait 1ms */
67   - SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);
68   - udelay(1000); /* wait 1ms */
69   -
70   - do_loadpci(NULL, 0,0, NULL);
71   -#endif
72   -}
73   -
74   -void read_loop(void)
75   -{
76   - int i;
77   - volatile unsigned char *ptr;
78   - volatile unsigned char val;
79   - volatile unsigned long *ptr2;
80   -
81   - printf("\nread loop on 1st sja1000...");
82   - while (1) {
83   - ptr = 0xf0000000;
84   -/* printf("\n1st SJA1000:\n");*/
85   - for (i=0; i<0x20; i++) {
86   - i = i;
87   - val = *ptr++;
88   -/* printf("%02x ", val);*/
89   - }
90   -
91   - /* Abort if ctrl-c was pressed */
92   - if (ctrlc()) {
93   - puts("\nAbort\n");
94   - return 0;
95   - }
96   - }
97   -}
98   -#endif
99 40 /*
100 41 * Command loadpci: wait for signal from host and boot image.
101 42 */
... ... @@ -110,66 +51,6 @@
110 51 char str[] = "\\|/-";
111 52 char *local_args[2];
112 53  
113   -#if 0 /* test-only */
114   - puts("\nStarting sja1000 test...");
115   - {
116   - int count;
117   - volatile unsigned char *ptr;
118   - volatile unsigned char val;
119   - volatile unsigned char val2;
120   -
121   -#if 1 /* write test */
122   - ptr = 0xf0000014;
123   - for (i=1; i<11; i++)
124   - *ptr++ = i;
125   -#endif
126   -
127   - count = 0;
128   - while (1) {
129   - count++;
130   -#if 0 /* write test */
131   - ptr = 0xf0000014;
132   - for (i=1; i<11; i++)
133   - *ptr++ = i;
134   -#endif
135   -#if 1 /* read test */
136   - ptr = 0xf0000014;
137   - for (i=1; i<11; i++) {
138   - val = *ptr++;
139   -#if 1
140   - if (val != i) {
141   - ptr = 0xf0000100;
142   - val = *ptr; /* trigger las */
143   -
144   - ptr = 0xf0000014;
145   - val2 = *ptr;
146   -
147   - printf("\nERROR: count=%d: soll=%x ist=%x -> staring read loop on 1st sja1000...\n", count, i, val);
148   -
149   - printf("soll=%x ist=%x -> staring read loop on 1st sja1000...\n", 1, val2);
150   -
151   - return 0; /* test-only */
152   - udelay(1000);
153   - error_print();
154   - read_loop();
155   - return 0;
156   - }
157   -#endif
158   - }
159   -#endif
160   -
161   - /* Abort if ctrl-c was pressed */
162   - if (ctrlc()) {
163   - puts("\nAbort\n");
164   - return 0;
165   - }
166   -
167   - if (!(count % 100000)) {
168   - printf(".");
169   - }
170   - }
171   - }
172   -#endif
173 54 /*
174 55 * Mark sync address
175 56 */
176 57  
... ... @@ -212,13 +93,13 @@
212 93 printf("\nStoring PCI Configuration Regs...\n");
213 94 } else {
214 95 sprintf(addr, "%08x", *ptr);
215   -
  96 +
216 97 /*
217 98 * Boot image
218 99 */
219 100 printf("\nBooting image at addr 0x%s ...\n", addr);
220 101 setenv("loadaddr", addr);
221   -
  102 +
222 103 local_args[0] = argv[0];
223 104 local_args[1] = NULL;
224 105 status = do_bootm (cmdtp, 0, 1, local_args);
include/configs/PCI405.h
... ... @@ -40,11 +40,7 @@
40 40 #define CONFIG_BOARD_PRE_INIT 1 /* call board_pre_init() */
41 41 #define CONFIG_MISC_INIT_R 1 /* call misc_init_r() on init */
42 42  
43   -#if 1 /* test-only */
44 43 #define CONFIG_SYS_CLK_FREQ 25000000 /* external frequency to pll */
45   -#else
46   -#define CONFIG_SYS_CLK_FREQ 16000000 /* external frequency to pll */
47   -#endif
48 44  
49 45 #define CONFIG_BAUDRATE 115200
50 46 #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */
... ... @@ -92,7 +88,7 @@
92 88  
93 89 #define CONFIG_SDRAM_BANK0 1 /* init onboard SDRAM bank 0 */
94 90  
95   -#define CONFIG_PRAM 2048 /* reserve 2 MB "protected RAM" */
  91 +#define CONFIG_PRAM 2048 /* reserve 2 MB "protected RAM" */
96 92  
97 93 /*
98 94 * Miscellaneous configurable options