1/* 2 * (C) Copyright 2001 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7#include <common.h> 8#include <asm/processor.h> 9#include <command.h> 10#include <malloc.h> 11#include <spd_sdram.h> 12 13 14int board_early_init_f (void) 15{ 16 /* 17 * IRQ 0-15 405GP internally generated; active high; level sensitive 18 * IRQ 16 405GP internally generated; active low; level sensitive 19 * IRQ 17-24 RESERVED 20 * IRQ 25 (EXT IRQ 0) CAN0; active low; level sensitive 21 * IRQ 26 (EXT IRQ 1) SER0 ; active low; level sensitive 22 * IRQ 27 (EXT IRQ 2) SER1; active low; level sensitive 23 * IRQ 28 (EXT IRQ 3) FPGA 0; active low; level sensitive 24 * IRQ 29 (EXT IRQ 4) FPGA 1; active low; level sensitive 25 * IRQ 30 (EXT IRQ 5) PCI INTA; active low; level sensitive 26 * IRQ 31 (EXT IRQ 6) COMPACT FLASH; active high; level sensitive 27 */ 28 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ 29 mtdcr(UIC0ER, 0x00000000); /* disable all ints */ 30 mtdcr(UIC0CR, 0x00000000); /* set all to be non-critical*/ 31 mtdcr(UIC0PR, 0xFFFFFF81); /* set int polarities */ 32 mtdcr(UIC0TR, 0x10000000); /* set int trigger levels */ 33 mtdcr(UIC0VCR, 0x00000001); /* set vect base=0,INT0 highest priority*/ 34 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ 35 36 /* 37 * EBC Configuration Register: set ready timeout to 512 ebc-clks -> ca. 15 us 38 */ 39 mtebc (EBC0_CFG, 0xa8400000); 40 41 return 0; 42} 43 44 45/* ------------------------------------------------------------------------- */ 46 47int misc_init_f (void) 48{ 49 return 0; /* dummy implementation */ 50} 51 52 53int misc_init_r (void) 54{ 55 return (0); 56} 57 58 59/* 60 * Check Board Identity: 61 */ 62 63int checkboard (void) 64{ 65 char str[64]; 66 int i = getenv_f("serial#", str, sizeof(str)); 67 68 puts ("Board: "); 69 70 if (i == -1) { 71 puts ("### No HW ID - assuming sbc405"); 72 } else { 73 puts(str); 74 } 75 76 putc ('\n'); 77 78 return 0; 79} 80 81/* ------------------------------------------------------------------------- */ 82 83int testdram (void) 84{ 85 /* TODO: XXX XXX XXX */ 86 printf ("test: 64 MB - ok\n"); 87 88 return (0); 89} 90 91/* ------------------------------------------------------------------------- */ 92