dataflash: fix a problem with the last partition
PATCH 1/1 dataflash: fix a problem with the last partition
This patch fix the problem that only the [NB_DATAFLASH_AREA -1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.
--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/dataflash.c +2 -2
@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)break ; }/* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1 ].end = + dataflash_info[i].end_address = (dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size)-1 ;
@@ -146,7 +146,7 @@ int AT91F_DataflashInit (void)if (area_list[part].end ==0xffffffff ) { dataflash_info[i].Device.area_list[j].end = dataflash_info[i].end_address + - dataflash_info [i].logical_address; + dataflash_info[i].logical_address; last_part =1 ; }else { dataflash_info[i].Device.area_list[j].end =
Signature · 1 line
1.5.2.2
PATCH 1/1 dataflash: fix a problem with the last partition
drivers/mtd/dataflash.c
Quoted 12 lines · Ilko Iliev
This patch fix the problem that only the [
NB_DATAFLASH_AREA-1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/mtd/dataflash.c +0
-0
Who is supposed to handle this one?
Stefan is it you?
Best Regards,
J.
PATCH 1/1 dataflash: fix a problem with the last partition
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 10 lines · Ilko Iliev
This patch fix the problem that only the [
NB_DATAFLASH_AREA-1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
drivers/mtd/dataflash.c
Quoted 4 lines
drivers/mtd/dataflash.c +0
-0Who is supposed to handle this one?
Stefan is it you?
I don't feel responsible for dataflash. I think it would be best if this would go in via Wolfgang directly.
Wolfgang, what do you think?
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
=====================================================================
PATCH 1/1 dataflash: fix a problem with the last partition
Dear Stefan Roese,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 8 lines
drivers/mtd/dataflash.c
Quoted 5 lines
drivers/mtd/dataflash.c +0
-0Who is supposed to handle this one?
Quoted 6 lines
Quoted 1 line
Stefan is it you?
I don't feel responsible for dataflash. I think it would be best if this would go in via Wolfgang directly.
Wolfgang, what do you think?
I tend to use a broad view summarizing all types of flash based storage devices (NAND, OneNAND, Dataflash, etc.). As such, I would see this on Scott's desk...
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 C++ is the best example of second-system effect since OS/360.
PATCH 1/1 dataflash: fix a problem with the last partition
Quoted 8 lines · Wolfgang Denk
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
drivers/mtd/dataflash.c
Quoted 4 lines
drivers/mtd/dataflash.c +0
-0Who is supposed to handle this one?
Stefan is it you?
Quoted 8 lines
Quoted 4 lines
I don't feel responsible for dataflash. I think it would be best if this would go in via Wolfgang directly.
Wolfgang, what do you think?
I tend to use a broad view summarizing all types of flash based storage devices (NAND, OneNAND, Dataflash, etc.). As such, I would see this on Scott's desk...
I barely have enough time to keep up with NAND, I know nothing about dataflash and have no hardware to test anything on, and there's no shared code. As such, I'm not sure that there's any point in routing the patches through me.
-Scott
PATCH 1/1 dataflash: fix a problem with the last partition
Dear Scott Wood,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 4 lines
I tend to use a broad view summarizing all types of flash based storage devices (NAND, OneNAND, Dataflash, etc.). As such, I would see this on Scott's desk...
I barely have enough time to keep up with NAND, I know nothing about dataflash and have no hardware to test anything on, and there's no shared code. As such, I'm not sure that there's any point in routing the patches through me.
Me too.
Is there anybody around volunteering to become custodian for Dataflash support?
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 Bus error -- please leave by the rear door.
PATCH 1/1 dataflash: fix a problem with the last partition
Quoted 13 lines · Wolfgang Denk
Dear Scott Wood,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 4 lines
I tend to use a broad view summarizing all types of flash based storage devices (NAND, OneNAND, Dataflash, etc.). As such, I would see this on Scott's desk...
I barely have enough time to keep up with NAND, I know nothing about dataflash and have no hardware to test anything on, and there's no shared code. As such, I'm not sure that there's any point in routing the patches through me.
Quoted 4 lines
Me too.
Is there anybody around volunteering to become custodian for Dataflash support?
If we can keep it with AT91?
Nearly all at91 ref board had dataflash
Best Regards,
J.
PATCH 1/1 dataflash: fix a problem with the last partition
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Is there anybody around volunteering to become custodian for Dataflash support?
If we can keep it with AT91?
Nearly all at91 ref board had dataflash
Does that mean you want to take that duty as part of the AT91 custodianship? In addition to al what you already have heaped on your plate?
Best regards,
Wolfgang Denk
Signature · 6 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 Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. - Ambrose Bierce
PATCH 1/1 dataflash: fix a problem with the last partition
In reply to Jean-Christophe PLAGNIOL-VILLARDDear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 9 lines
This patch fix the problem that only the [
NB_DATAFLASH_AREA-1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 5 lines
drivers/mtd/dataflash.c
Quoted 4 lines
drivers/mtd/dataflash.c +0
-0Who is supposed to handle this one?
Now that you claimed responsibility for dataflash code, could you please add it and/or provide feedback to the submitter?
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 Q: Why do mountain climbers rope themselves together? A: To prevent the sensible ones from going home.
PATCH 1/1 dataflash: fix a problem with the last partition
Quoted 12 lines · Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 9 lines
This patch fix the problem that only the [
NB_DATAFLASH_AREA-1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 5 lines
drivers/mtd/dataflash.c
Quoted 4 lines
drivers/mtd/dataflash.c +0
-0Who is supposed to handle this one?
Now that you claimed responsibility for dataflash code, could you please add it and/or provide feedback to the submitter?
I'll hope when can found a MMC/SD/DATAFLASH Maintainer
Best Regards,
J.
PATCH 1/1 dataflash: fix a problem with the last partition
In reply to Ilko IlievQuoted 2 lines · Ilko Iliev
This patch fix the problem that only the [
NB_DATAFLASH_AREA-1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.
please limit to 80 Chars
Quoted 20 lines
Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/mtd/dataflash.c +1
-1@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)break ; }/* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1 ].end = + dataflash_info[i].end_address = (dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size)-1 ;
drivers/mtd/dataflash.c int AT91F_DataflashInit (void) · line 149
Quoted 5 lines
drivers/mtd/dataflash.c +1
-1@@ -146,7 +146,7 @@ int AT91F_DataflashInit (void)if (area_list[part].end ==0xffffffff ) { dataflash_info[i].Device.area_list[j].end = dataflash_info[i].end_address + - dataflash_info [i].logical_address; + dataflash_info[i].logical_address;
please spit in 2 one for coding style fix and one for modification and btw maybe fix all coding style violation?
as space before and after '-' & co, etc...
drivers/mtd/dataflash.c int AT91F_DataflashInit (void) · line 152
Quoted 3 lines
drivers/mtd/dataflash.c +0
-0last_part =1 ; }else { dataflash_info[i].Device.area_list[j].end =
Best Regards,
J.
PATCH 1/1 fix some coding style violations.
This patch fix some coding style violations.
--- drivers/mtd/dataflash.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-)
drivers/mtd/dataflash.c +12 -13
@@ -131,14 +131,14 @@ int AT91F_DataflashInit (void)break ; }/* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1 ].end = + area_list[NB_DATAFLASH_AREA -1 ].end = (dataflash_info[i].Device.pages_number * - dataflash_info[i].Device.pages_size)-1 ; + dataflash_info[i].Device.pages_size) -1 ; part =0 ; last_part =0 ;/* set the area addresses */ -for (j =0 ; j<NB_DATAFLASH_AREA ; j++) { +for (j =0 ; j <NB_DATAFLASH_AREA ; j++) {if (found[i]!=0 ) { dataflash_info[i].Device.area_list[j].start = area_list[part].start +
@@ -146,7 +146,7 @@ int AT91F_DataflashInit (void)if (area_list[part].end ==0xffffffff ) { dataflash_info[i].Device.area_list[j].end = dataflash_info[i].end_address + - dataflash_info [i].logical_address; + dataflash_info[i].logical_address; last_part =1 ; }else { dataflash_info[i].Device.area_list[j].end =
@@ -180,12 +180,11 @@ void AT91F_DataflashSetEnv (void)unsigned long start;for (i =0 , part=0 ; i <CONFIG_SYS_MAX_DATAFLASH_BANKS ; i++) { -for (j =0 ; j<NB_DATAFLASH_AREA ; j++) { +for (j =0 ; j <NB_DATAFLASH_AREA ; j++) { env = area_list[part].setenv;/* Set the environment according to the label...*/ if ((env &FLAG_SETENV ) ==FLAG_SETENV ) { - start = - dataflash_info[i].Device.area_list[j].start; + start = dataflash_info[i].Device.area_list[j].start;sprintf ((char *) s,"%lX" ,start);setenv ((char *) area_list[part].label,(char *) s); }
@@ -230,7 +229,7 @@ void dataflash_print_info (void) (unsigned int ) dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size, (unsigned int) dataflash_info[i].logical_address); -for (j=0 ; j<NB_DATAFLASH_AREA ; j++) { +for (j =0 ; j <NB_DATAFLASH_AREA ; j++) {switch (dataflash_info[i].Device.area_list[j].protected) {case FLAG_PROTECT_SET :case FLAG_PROTECT_CLEAR :
@@ -322,7 +321,7 @@ int prot_dataflash (AT91PS_DataFlash pdataFlash, unsigned long addr)int area;/* find area */ -for (area=0 ; area <NB_DATAFLASH_AREA ; area++) { +for (area =0 ; area <NB_DATAFLASH_AREA ; area++) {if ((addr >= pdataFlash->pDevice->area_list[area].start) && (addr < pdataFlash->pDevice->area_list[area].end))break ;
@@ -360,13 +359,13 @@ int dataflash_real_protect (int flag, unsigned long start_addr,return -1 ; }/* find start area */ -for (area1=0 ; area1 <NB_DATAFLASH_AREA ; area1++) { +for (area1 =0 ; area1 <NB_DATAFLASH_AREA ; area1++) {if (start_addr == dataflash_info[i].Device.area_list[area1].start)break ; }if (area1 ==NB_DATAFLASH_AREA )return -1 ;/* find end area */ -for (area2=0 ; area2 <NB_DATAFLASH_AREA ; area2++) { +for (area2 =0 ; area2 <NB_DATAFLASH_AREA ; area2++) {if (end_addr == dataflash_info[i].Device.area_list[area2].end)break ; }
@@ -374,7 +373,7 @@ int dataflash_real_protect (int flag, unsigned long start_addr,return -1 ;/*set protection value*/ -for (j = area1; j < area2+1 ; j++) +for (j = area1; j < area2 +1 ; j++)if (dataflash_info[i].Device.area_list[j].protected !=FLAG_PROTECT_INVALID ) {if (flag ==0 ) {
@@ -386,7 +385,7 @@ int dataflash_real_protect (int flag, unsigned long start_addr, } } -return (area2-area1+1 ); +return (area2 - area1 +1 ); }/*---------------------------------------------------------------------------*/
Signature · 1 line
1.5.2.2
PATCH 1/1 fix some coding style violations.
Quoted 7 lines · Ilko Iliev
This patch fix some coding style violations.
Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-)
Applied to u-boot-at91
Best Regards,
J.
PATCH 1/1 mtd/dataflash.c: fix a problem with the last partition
In reply to Jean-Christophe PLAGNIOL-VILLARDThis patch fix the problem that only the [NB_DATAFLASH_AREA - 1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.
--- drivers/mtd/dataflash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/dataflash.c +1 -1
@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)break ; }/* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1 ].end = + dataflash_info[i].end_address = (dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size) -1 ;
Signature · 1 line
1.5.2.2
PATCH 1/1 mtd/dataflash.c: fix a problem with the last partition
Quoted 10 lines · Ilko Iliev
This patch fix the problem that only the [
NB_DATAFLASH_AREA- 1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size.Signed-off-by Ilko Iliev <[email protected]>--- drivers/mtd/dataflash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to u-boot-at91
Best Regards,
J.