2 * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
3 * Scott McNutt <smcnutt@psyent.com>
6 * (C) Copyright 2004, Shlomo Kut <skut@vyyo.com>
8 * See file CREDITS for list of people who contributed to this
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 #if defined(CONFIG_SEVENSEG)
30 #include "../common/sevenseg.h"
33 void _default_hdlr (void)
35 printf ("default_hdlr\n");
38 int board_early_init_f (void)
40 #if defined(CONFIG_SEVENSEG)
41 /* init seven segment led display and switch off */
42 sevenseg_set(SEVENSEG_OFF);
49 puts ("Board: Altera Nios 1C20 Development Kit\n");
53 long int initdram (int board_type)
58 #if defined(CONFIG_CMD_IDE)
59 int ide_preinit (void)
61 nios_pio_t *present = (nios_pio_t *) CFG_CF_PRESENT;
62 nios_pio_t *power = (nios_pio_t *) CFG_CF_POWER;
63 nios_pio_t *atasel = (nios_pio_t *) CFG_CF_ATASEL;
65 /* setup data direction registers */
66 present->direction = NIOS_PIO_IN;
67 power->direction = NIOS_PIO_OUT;
68 atasel->direction = NIOS_PIO_OUT;
70 /* Check for presence of card */
76 power->data = 1; /* Turn on power FET */
77 atasel->data = 0; /* Put in ATA mode */