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/kirkwood.h>
30 #include <asm/arch/mpp.h>
31 #include "mv88f6281gtw_ge.h"
33 DECLARE_GLOBAL_DATA_PTR;
35 int board_early_init_f(void)
38 * default gpio configuration
39 * There are maximum 64 gpios controlled through 2 sets of registers
40 * the below configuration configures mainly initial LED status
42 kw_config_gpio(MV88F6281GTW_GE_OE_VAL_LOW,
43 MV88F6281GTW_GE_OE_VAL_HIGH,
44 MV88F6281GTW_GE_OE_LOW, MV88F6281GTW_GE_OE_HIGH);
46 /* Multi-Purpose Pins Functionality configuration */
47 u32 kwmpp_config[] = {
100 kirkwood_mpp_conf(kwmpp_config);
107 * arch number of board
109 gd->bd->bi_arch_number = MACH_TYPE_MV88F6281GTW_GE;
111 /* adress of boot parameters */
112 gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
117 #ifdef CONFIG_MV88E61XX_SWITCH
120 /* configure and initialize switch */
121 struct mv88e61xx_config swcfg = {
123 .vlancfg = MV88E61XX_VLANCFG_ROUTER,
124 .rgmii_delay = MV88E61XX_RGMII_DELAY_EN,
125 .led_init = MV88E61XX_LED_INIT_EN,
126 .mdip = MV88E61XX_MDIP_REVERSE,
127 .portstate = MV88E61XX_PORTSTT_FORWARDING,
129 .ports_enabled = 0x3f
132 mv88e61xx_switch_initialize(&swcfg);
134 #endif /* CONFIG_MV88E61XX_SWITCH */