diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
commit | 98339cbd360b77c3167db287fd611468c2c44559 (patch) | |
tree | 06779e040c18aa40fc5a6e15b132fa1f70ec45f6 /drivers/ide/pci/amd74xx.c | |
parent | e4e0fadcd929138aa82130a1c5f22206d86d7bb2 (diff) | |
parent | cbbc4e818de4451cdef75a112b7fc8a523d5d2a0 (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: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
...
Diffstat (limited to 'drivers/ide/pci/amd74xx.c')
-rw-r--r-- | drivers/ide/pci/amd74xx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index efcf54338be7..ad222206a429 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -53,20 +53,20 @@ static void amd_set_speed(struct pci_dev *dev, u8 dn, u8 udma_mask, | |||
53 | u8 t = 0, offset = amd_offset(dev); | 53 | u8 t = 0, offset = amd_offset(dev); |
54 | 54 | ||
55 | pci_read_config_byte(dev, AMD_ADDRESS_SETUP + offset, &t); | 55 | pci_read_config_byte(dev, AMD_ADDRESS_SETUP + offset, &t); |
56 | t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(timing->setup, 1, 4) - 1) << ((3 - dn) << 1)); | 56 | t = (t & ~(3 << ((3 - dn) << 1))) | ((clamp_val(timing->setup, 1, 4) - 1) << ((3 - dn) << 1)); |
57 | pci_write_config_byte(dev, AMD_ADDRESS_SETUP + offset, t); | 57 | pci_write_config_byte(dev, AMD_ADDRESS_SETUP + offset, t); |
58 | 58 | ||
59 | pci_write_config_byte(dev, AMD_8BIT_TIMING + offset + (1 - (dn >> 1)), | 59 | pci_write_config_byte(dev, AMD_8BIT_TIMING + offset + (1 - (dn >> 1)), |
60 | ((FIT(timing->act8b, 1, 16) - 1) << 4) | (FIT(timing->rec8b, 1, 16) - 1)); | 60 | ((clamp_val(timing->act8b, 1, 16) - 1) << 4) | (clamp_val(timing->rec8b, 1, 16) - 1)); |
61 | 61 | ||
62 | pci_write_config_byte(dev, AMD_DRIVE_TIMING + offset + (3 - dn), | 62 | pci_write_config_byte(dev, AMD_DRIVE_TIMING + offset + (3 - dn), |
63 | ((FIT(timing->active, 1, 16) - 1) << 4) | (FIT(timing->recover, 1, 16) - 1)); | 63 | ((clamp_val(timing->active, 1, 16) - 1) << 4) | (clamp_val(timing->recover, 1, 16) - 1)); |
64 | 64 | ||
65 | switch (udma_mask) { | 65 | switch (udma_mask) { |
66 | case ATA_UDMA2: t = timing->udma ? (0xc0 | (FIT(timing->udma, 2, 5) - 2)) : 0x03; break; | 66 | case ATA_UDMA2: t = timing->udma ? (0xc0 | (clamp_val(timing->udma, 2, 5) - 2)) : 0x03; break; |
67 | case ATA_UDMA4: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 2, 10)]) : 0x03; break; | 67 | case ATA_UDMA4: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 2, 10)]) : 0x03; break; |
68 | case ATA_UDMA5: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 10)]) : 0x03; break; | 68 | case ATA_UDMA5: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 1, 10)]) : 0x03; break; |
69 | case ATA_UDMA6: t = timing->udma ? (0xc0 | amd_cyc2udma[FIT(timing->udma, 1, 15)]) : 0x03; break; | 69 | case ATA_UDMA6: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 1, 15)]) : 0x03; break; |
70 | default: return; | 70 | default: return; |
71 | } | 71 | } |
72 | 72 | ||
@@ -179,7 +179,7 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, | |||
179 | * Determine the system bus clock. | 179 | * Determine the system bus clock. |
180 | */ | 180 | */ |
181 | 181 | ||
182 | amd_clock = (ide_pci_clk ? ide_pci_clk : system_bus_clock()) * 1000; | 182 | amd_clock = (ide_pci_clk ? ide_pci_clk : 33) * 1000; |
183 | 183 | ||
184 | switch (amd_clock) { | 184 | switch (amd_clock) { |
185 | case 33000: amd_clock = 33333; break; | 185 | case 33000: amd_clock = 33333; break; |