diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-03-18 16:22:46 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:12 -0400 |
commit | a9dde2886b52f7959268c5a76c3c5974444c3a36 (patch) | |
tree | 761e66577c3c6d03b3d25e8401558ea3aff47685 /arch/mips/mti-malta/malta-setup.c | |
parent | 26859198195503823735641ff79a246299606da8 (diff) |
MIPS: Malta: Fix CONFIG_BLK_DEV_IDE vestiges.
Don't depend on CONFIG_IDE to make this more robust.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mti-malta/malta-setup.c')
-rw-r--r-- | arch/mips/mti-malta/malta-setup.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c index 405ff85e4b22..bf621516afff 100644 --- a/arch/mips/mti-malta/malta-setup.c +++ b/arch/mips/mti-malta/malta-setup.c | |||
@@ -165,7 +165,6 @@ static void __init plat_setup_iocoherency(void) | |||
165 | #endif | 165 | #endif |
166 | } | 166 | } |
167 | 167 | ||
168 | #ifdef CONFIG_BLK_DEV_IDE | ||
169 | static void __init pci_clock_check(void) | 168 | static void __init pci_clock_check(void) |
170 | { | 169 | { |
171 | unsigned int __iomem *jmpr_p = | 170 | unsigned int __iomem *jmpr_p = |
@@ -175,18 +174,25 @@ static void __init pci_clock_check(void) | |||
175 | 33, 20, 25, 30, 12, 16, 37, 10 | 174 | 33, 20, 25, 30, 12, 16, 37, 10 |
176 | }; | 175 | }; |
177 | int pciclock = pciclocks[jmpr]; | 176 | int pciclock = pciclocks[jmpr]; |
178 | char *argptr = fw_getcmdline(); | 177 | char *optptr, *argptr = fw_getcmdline(); |
179 | 178 | ||
180 | if (pciclock != 33 && !strstr(argptr, "idebus=")) { | 179 | /* |
181 | pr_warn("WARNING: PCI clock is %dMHz, setting idebus\n", | 180 | * If user passed a pci_clock= option, don't tack on another one |
181 | */ | ||
182 | optptr = strstr(argptr, "pci_clock="); | ||
183 | if (optptr && (optptr == argptr || optptr[-1] == ' ')) | ||
184 | return; | ||
185 | |||
186 | if (pciclock != 33) { | ||
187 | pr_warn("WARNING: PCI clock is %dMHz, setting pci_clock\n", | ||
182 | pciclock); | 188 | pciclock); |
183 | argptr += strlen(argptr); | 189 | argptr += strlen(argptr); |
184 | sprintf(argptr, " idebus=%d", pciclock); | 190 | sprintf(argptr, " pci_clock=%d", pciclock); |
185 | if (pciclock < 20 || pciclock > 66) | 191 | if (pciclock < 20 || pciclock > 66) |
186 | pr_warn("WARNING: IDE timing calculations will be incorrect\n"); | 192 | pr_warn("WARNING: IDE timing calculations will be " |
193 | "incorrect\n"); | ||
187 | } | 194 | } |
188 | } | 195 | } |
189 | #endif | ||
190 | 196 | ||
191 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) | 197 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) |
192 | static void __init screen_info_setup(void) | 198 | static void __init screen_info_setup(void) |
@@ -272,9 +278,7 @@ void __init plat_mem_setup(void) | |||
272 | 278 | ||
273 | plat_setup_iocoherency(); | 279 | plat_setup_iocoherency(); |
274 | 280 | ||
275 | #ifdef CONFIG_BLK_DEV_IDE | ||
276 | pci_clock_check(); | 281 | pci_clock_check(); |
277 | #endif | ||
278 | 282 | ||
279 | #ifdef CONFIG_BLK_DEV_FD | 283 | #ifdef CONFIG_BLK_DEV_FD |
280 | fd_activate(); | 284 | fd_activate(); |