]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/Marvell/rd6281a/rd6281a.c
gpio: remove gpiolib.c and define remaining functions as static inline in asm/gpio.h
[karo-tx-uboot.git] / board / Marvell / rd6281a / rd6281a.c
index e69e035308bdbcec164e788f14b58968764e6f51..b0020c95a5bb067ebe2291eb4714981751603edf 100644 (file)
@@ -3,29 +3,14 @@
  * Marvell Semiconductor <www.marvell.com>
  * Written-by: Prafulla Wadaskar <prafulla@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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <miiphy.h>
 #include <netdev.h>
-#include <asm/arch/kirkwood.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include "rd6281a.h"
 
@@ -38,12 +23,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(RD6281A_OE_VAL_LOW,
-                       RD6281A_OE_VAL_HIGH,
-                       RD6281A_OE_LOW, RD6281A_OE_HIGH);
+       mvebu_config_gpio(RD6281A_OE_VAL_LOW,
+                         RD6281A_OE_VAL_HIGH,
+                         RD6281A_OE_LOW, RD6281A_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 +81,7 @@ int board_early_init_f(void)
                MPP49_GPIO,
                0
        };
-       kirkwood_mpp_conf(kwmpp_config);
+       kirkwood_mpp_conf(kwmpp_config, NULL);
        return 0;
 }
 
@@ -108,7 +93,7 @@ int board_init(void)
        gd->bd->bi_arch_number = MACH_TYPE_RD88F6281;
 
        /* 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;
 }
@@ -139,11 +124,11 @@ void mv_phy_88e1116_init(char *name)
        miiphy_write(name, devadr, MV88E1116_PGADR_REG, 0);
 
        /* reset the phy */
-       if (miiphy_read (name, devadr, PHY_BMCR, &reg) != 0) {
+       if (miiphy_read (name, devadr, MII_BMCR, &reg) != 0) {
                printf("Err..(%s) PHY status read failed\n", __FUNCTION__);
                return;
        }
-       if (miiphy_write (name, devadr, PHY_BMCR, reg | 0x8000) != 0) {
+       if (miiphy_write (name, devadr, MII_BMCR, reg | 0x8000) != 0) {
                printf("Err..(%s) PHY reset failed\n", __FUNCTION__);
                return;
        }