diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /drivers/ata/pata_amd.c | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'drivers/ata/pata_amd.c')
-rw-r--r-- | drivers/ata/pata_amd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 26665c396485..57dd00f463d3 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -84,32 +84,32 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse | |||
84 | 84 | ||
85 | /* Configure the address set up timing */ | 85 | /* Configure the address set up timing */ |
86 | pci_read_config_byte(pdev, offset + 0x0C, &t); | 86 | pci_read_config_byte(pdev, offset + 0x0C, &t); |
87 | t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(at.setup, 1, 4) - 1) << ((3 - dn) << 1)); | 87 | t = (t & ~(3 << ((3 - dn) << 1))) | ((clamp_val(at.setup, 1, 4) - 1) << ((3 - dn) << 1)); |
88 | pci_write_config_byte(pdev, offset + 0x0C , t); | 88 | pci_write_config_byte(pdev, offset + 0x0C , t); |
89 | 89 | ||
90 | /* Configure the 8bit I/O timing */ | 90 | /* Configure the 8bit I/O timing */ |
91 | pci_write_config_byte(pdev, offset + 0x0E + (1 - (dn >> 1)), | 91 | pci_write_config_byte(pdev, offset + 0x0E + (1 - (dn >> 1)), |
92 | ((FIT(at.act8b, 1, 16) - 1) << 4) | (FIT(at.rec8b, 1, 16) - 1)); | 92 | ((clamp_val(at.act8b, 1, 16) - 1) << 4) | (clamp_val(at.rec8b, 1, 16) - 1)); |
93 | 93 | ||
94 | /* Drive timing */ | 94 | /* Drive timing */ |
95 | pci_write_config_byte(pdev, offset + 0x08 + (3 - dn), | 95 | pci_write_config_byte(pdev, offset + 0x08 + (3 - dn), |
96 | ((FIT(at.active, 1, 16) - 1) << 4) | (FIT(at.recover, 1, 16) - 1)); | 96 | ((clamp_val(at.active, 1, 16) - 1) << 4) | (clamp_val(at.recover, 1, 16) - 1)); |
97 | 97 | ||
98 | switch (clock) { | 98 | switch (clock) { |
99 | case 1: | 99 | case 1: |
100 | t = at.udma ? (0xc0 | (FIT(at.udma, 2, 5) - 2)) : 0x03; | 100 | t = at.udma ? (0xc0 | (clamp_val(at.udma, 2, 5) - 2)) : 0x03; |
101 | break; | 101 | break; |
102 | 102 | ||
103 | case 2: | 103 | case 2: |
104 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 2, 10)]) : 0x03; | 104 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 2, 10)]) : 0x03; |
105 | break; | 105 | break; |
106 | 106 | ||
107 | case 3: | 107 | case 3: |
108 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 10)]) : 0x03; | 108 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 1, 10)]) : 0x03; |
109 | break; | 109 | break; |
110 | 110 | ||
111 | case 4: | 111 | case 4: |
112 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 15)]) : 0x03; | 112 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 1, 15)]) : 0x03; |
113 | break; | 113 | break; |
114 | 114 | ||
115 | default: | 115 | default: |