From patchwork Mon Jan 18 17:19:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 43131 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D2EBBB7C8D for ; Tue, 19 Jan 2010 04:30:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754922Ab0ARR22 (ORCPT ); Mon, 18 Jan 2010 12:28:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755695Ab0ARR21 (ORCPT ); Mon, 18 Jan 2010 12:28:27 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:57577 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755079Ab0ARRUZ (ORCPT ); Mon, 18 Jan 2010 12:20:25 -0500 Received: by mail-fx0-f225.google.com with SMTP id 25so682979fxm.21 for ; Mon, 18 Jan 2010 09:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=13XTPUPVnh6NBznEeVlWwWIONrsm3dxTTH/2Zwa7gVQ=; b=DSvddYZqE3Hcx6G2/V732SkGtn+ppX+1HPvTtrkAaFVFfRFWfEOAAtzTTanpUqj2IK V7goL6rXc4E2nFYeI7UDJSNBJEGM3+MwWOEHhGtrsMPEN6Y4r9Oyl4TTRNjLuF5cYmX1 3HQS/93LPph7CSw5DBlyEvr+ioWyvRaj1h0aU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=eZDYJiiKnjfBZ6xljdpZKCXLSeKm/5Ds9hwhfysFSLhiaAmQ8+pVQaEOs8DPAz5gPD 4IrYCzYa8Yp6MYd29FYNS3Od9gJjsz6+RA6Cml2IzqJ70/q+Xtgx4U90Hwib6NwbLTW0 9RzC4GEvwd7kOzWthVOQRlxU7o77OjvidsQZM= Received: by 10.216.88.136 with SMTP id a8mr2128832wef.77.1263835224543; Mon, 18 Jan 2010 09:20:24 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id i35sm8799590gve.11.2010.01.18.09.20.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Jan 2010 09:20:23 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Mon, 18 Jan 2010 18:19:14 +0100 Message-Id: <20100118171914.14623.74426.sendpatchset@localhost> In-Reply-To: <20100118171349.14623.90030.sendpatchset@localhost> References: <20100118171349.14623.90030.sendpatchset@localhost> Subject: [PATCH 36/64] pdc202xx_old: add ->init_hwif method Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] pdc202xx_old: add ->init_hwif method Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pdc202xx_old.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) -- 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 Index: b/drivers/ide/pdc202xx_old.c =================================================================== --- a/drivers/ide/pdc202xx_old.c +++ b/drivers/ide/pdc202xx_old.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1998-2002 Andre Hedrick * Copyright (C) 2006-2007, 2009 MontaVista Software, Inc. - * Copyright (C) 2007 Bartlomiej Zolnierkiewicz + * Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz * * Portions Copyright (C) 1999 Promise Technology, Inc. * Author: Frank Tiernan (frankt@promise.com) @@ -21,8 +21,6 @@ #define DRV_NAME "pdc202xx_old" -static void pdc_old_disable_66MHz_clock(ide_hwif_t *); - static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) { ide_hwif_t *hwif = drive->hwif; @@ -32,12 +30,6 @@ static void pdc202xx_set_mode(ide_drive_ u8 AP = 0, BP = 0, CP = 0; u8 TA = 0, TB = 0, TC = 0; - /* - * TODO: do this once per channel - */ - if (dev->device != PCI_DEVICE_ID_PROMISE_20246) - pdc_old_disable_66MHz_clock(hwif); - pci_read_config_byte(dev, drive_pci, &AP); pci_read_config_byte(dev, drive_pci + 1, &BP); pci_read_config_byte(dev, drive_pci + 2, &CP); @@ -145,6 +137,11 @@ static void pdc_old_disable_66MHz_clock( outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); } +static void pdc2026x_init_hwif(ide_hwif_t *hwif) +{ + pdc_old_disable_66MHz_clock(hwif); +} + static void pdc202xx_dma_start(ide_drive_t *drive) { if (drive->current_speed > XFER_UDMA_2) @@ -261,6 +258,7 @@ static const struct ide_dma_ops pdc2026x { \ .name = DRV_NAME, \ .init_chipset = init_chipset_pdc202xx, \ + .init_hwif = pdc2026x_init_hwif, \ .port_ops = &pdc2026x_port_ops, \ .dma_ops = &pdc2026x_dma_ops, \ .host_flags = IDE_HFLAGS_PDC202XX, \ @@ -356,6 +354,6 @@ static void __exit pdc202xx_ide_exit(voi module_init(pdc202xx_ide_init); module_exit(pdc202xx_ide_exit); -MODULE_AUTHOR("Andre Hedrick, Frank Tiernan"); +MODULE_AUTHOR("Andre Hedrick, Frank Tiernan, Bartlomiej Zolnierkiewicz"); MODULE_DESCRIPTION("PCI driver module for older Promise IDE"); MODULE_LICENSE("GPL");