2 * Maintainer : Prafulla Wadaskar <prafulla@marvell.com>
5 * Marvell Semiconductor <www.marvell.com>
6 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
8 * See file CREDITS for list of people who contributed to this
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
29 #include <asm/arch/cpu.h>
30 #include <asm/arch/kirkwood.h>
31 #include <asm/arch/mpp.h>
32 #include "mv88f6281gtw_ge.h"
34 DECLARE_GLOBAL_DATA_PTR;
36 int board_early_init_f(void)
39 * default gpio configuration
40 * There are maximum 64 gpios controlled through 2 sets of registers
41 * the below configuration configures mainly initial LED status
43 kw_config_gpio(MV88F6281GTW_GE_OE_VAL_LOW,
44 MV88F6281GTW_GE_OE_VAL_HIGH,
45 MV88F6281GTW_GE_OE_LOW, MV88F6281GTW_GE_OE_HIGH);
47 /* Multi-Purpose Pins Functionality configuration */
48 u32 kwmpp_config[] = {
101 kirkwood_mpp_conf(kwmpp_config);
108 * arch number of board
110 gd->bd->bi_arch_number = MACH_TYPE_MV88F6281GTW_GE;
112 /* adress of boot parameters */
113 gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
118 #ifdef CONFIG_MV88E61XX_SWITCH
121 /* configure and initialize switch */
122 struct mv88e61xx_config swcfg = {
124 .vlancfg = MV88E61XX_VLANCFG_ROUTER,
125 .rgmii_delay = MV88E61XX_RGMII_DELAY_EN,
126 .led_init = MV88E61XX_LED_INIT_EN,
127 .mdip = MV88E61XX_MDIP_REVERSE,
128 .portstate = MV88E61XX_PORTSTT_FORWARDING,
130 .ports_enabled = 0x3f
133 mv88e61xx_switch_initialize(&swcfg);
135 #endif /* CONFIG_MV88E61XX_SWITCH */