coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <console/console.h>
#include <stdint.h>
#include <soc/addressmap.h>
#include <soc/dma.h>
Go to the source code of this file.
Macros | |
#define | APB_DMA_OFFSET(n) (struct apb_dma_channel_regs *)(TEGRA_APB_DMA_BASE + n) |
Functions | |
int | dma_busy (struct apb_dma_channel *const channel) |
struct apb_dma_channel *const | dma_claim (void) |
void | dma_release (struct apb_dma_channel *const channel) |
int | dma_start (struct apb_dma_channel *const channel) |
int | dma_stop (struct apb_dma_channel *const channel) |
Variables | |
struct apb_dma *const | apb_dma = (struct apb_dma *)TEGRA_APB_DMA_BASE |
struct apb_dma_channel | apb_dma_channels [] |
#define APB_DMA_OFFSET | ( | n | ) | (struct apb_dma_channel_regs *)(TEGRA_APB_DMA_BASE + n) |
int dma_busy | ( | struct apb_dma_channel *const | channel | ) |
Definition at line 48 of file dma.c.
References APB_STA_DMA_ACTIVITY, read32(), apb_dma_channel::regs, and apb_dma_channel_regs::sta.
Referenced by dma_release(), and tegra_spi_dma_finish().
struct apb_dma_channel* const dma_claim | ( | void | ) |
Definition at line 59 of file dma.c.
References APB_COMMAND_GEN, apb_dma_channels, ARRAY_SIZE, BIOS_DEBUG, apb_dma::command, apb_dma_channel::in_use, NULL, printk, read32(), apb_dma_channel::regs, and setbits32.
Referenced by tegra_spi_dma_prepare().
void dma_release | ( | struct apb_dma_channel *const | channel | ) |
Definition at line 92 of file dma.c.
References APB_COMMAND_GEN, apb_dma_channels, ARRAY_SIZE, clrbits32, apb_dma::command, dma_busy(), and apb_dma_channel::in_use.
Referenced by tegra_spi_dma_finish().
int dma_start | ( | struct apb_dma_channel *const | channel | ) |
Definition at line 111 of file dma.c.
References APB_CSR_ENB, apb_dma_channel::regs, and setbits32.
Referenced by tegra_spi_dma_start().
int dma_stop | ( | struct apb_dma_channel *const | channel | ) |
Definition at line 121 of file dma.c.
References APB_CSR_ENB, clrbits32, and apb_dma_channel::regs.
Referenced by tegra_spi_dma_finish().
struct apb_dma* const apb_dma = (struct apb_dma *)TEGRA_APB_DMA_BASE |
struct apb_dma_channel apb_dma_channels[] |
Definition at line 9 of file dma.c.
Referenced by dma_claim(), and dma_release().