Skip to content

Commit cde1e86

Browse files
nehebfloatious
authored andcommitted
ata: pata_ep93xx: avoid asm on non ARM
The raw ARM asm delay loop prevents COMPILE_TEST builds on non-ARM architectures. Guard it with CONFIG_ARM and provide a cpu_relax() fallback for compilation on other architectures. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent 042f552 commit cde1e86

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/ata/pata_ep93xx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ static void ep93xx_pata_enable_pio(void __iomem *base, int pio_mode)
204204
*/
205205
static void ep93xx_pata_delay(unsigned long count)
206206
{
207+
#ifdef CONFIG_ARM
207208
__asm__ volatile (
208209
"0:\n"
209210
"mov r0, r0\n"
@@ -212,6 +213,10 @@ static void ep93xx_pata_delay(unsigned long count)
212213
: "=r" (count)
213214
: "0" (count)
214215
);
216+
#else
217+
while (count--)
218+
cpu_relax();
219+
#endif
215220
}
216221

217222
static unsigned long ep93xx_pata_wait_for_iordy(void __iomem *base,

0 commit comments

Comments
 (0)