MPC8313ERDB Board, Align u-boot for large page

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC8313ERDB Board, Align u-boot for large page

Jump to solution
487 Views
Contributor I

Hello all,

I am working on a project which employs MPC8313E processor. For reference I have MPC8313ERDB board available with me.

Similar to the EVM, there is a NAND on the custom board I am working on, but the custom board NAND is of large page NAND(Page Size  = 2048 bytes) as compared to the small page NAND(Page Size  = 512 bytes) on the EVM. The requirement is to boot from NAND. Hence the u-boot resides on the NAND.

My understanding is nand-spl resides on block 0 of the NAND, and rest of the u-boot resides on block 1, hence we need to align the two properly.

My query is what is the appropriate way to make the changes as per alignment of u-boot spl and main u-boot is concerned, i.e. with respect to small page NAND and large page NAND?

In the file board/freescale/mpc8313erdb/u-boot-nand.lds there is a section, line 51:

          /* Align to next NAND block */

          . = ALIGN(0x4000);

I know very less about assembler and linker internals, but does this section have any relevance? For RDB Board, 512 x 32 = 0x4000. So for our board 2048 x 64 = 0x20000.

Please suggest.

Regards

Sujan Nag

Tags (3)
0 Kudos
1 Solution
47 Views
NXP Employee
NXP Employee

It's not really necessary for the SPL payload to be aligned to the block size -- we don't do so on many of our 85xx targets, such as MPC8572DS.  Instead, you can set CONFIG_SYS_NAND_U_BOOT_OFFS to 0 and adjust CONFIG_SYS_NAND_U_BOOT_START to point to the offset of the payload entry point relative to the beginning of flash.  What matters is that CONFIG_SYS_NAND_U_BOOT_OFFS point to the beginning of a block.

View solution in original post

0 Kudos
2 Replies
48 Views
NXP Employee
NXP Employee

It's not really necessary for the SPL payload to be aligned to the block size -- we don't do so on many of our 85xx targets, such as MPC8572DS.  Instead, you can set CONFIG_SYS_NAND_U_BOOT_OFFS to 0 and adjust CONFIG_SYS_NAND_U_BOOT_START to point to the offset of the payload entry point relative to the beginning of flash.  What matters is that CONFIG_SYS_NAND_U_BOOT_OFFS point to the beginning of a block.

View solution in original post

0 Kudos
47 Views
Contributor I

Hello,

I was able to solve the above issue, but sorry to say, I was looking into the wrong file.

I made some changes in the following file:

  • cpu/mpc83xx/u-boot.lds
    • changed ALIGN(16) to ALIGN(128) in cpu/mpc83xx/start.o section
  • nand_spl/board/freescale/mpc8313erdb/config.mk
  • changed PAD_TO = 0xFFF04000 to PAD_TO  = 0xFFF20000 for large page support.

    After "make" I was able to view the file in hex edit and verify that the padding have been done properly.

    Is it enough for my above mentioned requirement, or I am missing on something.

    Please suggest.

    Regards

    Sujan Nag

0 Kudos