#include <boot_device.h>
#include <cbfs.h>
#include <symbols.h>
#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/spi.h>
#include <soc/clock.h>
#include <console/console.h>
#include <spi_sdcard.h>
Go to the source code of this file.
◆ MSEL_SPI0x1
#define MSEL_SPI0x1 |
( |
|
m | ) |
(((m) == 5) || ((m) == 14)) |
◆ MSEL_SPI0x4
#define MSEL_SPI0x4 |
( |
|
m | ) |
(((m) == 6) || ((m) == 10) || ((m) == 15)) |
◆ MSEL_SPI1SD
#define MSEL_SPI1SD |
( |
|
m | ) |
((m) == 8) |
◆ MSEL_SPI1x1
#define MSEL_SPI1x1 |
( |
|
m | ) |
((m) == 12) |
◆ MSEL_SPI1x4
#define MSEL_SPI1x4 |
( |
|
m | ) |
(((m) == 7) || ((m) == 13)) |
◆ MSEL_SPI2SD
#define MSEL_SPI2SD |
( |
|
m | ) |
((m) == 11) |
◆ MSEL_SPI2x1
#define MSEL_SPI2x1 |
( |
|
m | ) |
((m) == 9) |
◆ boot_device_init()
Definition at line 70 of file media.c.
References card, die(), FU540_MSEL, fu540_spi_mmap(), m, MSEL_SPI0x1, MSEL_SPI0x4, MSEL_SPI2SD, read32(), slave, spi_mmap_config, spi_sdcard_init(), and spi_setup_slave().
◆ boot_device_ro()
Definition at line 48 of file media.c.
References die(), FU540_MSEL, m, MSEL_SPI0x1, MSEL_SPI0x4, MSEL_SPI2SD, NULL, mem_region_device::rdev, mmap_helper_region_device::rdev, read32(), sd_mdev, and spi_mdev.
◆ unleashed_sd_readat()
◆ card
Definition at line 1 of file media.c.
Referenced by boot_device_init(), spi_sdcard_disable_cs(), spi_sdcard_do_app_command(), spi_sdcard_do_command(), spi_sdcard_do_command_help(), spi_sdcard_enable_cs(), spi_sdcard_erase(), spi_sdcard_erase_all(), spi_sdcard_init(), spi_sdcard_multiple_read(), spi_sdcard_multiple_write(), spi_sdcard_read(), spi_sdcard_recvbyte(), spi_sdcard_sendbyte(), spi_sdcard_single_read(), spi_sdcard_single_write(), and spi_sdcard_size().
◆ sd_mdev
Initial value:=
struct mem_pool cbfs_cache
#define MMAP_HELPER_DEV_INIT(ops_, offset_, size_, mpool_)
Definition at line 32 of file media.c.
Referenced by boot_device_ro().
◆ spi_mdev
Initial value:=
#define MEM_REGION_DEV_RO_INIT(base_, size_)
Definition at line 1 of file media.c.
Referenced by boot_device_ro().
◆ spi_mmap_config
Initial value:= {
.cmd_en = 1,
.addr_len = 4,
.pad_cnt = 6,
.cmd_code = 0xec,
.pad_code = 0
}
#define FU540_SPI_PROTO_Q
#define FU540_SPI_PROTO_S
Definition at line 59 of file media.c.
Referenced by boot_device_init().
◆ unleashed_sd_ops
Initial value:= {
}
void * mmap_helper_rdev_mmap(const struct region_device *, size_t, size_t)
int mmap_helper_rdev_munmap(const struct region_device *, void *)
Definition at line 32 of file media.c.