xref: /linux/arch/powerpc/include/asm/mediabay.h (revision b8b572e1015f81b4e748417be2629dfe51ab99f9)
1*b8b572e1SStephen Rothwell /*
2*b8b572e1SStephen Rothwell  * mediabay.h: definitions for using the media bay
3*b8b572e1SStephen Rothwell  * on PowerBook 3400 and similar computers.
4*b8b572e1SStephen Rothwell  *
5*b8b572e1SStephen Rothwell  * Copyright (C) 1997 Paul Mackerras.
6*b8b572e1SStephen Rothwell  */
7*b8b572e1SStephen Rothwell #ifndef _PPC_MEDIABAY_H
8*b8b572e1SStephen Rothwell #define _PPC_MEDIABAY_H
9*b8b572e1SStephen Rothwell 
10*b8b572e1SStephen Rothwell #ifdef __KERNEL__
11*b8b572e1SStephen Rothwell 
12*b8b572e1SStephen Rothwell #define MB_FD		0	/* media bay contains floppy drive (automatic eject ?) */
13*b8b572e1SStephen Rothwell #define MB_FD1		1	/* media bay contains floppy drive (manual eject ?) */
14*b8b572e1SStephen Rothwell #define MB_SOUND	2	/* sound device ? */
15*b8b572e1SStephen Rothwell #define MB_CD		3	/* media bay contains ATA drive such as CD or ZIP */
16*b8b572e1SStephen Rothwell #define MB_PCI		5	/* media bay contains a PCI device */
17*b8b572e1SStephen Rothwell #define MB_POWER	6	/* media bay contains a Power device (???) */
18*b8b572e1SStephen Rothwell #define MB_NO		7	/* media bay contains nothing */
19*b8b572e1SStephen Rothwell 
20*b8b572e1SStephen Rothwell /* Number of bays in the machine or 0 */
21*b8b572e1SStephen Rothwell extern int media_bay_count;
22*b8b572e1SStephen Rothwell 
23*b8b572e1SStephen Rothwell #ifdef CONFIG_BLK_DEV_IDE_PMAC
24*b8b572e1SStephen Rothwell #include <linux/ide.h>
25*b8b572e1SStephen Rothwell 
26*b8b572e1SStephen Rothwell int check_media_bay_by_base(unsigned long base, int what);
27*b8b572e1SStephen Rothwell /* called by IDE PMAC host driver to register IDE controller for media bay */
28*b8b572e1SStephen Rothwell int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base,
29*b8b572e1SStephen Rothwell 			    int irq, ide_hwif_t *hwif);
30*b8b572e1SStephen Rothwell 
31*b8b572e1SStephen Rothwell int check_media_bay(struct device_node *which_bay, int what);
32*b8b572e1SStephen Rothwell 
33*b8b572e1SStephen Rothwell #else
34*b8b572e1SStephen Rothwell 
35*b8b572e1SStephen Rothwell static inline int check_media_bay(struct device_node *which_bay, int what)
36*b8b572e1SStephen Rothwell {
37*b8b572e1SStephen Rothwell 	return -ENODEV;
38*b8b572e1SStephen Rothwell }
39*b8b572e1SStephen Rothwell 
40*b8b572e1SStephen Rothwell #endif
41*b8b572e1SStephen Rothwell 
42*b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
43*b8b572e1SStephen Rothwell #endif /* _PPC_MEDIABAY_H */
44