mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
southbridge drivers in Kconfig. * It includes initial superio code as well, but there is at least one error in the pnp_device.c/superio scenario left * Fixed biosemu.c, vm86.c, pnp_device.c (sort of) * Enable vm86 instead of x86emu per default for vga init for now. This makes VGA in qemu work. There might be a bug in x86emu or the compiler I am using. (gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)) * Import isa-dma.c, keyboard.c and i8259.c from v2 /pc80, which was taken from LinuxBIOSv1 released from LANL under release LA-CC Number 00-34 and using parts from the Linux kernel. This patch makes vga and keyboard work in qemu. Yippie Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@260 f3766cd6-281f-0410-b1cd-43a5c92072e9
44 lines
1.8 KiB
C
44 lines
1.8 KiB
C
#include <arch/io.h>
|
|
#include <isa-dma.h>
|
|
|
|
/* DMA controller registers */
|
|
#define DMA1_CMD_REG 0x08 /* command register (w) */
|
|
#define DMA1_STAT_REG 0x08 /* status register (r) */
|
|
#define DMA1_REQ_REG 0x09 /* request register (w) */
|
|
#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */
|
|
#define DMA1_MODE_REG 0x0B /* mode register (w) */
|
|
#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */
|
|
#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */
|
|
#define DMA1_RESET_REG 0x0D /* Master Clear (w) */
|
|
#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */
|
|
#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */
|
|
|
|
#define DMA2_CMD_REG 0xD0 /* command register (w) */
|
|
#define DMA2_STAT_REG 0xD0 /* status register (r) */
|
|
#define DMA2_REQ_REG 0xD2 /* request register (w) */
|
|
#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */
|
|
#define DMA2_MODE_REG 0xD6 /* mode register (w) */
|
|
#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */
|
|
#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */
|
|
#define DMA2_RESET_REG 0xDA /* Master Clear (w) */
|
|
#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */
|
|
#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */
|
|
|
|
#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */
|
|
#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */
|
|
#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */
|
|
|
|
#define DMA_AUTOINIT 0x10
|
|
|
|
|
|
void isa_dma_init(void)
|
|
{
|
|
/* slave at 0x00 - 0x0f */
|
|
/* master at 0xc0 - 0xdf */
|
|
/* 0x80 - 0x8f DMA page registers */
|
|
/* DMA: 0x00, 0x02, 0x4, 0x06 base address for DMA channel */
|
|
outb(0, DMA1_RESET_REG);
|
|
outb(0, DMA2_RESET_REG);
|
|
outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
|
|
outb(0, DMA2_MASK_REG);
|
|
}
|