aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2005-12-14 20:16:18 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-12-14 20:16:18 -0500
commit65e5f2e3b457b6b20a5c4481312189d141a33d24 (patch)
treecce866efd8eea1815cb054a274e165bdbba16180
parent38f9d412be1ed29ee3b41782f22fd85b1c95fbed (diff)
[PATCH] ide: core modifications for AU1200
bart: slightly modified by me Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-dma.c15
-rw-r--r--include/asm-mips/mach-au1x00/au1xxx_ide.h5
-rw-r--r--include/linux/ide.h6
3 files changed, 12 insertions, 14 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 1e1531334c25..0523da77425a 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -90,11 +90,6 @@
90#include <asm/io.h> 90#include <asm/io.h>
91#include <asm/irq.h> 91#include <asm/irq.h>
92 92
93struct drive_list_entry {
94 const char *id_model;
95 const char *id_firmware;
96};
97
98static const struct drive_list_entry drive_whitelist [] = { 93static const struct drive_list_entry drive_whitelist [] = {
99 94
100 { "Micropolis 2112A" , "ALL" }, 95 { "Micropolis 2112A" , "ALL" },
@@ -139,7 +134,7 @@ static const struct drive_list_entry drive_blacklist [] = {
139}; 134};
140 135
141/** 136/**
142 * in_drive_list - look for drive in black/white list 137 * ide_in_drive_list - look for drive in black/white list
143 * @id: drive identifier 138 * @id: drive identifier
144 * @drive_table: list to inspect 139 * @drive_table: list to inspect
145 * 140 *
@@ -147,7 +142,7 @@ static const struct drive_list_entry drive_blacklist [] = {
147 * Returns 1 if the drive is found in the table. 142 * Returns 1 if the drive is found in the table.
148 */ 143 */
149 144
150static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table) 145int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table)
151{ 146{
152 for ( ; drive_table->id_model ; drive_table++) 147 for ( ; drive_table->id_model ; drive_table++)
153 if ((!strcmp(drive_table->id_model, id->model)) && 148 if ((!strcmp(drive_table->id_model, id->model)) &&
@@ -157,6 +152,8 @@ static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *d
157 return 0; 152 return 0;
158} 153}
159 154
155EXPORT_SYMBOL_GPL(ide_in_drive_list);
156
160/** 157/**
161 * ide_dma_intr - IDE DMA interrupt handler 158 * ide_dma_intr - IDE DMA interrupt handler
162 * @drive: the drive the interrupt is for 159 * @drive: the drive the interrupt is for
@@ -663,7 +660,7 @@ int __ide_dma_bad_drive (ide_drive_t *drive)
663{ 660{
664 struct hd_driveid *id = drive->id; 661 struct hd_driveid *id = drive->id;
665 662
666 int blacklist = in_drive_list(id, drive_blacklist); 663 int blacklist = ide_in_drive_list(id, drive_blacklist);
667 if (blacklist) { 664 if (blacklist) {
668 printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n", 665 printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n",
669 drive->name, id->model); 666 drive->name, id->model);
@@ -677,7 +674,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive);
677int __ide_dma_good_drive (ide_drive_t *drive) 674int __ide_dma_good_drive (ide_drive_t *drive)
678{ 675{
679 struct hd_driveid *id = drive->id; 676 struct hd_driveid *id = drive->id;
680 return in_drive_list(id, drive_whitelist); 677 return ide_in_drive_list(id, drive_whitelist);
681} 678}
682 679
683EXPORT_SYMBOL(__ide_dma_good_drive); 680EXPORT_SYMBOL(__ide_dma_good_drive);
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h
index 33d275c3b84c..0c3c127e619e 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_ide.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h
@@ -87,11 +87,6 @@ typedef struct
87} _auide_hwif; 87} _auide_hwif;
88 88
89#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 89#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
90struct drive_list_entry {
91 const char * id_model;
92 const char * id_firmware;
93};
94
95/* HD white list */ 90/* HD white list */
96static const struct drive_list_entry dma_white_list [] = { 91static const struct drive_list_entry dma_white_list [] = {
97/* 92/*
diff --git a/include/linux/ide.h b/include/linux/ide.h
index a39c3c59789d..a6b28dcf8f0d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1371,6 +1371,12 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *);
1371#define GOOD_DMA_DRIVE 1 1371#define GOOD_DMA_DRIVE 1
1372 1372
1373#ifdef CONFIG_BLK_DEV_IDEDMA 1373#ifdef CONFIG_BLK_DEV_IDEDMA
1374struct drive_list_entry {
1375 const char *id_model;
1376 const char *id_firmware;
1377};
1378
1379int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1374int __ide_dma_bad_drive(ide_drive_t *); 1380int __ide_dma_bad_drive(ide_drive_t *);
1375int __ide_dma_good_drive(ide_drive_t *); 1381int __ide_dma_good_drive(ide_drive_t *);
1376int ide_use_dma(ide_drive_t *); 1382int ide_use_dma(ide_drive_t *);