@@ -710,12 +710,12 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
710
710
int ecc_steps = chip -> ecc .steps ;
711
711
int ecc_size = chip -> ecc .size ;
712
712
int ecc_bytes = chip -> ecc .bytes ;
713
- void * dma_buf = denali -> buf ;
713
+ void * tmp_buf = denali -> buf ;
714
714
int oob_skip = denali -> oob_skip_bytes ;
715
715
size_t size = writesize + oobsize ;
716
716
int ret , i , pos , len ;
717
717
718
- ret = denali_data_xfer (denali , dma_buf , size , page , 1 , 0 );
718
+ ret = denali_data_xfer (denali , tmp_buf , size , page , 1 , 0 );
719
719
if (ret )
720
720
return ret ;
721
721
@@ -730,11 +730,11 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
730
730
else if (pos + len > writesize )
731
731
len = writesize - pos ;
732
732
733
- memcpy (buf , dma_buf + pos , len );
733
+ memcpy (buf , tmp_buf + pos , len );
734
734
buf += len ;
735
735
if (len < ecc_size ) {
736
736
len = ecc_size - len ;
737
- memcpy (buf , dma_buf + writesize + oob_skip ,
737
+ memcpy (buf , tmp_buf + writesize + oob_skip ,
738
738
len );
739
739
buf += len ;
740
740
}
@@ -745,7 +745,7 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
745
745
uint8_t * oob = chip -> oob_poi ;
746
746
747
747
/* BBM at the beginning of the OOB area */
748
- memcpy (oob , dma_buf + writesize , oob_skip );
748
+ memcpy (oob , tmp_buf + writesize , oob_skip );
749
749
oob += oob_skip ;
750
750
751
751
/* OOB ECC */
@@ -758,19 +758,19 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
758
758
else if (pos + len > writesize )
759
759
len = writesize - pos ;
760
760
761
- memcpy (oob , dma_buf + pos , len );
761
+ memcpy (oob , tmp_buf + pos , len );
762
762
oob += len ;
763
763
if (len < ecc_bytes ) {
764
764
len = ecc_bytes - len ;
765
- memcpy (oob , dma_buf + writesize + oob_skip ,
765
+ memcpy (oob , tmp_buf + writesize + oob_skip ,
766
766
len );
767
767
oob += len ;
768
768
}
769
769
}
770
770
771
771
/* OOB free */
772
772
len = oobsize - (oob - chip -> oob_poi );
773
- memcpy (oob , dma_buf + size - len , len );
773
+ memcpy (oob , tmp_buf + size - len , len );
774
774
}
775
775
776
776
return 0 ;
@@ -841,7 +841,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
841
841
int ecc_steps = chip -> ecc .steps ;
842
842
int ecc_size = chip -> ecc .size ;
843
843
int ecc_bytes = chip -> ecc .bytes ;
844
- void * dma_buf = denali -> buf ;
844
+ void * tmp_buf = denali -> buf ;
845
845
int oob_skip = denali -> oob_skip_bytes ;
846
846
size_t size = writesize + oobsize ;
847
847
int i , pos , len ;
@@ -851,7 +851,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
851
851
* This simplifies the logic.
852
852
*/
853
853
if (!buf || !oob_required )
854
- memset (dma_buf , 0xff , size );
854
+ memset (tmp_buf , 0xff , size );
855
855
856
856
/* Arrange the buffer for syndrome payload/ecc layout */
857
857
if (buf ) {
@@ -864,11 +864,11 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
864
864
else if (pos + len > writesize )
865
865
len = writesize - pos ;
866
866
867
- memcpy (dma_buf + pos , buf , len );
867
+ memcpy (tmp_buf + pos , buf , len );
868
868
buf += len ;
869
869
if (len < ecc_size ) {
870
870
len = ecc_size - len ;
871
- memcpy (dma_buf + writesize + oob_skip , buf ,
871
+ memcpy (tmp_buf + writesize + oob_skip , buf ,
872
872
len );
873
873
buf += len ;
874
874
}
@@ -879,7 +879,7 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
879
879
const uint8_t * oob = chip -> oob_poi ;
880
880
881
881
/* BBM at the beginning of the OOB area */
882
- memcpy (dma_buf + writesize , oob , oob_skip );
882
+ memcpy (tmp_buf + writesize , oob , oob_skip );
883
883
oob += oob_skip ;
884
884
885
885
/* OOB ECC */
@@ -892,22 +892,22 @@ static int denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
892
892
else if (pos + len > writesize )
893
893
len = writesize - pos ;
894
894
895
- memcpy (dma_buf + pos , oob , len );
895
+ memcpy (tmp_buf + pos , oob , len );
896
896
oob += len ;
897
897
if (len < ecc_bytes ) {
898
898
len = ecc_bytes - len ;
899
- memcpy (dma_buf + writesize + oob_skip , oob ,
899
+ memcpy (tmp_buf + writesize + oob_skip , oob ,
900
900
len );
901
901
oob += len ;
902
902
}
903
903
}
904
904
905
905
/* OOB free */
906
906
len = oobsize - (oob - chip -> oob_poi );
907
- memcpy (dma_buf + size - len , oob , len );
907
+ memcpy (tmp_buf + size - len , oob , len );
908
908
}
909
909
910
- return denali_data_xfer (denali , dma_buf , size , page , 1 , 1 );
910
+ return denali_data_xfer (denali , tmp_buf , size , page , 1 , 1 );
911
911
}
912
912
913
913
static int denali_write_page (struct mtd_info * mtd , struct nand_chip * chip ,
0 commit comments