Ignore:
Timestamp:
05/24/23 19:53:58 (6 months ago)
Author:
Kinsey Moore <kinsey.moore@…>
Branches:
master
Children:
ea27ada
Parents:
7a14c3df
git-author:
Kinsey Moore <kinsey.moore@…> (05/24/23 19:53:58)
git-committer:
Joel Sherrill <joel@…> (06/08/23 14:48:44)
Message:

bsps/xqspipsu: Use device information from the FCT

Instead of statically defining the device parameters, use the device
information available via the NOR device layer's Flash Configuration
Table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/aarch64/xilinx-zynqmp/jffs2_xqspipsu.c

    r7a14c3df r09fd5dd3  
    3939} flash_control;
    4040
    41 /* From the N25Q512A datasheet */
    42 #define BLOCK_SIZE (64UL * 1024UL)
    43 #define FLASH_SIZE (1024UL * BLOCK_SIZE)
    4441#define FLASH_DEVICE_ID 0xbb20 /* Type: 0xbb, Capacity: 0x20 */
    4542
     
    118115    QspiPsuPtr,
    119116    offset,
    120     BLOCK_SIZE
     117    super->block_size
    121118  );
    122119  if ( Status != XST_SUCCESS ) {
     
    140137static flash_control flash_instance = {
    141138  .super = {
    142     .block_size        = BLOCK_SIZE,
    143     .flash_size        = FLASH_SIZE,
    144139    .read              = do_read,
    145140    .write             = do_write,
     
    172167  }
    173168
     169  uint32_t sect_size = QspiPsu_NOR_Get_Sector_Size(qspipsu_ptr);
     170  uint32_t flash_size = QspiPsu_NOR_Get_Device_Size(qspipsu_ptr);
     171  flash_instance.super.flash_size = flash_size;
     172  flash_instance.super.block_size = sect_size;
     173
    174174  rv = mount(
    175175    NULL,
Note: See TracChangeset for help on using the changeset viewer.