Removed some unused old headers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12890 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-05-29 13:29:55 +00:00
parent 9a63135f7c
commit eca3ada99b
7 changed files with 0 additions and 373 deletions
@@ -1,16 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _CONSOLE_DEV_H
#define _CONSOLE_DEV_H
struct kernel_args;
int console_dev_init(struct kernel_args *ka);
enum {
CONSOLE_OP_WRITEXY = 2376
};
#endif
@@ -1,9 +0,0 @@
#ifndef _IDE_BUS_H
#define _IDE_BUS_H
#include <stage2.h>
int ide_bus_init(kernel_args *ka);
#endif
@@ -1,100 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Modified Sep 2001 by Rob Judd <[email protected]>
** Distributed under the terms of the NewOS License.
*/
#ifndef __IDE_PRIVATE_H__
#define __IDE_PRIVATE_H__
#include <types.h>
#include "partition.h"
typedef struct
{
unsigned short config; /* obsolete stuff */
unsigned short cyls; /* logical cylinders */
unsigned short _reserved_2;
unsigned short heads; /* logical heads */
unsigned short _vendor_4; /* bytes per track unformatted */
unsigned short _vendor_5; /* sectors per track unformatted */
unsigned short sectors; /* logical sectors */
unsigned short _vendor_7;
unsigned short _vendor_8;
unsigned short _vendor_9;
char serial[20]; //40 /* serial number */
unsigned short _vendor_20;
unsigned short _vendor_21;
unsigned short vend_bytes_long; /* number of ECC bytes on long cmd */
char firmware[8]; /* firmware revision */
char model[40]; //94 /* model name */
unsigned short mult_support; /* vendor stuff and multiple cmds */
unsigned short _reserved_48; /* bit 0: double word i/o possible */
unsigned short capabilities; /* bit 9: LBA; bit 8: DMA support */
unsigned short _reserved_50;
unsigned short pio; /* bit 15-8: timing mode for PIO */
unsigned short dma; /* bit 15-8: timing mode for DMA */
unsigned short _reserved_53;
unsigned short curr_cyls; /* current logical cylinders */
unsigned short curr_heads; /* current logical heads */
unsigned short curr_sectors; /* current logical sectors */
unsigned long capacity; //118 /* apparent capacity in sectors */
unsigned short _pad[511-59]; /* don't need this stuff for now */
} ide_hw_id_t;
#define IDE_MAGIC_COOKIE 0xABCDEF10
#define IDE_MAGIC_COOKIE2 0x12345678
#define NO_DEVICE -1
#define UNKNOWN_DEVICE 0
#define ATA_DEVICE 1
#define ATAPI_DEVICE 2
#define IDE_NAME 40
typedef struct s_ide_device
{
uint32 magic;
ide_hw_id_t hardware_device;
uint32 magic2;
int iobase;
int bus;
int device;
int device_type;
uint32 sector_count;
int bytes_per_sector;
int lba_supported;
int start_block;
int end_block;
tPartition partitions[8]; // 4 Primary + 4 Extended
} ide_device;
#define MAX_IDE_BUSES 2
#define MAX_DEVICES 4
extern ide_device devices[MAX_DEVICES];
#define DISK_GET_GEOMETRY 1
#define DISK_USE_DMA 2
#define DISK_USE_BUS_MASTERING 3
#define DISK_USE_PIO 4
#define DISK_GET_ACCOUSTIC_LEVEL 5
#define DISK_SET_ACCOUSTIC_LEVEL 6
typedef struct s_drive_geometry
{
uint32 blocks;
uint32 heads;
uint32 cylinders;
uint32 sectors;
int removable;
uint32 bytes_per_sector;
int read_only;
char model[40];
char serial[20];
char firmware[8];
} drive_geometry;
#endif
-31
View File
@@ -1,31 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Modified Sep 2001 by Rob Judd <[email protected]>
** Distributed under the terms of the NewOS License.
*/
#ifndef __IDE_RAW_H__
#define __IDE_RAW_H__
#include "ide_private.h"
#define NO_ERR 0
#define ERR_TIMEOUT 1
#define ERR_HARDWARE_ERROR 2
#define ERR_DRQ_NOT_SET 3
#define ERR_DISK_BUSY 4
#define ERR_DEVICE_FAULT 5
#define ERR_BUFFER_NOT_EMPTY 6
int ide_read_block(ide_device *device, char *buffer, uint32 block, uint8 numSectors);
int ide_write_block(ide_device *device, const char *buffer, uint32 block, uint8 numSectors);
int ide_base (int bus);
void ide_string_conv (char *str, int len);
int ide_reset (int bus, int device);
bool ide_identify_device (int bus, int device);
void ide_raw_init(int base1, int base2);
bool ide_get_partitions(ide_device *device);
int ide_get_accoustic(ide_device *device, int8* level_ptr);
int ide_set_accoustic(ide_device *device, int8 level);
#endif
@@ -1,84 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef __PARTITION_H
#define __PARTITION_H
#define PARTITION_MAGIC1 0x55
#define PARTITION_MAGIC2 0xaa
#define PART_MAGIC_OFFSET 0x01fe
#define PARTITION_OFFSET 0x01be
#define NUM_PARTITIONS 4
#define PTCHSToLBA(c, h, s, scnt, hcnt) ((s) & 0x3f) + \
(scnt) * ( (h) + (hcnt) * ((c) | (((s) & 0xc0) << 2)))
#define PTLBAToCHS(lba, c, h, s, scnt, hcnt) ( \
(s) = (lba) % (scnt) + 1, \
(lba) /= (scnt), \
(h) = (lba) % (hcnt), \
(lba) /= (heads), \
(c) = (lba) & 0xff, \
(s) |= ((lba) >> 2) & 0xc0)
/* taken from linux fdisk src */
typedef enum PartitionTypes
{
PTEmpty = 0,
PTDOS3xPrimary, /* 1 */
PTXENIXRoot, /* 2 */
PTXENIXUsr, /* 3 */
PTOLDDOS16Bit, /* 4 */
PTDosExtended, /* 5 */
PTDos5xPrimary, /* 6 */
PTOS2HPFS, /* 7 */
PTAIX, /* 8 */
PTAIXBootable, /* 9 */
PTOS2BootMgr, /* 10 */
PTWin95FAT32,
PTWin95FAT32LBA,
PTWin95FAT16LBA,
PTWin95ExtendedLBA,
PTVenix286 = 0x40,
PTNovell = 0x51,
PTMicroport = 0x52,
PTGnuHurd = 0x63,
PTNetware286 = 0x64,
PTNetware386 = 0x65,
PTPCIX = 0x75,
PTOldMinix = 0x80,
PTMinix = 0x81,
PTLinuxSwap = 0x82,
PTLinuxExt2 = 0x83,
PTAmoeba = 0x93,
PTAmoebaBBT = 0x94,
PTBSD = 0xa5,
PTBSDIFS = 0xb7,
PTBSDISwap = 0xb8,
PTSyrinx = 0xc7,
PTCPM = 0xdb,
PTDOSAccess = 0xe1,
PTDOSRO = 0xe3,
PTDOSSecondary = 0xf2,
PTBBT = 0xff
} partitionTypes;
#define PartitionIsExtended(P) ((P)->PartitionType == PTDosExtended)
typedef struct sPartition
{
unsigned char boot_flags;
unsigned char starting_head;
unsigned char starting_sector;
unsigned char starting_cylinder;
unsigned char partition_type;
unsigned char ending_head;
unsigned char ending_sector;
unsigned char ending_cylinder;
unsigned int starting_block;
unsigned int sector_count;
} tPartition;
#endif
@@ -1,96 +0,0 @@
/*
**
** Naive RealTek 8139C driver for the DC Broadband Adapter. Some
** assistance on names of things from the NetBSD-DC sources.
**
** (c)2001 Dan Potter
** License: X11
**
*/
#ifndef _RTL_8139C_H
#define _RTL_8139C_H
/* RTL8139C register definitions */
#define RT_IDR0 0x00 /* Mac address */
#define RT_MAR0 0x08 /* Multicast filter */
#define RT_TXSTATUS0 0x10 /* Transmit status (4 32bit regs) */
#define RT_TXSTATUS1 0x14 /* Transmit status (4 32bit regs) */
#define RT_TXSTATUS2 0x18 /* Transmit status (4 32bit regs) */
#define RT_TXSTATUS3 0x1c /* Transmit status (4 32bit regs) */
#define RT_TXADDR0 0x20 /* Tx descriptors (also 4 32bit) */
#define RT_TXADDR1 0x24 /* Tx descriptors (also 4 32bit) */
#define RT_TXADDR2 0x28 /* Tx descriptors (also 4 32bit) */
#define RT_TXADDR3 0x2c /* Tx descriptors (also 4 32bit) */
#define RT_RXBUF 0x30 /* Receive buffer start address */
#define RT_RXEARLYCNT 0x34 /* Early Rx byte count */
#define RT_RXEARLYSTATUS 0x36 /* Early Rx status */
#define RT_CHIPCMD 0x37 /* Command register */
#define RT_RXBUFTAIL 0x38 /* Current address of packet read (queue tail) */
#define RT_RXBUFHEAD 0x3A /* Current buffer address (queue head) */
#define RT_INTRMASK 0x3C /* Interrupt mask */
#define RT_INTRSTATUS 0x3E /* Interrupt status */
#define RT_TXCONFIG 0x40 /* Tx config */
#define RT_RXCONFIG 0x44 /* Rx config */
#define RT_TIMER 0x48 /* A general purpose counter */
#define RT_RXMISSED 0x4C /* 24 bits valid, write clears */
#define RT_CFG9346 0x50 /* 93C46 command register */
#define RT_CONFIG0 0x51 /* Configuration reg 0 */
#define RT_CONFIG1 0x52 /* Configuration reg 1 */
#define RT_TIMERINT 0x54 /* Timer interrupt register (32 bits) */
#define RT_MEDIASTATUS 0x58 /* Media status register */
#define RT_CONFIG3 0x59 /* Config register 3 */
#define RT_CONFIG4 0x5A /* Config register 4 */
#define RT_MULTIINTR 0x5C /* Multiple interrupt select */
#define RT_MII_TSAD 0x60 /* Transmit status of all descriptors (16 bits) */
#define RT_MII_BMCR 0x62 /* Basic Mode Control Register (16 bits) */
#define RT_MII_BMSR 0x64 /* Basic Mode Status Register (16 bits) */
#define RT_AS_ADVERT 0x66 /* Auto-negotiation advertisement reg (16 bits) */
#define RT_AS_LPAR 0x68 /* Auto-negotiation link partner reg (16 bits) */
#define RT_AS_EXPANSION 0x6A /* Auto-negotiation expansion reg (16 bits) */
/* RTL8193C command bits; or these together and write teh resulting value
into CHIPCMD to execute it. */
#define RT_CMD_RESET 0x10
#define RT_CMD_RX_ENABLE 0x08
#define RT_CMD_TX_ENABLE 0x04
#define RT_CMD_RX_BUF_EMPTY 0x01
/* RTL8139C interrupt status bits */
#define RT_INT_PCIERR 0x8000 /* PCI Bus error */
#define RT_INT_TIMEOUT 0x4000 /* Set when TCTR reaches TimerInt value */
#define RT_INT_RXFIFO_OVERFLOW 0x0040 /* Rx FIFO overflow */
#define RT_INT_RXFIFO_UNDERRUN 0x0020 /* Packet underrun / link change */
#define RT_INT_RXBUF_OVERFLOW 0x0010 /* Rx BUFFER overflow */
#define RT_INT_TX_ERR 0x0008
#define RT_INT_TX_OK 0x0004
#define RT_INT_RX_ERR 0x0002
#define RT_INT_RX_OK 0x0001
/* RTL8139C transmit status bits */
#define RT_TX_CARRIER_LOST 0x80000000 /* Carrier sense lost */
#define RT_TX_ABORTED 0x40000000 /* Transmission aborted */
#define RT_TX_OUT_OF_WINDOW 0x20000000 /* Out of window collision */
#define RT_TX_STATUS_OK 0x00008000 /* Status ok: a good packet was transmitted */
#define RT_TX_UNDERRUN 0x00004000 /* Transmit FIFO underrun */
#define RT_TX_HOST_OWNS 0x00002000 /* Set to 1 when DMA operation is completed */
#define RT_TX_SIZE_MASK 0x00001fff /* Descriptor size mask */
/* RTL8139C receive status bits */
#define RT_RX_MULTICAST 0x00008000 /* Multicast packet */
#define RT_RX_PAM 0x00004000 /* Physical address matched */
#define RT_RX_BROADCAST 0x00002000 /* Broadcast address matched */
#define RT_RX_BAD_SYMBOL 0x00000020 /* Invalid symbol in 100TX packet */
#define RT_RX_RUNT 0x00000010 /* Packet size is <64 bytes */
#define RT_RX_TOO_LONG 0x00000008 /* Packet size is >4K bytes */
#define RT_RX_CRC_ERR 0x00000004 /* CRC error */
#define RT_RX_FRAME_ALIGN 0x00000002 /* Frame alignment error */
#define RT_RX_STATUS_OK 0x00000001 /* Status ok: a good packet was received */
/* Realtek PCI vendor ID */
#define RT_VENDORID 0x10EC
/* Realtek Device ID */
#define RT_DEVICEID_8139 0x8139
#endif
@@ -1,37 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _RTL8139_PRIV_H
#define _RTL8139_PRIV_H
#include <kernel.h>
#include <vm.h>
#include <smp.h>
typedef struct rtl8139 {
int irq;
addr phys_base;
addr phys_size;
addr virt_base;
uint16 io_port;
region_id region;
uint8 mac_addr[6];
int txbn;
int last_txbn;
region_id rxbuf_region;
addr rxbuf;
sem_id rx_sem;
region_id txbuf_region;
addr txbuf;
sem_id tx_sem;
mutex lock;
spinlock_t reg_spinlock;
} rtl8139;
int rtl8139_detect(rtl8139 **rtl);
int rtl8139_init(rtl8139 *rtl);
void rtl8139_xmit(rtl8139 *rtl, const char *ptr, ssize_t len);
ssize_t rtl8139_rx(rtl8139 *rtl, char *buf, ssize_t buf_len);
#endif