Reverted r42958 as it is broken and I completely forgot to compile before

I commited... need to get back into the habbit, sorry for the noise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42961 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2011-10-29 15:51:04 +00:00
parent 993181928d
commit f9152093a3
2 changed files with 587 additions and 443 deletions

View File

@ -1,85 +1,83 @@
/*
* Copyright 2010-2011, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
/*******************************************************************************
/
/ File: ISA.h
/
/ Description: Interface to ISA module
/
/ Copyright 1998, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef _ISA_H
#define _ISA_H
#include <SupportDefs.h>
//#include <SupportDefs.h>
#include <bus_manager.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ---
ISA scatter/gather dma support.
--- */
typedef struct isa_dma_entry {
uint32 address;
uint16 transfer_count;
uchar reserved;
uchar flag;
typedef struct {
ulong address; /* memory address (little endian!) 4 bytes */
ushort transfer_count; /* # transfers minus one (little endian!) 2 bytes*/
uchar reserved; /* filler, 1byte*/
uchar flag; /* end of link flag, 1byte */
} isa_dma_entry;
#define B_LAST_ISA_DMA_ENTRY 0x80
#define B_LAST_ISA_DMA_ENTRY 0x80 /* sets end of link flag in isa_dma_entry */
enum {
B_8_BIT_TRANSFER,
B_16_BIT_TRANSFER
};
#define B_MAX_ISA_DMA_COUNT 0x10000
typedef struct isa_module_info isa_module_info;
struct isa_module_info {
typedef struct isa_module_info {
bus_manager_info binfo;
uint8 (*read_io_8) (int32 mapped_io_addr);
void (*write_io_8) (int32 mapped_io_addr, uint8 value);
uint16 (*read_io_16) (int32 mapped_io_addr);
void (*write_io_16) (int32 mapped_io_addr, uint16 value);
uint32 (*read_io_32) (int32 mapped_io_addr);
void (*write_io_32) (int32 mapped_io_addr, uint32 value);
uint8 (*read_io_8) (int mapped_io_addr);
void (*write_io_8) (int mapped_io_addr, uint8 value);
uint16 (*read_io_16) (int mapped_io_addr);
void (*write_io_16) (int mapped_io_addr, uint16 value);
uint32 (*read_io_32) (int mapped_io_addr);
void (*write_io_32) (int mapped_io_addr, uint32 value);
void* (*ram_address)
(const void * physical_address_in_system_memory);
void * (*ram_address) (const void *physical_address_in_system_memory);
int32 (*make_isa_dma_table) (
const void *buffer,
int32 buffer_size,
uint32 num_bits,
isa_dma_entry *table,
int32 num_entries
long (*make_isa_dma_table) (
const void *buffer, /* buffer to make a table for */
long buffer_size, /* buffer size */
ulong num_bits, /* dma transfer size that will be used */
isa_dma_entry *table, /* -> caller-supplied scatter/gather table */
long num_entries /* max # entries in table */
);
int32 (*start_isa_dma) (
int32 channel,
void *buf,
int32 transfer_count,
uchar mode,
uchar e_mode
long (*start_isa_dma) (
long channel, /* dma channel to use */
void *buf, /* buffer to transfer */
long transfer_count, /* # transfers */
uchar mode, /* mode flags */
uchar e_mode /* extended mode flags */
);
int32 (*start_scattered_isa_dma) (
int32 channel,
const isa_dma_entry* table,
uchar mode,
uchar emode
long (*start_scattered_isa_dma) (
long channel, /* channel # to use */
const isa_dma_entry *table, /* physical address of scatter/gather table */
uchar mode, /* mode flags */
uchar emode /* extended mode flags */
);
int32 (*lock_isa_dma_channel) (int32 channel);
int32 (*unlock_isa_dma_channel) (int32 channel);
};
long (*lock_isa_dma_channel) (long channel);
long (*unlock_isa_dma_channel) (long channel);
} isa_module_info;
#define B_ISA_MODULE_NAME "bus_managers/isa/v1"
#ifdef __cplusplus
}
#endif
#endif /* _ISA_H */

File diff suppressed because it is too large Load Diff