Skip to contentSkip to conversation

xen/arm: add OMAP5432 UART support for early_printk

PATCH In review Chen Baozi 3 participants 6 messages Jun 27, 2013 – Jun 29, 2013

lore
Share & tools
lore

Chen Baozi

author
#0 lore raw

PATCH 1/1 xen/arm: add OMAP5432 UART support for early_printk

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

---
 docs/misc/arm/early-printk.txt    |  1 +
 xen/arch/arm/Rules.mk             |  6 ++++
 xen/arch/arm/arm32/debug-omap.inc | 74 +++++++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/omap-uart.h   | 62 ++++++++++++++++++++++++++++++++
 4 files changed, 143 insertions(+)
 create mode 100644 xen/arch/arm/arm32/debug-omap.inc
 create mode 100644 xen/include/asm-arm/omap-uart.h
docs/misc/arm/early-printk.txt +1 -0
index fbc3208..874488f 100644
@@ -13,6 +13,7 @@ where mach is the name of the machine:
   - exynos5250: printk with the second UART
   - midway: printk with the pl011 on Calxeda Midway processors
   - fastmodel: printk on ARM Fastmodel software emulators
+  - omap5432: printk with UART3 on TI OMAP5432 processors
 
 The base address and baud rate is hardcoded in xen/arch/arm/Rules.mk,
 see there when adding support for new machines.
xen/arch/arm/Rules.mk +6 -0
index 422ed04..6eac20a 100644
@@ -64,6 +64,12 @@ EARLY_PRINTK_INC := pl011
 EARLY_PRINTK_BAUD := 115200
 EARLY_UART_BASE_ADDRESS := 0xfff36000
 endif
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y
+EARLY_PRINTK_BAUD := 115200
+EARLY_UART_BASE_ADDRESS := 0x48020000
+endif
 
 ifneq ($(EARLY_PRINTK_INC),)
 EARLY_PRINTK := y
xen/arch/arm/arm32/debug-omap.inc new file +74 -0

74 lines not on this page · raw message

xen/include/asm-arm/omap-uart.h new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 3 lines · Chen Baozi

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

From the register offsets this looks like it might be a somewhat 8250

compatible UART logic block?

Bamvor also implemented a driver for an 8250 like device on the sun6i[0]. Rather than having multiple drivers for similar platforms I asked him to produce a single configurable 8250 driver. Perhaps you could work together to make sure this works for you both?

Thanks,
Ian.

[0] see "xen/arm: introduce Allwinner sun6i SOC basic support" <[email protected]>.

xen/arch/arm/Rules.mk EARLY_PRINTK_INC := pl011 · line 69

Quoted 3 lines
xen/arch/arm/Rules.mk +3 -0
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y

Does your bootloader not setup the UART? Preferably we would simply inherit that setup (avoids more code and mismatched baud rate etc).

Ian.

author
#2 lore raw
Quoted 8 lines · Ian Campbell
Quoted 1 line · Chen Baozi

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

From the register offsets this looks like it might be a somewhat 8250
compatible UART logic block?
From TI's data manual, it is said this is a 16C750 compatible UART. So could it be called an 9250 compatible UART?

Quoted 4 lines

Bamvor also implemented a driver for an 8250 like device on the sun6i[0]. Rather than having multiple drivers for similar platforms I asked him to produce a single configurable 8250 driver. Perhaps you could work together to make sure this works for you both?

Sure, it is OK for me.

Quoted 7 lines

Thanks,
Ian.

[0] see "xen/arm: introduce Allwinner sun6i SOC basic support" <[email protected]>.

Quoted 6 lines

xen/arch/arm/Rules.mk EARLY_PRINTK_INC := pl011 · line 69

Quoted 3 lines
xen/arch/arm/Rules.mk +3 -0
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y

Does your bootloader not setup the UART? Preferably we would simply inherit that setup (avoids more code and mismatched baud rate etc).

Yes, it does. I thought re-initilization is necessary and found that is also ok to inherit the u-boot setup just after finishing the patch. Well, in this case, things are much easier :-)

Thanks,

Baozi

Quoted 3 lines

Ian.

author
#3 lore raw
Quoted 9 lines · Chen Baozi
Quoted 5 lines · Ian Campbell
Quoted 1 line · Chen Baozi

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

From the register offsets this looks like it might be a somewhat 8250 compatible UART logic block?

From TI's data manual, it is said this is a 16C750 compatible UART. So could it be called an 9250 compatible UART?

Sorry, 8250.

Quoted 31 lines
Quoted 6 lines

Bamvor also implemented a driver for an 8250 like device on the sun6i[0]. Rather than having multiple drivers for similar platforms I asked him to produce a single configurable 8250 driver. Perhaps you could work together to make sure this works for you both?

Sure, it is OK for me.

Quoted 7 lines

Thanks,
Ian.

[0] see "xen/arm: introduce Allwinner sun6i SOC basic support" <[email protected]>.

Quoted 6 lines

xen/arch/arm/Rules.mk EARLY_PRINTK_INC := pl011 · line 69

Quoted 3 lines
xen/arch/arm/Rules.mk +3 -0
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y

Does your bootloader not setup the UART? Preferably we would simply inherit that setup (avoids more code and mismatched baud rate etc).

Yes, it does. I thought re-initilization is necessary and found that is also ok to inherit the u-boot setup just after finishing the patch. Well, in this case, things are much easier :-)

Thanks,

Baozi

Quoted 3 lines

Ian.

#4 lore raw
Quoted 5 lines · Chen Baozi
Quoted 3 lines · Chen Baozi

On Jun 27, 2013, at 4:22 PM, Ian Campbell <[email protected]> wrote:

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines · Chen Baozi
Quoted 1 line

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

From the register offsets this looks like it might be a somewhat 8250 compatible UART logic block?

From TI's data manual, it is said this is a 16C750 compatible UART. So could it be called an 9250 compatible UART?

Sorry, 8250.

Phew, I was wondering what a 9250 was ;-)

Quoted 33 lines
Quoted 32 lines
Quoted 7 lines

Bamvor also implemented a driver for an 8250 like device on the sun6i[0]. Rather than having multiple drivers for similar platforms I asked him to produce a single configurable 8250 driver. Perhaps you could work together to make sure this works for you both?

Sure, it is OK for me.

Quoted 7 lines

Thanks,
Ian.

[0] see "xen/arm: introduce Allwinner sun6i SOC basic support" <[email protected]>.

Quoted 6 lines

xen/arch/arm/Rules.mk EARLY_PRINTK_INC := pl011 · line 69

Quoted 3 lines
xen/arch/arm/Rules.mk +3 -0
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y

Does your bootloader not setup the UART? Preferably we would simply inherit that setup (avoids more code and mismatched baud rate etc).

Yes, it does. I thought re-initilization is necessary and found that is also ok to inherit the u-boot setup just after finishing the patch. Well, in this case, things are much easier :-)

Thanks,

Baozi

Quoted 3 lines

Ian.

#5 lore raw
In reply to Chen Baozi
Quoted 8 lines · Ian Campbell
Quoted 6 lines · Chen Baozi
Quoted 1 line

To enable it, add "CONFIG_EARLY_PRINTK := omap5432" to Config.mk

From the register offsets this looks like it might be a somewhat 8250 compatible UART logic block?

Quoted 8 lines

From TI's data manual, it is said this is a 16C750 compatible UART. So could it be called an 9250 compatible UART?

Quoted 5 lines

Bamvor also implemented a driver for an 8250 like device on the sun6i[0]. Rather than having multiple drivers for similar platforms I asked him to produce a single configurable 8250 driver. Perhaps you could work together to make sure this works for you both?

Sure, it is OK for me.

great. i could update my patch and support both sun6i and omap5432.

Quoted 23 lines
Quoted 8 lines

Thanks,
Ian.

[0] see "xen/arm: introduce Allwinner sun6i SOC basic support" <[email protected]>.

Quoted 6 lines

xen/arch/arm/Rules.mk EARLY_PRINTK_INC := pl011 · line 69

Quoted 3 lines
xen/arch/arm/Rules.mk +3 -0
+ifeq ($(CONFIG_EARLY_PRINTK), omap5432)
+EARLY_PRINTK_INC := omap
+EARLY_PRINTK_INIT_UART := y

Does your bootloader not setup the UART? Preferably we would simply inherit that setup (avoids more code and mismatched baud rate etc).

Yes, it does. I thought re-initilization is necessary and found that is also ok to inherit the u-boot setup just after finishing the patch. Well, in this case, things are much easier :-)

Thanks,

Baozi

Quoted 3 lines

Ian.