[TC] MIPS: TURBOchannel update to the driver model
This is a set of changes to convert support for the TURBOchannel bus to the driver model. It implements the usual set of calls similar to what other bus drivers have: tc_register_driver(), tc_unregister_driver(), etc. All the platform-specific bits have been removed and headers from asm-mips/dec/ have been merged into linux/tc.h, which should be included by drivers. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
5986a2ec35
commit
b454cc6636
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Interface to the TURBOchannel related routines
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (c) 1998 Harald Koerfgen
|
||||
*/
|
||||
#ifndef __ASM_DEC_TC_H
|
||||
#define __ASM_DEC_TC_H
|
||||
|
||||
/*
|
||||
* Search for a TURBOchannel Option Module
|
||||
* with a certain name. Returns slot number
|
||||
* of the first card not in use or -ENODEV
|
||||
* if none found.
|
||||
*/
|
||||
extern int search_tc_card(const char *);
|
||||
/*
|
||||
* Marks the card in slot as used
|
||||
*/
|
||||
extern void claim_tc_card(int);
|
||||
/*
|
||||
* Marks the card in slot as free
|
||||
*/
|
||||
extern void release_tc_card(int);
|
||||
/*
|
||||
* Return base address of card in slot
|
||||
*/
|
||||
extern unsigned long get_tc_base_addr(int);
|
||||
/*
|
||||
* Return interrupt number of slot
|
||||
*/
|
||||
extern unsigned long get_tc_irq_nr(int);
|
||||
/*
|
||||
* Return TURBOchannel clock frequency in Hz
|
||||
*/
|
||||
extern unsigned long get_tc_speed(void);
|
||||
|
||||
#endif /* __ASM_DEC_TC_H */
|
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Various TURBOchannel related stuff
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Information obtained through the get_tcinfo prom call
|
||||
* created from:
|
||||
*
|
||||
* TURBOchannel Firmware Specification
|
||||
*
|
||||
* EK-TCAAD-FS-004
|
||||
* from Digital Equipment Corporation
|
||||
*
|
||||
* Copyright (c) 1998 Harald Koerfgen
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int revision;
|
||||
int clk_period;
|
||||
int slot_size;
|
||||
int io_timeout;
|
||||
int dma_range;
|
||||
int max_dma_burst;
|
||||
int parity;
|
||||
int reserved[4];
|
||||
} tcinfo;
|
||||
|
||||
#define MAX_SLOT 7
|
||||
|
||||
typedef struct {
|
||||
unsigned long base_addr;
|
||||
unsigned char name[9];
|
||||
unsigned char vendor[9];
|
||||
unsigned char firmware[9];
|
||||
int interrupt;
|
||||
int flags;
|
||||
} slot_info;
|
||||
|
||||
/*
|
||||
* Values for flags
|
||||
*/
|
||||
#define FREE 1<<0
|
||||
#define IN_USE 1<<1
|
||||
|
||||
|
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Offsets for the ROM header locations for
|
||||
* TURBOchannel cards
|
||||
*
|
||||
* created from:
|
||||
*
|
||||
* TURBOchannel Firmware Specification
|
||||
*
|
||||
* EK-TCAAD-FS-004
|
||||
* from Digital Equipment Corporation
|
||||
*
|
||||
* Jan.1998 Harald Koerfgen
|
||||
*/
|
||||
#ifndef __ASM_DEC_TCMODULE_H
|
||||
#define __ASM_DEC_TCMODULE_H
|
||||
|
||||
#define OLDCARD 0x3c0000
|
||||
#define NEWCARD 0x000000
|
||||
|
||||
#define TC_ROM_WIDTH 0x3e0
|
||||
#define TC_ROM_STRIDE 0x3e4
|
||||
#define TC_ROM_SIZE 0x3e8
|
||||
#define TC_SLOT_SIZE 0x3ec
|
||||
#define TC_PATTERN0 0x3f0
|
||||
#define TC_PATTERN1 0x3f4
|
||||
#define TC_PATTERN2 0x3f8
|
||||
#define TC_PATTERN3 0x3fc
|
||||
#define TC_FIRM_VER 0x400
|
||||
#define TC_VENDOR 0x420
|
||||
#define TC_MODULE 0x440
|
||||
#define TC_FIRM_TYPE 0x460
|
||||
#define TC_FLAGS 0x470
|
||||
#define TC_ROM_OBJECTS 0x480
|
||||
|
||||
#endif /* __ASM_DEC_TCMODULE_H */
|
Reference in New Issue
Block a user