Skip to contentSkip to conversation

SPEAr: Add ARM relocation support

PATCH New Amit Virdi 4 participants 8 messages Feb 16, 2012 – Feb 18, 2012

lore
Share & tools
lore

Amit Virdi

author
#0 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

---
 board/spear/common/spr_misc.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)
board/spear/common/spr_misc.c +1 -19
index 0812c20..3ab278f 100644
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
 int dram_init(void)
 {
-	struct xloader_table *xloader_tb =
-	    (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-	struct xloader_table_1_1 *table_1_1;
-	struct xloader_table_1_2 *table_1_2;
-	struct chip_data *chip = &chip_data;
-
+	/* Store complete RAM size and return */
 	gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
-	if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-		table_1_1 = &xloader_tb->table.table_1_1;
-		chip->dramfreq = table_1_1->ddrfreq;
-		chip->dramtype = table_1_1->ddrtype;
-
-	} else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) {
-		table_1_2 = &xloader_tb->table.table_1_2;
-		chip->dramfreq = table_1_2->ddrfreq;
-		chip->dramtype = table_1_2->ddrtype;
-	} else {
-		chip->dramfreq = -1;
-	}
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.2
#1 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Quoted 36 lines
---
 board/spear/common/spr_misc.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)
board/spear/common/spr_misc.c +1 -19
index 0812c20..3ab278f 100644
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
 int dram_init(void)
 {
-	struct xloader_table *xloader_tb =
-	    (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-	struct xloader_table_1_1 *table_1_1;
-	struct xloader_table_1_2 *table_1_2;
-	struct chip_data *chip = &chip_data;
-
+	/* Store complete RAM size and return */
 	gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
-	if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-		table_1_1 = &xloader_tb->table.table_1_1;
-		chip->dramfreq = table_1_1->ddrfreq;
-		chip->dramtype = table_1_1->ddrtype;
-
-	} else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) {
-		table_1_2 = &xloader_tb->table.table_1_2;
-		chip->dramfreq = table_1_2->ddrfreq;
-		chip->dramtype = table_1_2->ddrtype;
-	} else {
-		chip->dramfreq = -1;
-	}
-
 	return 0;
 }
author
#2 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Quoted 6 lines · Marek Vasut
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

~Amit Virdi

Quoted 38 lines
Quoted 26 lines
---
  board/spear/common/spr_misc.c |   20 +-------------------
  1 files changed, 1 insertions(+), 19 deletions(-)
board/spear/common/spr_misc.c +1 -11
index 0812c20..3ab278f 100644
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
  int dram_init(void)
  {
-	struct xloader_table *xloader_tb =
-	    (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-	struct xloader_table_1_1 *table_1_1;
-	struct xloader_table_1_2 *table_1_2;
-	struct chip_data *chip =&chip_data;
-
+	/* Store complete RAM size and return */
  	gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
-	if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-		table_1_1 =&xloader_tb->table.table_1_1;
-		chip->dramfreq = table_1_1->ddrfreq;
-		chip->dramtype = table_1_1->ddrtype;
-

board/spear/common/spr_misc.c static struct chip_data chip_data; · line 47

Quoted 10 lines
board/spear/common/spr_misc.c +0 -8
-	} else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) {
-		table_1_2 =&xloader_tb->table.table_1_2;
-		chip->dramfreq = table_1_2->ddrfreq;
-		chip->dramtype = table_1_2->ddrtype;
-	} else {
-		chip->dramfreq = -1;
-	}
-
  	return 0;
  }

.

#3 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Quoted 10 lines · Marek Vasut
Quoted 5 lines
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

Then name it "fix dram size reporting?". Also, you don't need dram_init at all if you only call get_dram_size() if I recall correctly, check arch/arm/lib/board.c, I might be mistaken. And maybe explain why you removed all the code in the changelog, it's not clear at all.

Thanks!

Quoted 46 lines

~Amit Virdi

Quoted 43 lines
Quoted 40 lines

---

  board/spear/common/spr_misc.c |   20 +-------------------
  1 files changed, 1 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

b/board/spear/common/spr_misc.c index 0812c20..3ab278f 100644

board/spear/common/spr_misc.c +1 -19
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
  int dram_init(void)
  {
 
-	struct xloader_table *xloader_tb =
-	    (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-	struct xloader_table_1_1 *table_1_1;
-	struct xloader_table_1_2 *table_1_2;
-	struct chip_data *chip =&chip_data;
-
+	/* Store complete RAM size and return */
 
  	gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
-	if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-		table_1_1 =&xloader_tb->table.table_1_1;
-		chip->dramfreq = table_1_1->ddrfreq;
-		chip->dramtype = table_1_1->ddrtype;
-
-	} else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) {
-		table_1_2 =&xloader_tb->table.table_1_2;
-		chip->dramfreq = table_1_2->ddrfreq;
-		chip->dramtype = table_1_2->ddrtype;
-	} else {
-		chip->dramfreq = -1;
-	}
-
 

return 0;

Quoted 1 line
  }

.

#4 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Hello Marek,

Quoted 11 lines · Marek Vasut
Quoted 10 lines · Marek Vasut
Quoted 5 lines
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

Quoted 8 lines

Then name it "fix dram size reporting?". Also, you don't need dram_init at all
if you only call get_dram_size() if I recall correctly, check arch/arm/lib/board.c, I might be mistaken. And maybe explain why you removed all
the code in the changelog, it's not clear at all.

Thanks for your suggestions. I got your point. I'll send V2 with correct subject and clear message.

Regards
Amit Virdi

Thanks!

Quoted 53 lines
Quoted 26 lines

~Amit Virdi

Quoted 22 lines
Quoted 22 lines

---

  board/spear/common/spr_misc.c |   20 +-------------------
  1 files changed, 1 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

b/board/spear/common/spr_misc.c index 0812c20..3ab278f 100644

board/spear/common/spr_misc.c +1 -6
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
  int dram_init(void)
  {
 
-  struct xloader_table *xloader_tb =
-      (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-  struct xloader_table_1_1 *table_1_1;
-  struct xloader_table_1_2 *table_1_2;
-  struct chip_data *chip =&chip_data;
-
+  /* Store complete RAM size and return */
 
Quoted 8 lines
Quoted 8 lines

board/spear/common/spr_misc.c static struct chip_data chip_data;

Quoted 8 lines
board/spear/common/spr_misc.c +0 -6
   gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
-  if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-          table_1_1 =&xloader_tb->table.table_1_1;
-          chip->dramfreq = table_1_1->ddrfreq;
-          chip->dramtype = table_1_1->ddrtype;
-
-  } else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version)

{

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
board/spear/common/spr_misc.c +0 -7
-          table_1_2 =&xloader_tb->table.table_1_2;
-          chip->dramfreq = table_1_2->ddrfreq;
-          chip->dramtype = table_1_2->ddrtype;
-  } else {
-          chip->dramfreq = -1;
-  }
-
 
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
   return 0;
  }

.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Quoted 21 lines

Hello Marek,

Quoted 11 lines · Marek Vasut
Quoted 10 lines · Marek Vasut
Quoted 5 lines
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

Quoted 6 lines

Then name it "fix dram size reporting?". Also, you don't need dram_init at all
if you only call get_dram_size() if I recall correctly, check arch/arm/lib/board.c, I might be mistaken. And maybe explain why you removed all
the code in the changelog, it's not clear at all.

Quoted 5 lines

Thanks for your suggestions. I got your point. I'll send V2 with correct subject and clear message.

Regards
Amit Virdi

Good, thanks! :)

M

Quoted 58 lines

Thanks!

Quoted 54 lines
Quoted 26 lines

~Amit Virdi

Quoted 24 lines
Quoted 24 lines

---

  board/spear/common/spr_misc.c |   20 +-------------------
  1 files changed, 1 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

b/board/spear/common/spr_misc.c index 0812c20..3ab278f 100644

board/spear/common/spr_misc.c +1 -6
@@ -40,27 +40,9 @@ static struct chip_data chip_data;
 
  int dram_init(void)
  {
 
-  struct xloader_table *xloader_tb =
-      (struct xloader_table *)XLOADER_TABLE_ADDRESS;
-  struct xloader_table_1_1 *table_1_1;
-  struct xloader_table_1_2 *table_1_2;
-  struct chip_data *chip =&chip_data;
-
+  /* Store complete RAM size and return */
 
   gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
 
Quoted 7 lines
Quoted 7 lines

board/spear/common/spr_misc.c static struct chip_data chip_data;

Quoted 7 lines
board/spear/common/spr_misc.c +0 -6
-  if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) {
-          table_1_1 =&xloader_tb->table.table_1_1;
-          chip->dramfreq = table_1_1->ddrfreq;
-          chip->dramtype = table_1_1->ddrtype;
-
-  } else if (XLOADER_TABLE_VERSION_1_2 ==
 xloader_tb->table_version)

{

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
board/spear/common/spr_misc.c +0 -7
-          table_1_2 =&xloader_tb->table.table_1_2;
-          chip->dramfreq = table_1_2->ddrfreq;
-          chip->dramtype = table_1_2->ddrtype;
-  } else {
-          chip->dramfreq = -1;
-  }
-
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
   return 0;
  }

.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

In reply to Amit Virdi

Hi Amit,

Le 17/02/2012 05:06, Amit Virdi a ?crit :

Quoted 12 lines · Marek Vasut
Quoted 6 lines
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

So the subject *is* wrong: the patch does not add relocation support, it fixes it.

Also, please fix my e-mail address in the recipients list. Somemone has me as ... at aribaud.ne instead of "@aribaud.net", and did not notice it.

Quoted 1 line

~Amit Virdi

Amicalement,

Signature · 1 line
Albert.
#7 lore raw

PATCH 1/1 SPEAr: Add ARM relocation support

Ciao Albert,

Quoted 15 lines · Albert ARIBAUD

Hi Amit,

Le 17/02/2012 05:06, Amit Virdi a ?crit :

Quoted 10 lines · Marek Vasut
Quoted 9 lines
Quoted 1 line

Uh, are you sure the Subject correlates with the patch ?

M

Quoted 9 lines
Quoted 4 lines

Yeah. The fix is a part of the Relocation feature. For relocation, it is essential that dram_init stores RAM size and do nothing more i.e. no access to bss etc.

So the subject *is* wrong: the patch does not add relocation support, it fixes it.

Yes. I'll correct the subject and shall be sending V2.

Quoted 4 lines

Also, please fix my e-mail address in the recipients list. Somemone has me as ... at aribaud.ne instead of "@aribaud.net", and did not notice it.

Sure!!

Regards
Amit Virdi