Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / Marvell / guruplug / guruplug.c
index 057c558682675fc09f33d4d4b2652cff73e54776..f3981c66d20bc4897ca08ff87aa615f2d00bb2e1 100644 (file)
@@ -1,31 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2009
  * Marvell Semiconductor <www.marvell.com>
  * Written-by: Siddarth Gore <gores@marvell.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
+#include <net.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
-#include <asm/arch/kirkwood.h>
+#include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include "guruplug.h"
 
@@ -38,12 +24,12 @@ int board_early_init_f(void)
         * There are maximum 64 gpios controlled through 2 sets of registers
         * the  below configuration configures mainly initial LED status
         */
-       kw_config_gpio(GURUPLUG_OE_VAL_LOW,
-                       GURUPLUG_OE_VAL_HIGH,
-                       GURUPLUG_OE_LOW, GURUPLUG_OE_HIGH);
+       mvebu_config_gpio(GURUPLUG_OE_VAL_LOW,
+                         GURUPLUG_OE_VAL_HIGH,
+                         GURUPLUG_OE_LOW, GURUPLUG_OE_HIGH);
 
        /* Multi-Purpose Pins Functionality configuration */
-       u32 kwmpp_config[] = {
+       static const u32 kwmpp_config[] = {
                MPP0_NF_IO2,
                MPP1_NF_IO3,
                MPP2_NF_IO4,
@@ -96,7 +82,7 @@ int board_early_init_f(void)
                MPP49_GPIO,     /* B_GLED */
                0
        };
-       kirkwood_mpp_conf(kwmpp_config);
+       kirkwood_mpp_conf(kwmpp_config, NULL);
        return 0;
 }
 
@@ -108,7 +94,7 @@ int board_init(void)
        gd->bd->bi_arch_number = MACH_TYPE_GURUPLUG;
 
        /* adress of boot parameters */
-       gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
+       gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
 
        return 0;
 }