MIPS: XBurst: suitable solution for per-board debug_ll
In the commit40492a0c13
(MIPS: add common header file for DEBUG_LL via NS16550) introduced common DEBUG_LL via NS16550 for MIPS (see file arch/mips/include/debug_ll_ns16550.h). In the commit1cbe2b2c00
(MIPS: XBurst: add Ritmix RZX-50 board support) the file debug_ll_ns16550.h used in the file arch/mips/mach-xburst/include/mach/debug_ll.h. Usage looks like this: ------------------------------------------------ +#ifdef CONFIG_BOARD_RZX50 +#include <mach/debug_ll_jz4755.h> +#endif + +#include <debug_ll_ns16550.h> ------------------------------------------------ So after adding another board (e.g. A320) we will have something like this: ------------------------------------------------ #ifdef CONFIG_BOARD_RZX50 #include <mach/debug_ll_jz4755.h> #endif +#ifdef CONFIG_BOARD_A320 +#include <mach/debug_ll_jz4740.h> +#endif #include <debug_ll_ns16550.h> ------------------------------------------------ This approach has disadvantage: * the files mach/debug_ll_jz4740.h and mach/debug_ll_jz4755.h (they go to arch/mips/arch-xburst) are __BOARD-SPECIFIC__ (not SOC- or mach-specific!); The file mach-xburst/include/mach/debug_ll.h is outside board directory, but it contains some board related information. This commit introduce a more suitable solution. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
d25d94bea6
commit
902b498458
|
@ -18,12 +18,12 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __INCLUDE_DEBUG_LL_JZ4755_H__
|
#ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
|
||||||
#define __INCLUDE_DEBUG_LL_JZ4755_H__
|
#define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
|
||||||
|
|
||||||
#include <mach/jz4750d_regs.h>
|
#include <mach/jz4750d_regs.h>
|
||||||
|
|
||||||
#define DEBUG_LL_UART_ADDR UART1_BASE
|
#define DEBUG_LL_UART_ADDR UART1_BASE
|
||||||
#define DEBUG_LL_UART_SHIFT 2
|
#define DEBUG_LL_UART_SHIFT 2
|
||||||
|
|
||||||
#endif /* __INCLUDE_DEBUG_LL_JZ4755_H__ */
|
#endif /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */
|
|
@ -24,10 +24,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
* This File contains declaration for early output support
|
* This File contains declaration for early output support
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_BOARD_RZX50
|
#include <board/debug_ll.h>
|
||||||
#include <mach/debug_ll_jz4755.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <debug_ll_ns16550.h>
|
#include <debug_ll_ns16550.h>
|
||||||
|
|
||||||
#endif /* __MACH_XBURST_DEBUG_LL__ */
|
#endif /* __MACH_XBURST_DEBUG_LL__ */
|
||||||
|
|
Loading…
Reference in New Issue