public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
@ 2009-06-08  7:38 Stefan Roese
  2009-06-08 10:25 ` Wolfgang Denk
  2009-06-12 13:01 ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Roese @ 2009-06-08  7:38 UTC (permalink / raw)
  To: u-boot

This is needed for the upcoming esd MECP5123 board port which uses I2C EEPROM
for environment storage.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
---
 cpu/mpc512x/i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc512x/i2c.c b/cpu/mpc512x/i2c.c
index 97bda0d..e2d9097 100644
--- a/cpu/mpc512x/i2c.c
+++ b/cpu/mpc512x/i2c.c
@@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <i2c.h>
 
 /* by default set I2C bus 0 active */
-static unsigned int bus_num = 0;
+static unsigned int bus_num __attribute__ ((section (".data"))) = 0;
 
 #define I2C_TIMEOUT	100
 #define I2C_RETRIES	3
-- 
1.6.3.2

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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08  7:38 [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation Stefan Roese
@ 2009-06-08 10:25 ` Wolfgang Denk
  2009-06-08 10:33   ` Heiko Schocher
  2009-06-08 16:48   ` Stefan Roese
  2009-06-12 13:01 ` Wolfgang Denk
  1 sibling, 2 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-08 10:25 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <1244446687-11316-1-git-send-email-sr@denx.de> you wrote:
> This is needed for the upcoming esd MECP5123 board port which uses I2C EEPROM
> for environment storage.

Stefan, please  check  if  this  is  really  what  you  want  to  do.
Environmentin EEPROM is *strongly* discouraged. It is slow like hell,
and  even more unreliable. Do *not* do this. Check if you can use any
other storage - NOR or NAND flash, or the like.

> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> ---
>  cpu/mpc512x/i2c.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Heiko, if Stefan does not change his mind, then I suggest you ACK the
patch and I apply it then to the 5xxx repo?

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
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack

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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08 10:25 ` Wolfgang Denk
@ 2009-06-08 10:33   ` Heiko Schocher
  2009-06-08 16:44     ` Stefan Roese
  2009-06-08 16:48   ` Stefan Roese
  1 sibling, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2009-06-08 10:33 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

Wolfgang Denk wrote:
> Dear Stefan Roese,
> 
> In message <1244446687-11316-1-git-send-email-sr@denx.de> you wrote:
>> This is needed for the upcoming esd MECP5123 board port which uses I2C EEPROM
>> for environment storage.
> 
> Stefan, please  check  if  this  is  really  what  you  want  to  do.
> Environmentin EEPROM is *strongly* discouraged. It is slow like hell,
> and  even more unreliable. Do *not* do this. Check if you can use any
> other storage - NOR or NAND flash, or the like.
> 
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
>> ---
>>  cpu/mpc512x/i2c.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Heiko, if Stefan does not change his mind, then I suggest you ACK the
> patch and I apply it then to the 5xxx repo?

This Patch is okay, independent if Stefan changes his mind or
not, I think. Thanks to Stefan for finding this.

Acked-by: Heiko Schocher<hs@denx.de>

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08 10:33   ` Heiko Schocher
@ 2009-06-08 16:44     ` Stefan Roese
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2009-06-08 16:44 UTC (permalink / raw)
  To: u-boot

On Monday 08 June 2009 12:33:01 Heiko Schocher wrote:
> >> This is needed for the upcoming esd MECP5123 board port which uses I2C
> >> EEPROM for environment storage.
> >
> > Stefan, please  check  if  this  is  really  what  you  want  to  do.
> > Environmentin EEPROM is *strongly* discouraged. It is slow like hell,
> > and  even more unreliable. Do *not* do this. Check if you can use any
> > other storage - NOR or NAND flash, or the like.
> >
> >> Signed-off-by: Stefan Roese <sr@denx.de>
> >> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> >> ---
> >>  cpu/mpc512x/i2c.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > Heiko, if Stefan does not change his mind, then I suggest you ACK the
> > patch and I apply it then to the 5xxx repo?
>
> This Patch is okay, independent if Stefan changes his mind or
> not, I think. Thanks to Stefan for finding this.

Full ACK. This is a bugfix and should be applied in any case.

Thanks.

Best regards,
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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08 10:25 ` Wolfgang Denk
  2009-06-08 10:33   ` Heiko Schocher
@ 2009-06-08 16:48   ` Stefan Roese
  2009-06-08 18:05     ` Wolfgang Denk
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2009-06-08 16:48 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Monday 08 June 2009 12:25:01 Wolfgang Denk wrote:
> > This is needed for the upcoming esd MECP5123 board port which uses I2C
> > EEPROM for environment storage.
>
> Stefan, please  check  if  this  is  really  what  you  want  to  do.
> Environmentin EEPROM is *strongly* discouraged. It is slow like hell,
> and  even more unreliable. Do *not* do this. Check if you can use any
> other storage - NOR or NAND flash, or the like.

I know that EEPROM has some disadvantages. But this is not my choice but the 
customers (esd) decision. esd has used I2C EEPROM for environment storage for 
a long time and even included write-protection to the EEPROM.

Best regards,
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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08 16:48   ` Stefan Roese
@ 2009-06-08 18:05     ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-08 18:05 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <200906081848.50593.sr@denx.de> you wrote:
> 
> I know that EEPROM has some disadvantages. But this is not my choice but the 
> customers (esd) decision. esd has used I2C EEPROM for environment storage for 
> a long time and even included write-protection to the EEPROM.

That's OK if they insist. But it is due diligence to at  least  point
out  the  potential  trouble  they  are  inviting. Which we have done
hereby.

But out of curiosity: please do me a favour and measure the time from
power-up to U-Boot prompt. Then "setenv baudrate 115200; saveenv" and
measure again.  Thanks in advance.

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
Death. Destruction. Disease. Horror. That's what war  is  all  about.
That's what makes it a thing to be avoided.
	-- Kirk, "A Taste of Armageddon", stardate 3193.0

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

* [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation
  2009-06-08  7:38 [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation Stefan Roese
  2009-06-08 10:25 ` Wolfgang Denk
@ 2009-06-12 13:01 ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-12 13:01 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <1244446687-11316-1-git-send-email-sr@denx.de> you wrote:
> This is needed for the upcoming esd MECP5123 board port which uses I2C EEPROM
> for environment storage.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> ---
>  cpu/mpc512x/i2c.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-mpc5xxx repo, 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
I perceive a possibility of an immediate  chronological  sequence  of
events which includes a violence.
                        - Terry Pratchett, _The Dark Side of the Sun_

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

end of thread, other threads:[~2009-06-12 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08  7:38 [U-Boot] [PATCH] mpc512x: Fix problem with I2C access before relocation Stefan Roese
2009-06-08 10:25 ` Wolfgang Denk
2009-06-08 10:33   ` Heiko Schocher
2009-06-08 16:44     ` Stefan Roese
2009-06-08 16:48   ` Stefan Roese
2009-06-08 18:05     ` Wolfgang Denk
2009-06-12 13:01 ` Wolfgang Denk

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