1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef __IDE_FLOPPY_H 3*4882a593Smuzhiyun #define __IDE_FLOPPY_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include "ide-gd.h" 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #ifdef CONFIG_IDE_GD_ATAPI 8*4882a593Smuzhiyun /* 9*4882a593Smuzhiyun * Pages of the SELECT SENSE / MODE SENSE packet commands. 10*4882a593Smuzhiyun * See SFF-8070i spec. 11*4882a593Smuzhiyun */ 12*4882a593Smuzhiyun #define IDEFLOPPY_CAPABILITIES_PAGE 0x1b 13*4882a593Smuzhiyun #define IDEFLOPPY_FLEXIBLE_DISK_PAGE 0x05 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun /* IOCTLs used in low-level formatting. */ 16*4882a593Smuzhiyun #define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600 17*4882a593Smuzhiyun #define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601 18*4882a593Smuzhiyun #define IDEFLOPPY_IOCTL_FORMAT_START 0x4602 19*4882a593Smuzhiyun #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* ide-floppy.c */ 22*4882a593Smuzhiyun extern const struct ide_disk_ops ide_atapi_disk_ops; 23*4882a593Smuzhiyun void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8); 24*4882a593Smuzhiyun void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *); 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun /* ide-floppy_ioctl.c */ 27*4882a593Smuzhiyun int ide_floppy_ioctl(ide_drive_t *, struct block_device *, fmode_t, 28*4882a593Smuzhiyun unsigned int, unsigned long); 29*4882a593Smuzhiyun int ide_floppy_compat_ioctl(ide_drive_t *, struct block_device *, fmode_t, 30*4882a593Smuzhiyun unsigned int, unsigned long); 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #ifdef CONFIG_IDE_PROC_FS 33*4882a593Smuzhiyun /* ide-floppy_proc.c */ 34*4882a593Smuzhiyun extern ide_proc_entry_t ide_floppy_proc[]; 35*4882a593Smuzhiyun extern const struct ide_proc_devset ide_floppy_settings[]; 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun #else 38*4882a593Smuzhiyun #define ide_floppy_proc NULL 39*4882a593Smuzhiyun #define ide_floppy_settings NULL 40*4882a593Smuzhiyun #endif 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun #endif /*__IDE_FLOPPY_H */ 43