[Armadeus-commitlog] UNNAMED PROJECT branch, armadeus-2020.07, updated. e352969ad579546161e7665b1a
Brought to you by:
sszy
|
From: Sébastien S. <ss...@us...> - 2021-05-21 15:11:56
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, armadeus-2020.07 has been updated
via e352969ad579546161e7665b1a0fccf7e128e007 (commit)
via ae4ce07a55e219d1fe7eb85379af48a6447351ba (commit)
via f8001989f4c32538155b8627e2cd52afe9c0df40 (commit)
from 648e57ce6d2cae60f018a4fd83eceb4c3e0ad848 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e352969ad579546161e7665b1a0fccf7e128e007
Author: Sébastien Szymanski <seb...@ar...>
Date: Fri May 21 16:38:38 2021 +0200
Separate code for OPOS8MM SoM and OPOS8MMDev board
commit ae4ce07a55e219d1fe7eb85379af48a6447351ba
Author: Sébastien Szymanski <seb...@ar...>
Date: Fri May 21 15:49:58 2021 +0200
opos8mm: drop unused spl_board_init function
commit f8001989f4c32538155b8627e2cd52afe9c0df40
Author: Sébastien Szymanski <seb...@ar...>
Date: Fri May 21 15:38:00 2021 +0200
opos8mmdev: remove board_mmc_get_env_dev function
-----------------------------------------------------------------------
Summary of changes:
arch/arm/include/asm/arch-imx8m/opos8mm.h | 11 ++
arch/arm/mach-imx/imx8m/Kconfig | 10 +-
arch/arm/mach-imx/imx8m/Makefile | 1 +
.../spl.c => arch/arm/mach-imx/imx8m/opos8mm.c | 118 +++++++++++++++------
.../arm/mach-imx/imx8m/opos8mm_lpddr4_timing.c | 2 +
board/armadeus/opos8mmdev/Makefile | 7 +-
board/armadeus/opos8mmdev/opos8mmdev.c | 58 +---------
configs/opos8mmdev_defconfig | 1 -
8 files changed, 108 insertions(+), 100 deletions(-)
create mode 100644 arch/arm/include/asm/arch-imx8m/opos8mm.h
rename board/armadeus/opos8mmdev/spl.c => arch/arm/mach-imx/imx8m/opos8mm.c (79%)
rename board/armadeus/opos8mmdev/lpddr4_timing.c => arch/arm/mach-imx/imx8m/opos8mm_lpddr4_timing.c (99%)
diff --git a/arch/arm/include/asm/arch-imx8m/opos8mm.h b/arch/arm/include/asm/arch-imx8m/opos8mm.h
new file mode 100644
index 0000000000..46f874641a
--- /dev/null
+++ b/arch/arm/include/asm/arch-imx8m/opos8mm.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2021 Armadeus Systems
+ */
+
+#ifndef __ARCH_ARM_IMX8MM_OPOS8MM_H__
+#define __ARCH_ARM_IMX8MM_OPOS8MM_H__
+
+int opos8mm_board_early_init_f(void);
+
+#endif
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 3da54f7e25..96e4c553f0 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -12,6 +12,12 @@ config IMX8MM
bool
select IMX8M
+config IMX8MM_OPOS8MM
+ bool
+ select IMX8MM
+ select SUPPORT_SPL
+ select IMX8M_LPDDR4
+
config IMX8MN
bool
select IMX8M
@@ -57,9 +63,7 @@ config TARGET_IMX8MP_EVK
config TARGET_OPOS8MMDEV
bool "Armadeus Systems OPOS8MM Dev board"
- select IMX8MM
- select SUPPORT_SPL
- select IMX8M_LPDDR4
+ select IMX8MM_OPOS8MM
config TARGET_PICO_IMX8MQ
bool "Support Technexion Pico iMX8MQ"
diff --git a/arch/arm/mach-imx/imx8m/Makefile b/arch/arm/mach-imx/imx8m/Makefile
index d9dee894aa..ee4cec589e 100644
--- a/arch/arm/mach-imx/imx8m/Makefile
+++ b/arch/arm/mach-imx/imx8m/Makefile
@@ -6,3 +6,4 @@ obj-y += lowlevel_init.o
obj-y += clock_slice.o soc.o
obj-$(CONFIG_IMX8MQ) += clock_imx8mq.o
obj-$(CONFIG_IMX8MM)$(CONFIG_IMX8MN)$(CONFIG_IMX8MP) += clock_imx8mm.o
+obj-$(CONFIG_IMX8MM_OPOS8MM) += opos8mm_lpddr4_timing.o opos8mm.o
diff --git a/board/armadeus/opos8mmdev/spl.c b/arch/arm/mach-imx/imx8m/opos8mm.c
similarity index 79%
rename from board/armadeus/opos8mmdev/spl.c
rename to arch/arm/mach-imx/imx8m/opos8mm.c
index 51328e5c9a..9eb1c7b18e 100644
--- a/board/armadeus/opos8mmdev/spl.c
+++ b/arch/arm/mach-imx/imx8m/opos8mm.c
@@ -3,38 +3,107 @@
* Copyright 2020 Armadeus Systems
*/
-#include <asm/arch/clock.h>
-#include <asm/arch/ddr.h>
#include <asm/arch/imx8mm_pins.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
-#include <asm/io.h>
-#include <asm/mach-imx/boot_mode.h>
-#include <asm/mach-imx/gpio.h>
#include <asm/mach-imx/iomux-v3.h>
-#include <asm/mach-imx/mxc_i2c.h>
#include <common.h>
-#include <hang.h>
-#include <spl.h>
-#include <init.h>
-#include <linux/delay.h>
-#include <power/pmic.h>
-#include <power/pca9450.h>
DECLARE_GLOBAL_DATA_PTR;
+#if IS_ENABLED(CONFIG_FEC_MXC)
+#include <miiphy.h>
+#include <netdev.h>
+
+int board_phy_config(struct phy_device *phydev)
+{
+ unsigned short val;
+
+ /*
+ * Ar803x phy SmartEEE feature cause link status generates glitch,
+ * which cause ethernet link down/up issue, so disable SmartEEE
+ */
+ phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x3);
+ phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x805d);
+ phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4003);
+ val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
+ val &= 0xffef;
+ phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
+
+ if (phydev->drv->config)
+ phydev->drv->config(phydev);
+
+ return 0;
+}
+#endif
+
+int board_init(void)
+{
+ return 0;
+}
+
+int board_late_init(void)
+{
+ return 0;
+}
+
+int dram_init(void)
+{
+ gd->ram_size = PHYS_SDRAM_SIZE;
+
+ return 0;
+}
+
#define UART_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
-#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
static iomux_v3_cfg_t const uart_pads[] = {
IMX8MM_PAD_UART4_RXD_UART4_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
IMX8MM_PAD_UART4_TXD_UART4_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
};
+#ifdef CONFIG_SPL_BUILD
+#include <asm/arch/clock.h>
+#endif
+
+int __weak opos8mm_board_early_init_f(void)
+{
+ imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
+
+#ifdef CONFIG_SPL_BUILD
+ init_uart_clk(3);
+#endif
+
+ return 0;
+}
+
+#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
+
static iomux_v3_cfg_t const wdog_pads[] = {
IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL),
};
+int board_early_init_f(void)
+{
+ struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
+
+ imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
+ set_wdog_reset(wdog);
+
+ return opos8mm_board_early_init_f();
+}
+
+#ifdef CONFIG_SPL_BUILD
+#include <asm/arch/ddr.h>
+#include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/gpio.h>
+#include <asm/mach-imx/mxc_i2c.h>
+#include <hang.h>
+#include <init.h>
+#include <linux/delay.h>
+#include <power/pmic.h>
+#include <power/pca9450.h>
+#include <spl.h>
+
int spl_board_boot_device(enum boot_device boot_dev_spl)
{
if (boot_dev_spl == USB_BOOT)
@@ -55,19 +124,6 @@ int board_fit_config_name_match(const char *name)
}
#endif
-
-int board_early_init_f(void)
-{
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
- imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
- set_wdog_reset(wdog);
-
- imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
- return 0;
-}
-
#define I2C_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE6)
struct i2c_pads_info i2c_pad_info1 = {
.scl = {
@@ -142,25 +198,20 @@ int power_init_board(void)
return 0;
}
-void spl_board_init(void)
-{
-}
-
void board_init_f(ulong dummy)
{
int ret;
arch_cpu_init();
- board_early_init_f();
-
ret = spl_early_init();
if (ret) {
printf("spl_early_init() failed: %d\n", ret);
hang();
}
- init_uart_clk(3);
+ board_early_init_f();
+
preloader_console_init();
enable_tzc380();
@@ -169,3 +220,4 @@ void board_init_f(ulong dummy)
spl_dram_init();
}
+#endif /* CONFIG_SPL_BUILD */
diff --git a/board/armadeus/opos8mmdev/lpddr4_timing.c b/arch/arm/mach-imx/imx8m/opos8mm_lpddr4_timing.c
similarity index 99%
rename from board/armadeus/opos8mmdev/lpddr4_timing.c
rename to arch/arm/mach-imx/imx8m/opos8mm_lpddr4_timing.c
index f53ddc0bf3..ffe0e48a04 100644
--- a/board/armadeus/opos8mmdev/lpddr4_timing.c
+++ b/arch/arm/mach-imx/imx8m/opos8mm_lpddr4_timing.c
@@ -8,6 +8,7 @@
* imx_v2018.03_4.14.78_1.0.0_ga ~ imx_v2018.04_4.19.35_1.0.0_ga
*/
+#ifdef CONFIG_SPL_BUILD
#include <linux/kernel.h>
#include <asm/arch/ddr.h>
@@ -1843,3 +1844,4 @@ struct dram_timing_info dram_timing = {
.ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie),
.fsp_table = { 3000, 400, 100, },
};
+#endif /* CONFIG_SPL_BUILD */
diff --git a/board/armadeus/opos8mmdev/Makefile b/board/armadeus/opos8mmdev/Makefile
index b5517ec472..86d5eac6e9 100644
--- a/board/armadeus/opos8mmdev/Makefile
+++ b/board/armadeus/opos8mmdev/Makefile
@@ -1,12 +1,7 @@
#
-# Copyright 2018 NXP
+# Copyright 2021 Armadeus Systems
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y += opos8mmdev.o
-
-ifdef CONFIG_SPL_BUILD
-obj-y += spl.o
-obj-y += lpddr4_timing.o
-endif
diff --git a/board/armadeus/opos8mmdev/opos8mmdev.c b/board/armadeus/opos8mmdev/opos8mmdev.c
index 4203c1ef36..2ccd740525 100644
--- a/board/armadeus/opos8mmdev/opos8mmdev.c
+++ b/board/armadeus/opos8mmdev/opos8mmdev.c
@@ -1,60 +1,4 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright 2020 Armadeus Systems
+ * Copyright 2021 Armadeus Systems
*/
-
-#include <common.h>
-#include <miiphy.h>
-#include <netdev.h>
-
-#include <asm/mach-imx/iomux-v3.h>
-#include <asm/arch/imx8mm_pins.h>
-#include <asm/arch/clock.h>
-#include <asm/io.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int dram_init(void)
-{
- gd->ram_size = PHYS_SDRAM_SIZE;
-
- return 0;
-}
-
-#if IS_ENABLED(CONFIG_FEC_MXC)
-int board_phy_config(struct phy_device *phydev)
-{
- unsigned short val;
-
- /*
- * Ar803x phy SmartEEE feature cause link status generates glitch,
- * which cause ethernet link down/up issue, so disable SmartEEE
- */
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x3);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x805d);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4003);
- val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
- val &= 0xffef;
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
-
- if (phydev->drv->config)
- phydev->drv->config(phydev);
-
- return 0;
-}
-#endif
-
-int board_init(void)
-{
- return 0;
-}
-
-int board_mmc_get_env_dev(int devno)
-{
- return devno;
-}
-
-int board_late_init(void)
-{
- return 0;
-}
diff --git a/configs/opos8mmdev_defconfig b/configs/opos8mmdev_defconfig
index 59acaaa3a3..e750b0e27d 100644
--- a/configs/opos8mmdev_defconfig
+++ b/configs/opos8mmdev_defconfig
@@ -32,7 +32,6 @@ CONFIG_LOG_DEFAULT_LEVEL=7
CONFIG_BOARD_LATE_INIT=y
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
hooks/post-receive
--
UNNAMED PROJECT
|