Mailing List Archive

[PATCH 00/06] serial8250: DLL/DLM rework, Emma Mobile UART driver
serial8250: DLL/DLM rework, Emma Mobile UART driver

[PATCH 01/06] serial8250: Add dl_read()/dl_write() callbacks
[PATCH 02/06] serial8250: Use dl_read()/dl_write() on Alchemy
[PATCH 03/06] serial8250: Use dl_read()/dl_write() on RM9K
[PATCH 04/06] serial8250: Clean up default map and dl code
[PATCH 05/06] serial8250: Introduce serial8250_register_8250_port()
[PATCH 06/06] serial8250-em: Add Emma Mobile UART driver

This series cleans up and adjusts the 8250 code base to allow
hooking in a driver for the UART in Emma Mobile SoCs.

In short:
- Patch 1-4 tie in 8250-specific dl_read()/dl_write() callbacks.
- Patch 5 adds a new register function to use new callbacks.
- Patch 6 adds a new driver that makes use of the above.

I'd be happy to rework the above patches if needed. The
main challenge for Emma Mobile UART support is the non-
standard offsets for DLL and DLM registers.

Note that there is no DT support included at this point,
but it boils down to a 10 line change. The boot loader on
my board does not do DT so I'd like to use kexec for DT
development (as usual), but to use kexec I first need to
get a non-DT kernel working. Which is basically this. =)

Signed-off-by: Magnus Damm <damm@opensource.se>
---

Builds on top of linux-next 20120501.

drivers/tty/serial/8250/8250.c | 373 ++++++++++++++++++-------------------
drivers/tty/serial/8250/8250.h | 14 +
drivers/tty/serial/8250/8250_em.c | 179 +++++++++++++++++
drivers/tty/serial/8250/Kconfig | 8
drivers/tty/serial/8250/Makefile | 1
include/linux/serial_8250.h | 1
6 files changed, 392 insertions(+), 184 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/06] serial8250: DLL/DLM rework, Emma Mobile UART driver [ In reply to ]
On Wed, 02 May 2012 21:46:42 +0900
Magnus Damm <magnus.damm@gmail.com> wrote:

> serial8250: DLL/DLM rework, Emma Mobile UART driver
>
> [PATCH 01/06] serial8250: Add dl_read()/dl_write() callbacks
> [PATCH 02/06] serial8250: Use dl_read()/dl_write() on Alchemy
> [PATCH 03/06] serial8250: Use dl_read()/dl_write() on RM9K
> [PATCH 04/06] serial8250: Clean up default map and dl code
> [PATCH 05/06] serial8250: Introduce serial8250_register_8250_port()
> [PATCH 06/06] serial8250-em: Add Emma Mobile UART driver
>
> This series cleans up and adjusts the 8250 code base to allow
> hooking in a driver for the UART in Emma Mobile SoCs.
>
> In short:
> - Patch 1-4 tie in 8250-specific dl_read()/dl_write() callbacks.
> - Patch 5 adds a new register function to use new callbacks.
> - Patch 6 adds a new driver that makes use of the above.
>
> I'd be happy to rework the above patches if needed. The
> main challenge for Emma Mobile UART support is the non-
> standard offsets for DLL and DLM registers.
>
> Note that there is no DT support included at this point,
> but it boils down to a 10 line change. The boot loader on
> my board does not do DT so I'd like to use kexec for DT
> development (as usual), but to use kexec I first need to
> get a non-DT kernel working. Which is basically this. =)
>
> Signed-off-by: Magnus Damm <damm@opensource.se>

Acked-by: Alan Cox <alan@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/06] serial8250: DLL/DLM rework, Emma Mobile UART driver [ In reply to ]
On Wednesday 02 May 2012, Magnus Damm wrote:
> serial8250: DLL/DLM rework, Emma Mobile UART driver
>
> [PATCH 01/06] serial8250: Add dl_read()/dl_write() callbacks
> [PATCH 02/06] serial8250: Use dl_read()/dl_write() on Alchemy
> [PATCH 03/06] serial8250: Use dl_read()/dl_write() on RM9K
> [PATCH 04/06] serial8250: Clean up default map and dl code
> [PATCH 05/06] serial8250: Introduce serial8250_register_8250_port()
> [PATCH 06/06] serial8250-em: Add Emma Mobile UART driver
>
> This series cleans up and adjusts the 8250 code base to allow
> hooking in a driver for the UART in Emma Mobile SoCs.
>
> In short:
> - Patch 1-4 tie in 8250-specific dl_read()/dl_write() callbacks.
> - Patch 5 adds a new register function to use new callbacks.
> - Patch 6 adds a new driver that makes use of the above.
>
> I'd be happy to rework the above patches if needed. The
> main challenge for Emma Mobile UART support is the non-
> standard offsets for DLL and DLM registers.
>
> Note that there is no DT support included at this point,
> but it boils down to a 10 line change. The boot loader on
> my board does not do DT so I'd like to use kexec for DT
> development (as usual), but to use kexec I first need to
> get a non-DT kernel working. Which is basically this. =)
>
> Signed-off-by: Magnus Damm <damm@opensource.se>

Looks good,

Acked-by: Arnd Bergmann <arnd@arndb.de>

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/06] serial8250: DLL/DLM rework, Emma Mobile UART driver [ In reply to ]
On Wednesday 02 May 2012, Magnus Damm wrote:
> Note that there is no DT support included at this point,
> but it boils down to a 10 line change. The boot loader on
> my board does not do DT so I'd like to use kexec for DT
> development (as usual), but to use kexec I first need to
> get a non-DT kernel working. Which is basically this. =)

As a follow-up on this, based on my comments to your emma platform
code, I think it would be easy enough to just use the appended
dtb support that we have, which allows you to boot a DT-enabled
kernel with a legacy boot loader.

Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 00/06] serial8250: DLL/DLM rework, Emma Mobile UART driver [ In reply to ]
On Sat, May 5, 2012 at 1:28 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 02 May 2012, Magnus Damm wrote:
>> Note that there is no DT support included at this point,
>> but it boils down to a 10 line change. The boot loader on
>> my board does not do DT so I'd like to use kexec for DT
>> development (as usual), but to use kexec I first need to
>> get a non-DT kernel working. Which is basically this. =)
>
> As a follow-up on this, based on my comments to your emma platform
> code, I think it would be easy enough to just use the appended
> dtb support that we have, which allows you to boot a DT-enabled
> kernel with a legacy boot loader.

Thanks for your comments! I have some code going with DT now. Will
post tomorrow.

As for the appended dtb support, do you know the recommended way to
include it in the uImage? It feels a bit odd to recommend customers to
patch their kernel source to build a bootable kernel. I ended up with
this local hackery, but there must be better ways:

--- 0001/arch/arm/boot/Makefile
+++ work/arch/arm/boot/Makefile 2012-05-09 00:40:17.000000000 +0900
@@ -53,6 +53,7 @@ $(obj)/compressed/vmlinux: $(obj)/Image

$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
+ cat $(obj)/emev2-kzm9d.dtb >> $@
@echo ' Kernel: $@ is ready'

endif

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/