![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <amdblocks/lpc.h>
#include <amdblocks/spi.h>
#include <assert.h>
#include <boot_device.h>
#include <commonlib/bsd/helpers.h>
#include <commonlib/region.h>
#include <console/console.h>
#include <delay.h>
#include <device/pci_ops.h>
#include <soc/pci_devs.h>
#include <spi_flash.h>
#include <string.h>
#include <thread.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | spi_dma_transaction |
Macros | |
#define | rom_base ((void *)(uintptr_t)(0x100000000ULL - CONFIG_ROM_SIZE)) |
Variables | |
static struct thread_mutex | spi_dma_hw_mutex |
const struct region_device_ops | spi_dma_rdev_ro_ops |
static const struct mem_region_device | boot_dev |
Definition at line 263 of file spi_dma.c.
References spi_dma_fix().
const struct region_device* boot_device_ro | ( | void | ) |
Definition at line 235 of file spi_dma.c.
References boot_dev, and mem_region_device::rdev.
Definition at line 67 of file spi_dma.c.
References BIOS_DEBUG, IS_ALIGNED, LPC_ROM_DMA_MIN_ALIGNMENT, and printk.
|
static |
Definition at line 134 of file spi_dma.c.
References assert, BIOS_ERR, spi_dma_transaction::destination, LPC_ROM_DMA_MIN_ALIGNMENT, LPC_ROM_DMA_SRC_ADDR, pci_read_config32(), printk, spi_dma_transaction::remaining, SOC_LPC_DEV, spi_dma_transaction::source, spi_dma_has_error(), spi_dma_is_busy(), spi_dma_readat_mmap(), spi_hw_mutex, start_spi_dma_transaction(), thread_mutex_unlock(), and spi_dma_transaction::transfer_size.
Referenced by spi_dma_readat_dma().
Definition at line 255 of file spi_dma.c.
References BIT, spi_read8(), spi_write8(), and val.
Referenced by boot_device_init().
Definition at line 61 of file spi_dma.c.
References LPC_ROM_DMA_CTRL_ERROR, LPC_ROM_DMA_EC_HOST_CONTROL, pci_read_config32(), and SOC_LPC_DEV.
Referenced by continue_spi_dma_transaction().
Definition at line 55 of file spi_dma.c.
References LPC_ROM_DMA_CTRL_START, LPC_ROM_DMA_EC_HOST_CONTROL, pci_read_config32(), and SOC_LPC_DEV.
Referenced by continue_spi_dma_transaction(), and start_spi_dma_transaction().
|
static |
|
static |
|
static |
|
static |
Definition at line 180 of file spi_dma.c.
References BIOS_SPEW, continue_spi_dma_transaction(), spi_dma_transaction::destination, printk, spi_dma_transaction::remaining, spi_dma_transaction::size, spi_dma_transaction::source, spi_dma_hw_mutex, start_spi_dma_transaction(), thread_mutex_lock(), thread_mutex_unlock(), thread_yield(), and udelay().
|
static |
Definition at line 43 of file spi_dma.c.
References container_of, mdev, memcpy(), offset, and rdev.
Referenced by continue_spi_dma_transaction().
uint32_t spi_flash_get_mmap_windows | ( | struct flash_mmap_window * | table | ) |
Definition at line 240 of file spi_dma.c.
References flash_mmap_window::flash_base, flash_mmap_window::host_base, rom_base, and flash_mmap_window::size.
|
static |
Definition at line 93 of file spi_dma.c.
References ALIGN_DOWN, assert, BIOS_SPEW, spi_dma_transaction::destination, IS_ALIGNED, LPC_ROM_DMA_CTRL_DW_COUNT, LPC_ROM_DMA_CTRL_DW_COUNT_MASK, LPC_ROM_DMA_CTRL_ERROR, LPC_ROM_DMA_CTRL_MAX_BYTES, LPC_ROM_DMA_CTRL_START, LPC_ROM_DMA_DST_ADDR, LPC_ROM_DMA_EC_HOST_CONTROL, LPC_ROM_DMA_MIN_ALIGNMENT, LPC_ROM_DMA_SRC_ADDR, MIN, pci_read_config32(), pci_write_config32(), printk, spi_dma_transaction::remaining, SOC_LPC_DEV, spi_dma_transaction::source, spi_dma_is_busy(), spi_hw_mutex, thread_mutex_lock(), and spi_dma_transaction::transfer_size.
Referenced by continue_spi_dma_transaction(), and spi_dma_readat_dma().
|
static |
Definition at line 215 of file spi_dma.c.
Referenced by boot_device_ro().
|
static |
Definition at line 134 of file spi_dma.c.
Referenced by spi_dma_readat_dma().
const struct region_device_ops spi_dma_rdev_ro_ops |