public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Pull request - ColdFire
@ 2010-02-10 18:23 TC Liew
  2010-02-11 22:55 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: TC Liew @ 2010-02-10 18:23 UTC (permalink / raw)
  To: u-boot

Wolfgang,

The following changes since commit 0b692dcb190655c7eb96b6b8003bee163e3b58dd:
  Wolfgang Denk (1):
        Merge branch 'master' of git://git.denx.de/u-boot-net

are available in the git repository at:

  git://www.denx.de/git/u-boot-coldfire.git master

TsiChung Liew (1):
      MCF5271-only: Added a weak board_reset function to allow custom reset

Wolfgang Wegner (3):
      add include/asm-m68k/unaligned.h
      allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
      MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE

 cpu/mcf52x2/cpu.c            |    6 ++++++
 cpu/mcf52x2/cpu.h            |   33 +++++++++++++++++++++++++++++++++
 cpu/mcf532x/speed.c          |    3 +++
 cpu/mcf532x/start.S          |    6 +++++-
 drivers/mtd/cfi_flash.c      |    2 +-
 include/asm-m68k/unaligned.h |   15 +++++++++++++++
 6 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 cpu/mcf52x2/cpu.h
 create mode 100644 include/asm-m68k/unaligned.h

Thanks!

Regards,
TsiChung

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

* [U-Boot] Pull request - ColdFire
  2010-02-10 18:23 [U-Boot] Pull request - ColdFire TC Liew
@ 2010-02-11 22:55 ` Wolfgang Denk
  2010-02-11 23:10   ` Wolfgang Wegner
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wolfgang Denk @ 2010-02-11 22:55 UTC (permalink / raw)
  To: u-boot

Dear TC Liew,

In message <a90206391002101023k7f32c804k62e675e8a29dce29@mail.gmail.com> you wrote:
> Wolfgang,
> 
> The following changes since commit 0b692dcb190655c7eb96b6b8003bee163e3b58dd:
>   Wolfgang Denk (1):
>         Merge branch 'master' of git://git.denx.de/u-boot-net
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-coldfire.git master
> 
> TsiChung Liew (1):
>       MCF5271-only: Added a weak board_reset function to allow custom reset

Hm... strange... The patch as posted (see for example here:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/70457
was submitted by Richard Retanubun; it carries an explicit 

	From: Richard Retanubun <RichardRetanubun@RuggedCom.com>

and has a different commit message, and a different date.


Please make sure to use git-am to apply patches from the mailing
list, so dates and attribution is correct.


It seems you many


> Wolfgang Wegner (3):
>       add include/asm-m68k/unaligned.h
>       allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM

This patch adds a too long line. Sorry for not noticing this before.

>       MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE
> 
>  cpu/mcf52x2/cpu.c            |    6 ++++++
>  cpu/mcf52x2/cpu.h            |   33 +++++++++++++++++++++++++++++++++
>  cpu/mcf532x/speed.c          |    3 +++
>  cpu/mcf532x/start.S          |    6 +++++-
>  drivers/mtd/cfi_flash.c      |    2 +-
>  include/asm-m68k/unaligned.h |   15 +++++++++++++++
>  6 files changed, 63 insertions(+), 2 deletions(-)
>  create mode 100644 cpu/mcf52x2/cpu.h
>  create mode 100644 include/asm-m68k/unaligned.h

Sorry, not pulled.

The long line is a nuisance only, but the wrong attribution should
really be fixed.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An age is called Dark not because  the  light  fails  to  shine,  but
because people refuse to see it.           -- James Michener, "Space"

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

* [U-Boot] Pull request - ColdFire
  2010-02-11 22:55 ` Wolfgang Denk
@ 2010-02-11 23:10   ` Wolfgang Wegner
  2010-02-16 10:22   ` [U-Boot] [PATCH v2] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
  2010-03-02  9:59   ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Wegner @ 2010-02-11 23:10 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang, TsiChung,

On Thu, Feb 11, 2010 at 11:55:11PM +0100, Wolfgang Denk wrote:
[...]
> > Wolfgang Wegner (3):
> >       add include/asm-m68k/unaligned.h
> >       allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
> 
> This patch adds a too long line. Sorry for not noticing this before.

sorry for that - it was posted before I found out about checkpatch.pl

I can send a corrected patch on tuesday because I do not have that
stuff set up here and company is closed until then... :-(

Regards,
Wolfgang

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

* [U-Boot] [PATCH v2] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
  2010-02-11 22:55 ` Wolfgang Denk
  2010-02-11 23:10   ` Wolfgang Wegner
@ 2010-02-16 10:22   ` Wolfgang Wegner
  2010-03-02  9:59   ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
  2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Wegner @ 2010-02-16 10:22 UTC (permalink / raw)
  To: u-boot

CONFIG_MONITOR_IS_IN_RAM is broken for MCF532x (and all other
processors having RAM located above the FLASH area). This patch
fixes this by conditionally
- removing the vector table at the beginning of code (MCF532x)
- not overwriting the vector base register (MCF532x)
- removing the code to re-set the PLL, which effectively disables
  SDRAM access (MCF532x)
- fixing the preprocessor condition to switch monitor protection
  off (all architectures)

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
---
This revised version fixes the too long line in drivers/mtd/cfi_flash.c
that would have been introduced by the first version.
In case it is preferred to provide a "patch for the patch" to fix the
long line alone, please let me know.

 cpu/mcf532x/speed.c     |    3 +++
 cpu/mcf532x/start.S     |    4 ++++
 drivers/mtd/cfi_flash.c |    3 ++-
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/cpu/mcf532x/speed.c b/cpu/mcf532x/speed.c
index 0d378e6..67f08c7 100644
--- a/cpu/mcf532x/speed.c
+++ b/cpu/mcf532x/speed.c
@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags)
 	fout = ((fref * mfd) / (BUSDIV * 4));
 #endif
 
+/* must not tamper with SDRAMC if running from SDRAM */
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 	/*
 	 * Check to see if the SDRAM has already been initialized.
 	 * If it has then the SDRAM needs to be put into self refresh
@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags)
 
 	/* wait for DQS logic to relock */
 	for (i = 0; i < 0x200; i++) ;
+#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
 
 	return fout;
 }
diff --git a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
index ff13a9f..5b134aa 100644
--- a/cpu/mcf532x/start.S
+++ b/cpu/mcf532x/start.S
@@ -45,6 +45,7 @@
 	addl	#60,%sp;		/* space for 15 regs */ \
 	rte;
 
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 .text
 /*
  *	Vector table. This is used for initial platform startup.
@@ -121,6 +122,7 @@ vector192_255:
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
+#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
 
 	.text
 
@@ -130,9 +132,11 @@ _start:
 	nop
 	move.w #0x2700,%sr	/* Mask off Interrupt */
 
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 	/* Set vector base register@the beginning of the Flash */
 	move.l	#CONFIG_SYS_FLASH_BASE, %d0
 	movec	%d0, %VBR
+#endif
 
 	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
 	movec	%d0, %RAMBAR1
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 24eb33f..fdba297 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1980,7 +1980,8 @@ unsigned long flash_init (void)
 	}
 
 	/* Monitor protection ON by default */
-#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE)
+#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) && \
+	(!defined(CONFIG_MONITOR_IS_IN_RAM))
 	flash_protect (FLAG_PROTECT_SET,
 		       CONFIG_SYS_MONITOR_BASE,
 		       CONFIG_SYS_MONITOR_BASE + monitor_flash_len  - 1,
-- 
1.5.6.5

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

* [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM
  2010-02-11 22:55 ` Wolfgang Denk
  2010-02-11 23:10   ` Wolfgang Wegner
  2010-02-16 10:22   ` [U-Boot] [PATCH v2] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
@ 2010-03-02  9:59   ` Wolfgang Wegner
  2010-03-02  9:59     ` [U-Boot] [PATCH [v3]] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
  2010-03-04  9:09     ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Stefan Roese
  2 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Wegner @ 2010-03-02  9:59 UTC (permalink / raw)
  To: u-boot

For platforms with flash below ram addresses, the current check to
activate monitor protection is wrong/insufficient. This patch fixes
CONFIG_MONITOR_IS_IN_RAM for these systems by adding a check for
this configuration.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
---
This patch is the CFI-relevant part of
"[PATCH] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM" dated 16.02.2010
to allow integration by the CFI maintainer independent of coldfire stuff.

 drivers/mtd/cfi_flash.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 24eb33f..fdba297 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1980,7 +1980,8 @@ unsigned long flash_init (void)
 	}
 
 	/* Monitor protection ON by default */
-#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE)
+#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) && \
+	(!defined(CONFIG_MONITOR_IS_IN_RAM))
 	flash_protect (FLAG_PROTECT_SET,
 		       CONFIG_SYS_MONITOR_BASE,
 		       CONFIG_SYS_MONITOR_BASE + monitor_flash_len  - 1,
-- 
1.5.6.5

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

* [U-Boot] [PATCH [v3]] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
  2010-03-02  9:59   ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
@ 2010-03-02  9:59     ` Wolfgang Wegner
  2010-03-04  9:09     ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Stefan Roese
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Wegner @ 2010-03-02  9:59 UTC (permalink / raw)
  To: u-boot

CONFIG_MONITOR_IS_IN_RAM is broken for MCF532x. This patch fixes this
 by conditionally
- removing the vector table at the beginning of code
- not overwriting the vector base register
- removing the code to re-set the PLL, which effectively disables
  SDRAM access

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
---
This patch is the coldfire-relevant part of
"[PATCH] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM" dated 16.02.2010
to allow integration by the coldfire maintainer independent of CFI stuff.

 cpu/mcf532x/speed.c |    3 +++
 cpu/mcf532x/start.S |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cpu/mcf532x/speed.c b/cpu/mcf532x/speed.c
index 0d378e6..67f08c7 100644
--- a/cpu/mcf532x/speed.c
+++ b/cpu/mcf532x/speed.c
@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags)
 	fout = ((fref * mfd) / (BUSDIV * 4));
 #endif
 
+/* must not tamper with SDRAMC if running from SDRAM */
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 	/*
 	 * Check to see if the SDRAM has already been initialized.
 	 * If it has then the SDRAM needs to be put into self refresh
@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags)
 
 	/* wait for DQS logic to relock */
 	for (i = 0; i < 0x200; i++) ;
+#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
 
 	return fout;
 }
diff --git a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
index ff13a9f..5b134aa 100644
--- a/cpu/mcf532x/start.S
+++ b/cpu/mcf532x/start.S
@@ -45,6 +45,7 @@
 	addl	#60,%sp;		/* space for 15 regs */ \
 	rte;
 
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 .text
 /*
  *	Vector table. This is used for initial platform startup.
@@ -121,6 +122,7 @@ vector192_255:
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
 .long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
+#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
 
 	.text
 
@@ -130,9 +132,11 @@ _start:
 	nop
 	move.w #0x2700,%sr	/* Mask off Interrupt */
 
+#if !defined(CONFIG_MONITOR_IS_IN_RAM)
 	/* Set vector base register@the beginning of the Flash */
 	move.l	#CONFIG_SYS_FLASH_BASE, %d0
 	movec	%d0, %VBR
+#endif
 
 	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
 	movec	%d0, %RAMBAR1
-- 
1.5.6.5

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

* [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM
  2010-03-02  9:59   ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
  2010-03-02  9:59     ` [U-Boot] [PATCH [v3]] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
@ 2010-03-04  9:09     ` Stefan Roese
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2010-03-04  9:09 UTC (permalink / raw)
  To: u-boot

On Tuesday 02 March 2010 10:59:19 Wolfgang Wegner wrote:
> For platforms with flash below ram addresses, the current check to
> activate monitor protection is wrong/insufficient. This patch fixes
> CONFIG_MONITOR_IS_IN_RAM for these systems by adding a check for
> this configuration.

Applied to u-boot-cfi-flash/master. Thanks.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

end of thread, other threads:[~2010-03-04  9:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 18:23 [U-Boot] Pull request - ColdFire TC Liew
2010-02-11 22:55 ` Wolfgang Denk
2010-02-11 23:10   ` Wolfgang Wegner
2010-02-16 10:22   ` [U-Boot] [PATCH v2] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
2010-03-02  9:59   ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
2010-03-02  9:59     ` [U-Boot] [PATCH [v3]] allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM Wolfgang Wegner
2010-03-04  9:09     ` [U-Boot] [PATCH [v3]] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox