* [PATCH 1/2] MIPS: make possible board-specific header files
@ 2012-06-01 9:23 Antony Pavlov
2012-06-01 9:23 ` [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll Antony Pavlov
2012-06-05 6:37 ` [PATCH 1/2] MIPS: make possible board-specific header files Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Antony Pavlov @ 2012-06-01 9:23 UTC (permalink / raw)
To: barebox
This patch makes possible to put a board-specific
header file (e. g. foobar.h) to arch/mips/boards/*/include/board/.
Header file usage:
#include <board/foobar.h>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index f28c21d..6b7dae9 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -96,6 +96,8 @@ else
MACH :=
endif
+CPPFLAGS += -I$(BOARD)/include
+
common-y += $(BOARD) $(MACH)
common-y += arch/mips/lib/
common-y += arch/mips/boot/
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll
2012-06-01 9:23 [PATCH 1/2] MIPS: make possible board-specific header files Antony Pavlov
@ 2012-06-01 9:23 ` Antony Pavlov
2012-06-02 2:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-05 6:37 ` [PATCH 1/2] MIPS: make possible board-specific header files Sascha Hauer
1 sibling, 1 reply; 5+ messages in thread
From: Antony Pavlov @ 2012-06-01 9:23 UTC (permalink / raw)
To: barebox
In the commit 40492a0c1305835c996e15eb1cce2406473ae76d
(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 commit 1cbe2b2c00de0efca503a983d0d008833f186f33
(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>
---
arch/mips/boards/rzx50/include/board/debug_ll.h | 29 ++++++++++++++++++++
arch/mips/mach-xburst/include/mach/debug_ll.h | 5 +---
.../mach-xburst/include/mach/debug_ll_jz4755.h | 29 --------------------
3 files changed, 30 insertions(+), 33 deletions(-)
create mode 100644 arch/mips/boards/rzx50/include/board/debug_ll.h
delete mode 100644 arch/mips/mach-xburst/include/mach/debug_ll_jz4755.h
diff --git a/arch/mips/boards/rzx50/include/board/debug_ll.h b/arch/mips/boards/rzx50/include/board/debug_ll.h
new file mode 100644
index 0000000..4164e47
--- /dev/null
+++ b/arch/mips/boards/rzx50/include/board/debug_ll.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
+#define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
+
+#include <mach/jz4750d_regs.h>
+
+#define DEBUG_LL_UART_ADDR UART1_BASE
+#define DEBUG_LL_UART_SHIFT 2
+
+#endif /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */
diff --git a/arch/mips/mach-xburst/include/mach/debug_ll.h b/arch/mips/mach-xburst/include/mach/debug_ll.h
index c3dbaa2..6e0cc93 100644
--- a/arch/mips/mach-xburst/include/mach/debug_ll.h
+++ b/arch/mips/mach-xburst/include/mach/debug_ll.h
@@ -24,10 +24,7 @@
/** @file
* This File contains declaration for early output support
*/
-#ifdef CONFIG_BOARD_RZX50
-#include <mach/debug_ll_jz4755.h>
-#endif
-
+#include <board/debug_ll.h>
#include <debug_ll_ns16550.h>
#endif /* __MACH_XBURST_DEBUG_LL__ */
diff --git a/arch/mips/mach-xburst/include/mach/debug_ll_jz4755.h b/arch/mips/mach-xburst/include/mach/debug_ll_jz4755.h
deleted file mode 100644
index babe296..0000000
--- a/arch/mips/mach-xburst/include/mach/debug_ll_jz4755.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __INCLUDE_DEBUG_LL_JZ4755_H__
-#define __INCLUDE_DEBUG_LL_JZ4755_H__
-
-#include <mach/jz4750d_regs.h>
-
-#define DEBUG_LL_UART_ADDR UART1_BASE
-#define DEBUG_LL_UART_SHIFT 2
-
-#endif /* __INCLUDE_DEBUG_LL_JZ4755_H__ */
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll
2012-06-01 9:23 ` [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll Antony Pavlov
@ 2012-06-02 2:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-02 3:51 ` Antony Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-06-02 2:52 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On 13:23 Fri 01 Jun , Antony Pavlov wrote:
> In the commit 40492a0c1305835c996e15eb1cce2406473ae76d
> (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 commit 1cbe2b2c00de0efca503a983d0d008833f186f33
> (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
>
I'll include it via config.h or at least have a common hearder name and just
have a single config to enable it and then enable it at board config level
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll
2012-06-02 2:52 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-06-02 3:51 ` Antony Pavlov
0 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2012-06-02 3:51 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On 2 June 2012 06:52, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 13:23 Fri 01 Jun , Antony Pavlov wrote:
>> In the commit 40492a0c1305835c996e15eb1cce2406473ae76d
>> (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 commit 1cbe2b2c00de0efca503a983d0d008833f186f33
>> (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
>>
> I'll include it via config.h or at least have a common hearder name and just
> have a single config to enable it and then enable it at board config level
This patch makes the chain:
include/debug_ll.h (controlled by CONFIG_DEBUG_LL)
\
`arch/mips/mach-xburst/include/mach/debug_ll.h (included if
CONFIG_DEBUG_LL=y)
\
`arch/mips/boards/rzx50/include/board/debug_ll.h (actual setup)
That is wrong?
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] MIPS: make possible board-specific header files
2012-06-01 9:23 [PATCH 1/2] MIPS: make possible board-specific header files Antony Pavlov
2012-06-01 9:23 ` [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll Antony Pavlov
@ 2012-06-05 6:37 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2012-06-05 6:37 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Fri, Jun 01, 2012 at 01:23:20PM +0400, Antony Pavlov wrote:
> This patch makes possible to put a board-specific
> header file (e. g. foobar.h) to arch/mips/boards/*/include/board/.
>
> Header file usage:
> #include <board/foobar.h>
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Applied, thanks
Sascha
> ---
> arch/mips/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index f28c21d..6b7dae9 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -96,6 +96,8 @@ else
> MACH :=
> endif
>
> +CPPFLAGS += -I$(BOARD)/include
> +
> common-y += $(BOARD) $(MACH)
> common-y += arch/mips/lib/
> common-y += arch/mips/boot/
> --
> 1.7.10
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-05 6:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01 9:23 [PATCH 1/2] MIPS: make possible board-specific header files Antony Pavlov
2012-06-01 9:23 ` [PATCH 2/2] MIPS: XBurst: suitable solution for per-board debug_ll Antony Pavlov
2012-06-02 2:52 ` Jean-Christophe PLAGNIOL-VILLARD
2012-06-02 3:51 ` Antony Pavlov
2012-06-05 6:37 ` [PATCH 1/2] MIPS: make possible board-specific header files Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox