2 * Copyright (C) 2011-2012
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #include <asm/arch/cpu.h>
28 #include <asm/arch/kirkwood.h>
29 #include <asm/arch/mpp.h>
32 DECLARE_GLOBAL_DATA_PTR;
34 int board_early_init_f(void)
37 * default gpio configuration
38 * There are maximum 64 gpios controlled through 2 sets of registers
39 * the below configuration configures mainly initial LED status
41 kw_config_gpio(IB62x0_OE_VAL_LOW,
43 IB62x0_OE_LOW, IB62x0_OE_HIGH);
45 /* Set SATA activity LEDs to default off */
46 writel(MVSATAHC_LED_POLARITY_CTRL, MVSATAHC_LED_CONF_REG);
47 /* Multi-Purpose Pins Functionality configuration */
48 u32 kwmpp_config[] = {
64 MPP22_GPIO, /* Power LED red */
65 MPP24_GPIO, /* Power off device */
66 MPP25_GPIO, /* Power LED green */
67 MPP27_GPIO, /* USB transfer LED */
68 MPP28_GPIO, /* Reset button */
69 MPP29_GPIO, /* USB Copy button */
72 kirkwood_mpp_conf(kwmpp_config, NULL);
78 /* adress of boot parameters */
79 gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;