All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: socfpga: Convert to DM serial
Date: Sat, 12 May 2018 22:28:19 +0200	[thread overview]
Message-ID: <20180512202819.17320-1-marex@denx.de> (raw)

Pull the serial port configuration from DT and use DM serial instead
of having the serial configuration in two places, DT and board config.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
---
 arch/arm/Kconfig                             | 3 +++
 arch/arm/dts/socfpga.dtsi                    | 2 ++
 arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts | 1 +
 include/configs/socfpga_common.h             | 8 --------
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 532aa41a87..2012ac6410 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -737,6 +737,7 @@ config ARCH_SOCFPGA
 	select ARCH_MISC_INIT
 	select CPU_V7A
 	select DM
+	select DM_SERIAL
 	select ENABLE_ARM_SOC_BOOT0_HOOK
 	select OF_CONTROL
 	select SPL_LIBCOMMON_SUPPORT
@@ -746,11 +747,13 @@ config ARCH_SOCFPGA
 	select SPL_NAND_SUPPORT if SPL_NAND_DENALI
 	select SPL_OF_CONTROL
 	select SPL_SERIAL_SUPPORT
+	select SPL_DM_SERIAL
 	select SPL_SPI_FLASH_SUPPORT if SPL_SPI_SUPPORT
 	select SPL_SPI_SUPPORT if DM_SPI
 	select SPL_WATCHDOG_SUPPORT
 	select SUPPORT_SPL
 	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
+	select SYS_NS16550
 	select SYS_THUMB_BUILD
 	imply CMD_MTDPARTS
 	imply CRC32_VERIFY
diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi
index e64127fcb2..314449478d 100644
--- a/arch/arm/dts/socfpga.dtsi
+++ b/arch/arm/dts/socfpga.dtsi
@@ -737,6 +737,7 @@
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clocks = <&l4_sp_clk>;
+			clock-frequency = <100000000>;
 		};
 
 		uart1: serial1 at ffc03000 {
@@ -746,6 +747,7 @@
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clocks = <&l4_sp_clk>;
+			clock-frequency = <100000000>;
 		};
 
 		rst: rstmgr at ffd05000 {
diff --git a/arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts b/arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts
index b573d0e658..06b61cb0af 100644
--- a/arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts
+++ b/arch/arm/dts/socfpga_arria10_socdk_sdmmc.dts
@@ -24,6 +24,7 @@
 };
 
 &uart1 {
+	clock-frequency = <50000000>;
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 54b9edc97c..a60da85499 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -173,14 +173,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * Serial Driver
  */
 #define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE	-4
-#if defined(CONFIG_TARGET_SOCFPGA_GEN5)
-#define CONFIG_SYS_NS16550_COM1		SOCFPGA_UART0_ADDRESS
-#define CONFIG_SYS_NS16550_CLK		100000000
-#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
-#define CONFIG_SYS_NS16550_COM1        SOCFPGA_UART1_ADDRESS
-#define CONFIG_SYS_NS16550_CLK		50000000
-#endif
 
 /*
  * USB
-- 
2.16.2

             reply	other threads:[~2018-05-12 20:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12 20:28 Marek Vasut [this message]
2018-05-16 10:11 ` [U-Boot] [PATCH] ARM: socfpga: Convert to DM serial Ley Foon Tan
2018-07-30 14:03 ` Simon Goldschmidt
2018-07-30 14:04   ` Marek Vasut
2018-07-30 16:03     ` Goldschmidt Simon
2018-08-01  7:29     ` Goldschmidt Simon
2018-08-01  7:34       ` Marek Vasut
2018-08-01 15:42         ` Simon Goldschmidt
2018-08-01 16:34           ` Marek Vasut
2018-08-02  8:36             ` Simon Goldschmidt
2018-08-02 11:14               ` Marek Vasut
2018-08-03  8:40         ` Simon Goldschmidt
2018-08-03  8:59           ` Marek Vasut
2018-08-03  9:10             ` Simon Goldschmidt
2018-08-03  9:22               ` Marek Vasut
2018-08-03 11:01                 ` Simon Goldschmidt
2018-08-03 20:24                   ` Simon Goldschmidt
2018-08-03 23:14                     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180512202819.17320-1-marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.