blob: 13c9b4b6d75ec78af99a5a99315a150f2f137282 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +02002#ifndef __IDE_FLOPPY_H
3#define __IDE_FLOPPY_H
4
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +02005#include "ide-gd.h"
Bartlomiej Zolnierkiewiczc84d9bb2008-10-17 18:09:13 +02006
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +02007#ifdef CONFIG_IDE_GD_ATAPI
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +02008/*
9 * Pages of the SELECT SENSE / MODE SENSE packet commands.
10 * See SFF-8070i spec.
11 */
12#define IDEFLOPPY_CAPABILITIES_PAGE 0x1b
13#define IDEFLOPPY_FLEXIBLE_DISK_PAGE 0x05
14
15/* IOCTLs used in low-level formatting. */
16#define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600
17#define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601
18#define IDEFLOPPY_IOCTL_FORMAT_START 0x4602
19#define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS 0x4603
20
21/* ide-floppy.c */
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +020022extern const struct ide_disk_ops ide_atapi_disk_ops;
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +020023void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *, u8);
24void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *);
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +020025
26/* ide-floppy_ioctl.c */
Al Virobadf8082008-10-16 10:23:20 -040027int ide_floppy_ioctl(ide_drive_t *, struct block_device *, fmode_t,
28 unsigned int, unsigned long);
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +020029
Bartlomiej Zolnierkiewiczb9103da2008-10-13 21:39:44 +020030#ifdef CONFIG_IDE_PROC_FS
31/* ide-floppy_proc.c */
32extern ide_proc_entry_t ide_floppy_proc[];
33extern const struct ide_proc_devset ide_floppy_settings[];
34#endif
Bartlomiej Zolnierkiewicz806f80a2008-10-17 18:09:14 +020035#else
36#define ide_floppy_proc NULL
37#define ide_floppy_settings NULL
38#endif
Bartlomiej Zolnierkiewiczb9103da2008-10-13 21:39:44 +020039
Bartlomiej Zolnierkiewicz01278542008-10-10 22:39:38 +020040#endif /*__IDE_FLOPPY_H */