* [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL
@ 2022-04-13 19:34 Pali Rohár
2022-05-07 15:16 ` Merlijn Wajer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Pali Rohár @ 2022-04-13 19:34 UTC (permalink / raw)
To: Merlijn Wajer, Tom Rini; +Cc: maemo-leste, u-boot
For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as
default value is not enough for memory hungry CONFIG_DM_SERIAL code.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
Who has serial console on the real device, please test this patch if
serial console is still working. I do not have adapter for serial
console so I tested this patch only in qemu.
---
board/nokia/rx51/rx51.c | 12 ++++++++++++
configs/nokia_rx51_defconfig | 5 ++---
include/configs/nokia_rx51.h | 1 -
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 621cff095619..460d248eaaeb 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -32,6 +32,7 @@
#include <i2c.h>
#include <video.h>
#include <keyboard.h>
+#include <ns16550.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/setup.h>
@@ -788,3 +789,14 @@ U_BOOT_DRVINFOS(rx51_video) = {
U_BOOT_DRVINFOS(rx51_kp) = {
{ "rx51_kp" },
};
+
+static const struct ns16550_plat rx51_serial = {
+ .base = CONFIG_SYS_NS16550_COM3,
+ .reg_shift = 2,
+ .clock = CONFIG_SYS_NS16550_CLK,
+ .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DRVINFOS(rx51_uart) = {
+ { "omap_serial", &rx51_serial },
+};
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index d5688c7a212b..68acf01e9aeb 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -11,12 +11,12 @@ CONFIG_STATIC_MACH_TYPE=y
CONFIG_MACH_TYPE=1955
CONFIG_SYS_TEXT_BASE=0x80008000
CONFIG_SYS_MALLOC_LEN=0xc0000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
CONFIG_TARGET_NOKIA_RX51=y
CONFIG_SYS_LOAD_ADDR=0x80000000
CONFIG_OPTIMIZE_INLINING=y
CONFIG_LTO=y
-# CONFIG_SYS_MALLOC_F is not set
# CONFIG_FIT is not set
CONFIG_BOOTDELAY=30
CONFIG_AUTOBOOT_KEYED=y
@@ -70,8 +70,7 @@ CONFIG_DM_KEYBOARD=y
# CONFIG_MMC_VERBOSE is not set
CONFIG_MMC_OMAP_HS=y
CONFIG_MTD=y
-CONFIG_CONS_INDEX=3
-CONFIG_SYS_NS16550=y
+CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_UDC=y
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index e837b12b568f..f273e243e55d 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -43,7 +43,6 @@
#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE (-4)
#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
/*
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL
2022-04-13 19:34 [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL Pali Rohár
@ 2022-05-07 15:16 ` Merlijn Wajer
2022-05-07 17:12 ` Tom Rini
2022-05-07 17:17 ` Merlijn Wajer
2022-05-09 20:18 ` Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Merlijn Wajer @ 2022-05-07 15:16 UTC (permalink / raw)
To: Pali Rohár, Tom Rini; +Cc: maemo-leste, u-boot
Hi Pali, Tom,
On 13/04/2022 21:34, Pali Rohár wrote:
> For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as
> default value is not enough for memory hungry CONFIG_DM_SERIAL code.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> Who has serial console on the real device, please test this patch if
> serial console is still working. I do not have adapter for serial
> console so I tested this patch only in qemu.
I can confirm this works on my serial adapter. The patch didn't apply on
latest master (2ad8d0cb950da2233a2ec030533f4e54c6d04126), but I just
updated it to apply without problems locally.
Regards,
Merlijn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL
2022-05-07 15:16 ` Merlijn Wajer
@ 2022-05-07 17:12 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-05-07 17:12 UTC (permalink / raw)
To: Merlijn Wajer; +Cc: Pali Rohár, maemo-leste, u-boot
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
On Sat, May 07, 2022 at 05:16:57PM +0200, Merlijn Wajer wrote:
> Hi Pali, Tom,
>
> On 13/04/2022 21:34, Pali Rohár wrote:
> > For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as
> > default value is not enough for memory hungry CONFIG_DM_SERIAL code.
> >
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > ---
> > Who has serial console on the real device, please test this patch if
> > serial console is still working. I do not have adapter for serial
> > console so I tested this patch only in qemu.
>
> I can confirm this works on my serial adapter. The patch didn't apply on
> latest master (2ad8d0cb950da2233a2ec030533f4e54c6d04126), but I just updated
> it to apply without problems locally.
Thanks, can you please reply with a Tested-by?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL
2022-04-13 19:34 [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL Pali Rohár
2022-05-07 15:16 ` Merlijn Wajer
@ 2022-05-07 17:17 ` Merlijn Wajer
2022-05-09 20:18 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Merlijn Wajer @ 2022-05-07 17:17 UTC (permalink / raw)
To: Pali Rohár, Tom Rini; +Cc: maemo-leste, u-boot
Hi Pali, Tom,
On 13/04/2022 21:34, Pali Rohár wrote:
> For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as
> default value is not enough for memory hungry CONFIG_DM_SERIAL code.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Regards,
Merlijn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL
2022-04-13 19:34 [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL Pali Rohár
2022-05-07 15:16 ` Merlijn Wajer
2022-05-07 17:17 ` Merlijn Wajer
@ 2022-05-09 20:18 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-05-09 20:18 UTC (permalink / raw)
To: Pali Rohár; +Cc: Merlijn Wajer, maemo-leste, u-boot
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
On Wed, Apr 13, 2022 at 09:34:14PM +0200, Pali Rohár wrote:
> For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as
> default value is not enough for memory hungry CONFIG_DM_SERIAL code.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-09 20:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-13 19:34 [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL Pali Rohár
2022-05-07 15:16 ` Merlijn Wajer
2022-05-07 17:12 ` Tom Rini
2022-05-07 17:17 ` Merlijn Wajer
2022-05-09 20:18 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox