1 2 Previous Next 16 Replies Latest reply on Jan 5, 2018 9:07 AM by vibac_2990166 Go to original post
      • 15. Re: Changed Micron(pc28f256p33bfe i suppose) to Spansion S29GL256S10TF102 failed
        GernotH_31

        Hi Vipul,

         

        OK, that's fine. As long as the fast parameter is 0 for do_write_oneword() things should be fine. The unlock cycles will then be added automatically.

         

        The loop should decrement len by 2 at every iteration (16 bit mode is fine). If it does not then you will have to debug the code to find out where and why it does not iterate.

         

        Best regards,

        Gernot

        • 16. Re: Changed Micron(pc28f256p33bfe i suppose) to Spansion S29GL256S10TF102 failed

          Hi,

           

          Yes loop does iterate; But issue here is - it is continuously iterating as "cfi_amdstd_write()" function is called again & again. And i don't know from where its getting called as its registered as call back in "mtd->write = cfi_amdstd_write" (you can see complete file in second reply);.

           

          code snippet:

           

          static int cfi_amdstd_write (struct mtd_info *mtd, loff_t to , size_t len, size_t *retlen, const u_char *buf)

          {

          .

          .

              printk(" in cfi_amdstd_write len  [%d] \n",len);

               while(len >= CFIDEV_BUSWIDTH) {

               -

               -

              }

          .

          .

          .

          }

           

          This cfi_amdstd_write function is called again and again with values of len as 1500,8192 and so on.

          LOGs:

          Line 935:    in cfi_amdstd_write len  [1500]

          Line 8958:  in cfi_amdstd_write len  [8192]

          Line 54031:in cfi_amdstd_write len  [8192]

           

          I'm trying to find from where function is being called and why this loop is continuously repeating.

           

          Br.

          Vipul Bagga

          1 2 Previous Next