From ab25e880ca9d508b7a807aa969105af32c3e6e51 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 14 Sep 2010 09:38:18 +0200 Subject: ppc4xx: POST UART: Use in/out_8() io-accessor functions This patch fixes a problem in the PPC4xx POST UART driver. This driver incorrectly used the in/out8() io-accessor functions. This could lead to problems since these functions don't guarantee execution ordering. This patch now replaces these functions with the correct ones. Additionally the driver is converted to using the NS16550 struct instead of macros for the register offsets. And some common code is factored out for better maintainability. Signed-off-by: Stefan Roese --- include/ppc4xx.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/ppc4xx.h') diff --git a/include/ppc4xx.h b/include/ppc4xx.h index ee30a4ca3d..5238d04aa7 100644 --- a/include/ppc4xx.h +++ b/include/ppc4xx.h @@ -99,6 +99,16 @@ #endif /* 440EP/EPX 440GR/GRX 440SP/SPE 460EX/GT/SX 405EX*/ +/* + * Define ns16550 register offset for all PPC4xx SoC's. Some + * mostly FPGA based PPC4xx implementations use a different + * offset. So let's give them a chance to define their offset + * in the board config header. + */ +#if !defined(CONFIG_SYS_NS16550_REG_SIZE) +#define CONFIG_SYS_NS16550_REG_SIZE 1 +#endif + #if defined(CONFIG_440) #include #else -- cgit v1.2.1