Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add spi flash update #54

Merged
merged 6 commits into from
Aug 25, 2023
Merged

add spi flash update #54

merged 6 commits into from
Aug 25, 2023

Conversation

jc849
Copy link
Collaborator

@jc849 jc849 commented Aug 25, 2023

  1. add spim driver
  2. add npcm4xx flash update
  3. add spip flash update
  4. increase i2c dma buffer size
  5. add i2c ipmb slave driver from OpenBIC framework
  6. remove wrong fix patch.

cpchiang added 6 commits August 22, 2023 22:37
add spim driver for npcm4xx internal flash.

CONFIG_XIP means system running code in the spi flash, in this use
case run code should locate in the RAM(SRAM).

disable regular exceptions interrupt when access internal flash, but
NMI, faults, or other interrupts that priority higher than BASEPRI
still have the ability to trigger in this time.

call npcm4xx_vector_table_save/restore() to replace/restore VTOR, so
CPU could fetch vector table from ram(sram) when interrupt happened.

1. spim driver only support single read/write mode spi flash access.
2. separate header.c to header file and source code.
3. when enable CONFIG_XIP, cannot write execution code space.
4. add sram vector table to replace VTOR when call save/restore API.
5. rename fiu driver structure naming.

Signed-off-by: cpchiang <[email protected]>
add npcm4xx firmware update when enable CONFIG_XIP.

1. add below API to support update firmware through running system.
   (1) external API: npcm4xx_set_update_fw_spi_nor_address()
       use for upper layer(like user space) to setting new firmware
       image location and write bitmap.
       SPI_NOR_SECTOR_SIZE per bit for write bitmap.

   (2) internal hook API: npcm4xx_spi_nor_set_update_fw_address()
       use for npcm4xx_set_update_fw_spi_nor_address() to call.

   (3) internal hook API: npcm4xx_spi_nor_do_fw_update()
       use for firmware update, the API will call when system reboot.

spim driver depend on write bitmap(default update all) to write new
firmware image to internel flash boot up space.

Signed-off-by: cpchiang <[email protected]>
increase npcm4xx i2c tx/rx dma buffer size.

for ipmb slave, max need 256 bytes.

Signed-off-by: cpchiang <[email protected]>
add ipmb slave driver from openbic framework.

fix ipmb_slave_read() may received wrong data if buffer not ready.

Signed-off-by: cpchiang <[email protected]>
add npcm4xx spip driver to support spi flash access.

only support single mode read/write spi command.

increase main stack size to 4096 to match openbic reference platform.

Signed-off-by: cpchiang <[email protected]>
rollback code to native framework.

Signed-off-by: cpchiang <[email protected]>
@maxdog988 maxdog988 merged commit 5b3e264 into Nuvoton-Israel:npcm-v2.6 Aug 25, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants