All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
       [not found] <mailman.7754.1242158509.26545.linuxppc-dev@ozlabs.org>
@ 2009-05-13  6:27   ` Heiko Schocher
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Schocher @ 2009-05-13  6:27 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, Scott Wood, linux-kernel

Hello Wolfgang,

> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.

Wouldn;t it be better, if u-boot fixes the device tree entries?
I think, u-boot should know, where the flash begins and ends, and
because this is maybe a dynamic variable for this board, it should
be better, if u-boot fixes this, so no need for adding a device tree
for every board variant.

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] 19+ messages in thread

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
@ 2009-05-13  6:27   ` Heiko Schocher
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Schocher @ 2009-05-13  6:27 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Scott Wood, linuxppc-dev, linux-kernel

Hello Wolfgang,

> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.

Wouldn;t it be better, if u-boot fixes the device tree entries?
I think, u-boot should know, where the flash begins and ends, and
because this is maybe a dynamic variable for this board, it should
be better, if u-boot fixes this, so no need for adding a device tree
for every board variant.

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] 19+ messages in thread

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
  2009-05-13  6:27   ` Heiko Schocher
@ 2009-05-14 21:48     ` Scott Wood
  -1 siblings, 0 replies; 19+ messages in thread
From: Scott Wood @ 2009-05-14 21:48 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: Wolfgang Denk, linuxppc-dev, linux-kernel

On Wed, May 13, 2009 at 08:27:07AM +0200, Heiko Schocher wrote:
> Hello Wolfgang,
> 
> > The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> > of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> > the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> > device tree, the kernel crashes because 0xFE00.0000 is not mapped.
> 
> Wouldn;t it be better, if u-boot fixes the device tree entries?

We should proabbly leave out the ranges altogether, and have u-boot
populate it from the mappings it establishes.

> I think, u-boot should know, where the flash begins and ends, and
> because this is maybe a dynamic variable for this board, it should
> be better, if u-boot fixes this, so no need for adding a device tree
> for every board variant.

Flash is on a SIMM on this board, and the board manual says it's
expandable to 32 MiB.  However, I suspect that the current DTS was just
an error as I based it on a board that had not had its flash SIMM
modified.  That specific flash SIMM is no longer working (or perhaps just
got its contents corrupted -- one of these days I may hook up a BDI and
try to reflash), so I can't go back and check.

I don't see how current u-boot would accomodate more than 8MiB flash on
this board (there's some detection in board/freescale/mpc8260ads/flash.c,
but I don't see any setting of BR0 besides the preliminary value at
0xff800000).

-Scott

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
@ 2009-05-14 21:48     ` Scott Wood
  0 siblings, 0 replies; 19+ messages in thread
From: Scott Wood @ 2009-05-14 21:48 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: linuxppc-dev, Wolfgang Denk, linux-kernel

On Wed, May 13, 2009 at 08:27:07AM +0200, Heiko Schocher wrote:
> Hello Wolfgang,
> 
> > The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> > of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> > the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> > device tree, the kernel crashes because 0xFE00.0000 is not mapped.
> 
> Wouldn;t it be better, if u-boot fixes the device tree entries?

We should proabbly leave out the ranges altogether, and have u-boot
populate it from the mappings it establishes.

> I think, u-boot should know, where the flash begins and ends, and
> because this is maybe a dynamic variable for this board, it should
> be better, if u-boot fixes this, so no need for adding a device tree
> for every board variant.

Flash is on a SIMM on this board, and the board manual says it's
expandable to 32 MiB.  However, I suspect that the current DTS was just
an error as I based it on a board that had not had its flash SIMM
modified.  That specific flash SIMM is no longer working (or perhaps just
got its contents corrupted -- one of these days I may hook up a BDI and
try to reflash), so I can't go back and check.

I don't see how current u-boot would accomodate more than 8MiB flash on
this board (there's some detection in board/freescale/mpc8260ads/flash.c,
but I don't see any setting of BR0 besides the preliminary value at
0xff800000).

-Scott

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
  2009-05-14 21:48     ` Scott Wood
@ 2009-05-15  5:54       ` Heiko Schocher
  -1 siblings, 0 replies; 19+ messages in thread
From: Heiko Schocher @ 2009-05-15  5:54 UTC (permalink / raw)
  To: Scott Wood; +Cc: Wolfgang Denk, linuxppc-dev, linux-kernel

Hello Scott,

Scott Wood wrote:
> On Wed, May 13, 2009 at 08:27:07AM +0200, Heiko Schocher wrote:
>> Hello Wolfgang,
>>
>>> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
>>> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
>>> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
>>> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>> Wouldn;t it be better, if u-boot fixes the device tree entries?
> 
> We should proabbly leave out the ranges altogether, and have u-boot
> populate it from the mappings it establishes.

No, I vote for manipulating just the entries, which u-boot dynamically
detect, and let the other entries untouched. It is possible that
there is a device which u-boot didn;t use/know, and there is in the DTS
an ranges entry for it (Maybe not on the MPC8727ADS, but we should
define a rule, how a bootloader has to manipulate entries). So if
u-boot build the complete ranges entry, it maybe miss something.

>> I think, u-boot should know, where the flash begins and ends, and
>> because this is maybe a dynamic variable for this board, it should
>> be better, if u-boot fixes this, so no need for adding a device tree
>> for every board variant.
> 
> Flash is on a SIMM on this board, and the board manual says it's
> expandable to 32 MiB.  However, I suspect that the current DTS was just
> an error as I based it on a board that had not had its flash SIMM
> modified.  That specific flash SIMM is no longer working (or perhaps just
> got its contents corrupted -- one of these days I may hook up a BDI and
> try to reflash), so I can't go back and check.
> 
> I don't see how current u-boot would accomodate more than 8MiB flash on
> this board (there's some detection in board/freescale/mpc8260ads/flash.c,

Didn;t this board uses the CFI driver? :-(

> but I don't see any setting of BR0 besides the preliminary value at
> 0xff800000).

OK, then the patch from Wolfgang should be sufficient.

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] 19+ messages in thread

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
@ 2009-05-15  5:54       ` Heiko Schocher
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Schocher @ 2009-05-15  5:54 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, Wolfgang Denk, linux-kernel

Hello Scott,

Scott Wood wrote:
> On Wed, May 13, 2009 at 08:27:07AM +0200, Heiko Schocher wrote:
>> Hello Wolfgang,
>>
>>> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
>>> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
>>> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
>>> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>> Wouldn;t it be better, if u-boot fixes the device tree entries?
> 
> We should proabbly leave out the ranges altogether, and have u-boot
> populate it from the mappings it establishes.

No, I vote for manipulating just the entries, which u-boot dynamically
detect, and let the other entries untouched. It is possible that
there is a device which u-boot didn;t use/know, and there is in the DTS
an ranges entry for it (Maybe not on the MPC8727ADS, but we should
define a rule, how a bootloader has to manipulate entries). So if
u-boot build the complete ranges entry, it maybe miss something.

>> I think, u-boot should know, where the flash begins and ends, and
>> because this is maybe a dynamic variable for this board, it should
>> be better, if u-boot fixes this, so no need for adding a device tree
>> for every board variant.
> 
> Flash is on a SIMM on this board, and the board manual says it's
> expandable to 32 MiB.  However, I suspect that the current DTS was just
> an error as I based it on a board that had not had its flash SIMM
> modified.  That specific flash SIMM is no longer working (or perhaps just
> got its contents corrupted -- one of these days I may hook up a BDI and
> try to reflash), so I can't go back and check.
> 
> I don't see how current u-boot would accomodate more than 8MiB flash on
> this board (there's some detection in board/freescale/mpc8260ads/flash.c,

Didn;t this board uses the CFI driver? :-(

> but I don't see any setting of BR0 besides the preliminary value at
> 0xff800000).

OK, then the patch from Wolfgang should be sufficient.

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] 19+ messages in thread

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size
  2009-05-15  5:54       ` Heiko Schocher
  (?)
@ 2009-05-15 15:36       ` Scott Wood
  -1 siblings, 0 replies; 19+ messages in thread
From: Scott Wood @ 2009-05-15 15:36 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: linuxppc-dev, Wolfgang Denk, linux-kernel

On Fri, May 15, 2009 at 07:54:51AM +0200, Heiko Schocher wrote:
> Scott Wood wrote:
> > We should proabbly leave out the ranges altogether, and have u-boot
> > populate it from the mappings it establishes.
> 
> No, I vote for manipulating just the entries, which u-boot dynamically
> detect, and let the other entries untouched. It is possible that
> there is a device which u-boot didn;t use/know, and there is in the DTS
> an ranges entry for it (Maybe not on the MPC8727ADS, but we should
> define a rule, how a bootloader has to manipulate entries). So if
> u-boot build the complete ranges entry, it maybe miss something.

If u-boot doesn't know about it, then it didn't create the mapping, and
thus it's not accessible (if something later on creates a mapping, it can
update ranges itself).  The devices themselves would still be described,
just not the non-existent mapping.

The benefit is that you would have just one place that reads out the
localbus config into the device tree, with no error-prone duplication of
data, or separate hacks for each board that has something that is
variable.

We could leave ranges in the dts for cuImage, and have u-boot just
overwrite the entire thing rather than patch up individual entries.

> > I don't see how current u-boot would accomodate more than 8MiB flash on
> > this board (there's some detection in board/freescale/mpc8260ads/flash.c,
> 
> Didn;t this board uses the CFI driver? :-(

Not yet, unfortunately.  This is pretty old code.

-Scott

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
  2009-05-12 19:06 ` Wolfgang Denk
@ 2009-06-11  1:51   ` Kumar Gala
  -1 siblings, 0 replies; 19+ messages in thread
From: Kumar Gala @ 2009-06-11  1:51 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, linux-kernel, Scott Wood


On May 12, 2009, at 2:06 PM, Wolfgang Denk wrote:

> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>
> Also introduce aliases for serial[01] and ethernet[01].
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> I am not really sure what the typical flash size on MPC8272ADS boards
> is. The board I used for testing is marked as "Prototype", so it may
> not be the release configuration. On the other hand, the manual also
> says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
> Wood eventually tested only with cuImage which fixes up the localbus
> mappings, thus eventually concealing the issue.
>
> I'm posting this as reference in case the 8 MB should turn out to be
> correct. -- wd
>
> arch/powerpc/boot/dts/mpc8272ads.dts |   19 +++++++++++++------
> 1 files changed, 13 insertions(+), 6 deletions(-)


applied to next.

- k

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-06-11  1:51   ` Kumar Gala
  0 siblings, 0 replies; 19+ messages in thread
From: Kumar Gala @ 2009-06-11  1:51 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Scott Wood, linuxppc-dev, linux-kernel


On May 12, 2009, at 2:06 PM, Wolfgang Denk wrote:

> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>
> Also introduce aliases for serial[01] and ethernet[01].
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> I am not really sure what the typical flash size on MPC8272ADS boards
> is. The board I used for testing is marked as "Prototype", so it may
> not be the release configuration. On the other hand, the manual also
> says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
> Wood eventually tested only with cuImage which fixes up the localbus
> mappings, thus eventually concealing the issue.
>
> I'm posting this as reference in case the 8 MB should turn out to be
> correct. -- wd
>
> arch/powerpc/boot/dts/mpc8272ads.dts |   19 +++++++++++++------
> 1 files changed, 13 insertions(+), 6 deletions(-)


applied to next.

- k

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
  2009-05-20 13:29       ` Kumar Gala
@ 2009-05-20 14:47         ` Scott Wood
  -1 siblings, 0 replies; 19+ messages in thread
From: Scott Wood @ 2009-05-20 14:47 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Li Yang, Wolfgang Denk, linuxppc-dev list, LKML List

Kumar Gala wrote:
> Scott, any feedback if our boards have 8M or 32M flash modules?

According to the manual, it comes with 8 but can be expanded to 32.  I 
don't think we swapped out the flash SIMM that came with the board.

As I wrote earlier in the thread, I don't see any way a current u-boot 
would enable more than 8MiB of flash on this board anyway.  I'd go ahead 
and apply the patch.

-Scott

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-20 14:47         ` Scott Wood
  0 siblings, 0 replies; 19+ messages in thread
From: Scott Wood @ 2009-05-20 14:47 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Li Yang, Wolfgang Denk, LKML List

Kumar Gala wrote:
> Scott, any feedback if our boards have 8M or 32M flash modules?

According to the manual, it comes with 8 but can be expanded to 32.  I 
don't think we swapped out the flash SIMM that came with the board.

As I wrote earlier in the thread, I don't see any way a current u-boot 
would enable more than 8MiB of flash on this board anyway.  I'd go ahead 
and apply the patch.

-Scott

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
  2009-05-13 19:42     ` Wolfgang Denk
@ 2009-05-20 13:29       ` Kumar Gala
  -1 siblings, 0 replies; 19+ messages in thread
From: Kumar Gala @ 2009-05-20 13:29 UTC (permalink / raw)
  To: Scott Wood; +Cc: Li Yang, Wolfgang Denk, linuxppc-dev list, LKML List


On May 13, 2009, at 2:42 PM, Wolfgang Denk wrote:

> Dear Li Yang,
>
> In message <2a27d3730905130328m27743852w2d68a62ebc32ce31@mail.gmail.com 
> > you wrote:
>>
>> Although 8MB seems to be the common size used.  It can be very easy
>> changed as a pluggable module.  It might be better to make the code
>> working for any reasonable flash sizes.
>
> You either have to provide a correct device tree for your board, or
> use a boot loader / boot wrapper that fixes the flash base address and
> size.
>
> At the moment, U-Boot does not  contain  any  code  yet  to  do  that
> (patches  welcome :-), and as far as I understand the cuImage wrapper
> works just the other way  round:  it  adjusts  the  mappings  to  the
> settings  in  the  device tree, which may or may not match the actual
> hardware. This may work, but at least gives  you  a  different  flash
> memory  map  in Linux than what you had before in U-Boot, so it's not
> really nice either.
>
>
> Hm... it seems the majority of MPC8272ADS boards seems to come indeed
> with 8 MB NOR flash, so I wonder if the patch should actually go in?
>
> Best regards,
>
> Wolfgang Denk

Scott, any feedback if our boards have 8M or 32M flash modules?

- k

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-20 13:29       ` Kumar Gala
  0 siblings, 0 replies; 19+ messages in thread
From: Kumar Gala @ 2009-05-20 13:29 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev list, Li Yang, Wolfgang Denk, LKML List


On May 13, 2009, at 2:42 PM, Wolfgang Denk wrote:

> Dear Li Yang,
>
> In message <2a27d3730905130328m27743852w2d68a62ebc32ce31@mail.gmail.com 
> > you wrote:
>>
>> Although 8MB seems to be the common size used.  It can be very easy
>> changed as a pluggable module.  It might be better to make the code
>> working for any reasonable flash sizes.
>
> You either have to provide a correct device tree for your board, or
> use a boot loader / boot wrapper that fixes the flash base address and
> size.
>
> At the moment, U-Boot does not  contain  any  code  yet  to  do  that
> (patches  welcome :-), and as far as I understand the cuImage wrapper
> works just the other way  round:  it  adjusts  the  mappings  to  the
> settings  in  the  device tree, which may or may not match the actual
> hardware. This may work, but at least gives  you  a  different  flash
> memory  map  in Linux than what you had before in U-Boot, so it's not
> really nice either.
>
>
> Hm... it seems the majority of MPC8272ADS boards seems to come indeed
> with 8 MB NOR flash, so I wonder if the patch should actually go in?
>
> Best regards,
>
> Wolfgang Denk

Scott, any feedback if our boards have 8M or 32M flash modules?

- k

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
  2009-05-13 10:28   ` Li Yang
@ 2009-05-13 19:42     ` Wolfgang Denk
  -1 siblings, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-13 19:42 UTC (permalink / raw)
  To: Li Yang; +Cc: linuxppc-dev, linux-kernel, Scott Wood, Kumar Gala

Dear Li Yang,

In message <2a27d3730905130328m27743852w2d68a62ebc32ce31@mail.gmail.com> you wrote:
>
> Although 8MB seems to be the common size used.  It can be very easy
> changed as a pluggable module.  It might be better to make the code
> working for any reasonable flash sizes.

You either have to provide a correct device tree for your board, or
use a boot loader / boot wrapper that fixes the flash base address and
size.

At the moment, U-Boot does not  contain  any  code  yet  to  do  that
(patches  welcome :-), and as far as I understand the cuImage wrapper
works just the other way  round:  it  adjusts  the  mappings  to  the
settings  in  the  device tree, which may or may not match the actual
hardware. This may work, but at least gives  you  a  different  flash
memory  map  in Linux than what you had before in U-Boot, so it's not
really nice either.


Hm... it seems the majority of MPC8272ADS boards seems to come indeed
with 8 MB NOR flash, so I wonder if the patch should actually go in?

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@denx.de
In accord with UNIX philosophy, Perl gives you enough  rope  to  hang
yourself.              - L. Wall & R. L. Schwartz, _Programming Perl_

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-13 19:42     ` Wolfgang Denk
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-13 19:42 UTC (permalink / raw)
  To: Li Yang; +Cc: Scott Wood, linuxppc-dev, linux-kernel

Dear Li Yang,

In message <2a27d3730905130328m27743852w2d68a62ebc32ce31@mail.gmail.com> you wrote:
>
> Although 8MB seems to be the common size used.  It can be very easy
> changed as a pluggable module.  It might be better to make the code
> working for any reasonable flash sizes.

You either have to provide a correct device tree for your board, or
use a boot loader / boot wrapper that fixes the flash base address and
size.

At the moment, U-Boot does not  contain  any  code  yet  to  do  that
(patches  welcome :-), and as far as I understand the cuImage wrapper
works just the other way  round:  it  adjusts  the  mappings  to  the
settings  in  the  device tree, which may or may not match the actual
hardware. This may work, but at least gives  you  a  different  flash
memory  map  in Linux than what you had before in U-Boot, so it's not
really nice either.


Hm... it seems the majority of MPC8272ADS boards seems to come indeed
with 8 MB NOR flash, so I wonder if the patch should actually go in?

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@denx.de
In accord with UNIX philosophy, Perl gives you enough  rope  to  hang
yourself.              - L. Wall & R. L. Schwartz, _Programming Perl_

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
  2009-05-12 19:06 ` Wolfgang Denk
@ 2009-05-13 10:28   ` Li Yang
  -1 siblings, 0 replies; 19+ messages in thread
From: Li Yang @ 2009-05-13 10:28 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, linux-kernel, Scott Wood, Kumar Gala

On Wed, May 13, 2009 at 3:06 AM, Wolfgang Denk <wd@denx.de> wrote:
> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>
> Also introduce aliases for serial[01] and ethernet[01].
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> I am not really sure what the typical flash size on MPC8272ADS boards
> is. The board I used for testing is marked as "Prototype", so it may
> not be the release configuration. On the other hand, the manual also
> says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
> Wood eventually tested only with cuImage which fixes up the localbus
> mappings, thus eventually concealing the issue.

The latest reference board I got also has an 8MB SIMM flash module
shipped in the box.

>
> I'm posting this as reference in case the 8 MB should turn out to be
> correct. -- wd

Although 8MB seems to be the common size used.  It can be very easy
changed as a pluggable module.  It might be better to make the code
working for any reasonable flash sizes.

- Leo

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

* Re: [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-13 10:28   ` Li Yang
  0 siblings, 0 replies; 19+ messages in thread
From: Li Yang @ 2009-05-13 10:28 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Scott Wood, linuxppc-dev, linux-kernel

On Wed, May 13, 2009 at 3:06 AM, Wolfgang Denk <wd@denx.de> wrote:
> The current device tree for the MPC8272ADS assumes a mapping of 32 MB
> of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
> the boards, mapped at 0xFF80.0000. When booting an uImage with such a
> device tree, the kernel crashes because 0xFE00.0000 is not mapped.
>
> Also introduce aliases for serial[01] and ethernet[01].
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> I am not really sure what the typical flash size on MPC8272ADS boards
> is. The board I used for testing is marked as "Prototype", so it may
> not be the release configuration. On the other hand, the manual also
> says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
> Wood eventually tested only with cuImage which fixes up the localbus
> mappings, thus eventually concealing the issue.

The latest reference board I got also has an 8MB SIMM flash module
shipped in the box.

>
> I'm posting this as reference in case the 8 MB should turn out to be
> correct. -- wd

Although 8MB seems to be the common size used.  It can be very easy
changed as a pluggable module.  It might be better to make the code
working for any reasonable flash sizes.

- Leo

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

* [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-12 19:06 ` Wolfgang Denk
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-12 19:06 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kernel, Wolfgang Denk, Scott Wood, Kumar Gala

The current device tree for the MPC8272ADS assumes a mapping of 32 MB
of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
the boards, mapped at 0xFF80.0000. When booting an uImage with such a
device tree, the kernel crashes because 0xFE00.0000 is not mapped.

Also introduce aliases for serial[01] and ethernet[01].

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
cc: Kumar Gala <galak@kernel.crashing.org>
---
I am not really sure what the typical flash size on MPC8272ADS boards
is. The board I used for testing is marked as "Prototype", so it may
not be the release configuration. On the other hand, the manual also
says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
Wood eventually tested only with cuImage which fixes up the localbus
mappings, thus eventually concealing the issue.

I'm posting this as reference in case the 8 MB should turn out to be
correct. -- wd

 arch/powerpc/boot/dts/mpc8272ads.dts |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 2a1929a..60f3327 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -17,6 +17,13 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+		serial0 = &scc1;
+		serial1 = &scc4;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -46,13 +53,13 @@
 		#size-cells = <1>;
 		reg = <0xf0010100 0x40>;
 
-		ranges = <0x0 0x0 0xfe000000 0x2000000
+		ranges = <0x0 0x0 0xff800000 0x00800000
 		          0x1 0x0 0xf4500000 0x8000
 		          0x3 0x0 0xf8200000 0x8000>;
 
 		flash@0,0 {
 			compatible = "jedec-flash";
-			reg = <0x0 0x0 0x2000000>;
+			reg = <0x0 0x0 0x00800000>;
 			bank-width = <4>;
 			device-width = <1>;
 		};
@@ -144,7 +151,7 @@
 				reg = <0x119f0 0x10 0x115f0 0x10>;
 			};
 
-			serial@11a00 {
+			scc1: serial@11a00 {
 				device_type = "serial";
 				compatible = "fsl,mpc8272-scc-uart",
 				             "fsl,cpm2-scc-uart";
@@ -155,7 +162,7 @@
 				fsl,cpm-command = <0x800000>;
 			};
 
-			serial@11a60 {
+			scc4: serial@11a60 {
 				device_type = "serial";
 				compatible = "fsl,mpc8272-scc-uart",
 				             "fsl,cpm2-scc-uart";
@@ -192,7 +199,7 @@
 				};
 			};
 
-			ethernet@11300 {
+			eth0: ethernet@11300 {
 				device_type = "network";
 				compatible = "fsl,mpc8272-fcc-enet",
 				             "fsl,cpm2-fcc-enet";
@@ -205,7 +212,7 @@
 				fsl,cpm-command = <0x12000300>;
 			};
 
-			ethernet@11320 {
+			eth1: ethernet@11320 {
 				device_type = "network";
 				compatible = "fsl,mpc8272-fcc-enet",
 				             "fsl,cpm2-fcc-enet";
-- 
1.6.0.6


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

* [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size
@ 2009-05-12 19:06 ` Wolfgang Denk
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2009-05-12 19:06 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Scott Wood, linux-kernel, Wolfgang Denk

The current device tree for the MPC8272ADS assumes a mapping of 32 MB
of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
the boards, mapped at 0xFF80.0000. When booting an uImage with such a
device tree, the kernel crashes because 0xFE00.0000 is not mapped.

Also introduce aliases for serial[01] and ethernet[01].

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
cc: Kumar Gala <galak@kernel.crashing.org>
---
I am not really sure what the typical flash size on MPC8272ADS boards
is. The board I used for testing is marked as "Prototype", so it may
not be the release configuration. On the other hand, the manual also
says 8 MB, Vitaly Borduk confirms 8 MB on his board, too, and Scott
Wood eventually tested only with cuImage which fixes up the localbus
mappings, thus eventually concealing the issue.

I'm posting this as reference in case the 8 MB should turn out to be
correct. -- wd

 arch/powerpc/boot/dts/mpc8272ads.dts |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 2a1929a..60f3327 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -17,6 +17,13 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+		serial0 = &scc1;
+		serial1 = &scc4;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -46,13 +53,13 @@
 		#size-cells = <1>;
 		reg = <0xf0010100 0x40>;
 
-		ranges = <0x0 0x0 0xfe000000 0x2000000
+		ranges = <0x0 0x0 0xff800000 0x00800000
 		          0x1 0x0 0xf4500000 0x8000
 		          0x3 0x0 0xf8200000 0x8000>;
 
 		flash@0,0 {
 			compatible = "jedec-flash";
-			reg = <0x0 0x0 0x2000000>;
+			reg = <0x0 0x0 0x00800000>;
 			bank-width = <4>;
 			device-width = <1>;
 		};
@@ -144,7 +151,7 @@
 				reg = <0x119f0 0x10 0x115f0 0x10>;
 			};
 
-			serial@11a00 {
+			scc1: serial@11a00 {
 				device_type = "serial";
 				compatible = "fsl,mpc8272-scc-uart",
 				             "fsl,cpm2-scc-uart";
@@ -155,7 +162,7 @@
 				fsl,cpm-command = <0x800000>;
 			};
 
-			serial@11a60 {
+			scc4: serial@11a60 {
 				device_type = "serial";
 				compatible = "fsl,mpc8272-scc-uart",
 				             "fsl,cpm2-scc-uart";
@@ -192,7 +199,7 @@
 				};
 			};
 
-			ethernet@11300 {
+			eth0: ethernet@11300 {
 				device_type = "network";
 				compatible = "fsl,mpc8272-fcc-enet",
 				             "fsl,cpm2-fcc-enet";
@@ -205,7 +212,7 @@
 				fsl,cpm-command = <0x12000300>;
 			};
 
-			ethernet@11320 {
+			eth1: ethernet@11320 {
 				device_type = "network";
 				compatible = "fsl,mpc8272-fcc-enet",
 				             "fsl,cpm2-fcc-enet";
-- 
1.6.0.6

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

end of thread, other threads:[~2009-06-11  1:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.7754.1242158509.26545.linuxppc-dev@ozlabs.org>
2009-05-13  6:27 ` [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash, size Heiko Schocher
2009-05-13  6:27   ` Heiko Schocher
2009-05-14 21:48   ` Scott Wood
2009-05-14 21:48     ` Scott Wood
2009-05-15  5:54     ` Heiko Schocher
2009-05-15  5:54       ` Heiko Schocher
2009-05-15 15:36       ` Scott Wood
2009-05-12 19:06 [PATCH] [PowerPC] MPC8272ADS: fix device tree for 8 MB flash size Wolfgang Denk
2009-05-12 19:06 ` Wolfgang Denk
2009-05-13 10:28 ` Li Yang
2009-05-13 10:28   ` Li Yang
2009-05-13 19:42   ` Wolfgang Denk
2009-05-13 19:42     ` Wolfgang Denk
2009-05-20 13:29     ` Kumar Gala
2009-05-20 13:29       ` Kumar Gala
2009-05-20 14:47       ` Scott Wood
2009-05-20 14:47         ` Scott Wood
2009-06-11  1:51 ` Kumar Gala
2009-06-11  1:51   ` Kumar Gala

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.