Patchwork [2/2] cmd640: always use enhanced support

login
register
mail settings
Submitter Bartlomiej Zolnierkiewicz
Date Feb. 7, 2011, 10:48 a.m.
Message ID <201102071148.12254.bzolnier@gmail.com>
Download mbox | patch
Permalink /patch/82100/
State Rejected
Delegated to: David Miller
Headers show

Comments

Bartlomiej Zolnierkiewicz - Feb. 7, 2011, 10:48 a.m.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/Kconfig  |   10 ----------
 drivers/ide/cmd640.c |   29 -----------------------------
 2 files changed, 39 deletions(-)

 
@@ -95,8 +93,6 @@ static u8 setup_counts[4]    = {4, 4, 4,
 static u8 active_counts[4]   = {16, 16, 16, 16}; /* Active count   (encoded) 
*/
 static u8 recovery_counts[4] = {16, 16, 16, 16}; /* Recovery count (encoded) 
*/
 
-#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
-
 static DEFINE_SPINLOCK(cmd640_lock);
 
 /*
@@ -282,19 +278,6 @@ static void __set_prefetch_mode(ide_driv
 	}
 }
 
-#ifndef CONFIG_BLK_DEV_CMD640_ENHANCED
-/*
- * Check whether prefetch is on for a drive,
- * and initialize the unmask flags for safe operation.
- */
-static void __init check_prefetch(ide_drive_t *drive, unsigned int index)
-{
-	u8 b = get_cmd640_reg(prefetch_regs[index]);
-
-	__set_prefetch_mode(drive, (b & prefetch_masks[index]) ? 0 : 1);
-}
-#else
-
 /*
  * Sets prefetch mode for a drive.
  */
@@ -496,13 +479,11 @@ static void cmd640_set_pio_mode(ide_hwif
 
 	display_clocks(index);
 }
-#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
 
 static void __init cmd640_init_dev(ide_drive_t *drive)
 {
 	unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1);
 
-#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
 	/*
 	 * Reset timing to the slowest speed and turn off prefetch.
 	 * This way, the drive identify code has a better chance.
@@ -513,14 +494,6 @@ static void __init cmd640_init_dev(ide_d
 	program_drive_counts(drive, i);
 	set_prefetch_mode(drive, i, 0);
 	printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch cleared\n", i);
-#else
-	/*
-	 * Set the drive unmask flags to match the prefetch setting.
-	 */
-	check_prefetch(drive, i);
-	printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n",
-		i, (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) ? "off" : "on");
-#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
 }
 
 static int cmd640_test_irq(ide_hwif_t *hwif)
@@ -535,9 +508,7 @@ static int cmd640_test_irq(ide_hwif_t *h
 
 static const struct ide_port_ops cmd640_port_ops = {
 	.init_dev		= cmd640_init_dev,
-#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
 	.set_pio_mode		= cmd640_set_pio_mode,
-#endif
 	.test_irq		= cmd640_test_irq,
 };
 
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -249,16 +249,6 @@  config BLK_DEV_CMD640
 	  the "CSA-6400E PCI to IDE controller" that some people have. For
 	  details, read <file:Documentation/ide/ide.txt>.
 
-config BLK_DEV_CMD640_ENHANCED
-	bool "CMD640 enhanced support"
-	depends on BLK_DEV_CMD640
-	help
-	  This option includes support for setting/autotuning PIO modes and
-	  prefetch on CMD640 IDE interfaces.  For details, read
-	  <file:Documentation/ide/ide.txt>. If you have a CMD640 IDE interface
-	  and your BIOS does not already do this for you, then say Y here.
-	  Otherwise say N.
-
 config BLK_DEV_IDEPNP
 	tristate "PNP EIDE support"
 	depends on PNP
Index: b/drivers/ide/cmd640.c
===================================================================
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -82,8 +82,6 @@  static int cmd640_vlb;
 static u8 prefetch_regs[4]  = {CNTRL, CNTRL, ARTTIM23, ARTTIM23};
 static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, 
ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
 
-#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
-
 static u8 arttim_regs[4] = {ARTTIM0, ARTTIM1, ARTTIM23, ARTTIM23};
 static u8 drwtim_regs[4] = {DRWTIM0, DRWTIM1, DRWTIM23, DRWTIM23};