]> Git Repo - J-u-boot.git/blobdiff - board/freescale/mx53ard/mx53ard.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / board / freescale / mx53ard / mx53ard.c
index e2dbf635234a447f53c6b52cb14d900c6636e2ff..f9ec5ca6ef35e9a7f13ef2e5be7ec11288473422 100644 (file)
@@ -1,36 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2011 Freescale Semiconductor, Inc.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
  */
 
 #include <common.h>
+#include <init.h>
+#include <net.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <netdev.h>
 #include <mmc.h>
-#include <fsl_esdhc.h>
+#include <fsl_esdhc_imx.h>
 #include <asm/gpio.h>
 
 #define ETHERNET_INT           IMX_GPIO_NR(2, 31)
@@ -48,13 +34,15 @@ int dram_init(void)
 
        return 0;
 }
-void dram_init_banksize(void)
+int dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 
        gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
        gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+
+       return 0;
 }
 
 #ifdef CONFIG_NAND_MXC
@@ -127,7 +115,7 @@ static void setup_iomux_uart(void)
        imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
 }
 
-#ifdef CONFIG_FSL_ESDHC
+#ifdef CONFIG_FSL_ESDHC_IMX
 struct fsl_esdhc_cfg esdhc_cfg[2] = {
        {MMC_SDHC1_BASE_ADDR},
        {MMC_SDHC2_BASE_ADDR},
@@ -157,7 +145,7 @@ int board_mmc_getcd(struct mmc *mmc)
 #define SD_PAD_CTRL            (PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | \
                                 PAD_CTL_DSE_HIGH)
 
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
 {
        static const iomux_v3_cfg_t sd1_pads[] = {
                NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
@@ -182,7 +170,7 @@ int board_mmc_init(bd_t *bis)
        };
 
        u32 index;
-       s32 status = 0;
+       int ret;
 
        esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
        esdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
@@ -201,12 +189,14 @@ int board_mmc_init(bd_t *bis)
                        printf("Warning: you configured more ESDHC controller"
                                "(%d) as supported by the board(2)\n",
                                CONFIG_SYS_FSL_ESDHC_NUM);
-                       return status;
+                       return -EINVAL;
                }
-               status |= fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
+               ret = fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
+               if (ret)
+                       return ret;
        }
 
-       return status;
+       return 0;
 }
 #endif
 
@@ -308,7 +298,7 @@ int board_init(void)
        return 0;
 }
 
-int board_eth_init(bd_t *bis)
+int board_eth_init(struct bd_info *bis)
 {
        int rc = -ENODEV;
 
This page took 0.029496 seconds and 4 git commands to generate.