aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5520.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 17:55:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 17:55:09 -0400
commitb5684b83b1e1579bbbc80e703e990c0cccf5892c (patch)
tree3f1b62b2320bce4d658d2ad0d4b77856499ac533 /drivers/ide/pci/cs5520.c
parent1481b9109fe771ec8b035d7760f42e36d2bed5d4 (diff)
parent1b8ebad87b459e2e1333fbf28005977245ff5402 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits) ide: use proper printk() KERN_* levels in ide-probe.c ide: fix for EATA SCSI HBA in ATA emulating mode ide: remove stale comments from drivers/ide/Makefile ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase ide-scsi: remove kmalloced struct request ht6560b: remove old history ht6560b: update email address ide-cd: fix oops when using growisofs gayle: release resources on ide_host_add() failure palm_bk3710: add UltraDMA/100 support ide: trivial sparse annotations ide: ide-tape.c sparse annotations and unaligned access removal ide: drop 'name' parameter from ->init_chipset method ide: prefix messages from IDE PCI host drivers by driver name it821x: remove DECLARE_ITE_DEV() macro it8213: remove DECLARE_ITE_DEV() macro ide: include PCI device name in messages from IDE PCI host drivers ide: remove <asm/ide.h> for some archs ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) ide-generic: is no longer needed on ppc32 ...
Diffstat (limited to 'drivers/ide/pci/cs5520.c')
-rw-r--r--drivers/ide/pci/cs5520.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index b03d8ae947e6..c0364b287f17 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -41,6 +41,8 @@
41#include <linux/ide.h> 41#include <linux/ide.h>
42#include <linux/dma-mapping.h> 42#include <linux/dma-mapping.h>
43 43
44#define DRV_NAME "cs5520"
45
44struct pio_clocks 46struct pio_clocks
45{ 47{
46 int address; 48 int address;
@@ -92,18 +94,11 @@ static const struct ide_port_ops cs5520_port_ops = {
92 .set_dma_mode = cs5520_set_dma_mode, 94 .set_dma_mode = cs5520_set_dma_mode,
93}; 95};
94 96
95#define DECLARE_CS_DEV(name_str) \ 97static const struct ide_port_info cyrix_chipset __devinitdata = {
96 { \ 98 .name = DRV_NAME,
97 .name = name_str, \ 99 .port_ops = &cs5520_port_ops,
98 .port_ops = &cs5520_port_ops, \ 100 .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_CS5520,
99 .host_flags = IDE_HFLAG_ISA_PORTS | \ 101 .pio_mask = ATA_PIO4,
100 IDE_HFLAG_CS5520, \
101 .pio_mask = ATA_PIO4, \
102 }
103
104static const struct ide_port_info cyrix_chipsets[] __devinitdata = {
105 /* 0 */ DECLARE_CS_DEV("Cyrix 5510"),
106 /* 1 */ DECLARE_CS_DEV("Cyrix 5520")
107}; 102};
108 103
109/* 104/*
@@ -114,7 +109,7 @@ static const struct ide_port_info cyrix_chipsets[] __devinitdata = {
114 109
115static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) 110static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
116{ 111{
117 const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; 112 const struct ide_port_info *d = &cyrix_chipset;
118 hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; 113 hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL };
119 114
120 ide_setup_pci_noise(dev, d); 115 ide_setup_pci_noise(dev, d);
@@ -128,7 +123,8 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
128 } 123 }
129 pci_set_master(dev); 124 pci_set_master(dev);
130 if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { 125 if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
131 printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); 126 printk(KERN_WARNING "%s: No suitable DMA available.\n",
127 d->name);
132 return -ENODEV; 128 return -ENODEV;
133 } 129 }
134 130