1b8b572e1SStephen Rothwell /* 2b8b572e1SStephen Rothwell * mediabay.h: definitions for using the media bay 3b8b572e1SStephen Rothwell * on PowerBook 3400 and similar computers. 4b8b572e1SStephen Rothwell * 5b8b572e1SStephen Rothwell * Copyright (C) 1997 Paul Mackerras. 6b8b572e1SStephen Rothwell */ 7b8b572e1SStephen Rothwell #ifndef _PPC_MEDIABAY_H 8b8b572e1SStephen Rothwell #define _PPC_MEDIABAY_H 9b8b572e1SStephen Rothwell 10b8b572e1SStephen Rothwell #ifdef __KERNEL__ 11b8b572e1SStephen Rothwell 12b8b572e1SStephen Rothwell #define MB_FD 0 /* media bay contains floppy drive (automatic eject ?) */ 13b8b572e1SStephen Rothwell #define MB_FD1 1 /* media bay contains floppy drive (manual eject ?) */ 14b8b572e1SStephen Rothwell #define MB_SOUND 2 /* sound device ? */ 15b8b572e1SStephen Rothwell #define MB_CD 3 /* media bay contains ATA drive such as CD or ZIP */ 16b8b572e1SStephen Rothwell #define MB_PCI 5 /* media bay contains a PCI device */ 17b8b572e1SStephen Rothwell #define MB_POWER 6 /* media bay contains a Power device (???) */ 18b8b572e1SStephen Rothwell #define MB_NO 7 /* media bay contains nothing */ 19b8b572e1SStephen Rothwell 20*d58b0c39SBenjamin Herrenschmidt struct macio_dev; 21b8b572e1SStephen Rothwell 22*d58b0c39SBenjamin Herrenschmidt #ifdef CONFIG_PMAC_MEDIABAY 23b8b572e1SStephen Rothwell 24*d58b0c39SBenjamin Herrenschmidt /* Check the content type of the bay, returns MB_NO if the bay is still 25*d58b0c39SBenjamin Herrenschmidt * transitionning 26*d58b0c39SBenjamin Herrenschmidt */ 27*d58b0c39SBenjamin Herrenschmidt extern int check_media_bay(struct macio_dev *bay); 28b8b572e1SStephen Rothwell 29*d58b0c39SBenjamin Herrenschmidt /* The ATA driver uses the calls below to temporarily hold on the 30*d58b0c39SBenjamin Herrenschmidt * media bay callbacks while initializing the interface 31*d58b0c39SBenjamin Herrenschmidt */ 32*d58b0c39SBenjamin Herrenschmidt extern void lock_media_bay(struct macio_dev *bay); 33*d58b0c39SBenjamin Herrenschmidt extern void unlock_media_bay(struct macio_dev *bay); 34b8b572e1SStephen Rothwell 35b8b572e1SStephen Rothwell #else 36b8b572e1SStephen Rothwell 37*d58b0c39SBenjamin Herrenschmidt static inline int check_media_bay(struct macio_dev *bay) 38b8b572e1SStephen Rothwell { 39*d58b0c39SBenjamin Herrenschmidt return MB_NO; 40b8b572e1SStephen Rothwell } 41b8b572e1SStephen Rothwell 42*d58b0c39SBenjamin Herrenschmidt static inline void lock_media_bay(struct macio_dev *bay) { } 43*d58b0c39SBenjamin Herrenschmidt static inline void unlock_media_bay(struct macio_dev *bay) { } 44*d58b0c39SBenjamin Herrenschmidt 45b8b572e1SStephen Rothwell #endif 46b8b572e1SStephen Rothwell 47b8b572e1SStephen Rothwell #endif /* __KERNEL__ */ 48b8b572e1SStephen Rothwell #endif /* _PPC_MEDIABAY_H */ 49