dbec2d4090
- Rename chip_config chip_operations throughout the tree - Fix Config.lb on most of the Opteron Ports - Fix the amd 8000 chipset support for setting the subsystem vendor and device ids - Add detection of devices that are on the motherboard (i.e. In Config.lb) - Baby step in getting the resource limit handling correct, Ignore fixed resources - Only call enable_childrens_resources on devices we know will have children For some busses like i2c it is non-sense and we don't want it. - Set the resource limits for pnp devices resources. - Improve the resource size detection for pnp devices. - Added a configuration register to amd8111_ide.c so we can enable/disable individual ide channels - Added a header file to hold the prototype of isa_dma_init - Fixed most of the superio chips so the should work now, the via superio pci device is the exception. - The code compiles and runs so it is time for me to go to bed. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1698 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
44 lines
1.8 KiB
C
44 lines
1.8 KiB
C
#include <arch/io.h>
|
|
#include <pc80/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);
|
|
}
|