]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/dataflash.c
omap3_spi: introduce CONFIG_OMAP3_SPI_D0_D1_SWAPPED
[u-boot] / drivers / mtd / dataflash.c
index 58be18255478777169b76994e052f66ee9091ce2..981ccd5b4b1ce697ef26d884d0e90bf6d1ad0a84 100644 (file)
@@ -39,7 +39,6 @@ int AT91F_DataflashInit (void)
        int i, j;
        int dfcode;
        int part;
-       int last_part;
        int found[CONFIG_SYS_MAX_DATAFLASH_BANKS];
        unsigned char protected;
 
@@ -131,12 +130,11 @@ 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;
 
                part = 0;
-               last_part = 0;
                /* set the area addresses */
                for(j = 0; j < NB_DATAFLASH_AREA; j++) {
                        if(found[i]!=0) {
@@ -147,7 +145,6 @@ int AT91F_DataflashInit (void)
                                        dataflash_info[i].Device.area_list[j].end =
                                                dataflash_info[i].end_address +
                                                dataflash_info[i].logical_address;
-                                       last_part = 1;
                                } else {
                                        dataflash_info[i].Device.area_list[j].end =
                                                area_list[part].end +