wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 1 | /* |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 2 | * (C) Copyright 2006 |
| 3 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
| 4 | * |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 5 | * (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 | |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 31 | #include <common.h> |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 32 | #include <command.h> |
| 33 | #include <malloc.h> |
| 34 | #include <asm/arch/ixp425.h> |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 35 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 36 | DECLARE_GLOBAL_DATA_PTR; |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 37 | |
| 38 | /* |
| 39 | * Miscelaneous platform dependent initialisations |
| 40 | */ |
wdenk | cb99da5 | 2005-01-12 00:15:14 +0000 | [diff] [blame] | 41 | int board_init (void) |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 42 | { |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 43 | /* arch number of IXDP */ |
wdenk | 767fbd4 | 2004-10-10 18:41:04 +0000 | [diff] [blame] | 44 | gd->bd->bi_arch_number = MACH_TYPE_IXDP425; |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 45 | |
| 46 | /* adress of boot parameters */ |
| 47 | gd->bd->bi_boot_params = 0x00000100; |
| 48 | |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 49 | #ifdef CONFIG_IXDPG425 |
| 50 | /* arch number of IXDP */ |
| 51 | gd->bd->bi_arch_number = MACH_TYPE_IXDPG425; |
| 52 | |
| 53 | /* |
| 54 | * Get realtek RTL8305 switch and SLIC out of reset |
| 55 | */ |
| 56 | GPIO_OUTPUT_SET(CFG_GPIO_SWITCH_RESET_N); |
| 57 | GPIO_OUTPUT_ENABLE(CFG_GPIO_SWITCH_RESET_N); |
| 58 | GPIO_OUTPUT_SET(CFG_GPIO_SLIC_RESET_N); |
| 59 | GPIO_OUTPUT_ENABLE(CFG_GPIO_SLIC_RESET_N); |
| 60 | |
| 61 | /* |
| 62 | * Setup GPIO's for PCI INTA & INTB |
| 63 | */ |
| 64 | GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTA_N); |
| 65 | GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTA_N); |
| 66 | GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTB_N); |
| 67 | GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTB_N); |
| 68 | |
| 69 | /* |
| 70 | * Setup GPIO's for 33MHz clock output |
| 71 | */ |
| 72 | *IXP425_GPIO_GPCLKR = 0x01FF01FF; |
| 73 | GPIO_OUTPUT_ENABLE(CFG_GPIO_PCI_CLK); |
| 74 | GPIO_OUTPUT_ENABLE(CFG_GPIO_EXTBUS_CLK); |
| 75 | #endif |
| 76 | |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 77 | return 0; |
| 78 | } |
| 79 | |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 80 | /* |
| 81 | * Check Board Identity |
| 82 | */ |
| 83 | int checkboard(void) |
| 84 | { |
| 85 | char *s = getenv("serial#"); |
| 86 | |
| 87 | #ifdef CONFIG_IXDPG425 |
| 88 | puts("Board: IXDPG425 - Intel Network Gateway Reference Platform"); |
| 89 | #else |
| 90 | puts("Board: IXDP425 - Intel Development Platform"); |
| 91 | #endif |
| 92 | |
| 93 | if (s != NULL) { |
| 94 | puts(", serial# "); |
| 95 | puts(s); |
| 96 | } |
| 97 | putc('\n'); |
| 98 | |
| 99 | return (0); |
| 100 | } |
wdenk | cb99da5 | 2005-01-12 00:15:14 +0000 | [diff] [blame] | 101 | |
| 102 | int dram_init (void) |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 103 | { |
wdenk | bd1575f | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 104 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 105 | gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
| 106 | |
| 107 | return (0); |
| 108 | } |
wdenk | cb99da5 | 2005-01-12 00:15:14 +0000 | [diff] [blame] | 109 | |
Jon Loeliger | 96892a9 | 2007-07-09 18:31:28 -0500 | [diff] [blame] | 110 | #if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI) |
wdenk | 26c5843 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 111 | extern struct pci_controller hose; |
Wolfgang Denk | a37cb30 | 2005-09-25 00:00:45 +0200 | [diff] [blame] | 112 | extern void pci_ixp_init(struct pci_controller * hose); |
wdenk | cb99da5 | 2005-01-12 00:15:14 +0000 | [diff] [blame] | 113 | |
wdenk | 26c5843 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 114 | void pci_init_board(void) |
| 115 | { |
wdenk | cb99da5 | 2005-01-12 00:15:14 +0000 | [diff] [blame] | 116 | extern void pci_ixp_init (struct pci_controller *hose); |
| 117 | |
wdenk | 26c5843 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 118 | pci_ixp_init(&hose); |
wdenk | 26c5843 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 119 | } |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 120 | #endif |