summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'cpu')
-rw-r--r--cpu/74xx_7xx/start.S2
-rw-r--r--cpu/mpc8xx/spi.c41
2 files changed, 16 insertions, 27 deletions
diff --git a/cpu/74xx_7xx/start.S b/cpu/74xx_7xx/start.S
index e8854f0..534c818 100644
--- a/cpu/74xx_7xx/start.S
+++ b/cpu/74xx_7xx/start.S
@@ -267,7 +267,7 @@ in_flash:
* everything is write-through.
* The init-mem BAT can be reused after reloc. The old
* gt-regs BAT can be reused after board_init_f calls
- * board_pre_init (EVB only).
+ * board_early_init_f (EVB only).
*/
#if !defined(CONFIG_BAB7xx) && !defined(CONFIG_ELPPC)
/* enable address translation */
diff --git a/cpu/mpc8xx/spi.c b/cpu/mpc8xx/spi.c
index 16b3f3a..5d75207 100644
--- a/cpu/mpc8xx/spi.c
+++ b/cpu/mpc8xx/spi.c
@@ -503,8 +503,7 @@ static int packet_check (char * packet, int length)
char c = (char) length;
int i;
- for (i = 0; i < length; i++)
- {
+ for (i = 0; i < length; i++) {
if (packet[i] != c++) return -1;
}
@@ -513,37 +512,32 @@ static int packet_check (char * packet, int length)
int spi_post_test (int flags)
{
- DECLARE_GLOBAL_DATA_PTR;
-
int res = -1;
volatile immap_t *immr = (immap_t *) CFG_IMMR;
- volatile cpm8xx_t *cp = (cpm8xx_t *) &immr->im_cpm;
+ volatile cpm8xx_t *cp = (cpm8xx_t *) & immr->im_cpm;
int i;
int l;
- spi_init_f();
- spi_init_r();
+ spi_init_f ();
+ spi_init_r ();
cp->cp_spmode |= SPMODE_LOOP;
- for (i = 0; i < TEST_NUM; i++)
- {
- for (l = TEST_MIN_LENGTH; l <= TEST_MAX_LENGTH; l += 8)
- {
- packet_fill(txbuf, l);
+ for (i = 0; i < TEST_NUM; i++) {
+ for (l = TEST_MIN_LENGTH; l <= TEST_MAX_LENGTH; l += 8) {
+ packet_fill (txbuf, l);
- spi_xfer(l);
+ spi_xfer (l);
- if (packet_check(rxbuf, l) < 0)
- {
- goto Done;
+ if (packet_check (rxbuf, l) < 0) {
+ goto Done;
+ }
}
- }
}
res = 0;
- Done:
+ Done:
cp->cp_spmode &= ~SPMODE_LOOP;
@@ -554,16 +548,11 @@ int spi_post_test (int flags)
*/
#if defined(CONFIG_8xx_CONS_SCC2)
- serial_init();
+ serial_init ();
#endif
-#if defined(SCC_ENET) && (SCC_ENET == 1)
- eth_init(gd->bd);
-#endif
-
- if (res != 0)
- {
- post_log("SPI test failed\n");
+ if (res != 0) {
+ post_log ("SPI test failed\n");
}
return res;