U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3: pandora: Enable DM_SERIAL
Date: Sat, 25 Aug 2018 22:40:08 +0300	[thread overview]
Message-ID: <20180825194008.3625-1-notasas@gmail.com> (raw)

This patch enables DM_SERIAL for the pandora board. Verified that
the default kernel can still be booted with this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
 board/pandora/pandora.c         | 14 ++++++++++++++
 configs/omap3_pandora_defconfig |  4 +++-
 include/configs/omap3_pandora.h | 17 -----------------
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index 4f91dc3bee..a9aae7951d 100644
--- a/board/pandora/pandora.c
+++ b/board/pandora/pandora.c
@@ -13,6 +13,8 @@
  * Texas Instruments, <www.ti.com>
  */
 #include <common.h>
+#include <dm.h>
+#include <ns16550.h>
 #include <twl4030.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -33,6 +35,18 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GPIO_IO_PWRDNZ			(1 << 6)
 #define PBIASLITEVMODE1			(1 << 8)
 
+static const struct ns16550_platdata pandora_serial = {
+	.base = OMAP34XX_UART3,
+	.reg_shift = 2,
+	.clock = V_NS16550_CLK,
+	.fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(pandora_uart) = {
+	"ns16550_serial",
+	&pandora_serial
+};
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index 6dce53834d..c2b4a4f0d2 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_OMAP3_PANDORA=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=2
@@ -25,11 +26,12 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(xloader),1920k(uboot),128k(uboot-env),10m(boot),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_DM=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
-CONFIG_CONS_INDEX=3
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_OMAP3_SPI=y
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 5a82cbee71..82c66c4b8c 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -19,23 +19,6 @@
 
 #define CONFIG_SYS_DEVICE_NULLDEV	1
 
-/*
- * Hardware drivers
- */
-
-/* TWL4030 LED */
-
-/*
- * NS16550 Configuration
- */
-#undef CONFIG_SYS_NS16550_CLK
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
-#define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
-
-/* commands to include */
-
 /*
  * Board NAND Info.
  */
-- 
2.17.1

             reply	other threads:[~2018-08-25 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-25 19:40 Grazvydas Ignotas [this message]
2018-09-11 12:26 ` [U-Boot] omap3: pandora: Enable DM_SERIAL Tom Rini

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=20180825194008.3625-1-notasas@gmail.com \
    --to=notasas@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox