Skip to contentSkip to conversation

mtd/dataflash.c: fix a problem with the last partition

PATCH New Ilko Iliev 2 participants 3 messages Oct 22, 2008 – Oct 27, 2008 Memory technology devices (MTD)

lore
Share & tools
lore

Ilko Iliev

author
#0 lore raw

PATCH 1/1 mtd/dataflash.c: 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.

index 201e518..43746e7 100644

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;
 
@@ -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 · 6 lines
Mit freundlichen Gr??en/With best regards,
Ilko Iliev
Ronetix Development Tools GmbH
CPU Modules, JTAG/BDM Emulators and Flash Programmers
Waidhausenstrasse 13/5, 1140 Vienna, Austria
E-Mail: iliev at ronetix.at; Web: www.ronetix.at
#1 lore raw

PATCH 1/1 mtd/dataflash.c: fix a problem with the last partition

Quoted 8 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.

you patch is corrupted by your mailler
please use git-send-email instead

Best Regards,
J.

author
#2 lore raw

PATCH 1/1 mtd/dataflash.c: fix a problem with the last partition

Dear Jean-Christophe,

Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 6 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.

Quoted 9 lines
Quoted 3 lines

you patch is corrupted by your mailler
please use git-send-email instead

Best Regards,
J.

I sent it again with git-send-email.

Signature · 6 lines
Mit freundlichen Gr??en/With best regards,
Ilko Iliev
Ronetix Development Tools GmbH
CPU Modules, JTAG/BDM Emulators and Flash Programmers
Waidhausenstrasse 13/5, 1140 Vienna, Austria
E-Mail: iliev at ronetix.at; Web: www.ronetix.at