3 * Michael Schwingen, michael@schwingen.org
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,
28 #include <asm/arch/ixp425.h>
33 #include <asm/arch/ixp425pci.h>
36 #include "dvlhost_hw.h"
38 DECLARE_GLOBAL_DATA_PTR;
40 int board_early_init_f(void)
43 writel(0xBFFF0002, IXP425_EXP_CS1);
49 gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
51 /* adress of boot parameters */
52 gd->bd->bi_boot_params = 0x00000100;
54 /* Setup GPIOs used as output */
55 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDGTRIGGER);
56 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DLAN_PAIRING);
57 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_PCIRST);
60 * LED latch enable and watchdog enable are tied to the same GPIO,
61 * so we need to trigger the watchdog if we want to enable the LEDs.
63 #ifdef CONFIG_HW_WATCHDOG
64 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDG_LED_EN);
66 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_WDG_LED_EN);
69 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_WDGTRIGGER);
70 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DLAN_PAIRING);
71 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_WDG_LED_EN);
72 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCIRST);
74 /* Setup GPIOs for Interrupt inputs */
75 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_WLAN);
76 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_PAIRING);
77 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_BTN_RESET);
78 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_IRQA);
79 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_IRQB);
81 /* Setup GPIO's for 33MHz clock output */
82 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
83 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
84 writel(0x01FF01FF, IXP425_GPIO_GPCLKR);
86 /* turn off all LEDs */
87 writew(0x0000, DVLHOST_LED_LATCH);
90 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_PCIRST);
95 /* Check Board Identity */
98 char *s = getenv("serial#");
100 puts("Board: dLAN 200AV (dvlhost)");
113 gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
118 struct pci_controller hose;
120 void pci_init_board(void)
128 /* init IcPlus IP175C ethernet switch to native IP175C mode */
129 miiphy_write("NPE1", 29, 31, 0x175C);