Commit 278db3a7 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] kill ide_modes.h

parent a64e02a6
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include "ide_modes.h"
#if (DISK_RECOVERY_TIME > 0) #if (DISK_RECOVERY_TIME > 0)
#error So the User Has To Fix the Compilation And Stop Hacking Port 0x43. Does anyone ever use this anyway ?? #error So the User Has To Fix the Compilation And Stop Hacking Port 0x43. Does anyone ever use this anyway ??
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include "ide_modes.h"
/* /*
* IDE library routines. These are plug in code that most * IDE library routines. These are plug in code that most
* drivers can use but occasionally may be weird enough * drivers can use but occasionally may be weird enough
...@@ -188,6 +186,12 @@ int ide_dma_enable (ide_drive_t *drive) ...@@ -188,6 +186,12 @@ int ide_dma_enable (ide_drive_t *drive)
EXPORT_SYMBOL(ide_dma_enable); EXPORT_SYMBOL(ide_dma_enable);
/*
* Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*.
* Some drives may specify a mode, while also specifying a different
* value for cycle_time (from drive identification data).
*/
const ide_pio_timings_t ide_pio_timings[6] = { const ide_pio_timings_t ide_pio_timings[6] = {
{ 70, 165, 600 }, /* PIO Mode 0 */ { 70, 165, 600 }, /* PIO Mode 0 */
{ 50, 125, 383 }, /* PIO Mode 1 */ { 50, 125, 383 }, /* PIO Mode 1 */
...@@ -199,6 +203,13 @@ const ide_pio_timings_t ide_pio_timings[6] = { ...@@ -199,6 +203,13 @@ const ide_pio_timings_t ide_pio_timings[6] = {
EXPORT_SYMBOL_GPL(ide_pio_timings); EXPORT_SYMBOL_GPL(ide_pio_timings);
/*
* Shared data/functions for determining best PIO mode for an IDE drive.
* Most of this stuff originally lived in cmd640.c, and changes to the
* ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
* breaking the fragile cmd640.c support.
*/
/* /*
* Black list. Some drives incorrectly report their maximal PIO mode, * Black list. Some drives incorrectly report their maximal PIO mode,
* at least in respect to CMD640. Here we keep info on some known drives. * at least in respect to CMD640. Here we keep info on some known drives.
......
...@@ -161,8 +161,6 @@ ...@@ -161,8 +161,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include "ide_modes.h"
/* default maximum number of failures */ /* default maximum number of failures */
#define IDE_DEFAULT_MAX_FAILURES 1 #define IDE_DEFAULT_MAX_FAILURES 1
......
/*
* linux/drivers/ide/ide_modes.h
*
* Copyright (C) 1996 Linus Torvalds, Igor Abramov, and Mark Lord
*/
#ifndef _IDE_MODES_H
#define _IDE_MODES_H
#include <linux/config.h>
/*
* Shared data/functions for determining best PIO mode for an IDE drive.
* Most of this stuff originally lived in cmd640.c, and changes to the
* ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
* breaking the fragile cmd640.c support.
*/
/*
* Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*.
* Some drives may specify a mode, while also specifying a different
* value for cycle_time (from drive identification data).
*/
typedef struct ide_pio_timings_s {
int setup_time; /* Address setup (ns) minimum */
int active_time; /* Active pulse (ns) minimum */
int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */
} ide_pio_timings_t;
typedef struct ide_pio_data_s {
u8 pio_mode;
u8 use_iordy;
u8 overridden;
u8 blacklisted;
unsigned int cycle_time;
} ide_pio_data_t;
u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
extern const ide_pio_timings_t ide_pio_timings[6];
#endif /* _IDE_MODES_H */
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
/* port addresses for auto-detection */ /* port addresses for auto-detection */
#define ALI_NUM_PORTS 4 #define ALI_NUM_PORTS 4
static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4}; static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4};
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
/* /*
* Changing this #undef to #define may solve start up problems in some systems. * Changing this #undef to #define may solve start up problems in some systems.
*/ */
......
...@@ -53,8 +53,6 @@ ...@@ -53,8 +53,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
/* #define DEBUG */ /* remove comments for DEBUG messages */ /* #define DEBUG */ /* remove comments for DEBUG messages */
/* /*
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "qd65xx.h" #include "qd65xx.h"
/* /*
......
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
/* /*
* Default speeds. These can be changed with "auto-tune" and/or hdparm. * Default speeds. These can be changed with "auto-tune" and/or hdparm.
*/ */
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "aec62xx.h" #include "aec62xx.h"
#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "alim15x3.h" #include "alim15x3.h"
/* /*
......
...@@ -115,8 +115,6 @@ ...@@ -115,8 +115,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
/* /*
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb * This flag is set in ide.c by the parameter: ide0=cmd640_vlb
*/ */
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "cmd64x.h" #include "cmd64x.h"
#if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "cs5520.h" #include "cs5520.h"
#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "cs5530.h" #include "cs5530.h"
#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "cy82c693.h" #include "cy82c693.h"
/* /*
...@@ -113,7 +112,7 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk) ...@@ -113,7 +112,7 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
/* note: we use the same values for 16bit IOR and IOW /* note: we use the same values for 16bit IOR and IOW
* those are all the same, since I don't have other * those are all the same, since I don't have other
* timings than those from ide_modes.h * timings than those from ide-lib.c
*/ */
p_pclk->time_16r = (u8)clk1; p_pclk->time_16r = (u8)clk1;
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "hpt34x.h" #include "hpt34x.h"
#if defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "hpt366.h" #include "hpt366.h"
#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/it8172/it8172_int.h> #include <asm/it8172/it8172_int.h>
#include "ide_modes.h"
#include "it8172.h" #include "it8172.h"
/* /*
......
...@@ -104,7 +104,6 @@ ...@@ -104,7 +104,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "opti621.h" #include "opti621.h"
#define OPTI621_MAX_PIO 3 #define OPTI621_MAX_PIO 3
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "pdc202xx_new.h" #include "pdc202xx_new.h"
#define PDC202_DEBUG_CABLE 0 #define PDC202_DEBUG_CABLE 0
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "pdc202xx_old.h" #include "pdc202xx_old.h"
#define PDC202_DEBUG_CABLE 0 #define PDC202_DEBUG_CABLE 0
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "pdcadma.h" #include "pdcadma.h"
#if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -103,7 +103,6 @@ ...@@ -103,7 +103,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "piix.h" #include "piix.h"
static int no_piix_dma; static int no_piix_dma;
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
#include "sc1200.h" #include "sc1200.h"
#define SC1200_REV_A 0x00 #define SC1200_REV_A 0x00
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "serverworks.h" #include "serverworks.h"
static u8 svwks_revision = 0; static u8 svwks_revision = 0;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "siimage.h" #include "siimage.h"
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include "ide-timing.h" #include "ide-timing.h"
#include "ide_modes.h"
#include "sis5513.h" #include "sis5513.h"
/* registers layout and init values are chipset family dependant */ /* registers layout and init values are chipset family dependant */
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/dma.h> #include <asm/dma.h>
#include "ide_modes.h"
#include "sl82c105.h" #include "sl82c105.h"
#undef DEBUG #undef DEBUG
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h"
#include "slc90e66.h" #include "slc90e66.h"
#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) #if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <linux/ide.h> #include <linux/ide.h>
#include <linux/init.h> #include <linux/init.h>
#include "ide_modes.h"
#include "triflex.h" #include "triflex.h"
static struct pci_dev *triflex_dev; static struct pci_dev *triflex_dev;
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "ide_modes.h"
static int identify (volatile u8 *p); static int identify (volatile u8 *p);
static void print_fixed (volatile u8 *p); static void print_fixed (volatile u8 *p);
static void print_funcid (int func); static void print_funcid (int func);
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/pmu.h> #include <linux/pmu.h>
#endif #endif
#include "ide_modes.h"
extern void ide_do_request(ide_hwgroup_t *hwgroup, int masked_irq); extern void ide_do_request(ide_hwgroup_t *hwgroup, int masked_irq);
......
...@@ -1794,6 +1794,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate); ...@@ -1794,6 +1794,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate);
extern void ide_toggle_bounce(ide_drive_t *drive, int on); extern void ide_toggle_bounce(ide_drive_t *drive, int on);
extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
typedef struct ide_pio_timings_s {
int setup_time; /* Address setup (ns) minimum */
int active_time; /* Active pulse (ns) minimum */
int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */
} ide_pio_timings_t;
typedef struct ide_pio_data_s {
u8 pio_mode;
u8 use_iordy;
u8 overridden;
u8 blacklisted;
unsigned int cycle_time;
} ide_pio_data_t;
extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
extern const ide_pio_timings_t ide_pio_timings[6];
extern spinlock_t ide_lock; extern spinlock_t ide_lock;
extern struct semaphore ide_cfg_sem; extern struct semaphore ide_cfg_sem;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment