All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Enable vmlinuz for JZ4740
@ 2012-03-29 16:09 Maarten ter Huurne
  2012-03-29 22:28 ` Sergei Shtylyov
  0 siblings, 1 reply; 6+ messages in thread
From: Maarten ter Huurne @ 2012-03-29 16:09 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-mips, Lluís Batlle i Rossell, Lars-Peter Clausen,
	Maarten ter Huurne

From: Lluís Batlle i Rossell <viric@viric.name>

This patch adds support for building a compressed kernel for the JZ4740
architecture.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
 arch/mips/Kconfig                      |    1 +
 arch/mips/boot/compressed/Makefile     |    4 ++++
 arch/mips/boot/compressed/uart-16550.c |    5 +++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9f78fbe..03dd163 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -213,6 +213,7 @@ config MACH_JZ4740
 	select HAVE_CLK
 	select GENERIC_IRQ_CHIP
 	select CPU_SUPPORTS_CPUFREQ
+	select SYS_SUPPORTS_ZBOOT_UART16550
 
 config LANTIQ
 	bool "Lantiq based platforms"
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 5042d51..71d89cb 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -58,8 +58,12 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
 # Calculate the load address of the compressed kernel image
 hostprogs-y := calc_vmlinuz_load_addr
 
+ifeq ($(CONFIG_MACH_JZ4740),y)
+VMLINUZ_LOAD_ADDRESS:=0x80600000
+else
 VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
 		$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
+endif
 
 vmlinuzobjs-y += $(obj)/piggy.o
 
diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c
index c9caaf4..1c7b739 100644
--- a/arch/mips/boot/compressed/uart-16550.c
+++ b/arch/mips/boot/compressed/uart-16550.c
@@ -18,6 +18,11 @@
 #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
 #endif
 
+#ifdef CONFIG_MACH_JZ4740
+#define UART0_BASE  0xB0030000
+#define PORT(offset) (UART0_BASE + (4 * offset))
+#endif
+
 #ifndef PORT
 #error please define the serial port address for your own machine
 #endif
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Enable vmlinuz for JZ4740
  2012-03-29 16:09 [PATCH] MIPS: Enable vmlinuz for JZ4740 Maarten ter Huurne
@ 2012-03-29 22:28 ` Sergei Shtylyov
  2012-03-30  9:53   ` Maarten ter Huurne
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2012-03-29 22:28 UTC (permalink / raw)
  To: Maarten ter Huurne
  Cc: Ralf Baechle, linux-mips, Lluís Batlle i Rossell,
	Lars-Peter Clausen

Hello.

On 29-03-2012 20:09, Maarten ter Huurne wrote:

> From: Lluís Batlle i Rossell<viric@viric.name>

> This patch adds support for building a compressed kernel for the JZ4740
> architecture.
>
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
> Signed-off-by: Maarten ter Huurne<maarten@treewalker.org>
[...]

> diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> index 5042d51..71d89cb 100644
> --- a/arch/mips/boot/compressed/Makefile
> +++ b/arch/mips/boot/compressed/Makefile
> @@ -58,8 +58,12 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
>   # Calculate the load address of the compressed kernel image
>   hostprogs-y := calc_vmlinuz_load_addr
>
> +ifeq ($(CONFIG_MACH_JZ4740),y)
> +VMLINUZ_LOAD_ADDRESS:=0x80600000

    Spaces around :=, please. And why this should be out of order case?

> +else
>   VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
>   		$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
> +endif
>
>   vmlinuzobjs-y += $(obj)/piggy.o

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Enable vmlinuz for JZ4740
  2012-03-29 22:28 ` Sergei Shtylyov
@ 2012-03-30  9:53   ` Maarten ter Huurne
  2012-03-30 12:18     ` Sergei Shtylyov
  0 siblings, 1 reply; 6+ messages in thread
From: Maarten ter Huurne @ 2012-03-30  9:53 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Ralf Baechle, linux-mips, Lluís Batlle i Rossell,
	Lars-Peter Clausen

On Friday 30 March 2012 02:28:32 Sergei Shtylyov wrote:

[...]

> > +ifeq ($(CONFIG_MACH_JZ4740),y)
> > +VMLINUZ_LOAD_ADDRESS:=0x80600000
> 
>     Spaces around :=, please. And why this should be out of order case?

I can add spaces, no problem.

I don't understand your question though. Do you mean why there is a 
different address for the JZ4740 platform? Or why the variable name is in 
upper case? Or something else?

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Enable vmlinuz for JZ4740
  2012-03-30  9:53   ` Maarten ter Huurne
@ 2012-03-30 12:18     ` Sergei Shtylyov
  2012-03-30 14:47       ` Maarten ter Huurne
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2012-03-30 12:18 UTC (permalink / raw)
  To: Maarten ter Huurne
  Cc: Ralf Baechle, linux-mips, Lluís Batlle i Rossell,
	Lars-Peter Clausen

Hello.

On 30-03-2012 13:53, Maarten ter Huurne wrote:

> [...]

>>> +ifeq ($(CONFIG_MACH_JZ4740),y)
>>> +VMLINUZ_LOAD_ADDRESS:=0x80600000

>>      Spaces around :=, please. And why this should be out of order case?

> I can add spaces, no problem.

> I don't understand your question though. Do you mean why there is a
> different address for the JZ4740 platform? Or why the variable name is in
> upper case? Or something else?

    I should have said: why the variable is handled as a special case for JZ4740?

> Bye,
> 		Maarten

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MIPS: Enable vmlinuz for JZ4740
  2012-03-30 12:18     ` Sergei Shtylyov
@ 2012-03-30 14:47       ` Maarten ter Huurne
  2012-03-30 14:48         ` Maarten ter Huurne
  0 siblings, 1 reply; 6+ messages in thread
From: Maarten ter Huurne @ 2012-03-30 14:47 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Ralf Baechle, linux-mips, Lluís Batlle i Rossell,
	Lars-Peter Clausen

On Friday 30 March 2012 16:18:23 Sergei Shtylyov wrote:

>     I should have said: why the variable is handled as a special case for
> JZ4740?

All existing boot loaders for the JZ4740 systems that we support, being the 
Ben NanoNote (already in mainline) and the Dingoo A320 (not in mainline 
yet), seem to be using 0x80600000 as a hardcoded load address. I don't know 
the origin of this convention.

I'll prepare a new patch with the spaces around ":=" added.

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] MIPS: Enable vmlinuz for JZ4740
  2012-03-30 14:47       ` Maarten ter Huurne
@ 2012-03-30 14:48         ` Maarten ter Huurne
  0 siblings, 0 replies; 6+ messages in thread
From: Maarten ter Huurne @ 2012-03-30 14:48 UTC (permalink / raw)
  To: Sergei Shtylyov, Ralf Baechle
  Cc: Lars-Peter Clausen, linux-mips, Lluís Batlle i Rossell,
	Maarten ter Huurne

From: Lluís Batlle i Rossell <viric@viric.name>

This patch adds support for building a compressed kernel for the JZ4740
architecture.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
 arch/mips/Kconfig                      |    1 +
 arch/mips/boot/compressed/Makefile     |    4 ++++
 arch/mips/boot/compressed/uart-16550.c |    5 +++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9f78fbe..03dd163 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -213,6 +213,7 @@ config MACH_JZ4740
 	select HAVE_CLK
 	select GENERIC_IRQ_CHIP
 	select CPU_SUPPORTS_CPUFREQ
+	select SYS_SUPPORTS_ZBOOT_UART16550
 
 config LANTIQ
 	bool "Lantiq based platforms"
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 5042d51..c2a3fb0 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -58,8 +58,12 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
 # Calculate the load address of the compressed kernel image
 hostprogs-y := calc_vmlinuz_load_addr
 
+ifeq ($(CONFIG_MACH_JZ4740),y)
+VMLINUZ_LOAD_ADDRESS := 0x80600000
+else
 VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
 		$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
+endif
 
 vmlinuzobjs-y += $(obj)/piggy.o
 
diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c
index c9caaf4..1c7b739 100644
--- a/arch/mips/boot/compressed/uart-16550.c
+++ b/arch/mips/boot/compressed/uart-16550.c
@@ -18,6 +18,11 @@
 #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
 #endif
 
+#ifdef CONFIG_MACH_JZ4740
+#define UART0_BASE  0xB0030000
+#define PORT(offset) (UART0_BASE + (4 * offset))
+#endif
+
 #ifndef PORT
 #error please define the serial port address for your own machine
 #endif
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-30 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 16:09 [PATCH] MIPS: Enable vmlinuz for JZ4740 Maarten ter Huurne
2012-03-29 22:28 ` Sergei Shtylyov
2012-03-30  9:53   ` Maarten ter Huurne
2012-03-30 12:18     ` Sergei Shtylyov
2012-03-30 14:47       ` Maarten ter Huurne
2012-03-30 14:48         ` Maarten ter Huurne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.