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.

board dependent mem.h



Hello,

We have several boards, based on the sitara, however, some of these boards have a different NAND flash. What I want to do, is to improve the read timings for the NAND flashes in u-boot. I've found the mem.h file, where I can set up these values. However, I've read something quite interesting:

* For every valid PRCM configuration there should be only one definition of
* the same. if values are independent of the board, this definition will be
* present in this file if values are dependent on the board, then this should
* go into corresponding mem-boardName.h file

This would imply that I could just as easily duplicate this file, place it in the configs directory and rename it to mem-<board>.h, right? Because I've done that and it doesn't seem to work. Perhaps I've placed this file in the wrong directory?

Kind regards,

Lapere Arend

  • Also, I don't seem to quite understand how to calculate the functional gpmc clock. Based upon what I find in the TRM I've come up with the following:

    CLK1_OUT = 25MHz
    M4 clk = CLK1_OUT/4
    GPMC_CLK = M4/2
    GPMC_CLK = 3.125MHz

    Which would mean that one tick lasts as long as 320ns... which doesn't seem right, according to specs I find regarding my NAND.
  • Hi Arend,

    GPMC_FCLK is typically 100MHz. It comes from the Core PLL HS Divider output CORE_CLKOUTM4 / 2, which is 200MHz, and then is further divided by 2 in the PRCM. See Figure 8-10 in the AM335X TRM Rev. K. The clock that provides GPMC_FCLK is named L3S_CLK in this figure.

  • Hi Biser,



    Thank you for the quick reply!

    As for the issue regarding the board dependent file, I've managed it by include my custom mem file in the board config, thanks to the header guards it only loads my mem settings.


    Kind regards,
    Arend