3 * Michael Schwingen, michael@schwingen.org
6 * Stefan Roese, DENX Software Engineering, sr@denx.de.
9 * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
12 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
13 * Marius Groeger <mgroeger@sysgo.de>
15 * SPDX-License-Identifier: GPL-2.0+
21 #include <asm/arch/ixp425.h>
26 #include <asm/arch/ixp425pci.h>
29 #include "actux4_hw.h"
31 DECLARE_GLOBAL_DATA_PTR;
33 int board_early_init_f(void)
35 writel(0xbd113c42, IXP425_EXP_CS1);
41 /* adress of boot parameters */
42 gd->bd->bi_boot_params = 0x00000100;
44 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_nPWRON);
45 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_nPWRON);
47 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
48 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
50 /* led not populated on board*/
51 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED3);
52 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED3);
55 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED2);
56 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED2);
59 /* weak pulldown = LED weak on */
60 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_LED1);
61 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED1);
63 /* Setup GPIO's for Interrupt inputs */
64 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTA);
65 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTB);
66 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTC);
67 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_RTCINT);
68 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTA);
69 GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTB);
71 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTA);
72 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTB);
73 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTC);
74 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_RTCINT);
75 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTA);
76 GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTB);
78 /* Setup GPIO's for 33MHz clock output */
79 writel(0x011001FF, IXP425_GPIO_GPCLKR);
80 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
81 GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
84 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
86 GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
88 GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
93 /* Check Board Identity */
96 puts("Board: AcTux-4\n");
102 gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
107 struct pci_controller hose;
109 void pci_init_board(void)
116 * Hardcoded flash setup:
117 * Flash 0 is a non-CFI SST 39VF020 flash, 8 bit flash / 8 bit bus.
118 * Flash 1 is an Intel *16 flash using the CFI driver.
120 ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
122 if (banknum == 0) { /* non-CFI boot flash */
125 info->interface = FLASH_CFI_X8;