linux/drivers
Sergei Shtylyov 7b73ee05d0 hpt366: init code rewrite
Finally, rework the driver init.  code to correctly handle all the chip
variants HighPoint has created so far.  This should cure the rest of the
timing issues in the driver (especially, on 66 MHz PCI) caused by the
HighPoint's habit of switching the base DPLL clock with every new revision
of the chips...

  - switch to using the enumeration type to differ between the numerous chip
    variants, matching PCI device/revision ID with the chip type early, at the
    init_setup stage;

  - extend the hpt_info structure to hold the DPLL and PCI clock frequencies,
    stop duplicating it for each channel by storing the pointer in the pci_dev
    structure: first, at the init_setup stage, point it to a static "template"
    with only the chip type and its specific base DPLL frequency, the highest
    supported DMA mode, and the chip settings table pointer filled, then, at
    the init_chipset stage, allocate per-chip instance  and fill it with the
    rest of the necessary information;

  - get rid of the constant thresholds in the HPT37x PCI clock detection code,
    switch  to calculating  PCI clock frequency based on the chip's base DPLL
    frequency;

  - switch to using the DPLL clock and enable UltraATA/133 mode by default on
    anything newer than HPT370/A;

  - fold PCI clock detection and DPLL setup code into init_chipset_hpt366(),
    unify the HPT36x/37x setup code and the speedproc handlers by joining the
    register setting lists into the table indexed by the clock selected;

  - add enablebits for all the chips to avoid touching disabled channels
    (though the HighPoint BIOS seem to only disable the primary one on
    HPT371/N);

  - separate the UltraDMA and MWDMA masks there to avoid changing PIO timings
    when setting an UltraDMA mode in hpt37x_tune_chipset().

This version has been tested on HPT370/302/371N.

Thanks to Alan for the inspiration. Hopefully, his libata driver will also
benefit from the work done on this "obsolete" driver...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-07 18:18:16 +01:00
..
acorn
acpi [PATCH] ACPI: fix cpufreq regression 2007-01-26 13:50:58 -08:00
amba
ata libata: Initialize nbytes for internal sg commands 2007-02-02 11:52:05 -05:00
atm [PATCH] horizon.c: missing __devinit 2007-01-23 11:09:49 -08:00
base
block
bluetooth
cdrom
char [PATCH] sysrq: showBlockedTasks is sysrq-W 2007-02-01 16:22:42 -08:00
clocksource
connector
cpufreq [CPUFREQ] check sysfs_create_link return value 2007-01-29 00:06:27 -05:00
crypto [S390] Support for s390 Pseudo Random Number Generator 2007-02-05 21:18:22 +01:00
dio
dma
edac
eisa
fc4
firmware [PATCH] Fix race in efi variable delete code 2007-01-26 13:51:01 -08:00
hid HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG 2007-02-05 10:00:45 +01:00
hwmon hwmon/w83793: Hide invalid VID readings 2007-01-18 22:14:24 +01:00
i2c
ide hpt366: init code rewrite 2007-02-07 18:18:16 +01:00
ieee1394
infiniband IB/ehca: Remove obsolete prototypes 2007-02-04 14:11:58 -08:00
input
isdn [PATCH] Gigaset ISDN driver error handling fixes 2007-01-26 13:50:58 -08:00
kvm [PATCH] KVM: fix lockup on 32-bit intel hosts with nx disabled in the bios 2007-02-01 16:22:41 -08:00
leds
macintosh
mca
md [PATCH] md: remove unnecessary printk when raid5 gets an unaligned read. 2007-01-26 13:51:00 -08:00
media V4L/DVB (5123): Buf_qbuf: fix: videobuf_queue->stream corruption and lockup 2007-01-23 22:00:21 -02:00
message
mfd
misc tifm_core: add suspend/resume infrastructure for tifm devices 2007-02-04 20:54:10 +01:00
mmc mmc: tifm: replace kmap with page_address 2007-02-04 20:54:12 +01:00
mtd [PATCH] mtd/nand/cafe.c missing include of dma-mapping.h 2007-01-30 08:39:20 -08:00
net [PATCH] net/smc911x: match up spin lock/unlock 2007-02-03 11:26:06 -08:00
nubus
oprofile
parisc
parport
pci ahci/pata_jmicron: fix JMicron quirk 2007-02-02 11:52:05 -05:00
pcmcia
pnp
ps3
rapidio
rtc [PATCH] remove __devinit markings from rtc_sysfs_add_device() 2007-01-26 13:51:00 -08:00
s390 [S390] Avoid excessive inlining. 2007-02-05 21:18:53 +01:00
sbus
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-02-03 11:26:39 -08:00
serial [ARM] Fix AMBA serial drivers for non-first serial ports 2007-01-24 11:59:57 +00:00
sh
sn
spi [PATCH] SPI: alternative fix for spi_busnum_to_master 2007-01-26 13:50:58 -08:00
tc
telephony
usb USB HID: handle multi-interface devices for Apple macbook pro properly 2007-02-05 10:06:01 +01:00
video
w1
zorro
Kconfig
Makefile