* [RFC 0/3] MIPS: add the initial support for lowlevel init
@ 2012-05-13 17:24 Antony Pavlov
2012-05-13 17:24 ` [RFC 1/3] MIPS: move start.S code to .text_entry section Antony Pavlov
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Antony Pavlov @ 2012-05-13 17:24 UTC (permalink / raw)
To: barebox
This patch series introduce the initial support for lowlevel init
for the MIPS boards.
In the future low level initialization will be used
for cache initialization.
[RFC 1/3] MIPS: move start.S code to .text_entry section
[RFC 2/3] MIPS: add the initial support for lowlevel init
[RFC 3/3] MIPS: malta: add bogus lowlevel init
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC 1/3] MIPS: move start.S code to .text_entry section
2012-05-13 17:24 [RFC 0/3] MIPS: add the initial support for lowlevel init Antony Pavlov
@ 2012-05-13 17:24 ` Antony Pavlov
2012-05-13 17:24 ` [RFC 2/3] MIPS: add the initial support for lowlevel init Antony Pavlov
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2012-05-13 17:24 UTC (permalink / raw)
To: barebox
This commit make possible lowlevel initialisation code
in the text_bare_init section.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/boot/start.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index e8868e1..6bf5baa 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -50,7 +50,7 @@ _pc: addiu \rd, ra, \label - _pc # label is assumed to be
.set noreorder
.text
- .section ".text_bare_init"
+ .section ".text_entry"
.align 4
EXPORT(_start)
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC 2/3] MIPS: add the initial support for lowlevel init
2012-05-13 17:24 [RFC 0/3] MIPS: add the initial support for lowlevel init Antony Pavlov
2012-05-13 17:24 ` [RFC 1/3] MIPS: move start.S code to .text_entry section Antony Pavlov
@ 2012-05-13 17:24 ` Antony Pavlov
2012-05-14 8:55 ` Sascha Hauer
2012-05-13 17:24 ` [RFC 3/3] MIPS: malta: add bogus " Antony Pavlov
2012-05-14 8:18 ` [RFC 0/3] MIPS: add the initial support for " Sascha Hauer
3 siblings, 1 reply; 8+ messages in thread
From: Antony Pavlov @ 2012-05-13 17:24 UTC (permalink / raw)
To: barebox
This commit introduce the initial support for
machine specific lowlevel initialization
(e.g. RAM controller or cache memory).
To return from mach_init_lowlevel() it uses
explicit mach_init_lowlevel_return label.
This saves ra register for using inside mach_init_lowlevel()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/boot/start.S | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 6bf5baa..6db104b 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -74,6 +74,14 @@ __start:
and k0, k1
mtc0 k0, CP0_STATUS
+#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT
+ b mach_init_lowlevel
+ nop
+
+mach_init_lowlevel_return:
+EXPORT(mach_init_lowlevel_return)
+#endif
+
/* copy barebox to link location */
ADR a0, _start, t1 /* a0 <- pc-relative position of _start */
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC 3/3] MIPS: malta: add bogus lowlevel init
2012-05-13 17:24 [RFC 0/3] MIPS: add the initial support for lowlevel init Antony Pavlov
2012-05-13 17:24 ` [RFC 1/3] MIPS: move start.S code to .text_entry section Antony Pavlov
2012-05-13 17:24 ` [RFC 2/3] MIPS: add the initial support for lowlevel init Antony Pavlov
@ 2012-05-13 17:24 ` Antony Pavlov
2012-05-14 8:18 ` [RFC 0/3] MIPS: add the initial support for " Sascha Hauer
3 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2012-05-13 17:24 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/Kconfig | 1 +
arch/mips/mach-malta/Makefile | 1 +
arch/mips/mach-malta/lowlevel_init.S | 37 ++++++++++++++++++++++++++++++++++
3 files changed, 39 insertions(+)
create mode 100644 arch/mips/mach-malta/lowlevel_init.S
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 50d5c67..9e4bea1 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -36,6 +36,7 @@ config MACH_MIPS_MALTA
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
select HAS_DEBUG_LL
+ select MACH_HAS_LOWLEVEL_INIT
config MACH_MIPS_BCM47XX
bool "Broadcom BCM47xx-based boards"
diff --git a/arch/mips/mach-malta/Makefile b/arch/mips/mach-malta/Makefile
index f3cc668..f4cb8f2 100644
--- a/arch/mips/mach-malta/Makefile
+++ b/arch/mips/mach-malta/Makefile
@@ -1 +1,2 @@
obj-y += reset.o
+obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o
diff --git a/arch/mips/mach-malta/lowlevel_init.S b/arch/mips/mach-malta/lowlevel_init.S
new file mode 100644
index 0000000..a34de74
--- /dev/null
+++ b/arch/mips/mach-malta/lowlevel_init.S
@@ -0,0 +1,37 @@
+/*
+ * Lowlevel init code for MIPS malta
+ *
+ * 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
+ */
+
+#include <config.h>
+#include <asm/asm.h>
+#include <asm/regdef.h>
+#include <asm/mipsregs.h>
+
+ .section ".text_bare_init"
+
+LEAF(mach_init_lowlevel)
+
+ /* nothing special yet */
+
+ /* return */
+ b mach_init_lowlevel_return
+ nop
+END(mach_init_lowlevel)
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC 0/3] MIPS: add the initial support for lowlevel init
2012-05-13 17:24 [RFC 0/3] MIPS: add the initial support for lowlevel init Antony Pavlov
` (2 preceding siblings ...)
2012-05-13 17:24 ` [RFC 3/3] MIPS: malta: add bogus " Antony Pavlov
@ 2012-05-14 8:18 ` Sascha Hauer
2012-05-14 8:28 ` Antony Pavlov
3 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2012-05-14 8:18 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Sun, May 13, 2012 at 09:24:41PM +0400, Antony Pavlov wrote:
> This patch series introduce the initial support for lowlevel init
> for the MIPS boards.
>
> In the future low level initialization will be used
> for cache initialization.
>
> [RFC 1/3] MIPS: move start.S code to .text_entry section
> [RFC 2/3] MIPS: add the initial support for lowlevel init
> [RFC 3/3] MIPS: malta: add bogus lowlevel init
Looks mostly good except that you have some whitespace damage in your
patches. Can we drop 3/3 until we have something useful in the lowlevel
init?
Sascha
--
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] 8+ messages in thread
* Re: [RFC 0/3] MIPS: add the initial support for lowlevel init
2012-05-14 8:18 ` [RFC 0/3] MIPS: add the initial support for " Sascha Hauer
@ 2012-05-14 8:28 ` Antony Pavlov
0 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2012-05-14 8:28 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 14 May 2012 12:18, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Sun, May 13, 2012 at 09:24:41PM +0400, Antony Pavlov wrote:
>> This patch series introduce the initial support for lowlevel init
>> for the MIPS boards.
>>
>> In the future low level initialization will be used
>> for cache initialization.
>>
>> [RFC 1/3] MIPS: move start.S code to .text_entry section
>> [RFC 2/3] MIPS: add the initial support for lowlevel init
>> [RFC 3/3] MIPS: malta: add bogus lowlevel init
>
> Looks mostly good except that you have some whitespace damage in your
> patches.
Hmm. checkpatch.pl didn't find anything. Can you give any sample, please.
> Can we drop 3/3 until we have something useful in the lowlevel
> init?
Just now I'm working on cache support for MIPS. I think we can get
useful in the lowlevel init in a few days :))
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC 2/3] MIPS: add the initial support for lowlevel init
2012-05-13 17:24 ` [RFC 2/3] MIPS: add the initial support for lowlevel init Antony Pavlov
@ 2012-05-14 8:55 ` Sascha Hauer
2012-05-14 9:13 ` Antony Pavlov
0 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2012-05-14 8:55 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Sun, May 13, 2012 at 09:24:43PM +0400, Antony Pavlov wrote:
> This commit introduce the initial support for
> machine specific lowlevel initialization
> (e.g. RAM controller or cache memory).
>
> To return from mach_init_lowlevel() it uses
> explicit mach_init_lowlevel_return label.
> This saves ra register for using inside mach_init_lowlevel()
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> arch/mips/boot/start.S | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
> index 6bf5baa..6db104b 100644
> --- a/arch/mips/boot/start.S
> +++ b/arch/mips/boot/start.S
> @@ -74,6 +74,14 @@ __start:
> and k0, k1
> mtc0 k0, CP0_STATUS
>
> +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT
> + b mach_init_lowlevel
> + nop
^^^^
Space after tab.
Sascha
--
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] 8+ messages in thread
* Re: [RFC 2/3] MIPS: add the initial support for lowlevel init
2012-05-14 8:55 ` Sascha Hauer
@ 2012-05-14 9:13 ` Antony Pavlov
0 siblings, 0 replies; 8+ messages in thread
From: Antony Pavlov @ 2012-05-14 9:13 UTC (permalink / raw)
To: barebox
On 14 May 2012 12:55, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Sun, May 13, 2012 at 09:24:43PM +0400, Antony Pavlov wrote:
>> This commit introduce the initial support for
>> machine specific lowlevel initialization
>> (e.g. RAM controller or cache memory).
>>
>> To return from mach_init_lowlevel() it uses
>> explicit mach_init_lowlevel_return label.
>> This saves ra register for using inside mach_init_lowlevel()
>>
>> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
>> ---
>> arch/mips/boot/start.S | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
>> index 6bf5baa..6db104b 100644
>> --- a/arch/mips/boot/start.S
>> +++ b/arch/mips/boot/start.S
>> @@ -74,6 +74,14 @@ __start:
>> and k0, k1
>> mtc0 k0, CP0_STATUS
>>
>> +#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT
>> + b mach_init_lowlevel
>> + nop
> ^^^^
>
> Space after tab.
It not a bug, it is a feature! :))
The nop instruction is in a branch delay slot, so add a space before it.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-14 9:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 17:24 [RFC 0/3] MIPS: add the initial support for lowlevel init Antony Pavlov
2012-05-13 17:24 ` [RFC 1/3] MIPS: move start.S code to .text_entry section Antony Pavlov
2012-05-13 17:24 ` [RFC 2/3] MIPS: add the initial support for lowlevel init Antony Pavlov
2012-05-14 8:55 ` Sascha Hauer
2012-05-14 9:13 ` Antony Pavlov
2012-05-13 17:24 ` [RFC 3/3] MIPS: malta: add bogus " Antony Pavlov
2012-05-14 8:18 ` [RFC 0/3] MIPS: add the initial support for " Sascha Hauer
2012-05-14 8:28 ` Antony Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox