2 * (C) Copyright 2007-2008
3 * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.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,
26 #include <asm/processor.h>
29 #define HWTYPE_CCX16 1
32 int board_early_init_f(void)
34 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
35 mtdcr(UIC0ER, 0x00000000); /* disable all ints */
36 mtdcr(UIC0CR, 0x00000000); /* set all to be non-critical */
37 mtdcr(UIC0PR, 0xFFFFFF80); /* set int polarities */
38 mtdcr(UIC0TR, 0x10000000); /* set int trigger levels */
39 mtdcr(UIC0VCR, 0x00000001); /* set vect base=0,INT0 highest prio */
40 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
43 * EBC Configuration Register: set ready timeout to 512 ebc-clks
46 mtebc(EBC0_CFG, 0xa8400000); /* ebc always driven */
52 * Check Board Identity:
56 char *s = getenv("serial#");
57 u16 val = in_le16((void *)CONFIG_FPGA_BASE + 2);
59 u8 hardware_cpu_ports;
60 u8 hardware_con_ports;
63 printf("Board: CATCenter Neo");
71 unit_type = (val & 0xf000) >> 12;
72 hardware_cpu_ports = ((val & 0x0f00) >> 8) * 8;
73 hardware_con_ports = ((val & 0x00f0) >> 4) * 2;
74 hardware_version = val & 0x000f;
78 printf("CCX16-FPGA (80 UARTs)");
82 printf("UnitType %d, unsupported", unit_type);
86 printf(", %d cpu ports, %d console ports,",
87 hardware_cpu_ports, hardware_con_ports);
89 switch (hardware_version) {
91 printf(" HW-Ver 3.00\n");
95 printf(" HW-Ver %d, unsupported\n",