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
+49 -51
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 #ifndef _ISA_H
#define _ISA_H #define _ISA_H
//#include <SupportDefs.h>
#include <SupportDefs.h>
#include <bus_manager.h> #include <bus_manager.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* ---
ISA scatter/gather dma support.
--- */
typedef struct isa_dma_entry { typedef struct {
uint32 address; ulong address; /* memory address (little endian!) 4 bytes */
uint16 transfer_count; ushort transfer_count; /* # transfers minus one (little endian!) 2 bytes*/
uchar reserved; uchar reserved; /* filler, 1byte*/
uchar flag; uchar flag; /* end of link flag, 1byte */
} isa_dma_entry; } isa_dma_entry;
#define B_LAST_ISA_DMA_ENTRY 0x80 /* sets end of link flag in isa_dma_entry */
#define B_LAST_ISA_DMA_ENTRY 0x80
enum { enum {
B_8_BIT_TRANSFER, B_8_BIT_TRANSFER,
B_16_BIT_TRANSFER B_16_BIT_TRANSFER
}; };
#define B_MAX_ISA_DMA_COUNT 0x10000 #define B_MAX_ISA_DMA_COUNT 0x10000
typedef struct isa_module_info {
typedef struct isa_module_info isa_module_info;
struct isa_module_info {
bus_manager_info binfo; bus_manager_info binfo;
uint8 (*read_io_8) (int32 mapped_io_addr); uint8 (*read_io_8) (int mapped_io_addr);
void (*write_io_8) (int32 mapped_io_addr, uint8 value); void (*write_io_8) (int mapped_io_addr, uint8 value);
uint16 (*read_io_16) (int32 mapped_io_addr); uint16 (*read_io_16) (int mapped_io_addr);
void (*write_io_16) (int32 mapped_io_addr, uint16 value); void (*write_io_16) (int mapped_io_addr, uint16 value);
uint32 (*read_io_32) (int32 mapped_io_addr); uint32 (*read_io_32) (int mapped_io_addr);
void (*write_io_32) (int32 mapped_io_addr, uint32 value); void (*write_io_32) (int mapped_io_addr, uint32 value);
void* (*ram_address) void * (*ram_address) (const void *physical_address_in_system_memory);
(const void * physical_address_in_system_memory);
int32 (*make_isa_dma_table) ( long (*make_isa_dma_table) (
const void *buffer, const void *buffer, /* buffer to make a table for */
int32 buffer_size, long buffer_size, /* buffer size */
uint32 num_bits, ulong num_bits, /* dma transfer size that will be used */
isa_dma_entry *table, isa_dma_entry *table, /* -> caller-supplied scatter/gather table */
int32 num_entries long num_entries /* max # entries in table */
); );
int32 (*start_isa_dma) ( long (*start_isa_dma) (
int32 channel, long channel, /* dma channel to use */
void *buf, void *buf, /* buffer to transfer */
int32 transfer_count, long transfer_count, /* # transfers */
uchar mode, uchar mode, /* mode flags */
uchar e_mode uchar e_mode /* extended mode flags */
); );
int32 (*start_scattered_isa_dma) ( long (*start_scattered_isa_dma) (
int32 channel, long channel, /* channel # to use */
const isa_dma_entry* table, const isa_dma_entry *table, /* physical address of scatter/gather table */
uchar mode, uchar mode, /* mode flags */
uchar emode uchar emode /* extended mode flags */
); );
int32 (*lock_isa_dma_channel) (int32 channel); long (*lock_isa_dma_channel) (long channel);
int32 (*unlock_isa_dma_channel) (int32 channel); long (*unlock_isa_dma_channel) (long channel);
}; } isa_module_info;
#define B_ISA_MODULE_NAME "bus_managers/isa/v1" #define B_ISA_MODULE_NAME "bus_managers/isa/v1"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _ISA_H */ #endif /* _ISA_H */
+538 -392
View File
File diff suppressed because it is too large Load Diff