[PATCH 3/3] palm_bk3710: factor out cable detection

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Thursday, February 7, 2008 - 7:42 am

Factor out cable detection to palm_bk3710_cable_detect().

Cc: Anton Salnikov <asalnikov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/arm/palm_bk3710.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: b/drivers/ide/arm/palm_bk3710.c
===================================================================
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -311,6 +311,12 @@ static void __devinit palm_bk3710_chipin
 	palm_bk3710_setpiomode(base, NULL, 0, 600, 0);
 	palm_bk3710_setpiomode(base, NULL, 1, 600, 0);
 }
+
+static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
+{
+	return ATA_CBL_PATA80;
+}
+
 static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 {
 	struct clk *clkp;
@@ -381,7 +387,7 @@ static int __devinit palm_bk3710_probe(s
 	hwif->set_dma_mode = &palm_bk3710_set_dma_mode;
 	hwif->mmio = 1;
 	default_hwif_mmiops(hwif);
-	hwif->cbl = ATA_CBL_PATA80;
+	hwif->cbl = palm_bk3710_cable_detect(hwif);
 	hwif->ultra_mask = 0x1f;	/* Ultra DMA Mode 4 Max
 						(input clk 99MHz) */
 	hwif->mwdma_mask = 0x7;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/3] palm_bk3710: factor out cable detection, Sergei Shtylyov, (Thu Feb 7, 7:41 am)
[PATCH 3/3] palm_bk3710: factor out cable detection, Bartlomiej Zolnierki ..., (Thu Feb 7, 7:42 am)
Re: [PATCH 3/3] palm_bk3710: factor out cable detection, Bartlomiej Zolnierki ..., (Thu Feb 7, 9:14 am)
Re: [PATCH 3/3] palm_bk3710: factor out cable detection, Bartlomiej Zolnierki ..., (Thu Feb 7, 1:51 pm)
Re: [PATCH 3/3] palm_bk3710: factor out cable detection, Sergei Shtylyov, (Fri Feb 8, 10:34 am)