3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 long int spd_sdram (void);
26 #include "bubinga405ep.h"
27 #include <asm/processor.h>
30 int board_pre_init (void)
32 mtdcr (uicsr, 0xFFFFFFFF); /* clear all ints */
33 mtdcr (uicer, 0x00000000); /* disable all ints */
34 mtdcr (uiccr, 0x00000010);
35 mtdcr (uicpr, 0xFFFF7FF0); /* set int polarities */
36 mtdcr (uictr, 0x00000010); /* set int trigger levels */
37 mtdcr (uicsr, 0xFFFFFFFF); /* clear all ints */
40 #define mtebc(reg, data) mtdcr(ebccfga,reg);mtdcr(ebccfgd,data)
42 /* BAS=0xF00,BS=0x0(1MB),BU=0x3(R/W),BW=0x0( 8 bits) */
43 mtebc (pb1ap, 0x02815480);
44 mtebc (pb1cr, 0xF0018000);
46 p = (unsigned int*)0xEF600708;
51 /* BAS=0xF01,BS=0x0(1MB),BU=0x3(R/W),BW=0x0(8 bits) */
52 mtebc (pb2ap, 0x04815A80);
53 mtebc (pb2cr, 0xF0118000);
55 /* BAS=0xF02,BS=0x0(1MB),BU=0x3(R/W),BW=0x0( 8 bits) */
56 mtebc (pb3ap, 0x01815280);
57 mtebc (pb3cr, 0xF0218000);
59 /* BAS=0xF03,BS=0x0(1MB),BU=0x3(R/W),BW=0x0(8 bits) */
60 mtebc (pb7ap, 0x01815280);
61 mtebc (pb7cr, 0xF0318000);
64 /* set UART1 control to select CTS/RTS */
65 #define FPGA_BRDC 0xF0300004
66 *(volatile char *) (FPGA_BRDC) |= 0x1;
74 /* ------------------------------------------------------------------------- */
77 * Check Board Identity:
82 unsigned char *s = getenv ("serial#");
87 if (!s || strncmp (s, "BUBINGA405EP", 9)) {
88 puts ("### No HW ID - assuming WALNUT405");
90 for (e = s; *e; ++e) {
104 /* -------------------------------------------------------------------------
105 initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
106 the necessary info for SDRAM controller configuration
107 ------------------------------------------------------------------------- */
108 long int initdram (int board_type)
116 /* ------------------------------------------------------------------------- */
120 /* TODO: XXX XXX XXX */
121 printf ("test: xxx MB - ok\n");
126 /* ------------------------------------------------------------------------- */