blob: eaf7cdefe566342f03d8703316172c010d2278a9 [file] [log] [blame]
wdenkbd1575f2003-10-14 19:43:55 +00001/*
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02002 * (C) Copyright 2006
3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
4 *
wdenkbd1575f2003-10-14 19:43:55 +00005 * (C) Copyright 2002
6 * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
7 *
8 * (C) Copyright 2002
9 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
10 * Marius Groeger <mgroeger@sysgo.de>
11 *
12 * See file CREDITS for list of people who contributed to this
13 * project.
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 * MA 02111-1307 USA
29 */
30
wdenkbd1575f2003-10-14 19:43:55 +000031#include <common.h>
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020032#include <command.h>
33#include <malloc.h>
34#include <asm/arch/ixp425.h>
wdenkbd1575f2003-10-14 19:43:55 +000035
Wolfgang Denk6405a152006-03-31 18:32:53 +020036DECLARE_GLOBAL_DATA_PTR;
wdenkbd1575f2003-10-14 19:43:55 +000037
38/*
39 * Miscelaneous platform dependent initialisations
40 */
wdenkcb99da52005-01-12 00:15:14 +000041int board_post_init (void)
wdenkbd1575f2003-10-14 19:43:55 +000042{
43 return (0);
44}
45
wdenkcb99da52005-01-12 00:15:14 +000046int board_init (void)
wdenkbd1575f2003-10-14 19:43:55 +000047{
wdenkbd1575f2003-10-14 19:43:55 +000048 /* arch number of IXDP */
wdenk767fbd42004-10-10 18:41:04 +000049 gd->bd->bi_arch_number = MACH_TYPE_IXDP425;
wdenkbd1575f2003-10-14 19:43:55 +000050
51 /* adress of boot parameters */
52 gd->bd->bi_boot_params = 0x00000100;
53
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020054#ifdef CONFIG_IXDPG425
55 /* arch number of IXDP */
56 gd->bd->bi_arch_number = MACH_TYPE_IXDPG425;
57
58 /*
59 * Get realtek RTL8305 switch and SLIC out of reset
60 */
61 GPIO_OUTPUT_SET(CFG_GPIO_SWITCH_RESET_N);
62 GPIO_OUTPUT_ENABLE(CFG_GPIO_SWITCH_RESET_N);
63 GPIO_OUTPUT_SET(CFG_GPIO_SLIC_RESET_N);
64 GPIO_OUTPUT_ENABLE(CFG_GPIO_SLIC_RESET_N);
65
66 /*
67 * Setup GPIO's for PCI INTA & INTB
68 */
69 GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTA_N);
70 GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTA_N);
71 GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTB_N);
72 GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTB_N);
73
74 /*
75 * Setup GPIO's for 33MHz clock output
76 */
77 *IXP425_GPIO_GPCLKR = 0x01FF01FF;
78 GPIO_OUTPUT_ENABLE(CFG_GPIO_PCI_CLK);
79 GPIO_OUTPUT_ENABLE(CFG_GPIO_EXTBUS_CLK);
80#endif
81
wdenkbd1575f2003-10-14 19:43:55 +000082 return 0;
83}
84
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020085/*
86 * Check Board Identity
87 */
88int checkboard(void)
89{
90 char *s = getenv("serial#");
91
92#ifdef CONFIG_IXDPG425
93 puts("Board: IXDPG425 - Intel Network Gateway Reference Platform");
94#else
95 puts("Board: IXDP425 - Intel Development Platform");
96#endif
97
98 if (s != NULL) {
99 puts(", serial# ");
100 puts(s);
101 }
102 putc('\n');
103
104 return (0);
105}
wdenkcb99da52005-01-12 00:15:14 +0000106
107int dram_init (void)
wdenkbd1575f2003-10-14 19:43:55 +0000108{
wdenkbd1575f2003-10-14 19:43:55 +0000109 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
110 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
111
112 return (0);
113}
wdenkcb99da52005-01-12 00:15:14 +0000114
Wolfgang Denk4646d2a2006-05-30 15:56:48 +0200115#if (CONFIG_COMMANDS & CFG_CMD_PCI) || defined(CONFIG_PCI)
wdenk26c58432005-01-09 17:12:27 +0000116extern struct pci_controller hose;
Wolfgang Denka37cb302005-09-25 00:00:45 +0200117extern void pci_ixp_init(struct pci_controller * hose);
wdenkcb99da52005-01-12 00:15:14 +0000118
wdenk26c58432005-01-09 17:12:27 +0000119void pci_init_board(void)
120{
wdenkcb99da52005-01-12 00:15:14 +0000121 extern void pci_ixp_init (struct pci_controller *hose);
122
wdenk26c58432005-01-09 17:12:27 +0000123 pci_ixp_init(&hose);
wdenk26c58432005-01-09 17:12:27 +0000124}
Wolfgang Denk4646d2a2006-05-30 15:56:48 +0200125#endif