summaryrefslogtreecommitdiff
path: root/board/tqc
diff options
context:
space:
mode:
Diffstat (limited to 'board/tqc')
-rw-r--r--board/tqc/tqm5200/tqm5200.c4
-rw-r--r--board/tqc/tqm834x/tqm834x.c4
-rw-r--r--board/tqc/tqm8xx/Kconfig78
-rw-r--r--board/tqc/tqm8xx/MAINTAINERS16
-rw-r--r--board/tqc/tqm8xx/tqm8xx.c60
-rw-r--r--board/tqc/tqma6/tqma6.c27
-rw-r--r--board/tqc/tqma6/tqma6_bb.h2
-rw-r--r--board/tqc/tqma6/tqma6_mba6.c10
8 files changed, 40 insertions, 161 deletions
diff --git a/board/tqc/tqm5200/tqm5200.c b/board/tqc/tqm5200/tqm5200.c
index a1f56cde29..e9363ea394 100644
--- a/board/tqc/tqm5200/tqm5200.c
+++ b/board/tqc/tqm5200/tqm5200.c
@@ -863,12 +863,14 @@ int board_get_height (void)
#endif /* CONFIG_VIDEO_SM501 */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#if defined(CONFIG_VIDEO)
fdt_add_edid(blob, "smi,sm501", edid_buf);
#endif
+
+ return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 814fcb2657..d891a3844c 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -414,12 +414,14 @@ static void set_ddr_config(void) {
}
#ifdef CONFIG_OF_BOARD_SETUP
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif /* CONFIG_PCI */
+
+ return 0;
}
#endif /* CONFIG_OF_BOARD_SETUP */
diff --git a/board/tqc/tqm8xx/Kconfig b/board/tqc/tqm8xx/Kconfig
index 926a37afc5..857fedb8be 100644
--- a/board/tqc/tqm8xx/Kconfig
+++ b/board/tqc/tqm8xx/Kconfig
@@ -1,68 +1,3 @@
-if TARGET_FPS850L
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "FPS850L"
-
-endif
-
-if TARGET_FPS860L
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "FPS860L"
-
-endif
-
-if TARGET_NSCU
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "NSCU"
-
-endif
-
-if TARGET_SM850
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "SM850"
-
-endif
-
-if TARGET_TK885D
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "TK885D"
-
-endif
-
if TARGET_TQM823L
config SYS_BOARD
@@ -218,16 +153,3 @@ config SYS_CONFIG_NAME
default "TQM885D"
endif
-
-if TARGET_VIRTLAB2
-
-config SYS_BOARD
- default "tqm8xx"
-
-config SYS_VENDOR
- default "tqc"
-
-config SYS_CONFIG_NAME
- default "virtlab2"
-
-endif
diff --git a/board/tqc/tqm8xx/MAINTAINERS b/board/tqc/tqm8xx/MAINTAINERS
index fe4a212029..f3ddc6a530 100644
--- a/board/tqc/tqm8xx/MAINTAINERS
+++ b/board/tqc/tqm8xx/MAINTAINERS
@@ -2,12 +2,6 @@ TQM8XX BOARD
M: Wolfgang Denk <wd@denx.de>
S: Maintained
F: board/tqc/tqm8xx/
-F: include/configs/FPS850L.h
-F: configs/FPS850L_defconfig
-F: include/configs/FPS860L.h
-F: configs/FPS860L_defconfig
-F: include/configs/SM850.h
-F: configs/SM850_defconfig
F: include/configs/TQM823L.h
F: configs/TQM823L_defconfig
F: configs/TQM823L_LCD_defconfig
@@ -34,14 +28,4 @@ F: configs/TQM866M_defconfig
F: include/configs/TQM885D.h
F: configs/TQM885D_defconfig
F: configs/TTTech_defconfig
-F: include/configs/virtlab2.h
-F: configs/virtlab2_defconfig
F: configs/wtk_defconfig
-
-NSCU BOARD
-#M: -
-S: Maintained
-F: include/configs/NSCU.h
-F: configs/NSCU_defconfig
-F: include/configs/TK885D.h
-F: configs/TK885D_defconfig
diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c
index 9ce2a5739f..6d17830575 100644
--- a/board/tqc/tqm8xx/tqm8xx.c
+++ b/board/tqc/tqm8xx/tqm8xx.c
@@ -118,9 +118,7 @@ int checkboard (void)
break;
putc (buf[i]);
}
-#ifdef CONFIG_VIRTLAB2
- puts (" (Virtlab2)");
-#endif
+
putc ('\n');
return (0);
@@ -512,14 +510,6 @@ int misc_init_r (void)
immap->im_ioport.iop_padat &= ~0x0001; /* turn it off */
# endif
-#ifdef CONFIG_NSCU
- /* wake up ethernet module */
- immap->im_ioport.iop_pcpar &= ~0x0004; /* GPIO pin */
- immap->im_ioport.iop_pcdir |= 0x0004; /* output */
- immap->im_ioport.iop_pcso &= ~0x0004; /* for clarity */
- immap->im_ioport.iop_pcdat |= 0x0004; /* enable */
-#endif /* CONFIG_NSCU */
-
return (0);
}
#endif /* CONFIG_MISC_INIT_R */
@@ -674,55 +664,11 @@ void ft_blob_update (void *blob, bd_t *bd)
}
}
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
ft_blob_update(blob, bd);
-}
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
-
-/* ---------------------------------------------------------------------------- */
-/* TK885D specific initializaion */
-/* ---------------------------------------------------------------------------- */
-#ifdef CONFIG_TK885D
-#include <miiphy.h>
-int last_stage_init(void)
-{
- const unsigned char phy[] = {CONFIG_FEC1_PHY, CONFIG_FEC2_PHY};
- unsigned short reg;
- int ret, i = 100;
- char *s;
-
- mii_init();
- /* Without this delay 0xff is read from the UART buffer later in
- * abortboot() and autoboot is aborted */
- udelay(10000);
- while (tstc() && i--)
- (void)getc();
-
- /* Check if auto-negotiation is prohibited */
- s = getenv("phy_auto_nego");
-
- if (!s || !strcmp(s, "on"))
- /* Nothing to do - autonegotiation by default */
- return 0;
-
- for (i = 0; i < 2; i++) {
- ret = miiphy_read("FEC", phy[i], MII_BMCR, &reg);
- if (ret) {
- printf("Cannot read BMCR on PHY %d\n", phy[i]);
- return 0;
- }
- /* Auto-negotiation off, hard set full duplex, 100Mbps */
- ret = miiphy_write("FEC", phy[i],
- MII_BMCR, (reg | BMCR_SPEED100 |
- BMCR_FULLDPLX) & ~BMCR_ANENABLE);
- if (ret) {
- printf("Cannot write BMCR on PHY %d\n", phy[i]);
- return 0;
- }
- }
return 0;
}
-#endif
+#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index b552bb8d7e..c9e163e7d5 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -17,6 +17,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/imx-common/mxc_i2c.h>
+#include <asm/imx-common/spi.h>
#include <common.h>
#include <fsl_esdhc.h>
#include <libfdt.h>
@@ -50,7 +51,7 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+ gd->ram_size = imx_ddr_size();
return 0;
}
@@ -138,8 +139,10 @@ static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = {
NEW_PAD_CTRL(MX6_PAD_EIM_D18__ECSPI1_MOSI, SPI_PAD_CTRL),
};
+#define TQMA6_SF_CS_GPIO IMX_GPIO_NR(3, 19)
+
static unsigned const tqma6_ecspi1_cs[] = {
- IMX_GPIO_NR(3, 19),
+ TQMA6_SF_CS_GPIO,
};
static void tqma6_iomuxc_spi(void)
@@ -152,6 +155,12 @@ static void tqma6_iomuxc_spi(void)
ARRAY_SIZE(tqma6_ecspi1_pads));
}
+int board_spi_cs_gpio(unsigned bus, unsigned cs)
+{
+ return ((bus == CONFIG_SF_DEFAULT_BUS) &&
+ (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
+}
+
static struct i2c_pads_info tqma6_i2c3_pads = {
/* I2C3: on board LM75, M24C64, */
.scl = {
@@ -172,8 +181,14 @@ static struct i2c_pads_info tqma6_i2c3_pads = {
static void tqma6_setup_i2c(void)
{
- /* use logical index for bus, e.g. I2C1 -> 0 */
- setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &tqma6_i2c3_pads);
+ int ret;
+ /*
+ * use logical index for bus, e.g. I2C1 -> 0
+ * warn on error
+ */
+ ret = setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &tqma6_i2c3_pads);
+ if (ret)
+ printf("setup I2C3 failed: %d\n", ret);
}
int board_early_init_f(void)
@@ -251,12 +266,14 @@ int checkboard(void)
* Device Tree Support
*/
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
{
/* bring in eMMC dsr settings */
do_fixup_by_path_u32(blob,
"/soc/aips-bus@02100000/usdhc@02198000",
"dsr", tqma6_emmc_dsr, 2);
tqma6_bb_ft_board_setup(blob, bd);
+
+ return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
diff --git a/board/tqc/tqma6/tqma6_bb.h b/board/tqc/tqma6/tqma6_bb.h
index 9d072d28ad..fb7b4626a1 100644
--- a/board/tqc/tqma6/tqma6_bb.h
+++ b/board/tqc/tqma6/tqma6_bb.h
@@ -6,7 +6,7 @@
*/
#ifndef __TQMA6_BB__
-#define __TQMA6_BB
+#define __TQMA6_BB__
#include <common.h>
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index fd592875d8..6f4cffd95e 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -224,8 +224,14 @@ static struct i2c_pads_info mba6_i2c1_pads = {
static void mba6_setup_i2c(void)
{
- /* use logical index for bus, e.g. I2C1 -> 0 */
- setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads);
+ int ret;
+ /*
+ * use logical index for bus, e.g. I2C1 -> 0
+ * warn on error
+ */
+ ret = setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads);
+ if (ret)
+ printf("setup I2C1 failed: %d\n", ret);
}