microblaze: usable uart16550 for big endian systems
PATCH v2 1/1 microblaze: usable uart16550 for big endian systems
As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, not all U-Boot BSP will treat properly the 3 byte offset.
This why prefer to mask out the 3 byte offset in general and setup correct _REG_SIZE value depending on edianess.
---
v2: Mask out 3 byte offset
Set correct _REG_SIZE values for big/little endianess
--- include/configs/microblaze-generic.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
include/configs/microblaze-generic.h +6 -2
@@ -41,10 +41,14 @@#elif XILINX_UART16550_BASEADDR # define CONFIG_SYS_NS16550 1# define CONFIG_SYS_NS16550_SERIAL -# define CONFIG_SYS_NS16550_REG_SIZE -4 +# if defined(__MICROBLAZEEL__) +# define CONFIG_SYS_NS16550_REG_SIZE -4 +# else +# define CONFIG_SYS_NS16550_REG_SIZE 4 +# endif # define CONFIG_CONS_INDEX 1# define CONFIG_SYS_NS16550_COM1 \ - (XILINX_UART16550_BASEADDR + 0x1000) + ((XILINX_UART16550_BASEADDR & ~0xF) + 0x1000)# define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ# define CONFIG_BAUDRATE 115200
Signature · 1 line
1.7.0.4
PATCH v2 1/1 microblaze: usable uart16550 for big endian systems
Quoted 8 lines · Stephan Linz
As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, not all U-Boot BSP will treat properly the 3 byte offset.
This why prefer to mask out the 3 byte offset in general and setup correct
_REG_SIZEvalue depending on edianess.
Quoted 7 lines
Signed-off-by Stephan Linz <[email protected]>---
v2: Mask out 3 byte offset
Set correct_REG_SIZEvalues for big/little endianess--- include/configs/microblaze-generic.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Wolfgang: Can you please apply this patch directly to your repo.
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH v2 1/1 microblaze: usable uart16550 for big endian systems
Dear Michal Simek,
Quoted 17 lines · In message <[email protected]> you wrote:
Quoted 8 lines · Stephan Linz
As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, not all U-Boot BSP will treat properly the 3 byte offset.
This why prefer to mask out the 3 byte offset in general and setup correct
_REG_SIZEvalue depending on edianess.Quoted 7 lines
Signed-off-by Stephan Linz <[email protected]>---
v2: Mask out 3 byte offset
Set correct_REG_SIZEvalues for big/little endianess--- include/configs/microblaze-generic.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Quoted 3 lines
Tested-by Michal Simek <[email protected]>Wolfgang: Can you please apply this patch directly to your repo.
Yes, I can. Done.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de : I've tried (in vi) "g/[a-z]\n[a-z]/s//_/"...but that doesn't : cut it. Any ideas? (I take it that it may be a two-pass sort of solution). In the first pass, install perl. :-) Larry Wall <[email protected]>
Wolfgang Denk
AppliedPATCH v2 1/1 microblaze: usable uart16550 for big endian systems
In reply to Stephan LinzDear Stephan Linz,
Quoted 8 lines · In message <[email protected]> you wrote:
As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, not all U-Boot BSP will treat properly the 3 byte offset.
This why prefer to mask out the 3 byte offset in general and setup correct
_REG_SIZEvalue depending on edianess.
Quoted 7 lines
Signed-off-by Stephan Linz <[email protected]>---
v2: Mask out 3 byte offset
Set correct_REG_SIZEvalues for big/little endianess--- include/configs/microblaze-generic.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I find this a nice feature but it is not according to the documen-
tation. Or is it a BUG?" "Let's call it an accidental feature. :-)"
- Larry Wall in <[email protected]>