Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 1 | /* |
Stefan Roese | 5a5958b | 2007-10-15 11:29:33 +0200 | [diff] [blame] | 2 | * (C) Copyright 2006-2007 |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 3 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
| 4 | * |
| 5 | * (C) Copyright 2006 |
| 6 | * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com |
Wolfgang Denk | 865f0f9 | 2008-01-23 14:31:17 +0100 | [diff] [blame] | 7 | * Alain Saurel, AMCC/IBM, alain.saurel@fr.ibm.com |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation; either version 2 of |
| 12 | * the License, or (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 22 | * MA 02111-1307 USA |
| 23 | */ |
| 24 | |
| 25 | #include <common.h> |
Stefan Roese | 1362888 | 2007-12-13 14:52:53 +0100 | [diff] [blame] | 26 | #include <libfdt.h> |
| 27 | #include <fdt_support.h> |
Stefan Roese | 4fb25a3 | 2008-06-25 10:59:22 +0200 | [diff] [blame^] | 28 | #include <ppc4xx.h> |
Lawrence R. Johnson | b05e8bf | 2008-01-04 02:11:56 -0500 | [diff] [blame] | 29 | #include <asm/gpio.h> |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 30 | #include <asm/processor.h> |
Stefan Roese | 5a5958b | 2007-10-15 11:29:33 +0200 | [diff] [blame] | 31 | #include <asm/io.h> |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 32 | #include <asm/bitops.h> |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 33 | |
| 34 | DECLARE_GLOBAL_DATA_PTR; |
| 35 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 36 | extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 37 | |
Stefan Roese | 1b3c360 | 2006-12-22 14:29:40 +0100 | [diff] [blame] | 38 | ulong flash_get_size (ulong base, int banknum); |
| 39 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 40 | int board_early_init_f(void) |
| 41 | { |
Stefan Roese | a78bc44 | 2007-01-05 10:40:36 +0100 | [diff] [blame] | 42 | u32 sdr0_cust0; |
| 43 | u32 sdr0_pfc1, sdr0_pfc2; |
| 44 | u32 reg; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 45 | |
| 46 | mtdcr(ebccfga, xbcfg); |
| 47 | mtdcr(ebccfgd, 0xb8400000); |
| 48 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 49 | /* |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 50 | * Setup the interrupt controller polarities, triggers, etc. |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 51 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 52 | mtdcr(uic0sr, 0xffffffff); /* clear all */ |
| 53 | mtdcr(uic0er, 0x00000000); /* disable all */ |
| 54 | mtdcr(uic0cr, 0x00000005); /* ATI & UIC1 crit are critical */ |
| 55 | mtdcr(uic0pr, 0xfffff7ff); /* per ref-board manual */ |
| 56 | mtdcr(uic0tr, 0x00000000); /* per ref-board manual */ |
| 57 | mtdcr(uic0vr, 0x00000000); /* int31 highest, base=0x000 */ |
| 58 | mtdcr(uic0sr, 0xffffffff); /* clear all */ |
| 59 | |
| 60 | mtdcr(uic1sr, 0xffffffff); /* clear all */ |
| 61 | mtdcr(uic1er, 0x00000000); /* disable all */ |
| 62 | mtdcr(uic1cr, 0x00000000); /* all non-critical */ |
| 63 | mtdcr(uic1pr, 0xffffffff); /* per ref-board manual */ |
| 64 | mtdcr(uic1tr, 0x00000000); /* per ref-board manual */ |
| 65 | mtdcr(uic1vr, 0x00000000); /* int31 highest, base=0x000 */ |
| 66 | mtdcr(uic1sr, 0xffffffff); /* clear all */ |
| 67 | |
| 68 | mtdcr(uic2sr, 0xffffffff); /* clear all */ |
| 69 | mtdcr(uic2er, 0x00000000); /* disable all */ |
| 70 | mtdcr(uic2cr, 0x00000000); /* all non-critical */ |
| 71 | mtdcr(uic2pr, 0xffffffff); /* per ref-board manual */ |
| 72 | mtdcr(uic2tr, 0x00000000); /* per ref-board manual */ |
| 73 | mtdcr(uic2vr, 0x00000000); /* int31 highest, base=0x000 */ |
| 74 | mtdcr(uic2sr, 0xffffffff); /* clear all */ |
| 75 | |
| 76 | /* 50MHz tmrclk */ |
Larry Johnson | d347117 | 2007-12-22 15:34:39 -0500 | [diff] [blame] | 77 | out_8((u8 *) CFG_BCSR_BASE + 0x04, 0x00); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 78 | |
| 79 | /* clear write protects */ |
Larry Johnson | d347117 | 2007-12-22 15:34:39 -0500 | [diff] [blame] | 80 | out_8((u8 *) CFG_BCSR_BASE + 0x07, 0x00); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 81 | |
| 82 | /* enable Ethernet */ |
Larry Johnson | d347117 | 2007-12-22 15:34:39 -0500 | [diff] [blame] | 83 | out_8((u8 *) CFG_BCSR_BASE + 0x08, 0x00); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 84 | |
| 85 | /* enable USB device */ |
Larry Johnson | d347117 | 2007-12-22 15:34:39 -0500 | [diff] [blame] | 86 | out_8((u8 *) CFG_BCSR_BASE + 0x09, 0x20); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 87 | |
Mike Nuss | b738654 | 2008-02-06 11:10:11 -0500 | [diff] [blame] | 88 | /* select Ethernet (and optionally IIC1) pins */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 89 | mfsdr(SDR0_PFC1, sdr0_pfc1); |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 90 | sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_SELECT_MASK) | |
| 91 | SDR0_PFC1_SELECT_CONFIG_4; |
Mike Nuss | b738654 | 2008-02-06 11:10:11 -0500 | [diff] [blame] | 92 | #ifdef CONFIG_I2C_MULTI_BUS |
| 93 | sdr0_pfc1 |= ((sdr0_pfc1 & ~SDR0_PFC1_SIS_MASK) | SDR0_PFC1_SIS_IIC1_SEL); |
| 94 | #endif |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 95 | mfsdr(SDR0_PFC2, sdr0_pfc2); |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 96 | sdr0_pfc2 = (sdr0_pfc2 & ~SDR0_PFC2_SELECT_MASK) | |
| 97 | SDR0_PFC2_SELECT_CONFIG_4; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 98 | mtsdr(SDR0_PFC2, sdr0_pfc2); |
| 99 | mtsdr(SDR0_PFC1, sdr0_pfc1); |
| 100 | |
| 101 | /* PCI arbiter enabled */ |
| 102 | mfsdr(sdr_pci0, reg); |
| 103 | mtsdr(sdr_pci0, 0x80000000 | reg); |
| 104 | |
| 105 | /* setup NAND FLASH */ |
| 106 | mfsdr(SDR0_CUST0, sdr0_cust0); |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 107 | sdr0_cust0 = SDR0_CUST0_MUX_NDFC_SEL | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 108 | SDR0_CUST0_NDFC_ENABLE | |
| 109 | SDR0_CUST0_NDFC_BW_8_BIT | |
| 110 | SDR0_CUST0_NDFC_ARE_MASK | |
| 111 | (0x80000000 >> (28 + CFG_NAND_CS)); |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 112 | mtsdr(SDR0_CUST0, sdr0_cust0); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 113 | |
| 114 | return 0; |
| 115 | } |
| 116 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 117 | int misc_init_r(void) |
| 118 | { |
| 119 | uint pbcr; |
| 120 | int size_val = 0; |
Stefan Roese | a78bc44 | 2007-01-05 10:40:36 +0100 | [diff] [blame] | 121 | u32 reg; |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 122 | #ifdef CONFIG_440EPX |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 123 | unsigned long usb2d0cr = 0; |
| 124 | unsigned long usb2phy0cr, usb2h0cr = 0; |
| 125 | unsigned long sdr0_pfc1; |
| 126 | char *act = getenv("usbact"); |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 127 | #endif |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 128 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 129 | /* Re-do flash sizing to get full correct info */ |
Stefan Roese | 1b3c360 | 2006-12-22 14:29:40 +0100 | [diff] [blame] | 130 | |
| 131 | /* adjust flash start and offset */ |
| 132 | gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize; |
| 133 | gd->bd->bi_flashoffset = 0; |
| 134 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 135 | #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) |
| 136 | mtdcr(ebccfga, pb3cr); |
| 137 | #else |
| 138 | mtdcr(ebccfga, pb0cr); |
| 139 | #endif |
| 140 | pbcr = mfdcr(ebccfgd); |
Wolfgang Denk | 865f0f9 | 2008-01-23 14:31:17 +0100 | [diff] [blame] | 141 | size_val = ffs(gd->bd->bi_flashsize) - 21; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 142 | pbcr = (pbcr & 0x0001ffff) | gd->bd->bi_flashstart | (size_val << 17); |
| 143 | #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL) |
| 144 | mtdcr(ebccfga, pb3cr); |
| 145 | #else |
| 146 | mtdcr(ebccfga, pb0cr); |
| 147 | #endif |
| 148 | mtdcr(ebccfgd, pbcr); |
| 149 | |
Stefan Roese | 1b3c360 | 2006-12-22 14:29:40 +0100 | [diff] [blame] | 150 | /* |
| 151 | * Re-check to get correct base address |
| 152 | */ |
| 153 | flash_get_size(gd->bd->bi_flashstart, 0); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 154 | |
| 155 | #ifdef CFG_ENV_IS_IN_FLASH |
| 156 | /* Monitor protection ON by default */ |
| 157 | (void)flash_protect(FLAG_PROTECT_SET, |
| 158 | -CFG_MONITOR_LEN, |
| 159 | 0xffffffff, |
| 160 | &flash_info[0]); |
| 161 | |
| 162 | /* Env protection ON by default */ |
| 163 | (void)flash_protect(FLAG_PROTECT_SET, |
| 164 | CFG_ENV_ADDR_REDUND, |
| 165 | CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, |
| 166 | &flash_info[0]); |
| 167 | #endif |
| 168 | |
| 169 | /* |
| 170 | * USB suff... |
| 171 | */ |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 172 | #ifdef CONFIG_440EPX |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 173 | if (act == NULL || strcmp(act, "hostdev") == 0) { |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 174 | /* SDR Setting */ |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 175 | mfsdr(SDR0_PFC1, sdr0_pfc1); |
Niklaus Giger | f780b83 | 2007-06-27 18:11:38 +0200 | [diff] [blame] | 176 | mfsdr(SDR0_USB2D0CR, usb2d0cr); |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 177 | mfsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
| 178 | mfsdr(SDR0_USB2H0CR, usb2h0cr); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 179 | |
| 180 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_XOCLK_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 181 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_XOCLK_EXTERNAL; |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 182 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_WDINT_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 183 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_WDINT_16BIT_30MHZ; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 184 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DVBUS_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 185 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DVBUS_PURDIS; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 186 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DWNSTR_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 187 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DWNSTR_HOST; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 188 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_UTMICN_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 189 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_UTMICN_HOST; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 190 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 191 | /* |
| 192 | * An 8-bit/60MHz interface is the only possible alternative |
| 193 | * when connecting the Device to the PHY |
| 194 | */ |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 195 | usb2h0cr = usb2h0cr &~SDR0_USB2H0CR_WDINT_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 196 | usb2h0cr = usb2h0cr | SDR0_USB2H0CR_WDINT_16BIT_30MHZ; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 197 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 198 | /* |
| 199 | * To enable the USB 2.0 Device function |
| 200 | * through the UTMI interface |
| 201 | */ |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 202 | usb2d0cr = usb2d0cr &~SDR0_USB2D0CR_USB2DEV_EBC_SEL_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 203 | usb2d0cr = usb2d0cr | SDR0_USB2D0CR_USB2DEV_SELECTION; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 204 | |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 205 | sdr0_pfc1 = sdr0_pfc1 &~SDR0_PFC1_UES_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 206 | sdr0_pfc1 = sdr0_pfc1 | SDR0_PFC1_UES_USB2D_SEL; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 207 | |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 208 | mtsdr(SDR0_PFC1, sdr0_pfc1); |
Niklaus Giger | f780b83 | 2007-06-27 18:11:38 +0200 | [diff] [blame] | 209 | mtsdr(SDR0_USB2D0CR, usb2d0cr); |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 210 | mtsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
| 211 | mtsdr(SDR0_USB2H0CR, usb2h0cr); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 212 | |
| 213 | /*clear resets*/ |
| 214 | udelay (1000); |
| 215 | mtsdr(SDR0_SRST1, 0x00000000); |
| 216 | udelay (1000); |
| 217 | mtsdr(SDR0_SRST0, 0x00000000); |
| 218 | |
| 219 | printf("USB: Host(int phy) Device(ext phy)\n"); |
| 220 | |
| 221 | } else if (strcmp(act, "dev") == 0) { |
| 222 | /*-------------------PATCH-------------------------------*/ |
| 223 | mfsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
| 224 | |
| 225 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_XOCLK_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 226 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_XOCLK_EXTERNAL; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 227 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DVBUS_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 228 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DVBUS_PURDIS; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 229 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DWNSTR_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 230 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DWNSTR_HOST; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 231 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_UTMICN_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 232 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_UTMICN_HOST; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 233 | mtsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
| 234 | |
| 235 | udelay (1000); |
| 236 | mtsdr(SDR0_SRST1, 0x672c6000); |
| 237 | |
| 238 | udelay (1000); |
| 239 | mtsdr(SDR0_SRST0, 0x00000080); |
| 240 | |
| 241 | udelay (1000); |
| 242 | mtsdr(SDR0_SRST1, 0x60206000); |
| 243 | |
| 244 | *(unsigned int *)(0xe0000350) = 0x00000001; |
| 245 | |
| 246 | udelay (1000); |
| 247 | mtsdr(SDR0_SRST1, 0x60306000); |
| 248 | /*-------------------PATCH-------------------------------*/ |
| 249 | |
| 250 | /* SDR Setting */ |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 251 | mfsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 252 | mfsdr(SDR0_USB2H0CR, usb2h0cr); |
Niklaus Giger | f780b83 | 2007-06-27 18:11:38 +0200 | [diff] [blame] | 253 | mfsdr(SDR0_USB2D0CR, usb2d0cr); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 254 | mfsdr(SDR0_PFC1, sdr0_pfc1); |
| 255 | |
| 256 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_XOCLK_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 257 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_XOCLK_EXTERNAL; |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 258 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_WDINT_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 259 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_WDINT_8BIT_60MHZ; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 260 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DVBUS_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 261 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DVBUS_PUREN; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 262 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_DWNSTR_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 263 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_DWNSTR_DEV; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 264 | usb2phy0cr = usb2phy0cr &~SDR0_USB2PHY0CR_UTMICN_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 265 | usb2phy0cr = usb2phy0cr | SDR0_USB2PHY0CR_UTMICN_DEV; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 266 | |
| 267 | usb2h0cr = usb2h0cr &~SDR0_USB2H0CR_WDINT_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 268 | usb2h0cr = usb2h0cr | SDR0_USB2H0CR_WDINT_8BIT_60MHZ; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 269 | |
| 270 | usb2d0cr = usb2d0cr &~SDR0_USB2D0CR_USB2DEV_EBC_SEL_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 271 | usb2d0cr = usb2d0cr | SDR0_USB2D0CR_EBC_SELECTION; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 272 | |
| 273 | sdr0_pfc1 = sdr0_pfc1 &~SDR0_PFC1_UES_MASK; |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 274 | sdr0_pfc1 = sdr0_pfc1 | SDR0_PFC1_UES_EBCHR_SEL; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 275 | |
Wolfgang Denk | 511d0c7 | 2006-10-09 00:42:01 +0200 | [diff] [blame] | 276 | mtsdr(SDR0_USB2H0CR, usb2h0cr); |
| 277 | mtsdr(SDR0_USB2PHY0CR, usb2phy0cr); |
Niklaus Giger | f780b83 | 2007-06-27 18:11:38 +0200 | [diff] [blame] | 278 | mtsdr(SDR0_USB2D0CR, usb2d0cr); |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 279 | mtsdr(SDR0_PFC1, sdr0_pfc1); |
| 280 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 281 | /* clear resets */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 282 | udelay (1000); |
| 283 | mtsdr(SDR0_SRST1, 0x00000000); |
| 284 | udelay (1000); |
| 285 | mtsdr(SDR0_SRST0, 0x00000000); |
| 286 | |
| 287 | printf("USB: Device(int phy)\n"); |
| 288 | } |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 289 | #endif /* CONFIG_440EPX */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 290 | |
John Otken john@softadvances.com | 8ce16f5 | 2007-03-08 09:39:48 -0600 | [diff] [blame] | 291 | mfsdr(SDR0_SRST1, reg); /* enable security/kasumi engines */ |
| 292 | reg &= ~(SDR0_SRST1_CRYP0 | SDR0_SRST1_KASU0); |
| 293 | mtsdr(SDR0_SRST1, reg); |
| 294 | |
Stefan Roese | a78bc44 | 2007-01-05 10:40:36 +0100 | [diff] [blame] | 295 | /* |
| 296 | * Clear PLB4A0_ACR[WRP] |
| 297 | * This fix will make the MAL burst disabling patch for the Linux |
| 298 | * EMAC driver obsolete. |
| 299 | */ |
| 300 | reg = mfdcr(plb4_acr) & ~PLB4_ACR_WRP; |
| 301 | mtdcr(plb4_acr, reg); |
| 302 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 303 | return 0; |
| 304 | } |
| 305 | |
| 306 | int checkboard(void) |
| 307 | { |
| 308 | char *s = getenv("serial#"); |
Stefan Roese | e0b9ea8 | 2007-01-13 07:57:51 +0100 | [diff] [blame] | 309 | u8 rev; |
| 310 | u8 val; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 311 | |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 312 | #ifdef CONFIG_440EPX |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 313 | printf("Board: Sequoia - AMCC PPC440EPx Evaluation Board"); |
Stefan Roese | 854bc8d | 2006-09-13 13:51:58 +0200 | [diff] [blame] | 314 | #else |
| 315 | printf("Board: Rainier - AMCC PPC440GRx Evaluation Board"); |
| 316 | #endif |
Stefan Roese | e0b9ea8 | 2007-01-13 07:57:51 +0100 | [diff] [blame] | 317 | |
Stefan Roese | 5a5958b | 2007-10-15 11:29:33 +0200 | [diff] [blame] | 318 | rev = in_8((void *)(CFG_BCSR_BASE + 0)); |
| 319 | val = in_8((void *)(CFG_BCSR_BASE + 5)) & CFG_BCSR5_PCI66EN; |
Stefan Roese | e0b9ea8 | 2007-01-13 07:57:51 +0100 | [diff] [blame] | 320 | printf(", Rev. %X, PCI=%d MHz", rev, val ? 66 : 33); |
| 321 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 322 | if (s != NULL) { |
| 323 | puts(", serial# "); |
| 324 | puts(s); |
| 325 | } |
| 326 | putc('\n'); |
| 327 | |
| 328 | return (0); |
| 329 | } |
| 330 | |
Matthias Fuchs | 1f84021 | 2008-01-08 15:40:09 +0100 | [diff] [blame] | 331 | #if defined(CONFIG_PCI) && defined(CONFIG_PCI_PNP) |
| 332 | /* |
| 333 | * Assign interrupts to PCI devices. |
| 334 | */ |
| 335 | void sequoia_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev) |
| 336 | { |
| 337 | pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIR2); |
| 338 | } |
| 339 | #endif |
| 340 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 341 | /* |
| 342 | * pci_pre_init |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 343 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 344 | * This routine is called just prior to registering the hose and gives |
| 345 | * the board the opportunity to check things. Returning a value of zero |
| 346 | * indicates that things are bad & PCI initialization should be aborted. |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 347 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 348 | * Different boards may wish to customize the pci controller structure |
| 349 | * (add regions, override default access routines, etc) or perform |
| 350 | * certain pre-initialization actions. |
| 351 | */ |
Stefan Roese | 466fff1 | 2007-06-25 15:57:39 +0200 | [diff] [blame] | 352 | #if defined(CONFIG_PCI) |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 353 | int pci_pre_init(struct pci_controller *hose) |
| 354 | { |
| 355 | unsigned long addr; |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 356 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 357 | /* |
| 358 | * Set priority for all PLB3 devices to 0. |
| 359 | * Set PLB3 arbiter to fair mode. |
| 360 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 361 | mfsdr(sdr_amp1, addr); |
| 362 | mtsdr(sdr_amp1, (addr & 0x000000FF) | 0x0000FF00); |
| 363 | addr = mfdcr(plb3_acr); |
| 364 | mtdcr(plb3_acr, addr | 0x80000000); |
| 365 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 366 | /* |
| 367 | * Set priority for all PLB4 devices to 0. |
| 368 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 369 | mfsdr(sdr_amp0, addr); |
| 370 | mtsdr(sdr_amp0, (addr & 0x000000FF) | 0x0000FF00); |
| 371 | addr = mfdcr(plb4_acr) | 0xa0000000; /* Was 0x8---- */ |
| 372 | mtdcr(plb4_acr, addr); |
| 373 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 374 | /* |
| 375 | * Set Nebula PLB4 arbiter to fair mode. |
| 376 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 377 | /* Segment0 */ |
| 378 | addr = (mfdcr(plb0_acr) & ~plb0_acr_ppm_mask) | plb0_acr_ppm_fair; |
| 379 | addr = (addr & ~plb0_acr_hbu_mask) | plb0_acr_hbu_enabled; |
| 380 | addr = (addr & ~plb0_acr_rdp_mask) | plb0_acr_rdp_4deep; |
| 381 | addr = (addr & ~plb0_acr_wrp_mask) | plb0_acr_wrp_2deep; |
| 382 | mtdcr(plb0_acr, addr); |
| 383 | |
| 384 | /* Segment1 */ |
| 385 | addr = (mfdcr(plb1_acr) & ~plb1_acr_ppm_mask) | plb1_acr_ppm_fair; |
| 386 | addr = (addr & ~plb1_acr_hbu_mask) | plb1_acr_hbu_enabled; |
| 387 | addr = (addr & ~plb1_acr_rdp_mask) | plb1_acr_rdp_4deep; |
| 388 | addr = (addr & ~plb1_acr_wrp_mask) | plb1_acr_wrp_2deep; |
| 389 | mtdcr(plb1_acr, addr); |
| 390 | |
Matthias Fuchs | 1f84021 | 2008-01-08 15:40:09 +0100 | [diff] [blame] | 391 | #ifdef CONFIG_PCI_PNP |
| 392 | hose->fixup_irq = sequoia_pci_fixup_irq; |
| 393 | #endif |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 394 | return 1; |
| 395 | } |
Stefan Roese | 466fff1 | 2007-06-25 15:57:39 +0200 | [diff] [blame] | 396 | #endif /* defined(CONFIG_PCI) */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 397 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 398 | /* |
| 399 | * pci_target_init |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 400 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 401 | * The bootstrap configuration provides default settings for the pci |
| 402 | * inbound map (PIM). But the bootstrap config choices are limited and |
| 403 | * may not be sufficient for a given board. |
| 404 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 405 | #if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) |
| 406 | void pci_target_init(struct pci_controller *hose) |
| 407 | { |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 408 | /* |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 409 | * Set up Direct MMIO registers |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 410 | */ |
| 411 | /* |
| 412 | * PowerPC440EPX PCI Master configuration. |
| 413 | * Map one 1Gig range of PLB/processor addresses to PCI memory space. |
| 414 | * PLB address 0xA0000000-0xDFFFFFFF |
| 415 | * ==> PCI address 0xA0000000-0xDFFFFFFF |
| 416 | * Use byte reversed out routines to handle endianess. |
| 417 | * Make this region non-prefetchable. |
| 418 | */ |
| 419 | out32r(PCIX0_PMM0MA, 0x00000000); /* PMM0 Mask/Attribute */ |
| 420 | /* - disabled b4 setting */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 421 | out32r(PCIX0_PMM0LA, CFG_PCI_MEMBASE); /* PMM0 Local Address */ |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 422 | out32r(PCIX0_PMM0PCILA, CFG_PCI_MEMBASE); /* PMM0 PCI Low Address */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 423 | out32r(PCIX0_PMM0PCIHA, 0x00000000); /* PMM0 PCI High Address */ |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 424 | out32r(PCIX0_PMM0MA, 0xE0000001); /* 512M + No prefetching, */ |
| 425 | /* and enable region */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 426 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 427 | out32r(PCIX0_PMM1MA, 0x00000000); /* PMM0 Mask/Attribute */ |
| 428 | /* - disabled b4 setting */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 429 | out32r(PCIX0_PMM1LA, CFG_PCI_MEMBASE2); /* PMM0 Local Address */ |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 430 | out32r(PCIX0_PMM1PCILA, CFG_PCI_MEMBASE2); /* PMM0 PCI Low Address */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 431 | out32r(PCIX0_PMM1PCIHA, 0x00000000); /* PMM0 PCI High Address */ |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 432 | out32r(PCIX0_PMM1MA, 0xE0000001); /* 512M + No prefetching, */ |
| 433 | /* and enable region */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 434 | |
| 435 | out32r(PCIX0_PTM1MS, 0x00000001); /* Memory Size/Attribute */ |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 436 | out32r(PCIX0_PTM1LA, 0); /* Local Addr. Reg */ |
| 437 | out32r(PCIX0_PTM2MS, 0); /* Memory Size/Attribute */ |
| 438 | out32r(PCIX0_PTM2LA, 0); /* Local Addr. Reg */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 439 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 440 | /* |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 441 | * Set up Configuration registers |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 442 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 443 | |
| 444 | /* Program the board's subsystem id/vendor id */ |
| 445 | pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID, |
| 446 | CFG_PCI_SUBSYS_VENDORID); |
| 447 | pci_write_config_word(0, PCI_SUBSYSTEM_ID, CFG_PCI_SUBSYS_ID); |
| 448 | |
| 449 | /* Configure command register as bus master */ |
| 450 | pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER); |
| 451 | |
| 452 | /* 240nS PCI clock */ |
| 453 | pci_write_config_word(0, PCI_LATENCY_TIMER, 1); |
| 454 | |
| 455 | /* No error reporting */ |
| 456 | pci_write_config_word(0, PCI_ERREN, 0); |
| 457 | |
| 458 | pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101); |
| 459 | |
| 460 | } |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 461 | #endif /* defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 462 | |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 463 | #if defined(CONFIG_PCI) && defined(CFG_PCI_MASTER_INIT) |
| 464 | void pci_master_init(struct pci_controller *hose) |
| 465 | { |
| 466 | unsigned short temp_short; |
| 467 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 468 | /* |
| 469 | * Write the PowerPC440 EP PCI Configuration regs. |
| 470 | * Enable PowerPC440 EP to be a master on the PCI bus (PMM). |
| 471 | * Enable PowerPC440 EP to act as a PCI memory target (PTM). |
| 472 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 473 | pci_read_config_word(0, PCI_COMMAND, &temp_short); |
| 474 | pci_write_config_word(0, PCI_COMMAND, |
| 475 | temp_short | PCI_COMMAND_MASTER | |
| 476 | PCI_COMMAND_MEMORY); |
| 477 | } |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 478 | #endif /* defined(CONFIG_PCI) && defined(CFG_PCI_MASTER_INIT) */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 479 | |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 480 | /* |
| 481 | * is_pci_host |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 482 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 483 | * This routine is called to determine if a pci scan should be |
| 484 | * performed. With various hardware environments (especially cPCI and |
| 485 | * PPMC) it's insufficient to depend on the state of the arbiter enable |
| 486 | * bit in the strap register, or generic host/adapter assumptions. |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 487 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 488 | * Rather than hard-code a bad assumption in the general 440 code, the |
| 489 | * 440 pci code requires the board to decide at runtime. |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 490 | * |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 491 | * Return 0 for adapter mode, non-zero for host (monarch) mode. |
| 492 | */ |
Stefan Roese | 887e2ec | 2006-09-07 11:51:23 +0200 | [diff] [blame] | 493 | #if defined(CONFIG_PCI) |
| 494 | int is_pci_host(struct pci_controller *hose) |
| 495 | { |
| 496 | /* Cactus is always configured as host. */ |
| 497 | return (1); |
| 498 | } |
Matthias Fuchs | 83a49c8 | 2008-01-16 10:33:46 +0100 | [diff] [blame] | 499 | #endif /* defined(CONFIG_PCI) */ |
| 500 | |
Igor Lisitsin | a11e069 | 2007-03-28 19:06:19 +0400 | [diff] [blame] | 501 | #if defined(CONFIG_POST) |
| 502 | /* |
| 503 | * Returns 1 if keys pressed to start the power-on long-running tests |
| 504 | * Called from board_init_f(). |
| 505 | */ |
| 506 | int post_hotkeys_pressed(void) |
| 507 | { |
| 508 | return 0; /* No hotkeys supported */ |
| 509 | } |
| 510 | #endif /* CONFIG_POST */ |