Skip to contentSkip to conversation

Change initdram() return type to phys_size_t

PATCH New Becky Bruce 6 participants 10 messages Jun 10, 2008 – Jun 13, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms.

This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram). It does not actually modify the code inside the function on any of the platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code.

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN.

Patch is too large for the list, and is located at:
http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_size_t.patch

#1 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 12 lines · Becky Bruce

This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms.

This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram). It does not actually modify the code inside the function on any of the platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code.

Quoted 5 lines

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN.

Patch is too large for the list, and is located at:
http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_size_t.patch

The whole 4-part series:

jdl

#2 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 16 lines · Jon Loeliger
Quoted 15 lines · Becky Bruce

This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms.

This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram).
It does not actually modify the code inside the function on any of the
platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code.

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN.

Quoted 7 lines
Quoted 3 lines

Patch is too large for the list, and is located at:
http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_
size_t.patch

The whole 4-part series:

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
=====================================================================

#3 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

In reply to Becky Bruce
Quoted 12 lines · In message <[email protected]> you…

This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms.

This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram). It does not actually modify the code inside the function on any of the platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code.

Quoted 5 lines

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN.

Patch is too large for the list, and is located at:
http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_size_t.patch

Sorry, but I'm afraid this doesn't apply at all:

Applying Change initdram() return type to phys_size_t
error: board/amcc/kilauea/memory.c: does not exist in index
error: board/amcc/makalu/memory.c: does not exist in index
error: patch failed: board/amcc/yosemite/yosemite.c:331
error: board/amcc/yosemite/yosemite.c: patch does not apply
error: patch failed: board/esd/ar405/ar405.c:192
error: board/esd/ar405/ar405.c: patch does not apply
error: patch failed: board/esd/canbt/canbt.c:184
error: board/esd/canbt/canbt.c: patch does not apply
error: patch failed: board/g2000/g2000.c:158
error: board/g2000/g2000.c: patch does not apply
error: board/tqm5200/tqm5200.c: does not exist in index
error: board/tqm8260/tqm8260.c: does not exist in index
error: board/tqm8272/tqm8272.c: does not exist in index
error: board/tqm834x/tqm834x.c: does not exist in index
error: board/tqm85xx/sdram.c: does not exist in index
error: board/tqm8xx/tqm8xx.c: does not exist in index
error: patch failed: board/w7o/w7o.c:151
error: board/w7o/w7o.c: patch does not apply
error: patch failed: nand_spl/board/amcc/bamboo/sdram.c:89
error: nand_spl/board/amcc/bamboo/sdram.c: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merged board/amcc/acadia/memory.c
...
Auto-merged board/amcc/ebony/ebony.c
CONFLICT (delete/modify): board/amcc/kilauea/memory.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/amcc/kilauea/memory.c left in tree. CONFLICT (delete/modify): board/amcc/makalu/memory.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/amcc/makalu/memory.c left in tree. Auto-merged board/amcc/ocotea/ocotea.c
...
Auto-merged board/amcc/yosemite/yosemite.c
CONFLICT (content): Merge conflict in board/amcc/yosemite/yosemite.c
Auto-merged board/csb272/csb272.c
...
Auto-merged board/esd/ar405/ar405.c
CONFLICT (content): Merge conflict in board/esd/ar405/ar405.c
Auto-merged board/esd/canbt/canbt.c
CONFLICT (content): Merge conflict in board/esd/canbt/canbt.c
Auto-merged board/exbitgen/exbitgen.c
...
Auto-merged board/g2000/g2000.c
CONFLICT (content): Merge conflict in board/g2000/g2000.c
Auto-merged board/gth2/gth2.c
...
Auto-merged board/purple/purple.c
CONFLICT (delete/modify): board/tqm8272/tqm8272.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/tqm8272/tqm8272.c left in tree. CONFLICT (delete/modify): board/tqm85xx/sdram.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/tqm85xx/sdram.c left in tree. Auto-merged board/w7o/w7o.c
...
Auto-merged nand_spl/board/amcc/bamboo/sdram.c
CONFLICT (content): Merge conflict in nand_spl/board/amcc/bamboo/sdram.c
Failed to merge in the changes.
Patch failed at 0001.

Can you please rebase your patch set?

Best regards,

Wolfgang Denk

Signature · 5 lines
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
No one may kill a man.  Not for any purpose.  It cannot be condoned.
	-- Kirk, "Spock's Brain", stardate 5431.6
#4 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 99 lines · Wolfgang Denk

In message <[email protected]

Quoted 21 lines

you wrote:
This patch changes the return type of initdram() from long int to phys_size_t.
This is required for a couple of reasons: long int limits the amount of dram
to 2GB, and u-boot in general is moving over to phys_size_t to represent the
size of physical memory. phys_size_t is defined as an unsigned long on almost
all current platforms.

This patch *only* changes the return type of the initdram function (in
include/common.h, as well as in each board's implementation of initdram). It
does not actually modify the code inside the function on any of the platforms;
platforms which wish to support more than 2GB of DRAM will need to modify
their initdram() function code.

Quoted 6 lines

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
MPC8641HPCN.

Patch is too large for the list, and is located at:
http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_size_t.patch

Sorry, but I'm afraid this doesn't apply at all:

Applying Change initdram() return type to phys_size_t
error: board/amcc/kilauea/memory.c: does not exist in index
error: board/amcc/makalu/memory.c: does not exist in index
error: patch failed: board/amcc/yosemite/yosemite.c:331
error: board/amcc/yosemite/yosemite.c: patch does not apply
error: patch failed: board/esd/ar405/ar405.c:192
error: board/esd/ar405/ar405.c: patch does not apply
error: patch failed: board/esd/canbt/canbt.c:184
error: board/esd/canbt/canbt.c: patch does not apply
error: patch failed: board/g2000/g2000.c:158
error: board/g2000/g2000.c: patch does not apply
error: board/tqm5200/tqm5200.c: does not exist in index
error: board/tqm8260/tqm8260.c: does not exist in index
error: board/tqm8272/tqm8272.c: does not exist in index
error: board/tqm834x/tqm834x.c: does not exist in index
error: board/tqm85xx/sdram.c: does not exist in index
error: board/tqm8xx/tqm8xx.c: does not exist in index
error: patch failed: board/w7o/w7o.c:151
error: board/w7o/w7o.c: patch does not apply
error: patch failed: nand_spl/board/amcc/bamboo/sdram.c:89
error: nand_spl/board/amcc/bamboo/sdram.c: patch does not apply Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge... Auto-merged board/amcc/acadia/memory.c
...
Auto-merged board/amcc/ebony/ebony.c
CONFLICT (delete/modify): board/amcc/kilauea/memory.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/amcc/ kilauea/memory.c left in tree.
CONFLICT (delete/modify): board/amcc/makalu/memory.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/amcc/ makalu/memory.c left in tree.
Auto-merged board/amcc/ocotea/ocotea.c
...
Auto-merged board/amcc/yosemite/yosemite.c
CONFLICT (content): Merge conflict in board/amcc/yosemite/yosemite.c Auto-merged board/csb272/csb272.c
...
Auto-merged board/esd/ar405/ar405.c
CONFLICT (content): Merge conflict in board/esd/ar405/ar405.c Auto-merged board/esd/canbt/canbt.c
CONFLICT (content): Merge conflict in board/esd/canbt/canbt.c Auto-merged board/exbitgen/exbitgen.c
...
Auto-merged board/g2000/g2000.c
CONFLICT (content): Merge conflict in board/g2000/g2000.c Auto-merged board/gth2/gth2.c
...
Auto-merged board/purple/purple.c
CONFLICT (delete/modify): board/tqm8272/tqm8272.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/ tqm8272/tqm8272.c left in tree.
CONFLICT (delete/modify): board/tqm85xx/sdram.c deleted in HEAD and modified in Change initdram() return type to phys_size_t. Version Change initdram() return type to phys_size_t of board/tqm85xx/ sdram.c left in tree.
Auto-merged board/w7o/w7o.c
...
Auto-merged nand_spl/board/amcc/bamboo/sdram.c
CONFLICT (content): Merge conflict in nand_spl/board/amcc/bamboo/ sdram.c
Failed to merge in the changes.
Patch failed at 0001.

Quoted 1 line

Can you please rebase your patch set?

Since Becky's been under the weather today and I'm feeling generous how about this version:

http://gate.crashing.org/~galak/0001-v2-Change-initdram-return-type-to-phys_size_t.patch

It should apply clean to:

commit cdeb62e20d94005f2e80604fda03b498c3a6f704
Merge: 1859e42... ae9e97f...
Author: Wolfgang Denk <[email protected]>
Date: Wed Jun 11 22:30:47 2008 +0200

Merge branch 'master' of git://www.denx.de/git/u-boot-fdt

- k

#5 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

In message <[email protected]> you wrote:
...

Quoted 8 lines
Quoted 1 line

Can you please rebase your patch set?

Since Becky's been under the weather today and I'm feeling generous how about this version:

http://gate.crashing.org/~galak/0001-v2-Change-initdram-return-type-to-phys_size_t.patch

It should apply clean to:

Thanks, applied.

Best regards,

Wolfgang Denk

Signature · 4 lines
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
If God had a beard, he'd be a UNIX programmer.
#6 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

In reply to Kumar Gala

Bah - I thought I had updated my tree right before I sent that out. Not sure what happened here. Sorry about that, and thanks, Kumar!

-Becky

Quoted 17 lines · Kumar Gala

Since Becky's been under the weather today and I'm feeling generous how about this version:

http://gate.crashing.org/~galak/0001-v2-Change-initdram-return-type-
to-phys_size_t.patch

It should apply clean to:

commit cdeb62e20d94005f2e80604fda03b498c3a6f704
Merge: 1859e42... ae9e97f...
Author: Wolfgang Denk <[email protected]>
Date: Wed Jun 11 22:30:47 2008 +0200

Merge branch 'master' of git://www.denx.de/git/u-boot-fdt

- k

#7 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 2 lines · Becky Bruce

Bah - I thought I had updated my tree right before I sent that out. Not sure what happened here. Sorry about that, and thanks, Kumar!

Your patch was applied after he pulled all the custodian trees. So the patch probably conflicted with one (or more) of them.

Andy

#8 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 8 lines · Andy Fleming
Quoted 2 lines · Becky Bruce

Bah - I thought I had updated my tree right before I sent that out. Not sure what happened here. Sorry about that, and thanks, Kumar!

Your patch was applied after he pulled all the custodian trees. So the patch probably conflicted with one (or more) of them.

Andy

While I do not know how Wolfgang is applying patches, I might inject that adding a "-3" flag to a "git am" command might help as it will figure out some of these more complicated merges slightly better sometimes. (Wolfgang might already have done that and it still failed with conflicts, of course; I just don't know.)

HTH,
jdl

#9 lore raw

PATCH 1/4 Change initdram() return type to phys_size_t

Quoted 3 lines · In message <1213297405.5327.18.camel@ld0161-tx32> you wrote:

While I do not know how Wolfgang is applying patches, I might inject that adding a "-3" flag to a "git am"

I normally use

	git-am -3 -i -u --whitespace=strip
Quoted 2 lines

command might help as it will figure out some of these more complicated merges slightly better sometimes.

ACK.

Quoted 2 lines

(Wolfgang might already have done that and it still failed with conflicts, of course; I just don't know.)

As mentioned bfore, I pulled in a lot of other changes first that might have caused the conflicts.

Best regards,

Wolfgang Denk

Signature · 5 lines
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 have made mistakes, but have never made the mistake of  claiming  I
never made one.                                     - James G. Bennet