This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM385: Nand Prefetch read in uboot (ipnc rdk 3.5)

Part Number: DM385

Hi,

When i use nand read (uboot) in custom DM385 with IPNC RDK 3.5, the speed of operation is very slow.

For fast read we use GPMC prefetch read, I applied below patch (attached).

In omap_nand_read_buf function()

Its  hang when *buf++ = *(volatile uint8_t *)(nand_fifo_add); instruction execting.

Is there any memory access issue because when i try to read that memory only hangs?

Regards,

RAJ M

5165.prefetch_nand_read.tar.gz

  • Hello,

    The patch which is applied is not a patch file can you attach it properly so that its easier to guide.

    Cheers,
    --Prabhakar Lad
  • Hello,

    Now i have attached properly.

    If you still face problem to apply patch try it apply manually.

    Regards,

    RAJ M

    prefetch_nand_read.patch.tar.gz

  • Hello,

    Can you try changing the macro "PISMO1_NAND_SIZE GPMC_SIZE_256M" to "PISMO1_NAND_SIZE GPMC_SIZE_16M" which is in arch/arm/include/asm/arch-ti81xx/mem.h

    Cheers,
    --Prabhakar Lad
  • Hello,

    Thanks for the reply.

    After changing "PISMO1_NAND_SIZE GPMC_SIZE_16M.  Now  I can read but still the time is not improved both prefetch and default read took same time for reading image from nand.

    Below is my log for reference

    [0.000001 0.000001]
    [0.000111 0.000110] U-Boot 2010.06 (Jan 18 2017 - 10:23:06) DM385_IPNC_3.50.00
    [0.003783 0.003672]
    [0.005940 0.002157] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (Spansion/AMD NAND 128MiB 3,3V 8-bit)
    [0.013199 0.007259]
    [0.014948 0.001749]
    [0.015019 0.000071]
    [0.015069 0.000050] NAND read: device 0 offset 0x20000, size 0x1e000
    [0.307967 0.292898]  122880 bytes read: OK
    [0.313943 0.005976]
    [0.314000 0.000057] U-Boot 2010.06 (Jan 09 2017 - 20:04:24) DM385_IPNC_3.50.00
    [0.325943 0.011943]
    [0.325998 0.000055] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (Spansion/AMD NAND 128MiB 3,3V 8-bit)
    [0.333900 0.007902]
    [0.838992 0.505092]
    [0.840940 0.001948]
    [0.840983 0.000043] Loading from NAND 128MiB 3,3V 8-bit, offset 0x280000
    [0.846919 0.005936]    Image Name:   Linux-2.6.37_DM385_CARDVR_3.50.0
    [0.850596 0.003677]    Image Type:   ARM Linux Kernel Image (uncompressed)
    [0.856333 0.005737]    Data Size:    1763436 Bytes = 1.7 MiB
    [0.859676 0.003343]    Load Address: 80008000
    [0.864342 0.004666]    Entry Point:  80008000
    [2.459966 1.595624] ## Booting kernel from Legacy Image at 80007fc0 ...

    Also this is gpmc config is it ok?

    #define M_NAND_GPMC_CONFIG1     0x00001800      
    #define M_NAND_GPMC_CONFIG2     0x00060600      
    #define M_NAND_GPMC_CONFIG3     0x00060601      
    #define M_NAND_GPMC_CONFIG4     0x04010401      
    #define M_NAND_GPMC_CONFIG5     0x00040506      
    #define M_NAND_GPMC_CONFIG6     0x04000580      
    #define M_NAND_GPMC_CONFIG7     0x00000008

    GPMC clock frequency

    #define L3_M            (opp_val_dm385(800, 800))

    Regards,

    RAJ M

  • Hello,

    can you try with below settings:


           #define M_NAND_GPMC_CONFIG1 0x00001800
           #define M_NAND_GPMC_CONFIG2 0x00070700
           #define M_NAND_GPMC_CONFIG3 0x00070700
           #define M_NAND_GPMC_CONFIG4 0x05000400
           #define M_NAND_GPMC_CONFIG5 0x00040707
           #define M_NAND_GPMC_CONFIG6 0x16000000
           #define M_NAND_GPMC_CONFIG7 0x00000008

    Cheers,

    --Prabhakar Lad

  • Hello,

    Now very little bit improved

    [0.012799 0.007870]
    [0.014941 0.002142]
    [0.015012 0.000071]
    [0.015067 0.000055] NAND read: device 0 offset 0x20000, size 0x1e000
    [0.219974 0.204907]  122880 bytes read: OK
    [0.225948 0.005974]
    [0.226007 0.000059] U-Boot 2010.06 (Jan 19 2017 - 10:29:49) DM385_IPNC_3.50.00
    [0.237944 0.011937]
    [0.238004 0.000060] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (Spansion/AMD NAND 128MiB 3,3V 8-bit)
    [0.245884 0.007880]
    [0.660998 0.415114]
    [0.662946 0.001948]
    [0.663011 0.000065] Loading from NAND 128MiB 3,3V 8-bit, offset 0x280000
    [0.668925 0.005914]    Image Name:   Linux-2.6.37_DM385_CARDVR_3.50.0
    [0.672544 0.003619]    Image Type:   ARM Linux Kernel Image (uncompressed)
    [0.678300 0.005756]    Data Size:    1763436 Bytes = 1.7 MiB
    [0.680356 0.002056]    Load Address: 80008000
    [0.683306 0.002950]    Entry Point:  80008000
    [2.166973 1.483667] ## Booting kernel from Legacy Image at 80007fc0 ...

    Regards,

    RAJ M