1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef EMMC_API_H
- #define EMMC_API_H
- #include "bcm_emmc.h"
- #include "emmc_pboot_hal_memory_drv.h"
- #ifdef INCLUDE_EMMC_DRIVER_ERASE_CODE
- #define EMMC_ERASE_START_BLOCK 0x0
- #define EMMC_ERASE_BLOCK_COUNT 0x1
- #define EMMC_ERASE_USER_AREA 0
- #define EMMC_ERASE_BOOT_PARTITION1 1
- #define EMMC_ERASE_BOOT_PARTITION2 2
- #define EMMC_ERASE_PARTITION EMMC_ERASE_USER_AREA
- #endif
- uint32_t bcm_emmc_init(bool card_rdy_only);
- void emmc_deinit(void);
- #ifdef INCLUDE_EMMC_DRIVER_ERASE_CODE
- int emmc_erase(uintptr_t mem_addr, size_t num_of_blocks, uint32_t partition);
- #endif
- uint32_t emmc_partition_select(uint32_t partition);
- uint32_t emmc_read(uintptr_t mem_addr, uintptr_t storage_addr,
- size_t storage_size, size_t bytes_to_read);
- uint32_t emmc_write(uintptr_t mem_addr, uintptr_t data_addr,
- size_t bytes_to_write);
- #endif
|