1 /*
2  *  linux/drivers/ide/legacy/pdc4030.h
3  *
4  *  Copyright (C) 1995-1998  Linus Torvalds & authors
5  */
6 
7 /*
8  * Principal author: Peter Denison <peterd@pnd-pc.demon.co.uk>
9  */
10 
11 #ifndef IDE_PROMISE_H
12 #define IDE_PROMISE_H
13 
14 #include <linux/config.h>
15 
16 #ifndef CONFIG_BLK_DEV_PDC4030
17 # ifdef _IDE_DISK
18 
19 # define IS_PDC4030_DRIVE (0)	/* auto-NULLs out pdc4030 code */
20 
21 ide_startstop_t promise_rw_disk(ide_drive_t *, struct request *, unsigned long);
22 
promise_rw_disk(ide_drive_t * drive,struct request * rq,unsigned long block)23 ide_startstop_t promise_rw_disk(ide_drive_t *drive, struct request *rq, unsigned long block)
24 {
25         return ide_stopped;
26 }
27 # endif /* _IDE_DISK */
28 #else /* CONFIG_BLK_DEV_PDC4030 */
29 # ifdef _IDE_DISK
30 #  define IS_PDC4030_DRIVE (HWIF(drive)->chipset == ide_pdc4030)
31 
32 ide_startstop_t promise_rw_disk(ide_drive_t *, struct request *, unsigned long);
33 
34 # endif /* _IDE_DISK */
35 #endif /* CONFIG_BLK_DEV_PDC4030 */
36 
37 #ifdef __PROMISE_4030
38 #define	PROMISE_EXTENDED_COMMAND	0xF0
39 #define	PROMISE_READ			0xF2
40 #define	PROMISE_WRITE			0xF3
41 /* Extended commands - main command code = 0xf0 */
42 #define	PROMISE_GET_CONFIG		0x10
43 #define	PROMISE_IDENTIFY		0x20
44 
45 struct translation_mode {
46 	u16	cyl;
47 	u8	head;
48 	u8	sect;
49 };
50 
51 struct dc_ident {
52 	u8	type;
53 	u8	unknown1;
54 	u8	hw_revision;
55 	u8	firmware_major;
56 	u8	firmware_minor;
57 	u8	bios_address;
58 	u8	irq;
59 	u8	unknown2;
60 	u16	cache_mem;
61 	u16	unknown3;
62 	u8	id[2];
63 	u16	info;
64 	struct translation_mode current_tm[4];
65 	u8	pad[SECTOR_WORDS*4 - 32];
66 };
67 
68 #endif /* __PROMISE_4030 */
69 
70 #endif /* IDE_PROMISE_H */
71