]> Git Repo - J-u-boot.git/blobdiff - board/tqc/tqma6/tqma6.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / board / tqc / tqma6 / tqma6.c
index 372a17cd51607e7e3a327c3ee1c3e96f614b1eea..26d557cece942e376f209bab3380f6228457cf6f 100644 (file)
@@ -7,18 +7,22 @@
  * Author: Markus Niebel <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
+#include <env.h>
+#include <fdt_support.h>
+#include <asm/global_data.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/spi.h>
 #include <common.h>
-#include <fsl_esdhc.h>
+#include <fsl_esdhc_imx.h>
 #include <linux/libfdt.h>
 #include <i2c.h>
 #include <mmc.h>
@@ -58,6 +62,7 @@ int dram_init(void)
 
 static const uint16_t tqma6_emmc_dsr = 0x0100;
 
+#ifndef CONFIG_DM_MMC
 /* eMMC on USDHCI3 always present */
 static iomux_v3_cfg_t const tqma6_usdhc3_pads[] = {
        NEW_PAD_CTRL(MX6_PAD_SD3_CLK__SD3_CLK,          USDHC_PAD_CTRL),
@@ -113,7 +118,7 @@ int board_mmc_getwp(struct mmc *mmc)
        return ret;
 }
 
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
 {
        imx_iomux_v3_setup_multiple_pads(tqma6_usdhc3_pads,
                                         ARRAY_SIZE(tqma6_usdhc3_pads));
@@ -130,7 +135,9 @@ int board_mmc_init(bd_t *bis)
 
        return 0;
 }
+#endif
 
+#ifndef CONFIG_DM_SPI
 static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = {
        /* SS1 */
        NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL),
@@ -162,7 +169,9 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
                (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
 }
 #endif
+#endif
 
+#ifdef CONFIG_SYS_I2C
 static struct i2c_pads_info tqma6_i2c3_pads = {
        /* I2C3: on board LM75, M24C64,  */
        .scl = {
@@ -192,6 +201,7 @@ static void tqma6_setup_i2c(void)
        if (ret)
                printf("setup I2C3 failed: %d\n", ret);
 }
+#endif
 
 int board_early_init_f(void)
 {
@@ -203,8 +213,12 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+#ifndef CONFIG_DM_SPI
        tqma6_iomuxc_spi();
+#endif
+#ifdef CONFIG_SYS_I2C
        tqma6_setup_i2c();
+#endif
 
        tqma6_bb_board_init();
 
@@ -233,6 +247,7 @@ static const char *tqma6_get_boardname(void)
        };
 }
 
+#ifdef CONFIG_POWER
 /* setup board specific PMIC */
 int power_init_board(void)
 {
@@ -249,6 +264,7 @@ int power_init_board(void)
 
        return 0;
 }
+#endif
 
 int board_late_init(void)
 {
@@ -271,7 +287,7 @@ int checkboard(void)
  */
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
 #define MODELSTRLEN 32u
-int ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, struct bd_info *bd)
 {
        char modelstr[MODELSTRLEN];
 
This page took 0.029809 seconds and 4 git commands to generate.