1 #include <exec/types.h>
3 #include <asm/amcc440.h>
5 VOID
ata_insw(APTR address
, UWORD port
, ULONG count
)
8 UWORD
*p
= (UWORD
*)(port
+ PCIC0_IO
);
17 VOID
ata_insl(APTR address
, UWORD port
, ULONG count
)
20 ata_insw(address
, port
, count
);
23 ULONG
*addr
= address
;
24 ULONG
*p
= (ULONG
*)(port
+ PCIC0_IO
);
34 VOID
ata_outsw(APTR address
, UWORD port
, ULONG count
)
36 UWORD
*addr
= address
;
37 UWORD
*p
= (UWORD
*)(port
+ PCIC0_IO
);
46 VOID
ata_outsl(APTR address
, UWORD port
, ULONG count
)
49 ata_outsw(address
, port
, count
);
52 ULONG
*addr
= address
;
53 ULONG
*p
= (ULONG
*)(port
+ PCIC0_IO
);
63 void ata_400ns(ULONG port
)
65 register ULONG tick_old
, tick
;
67 asm volatile("mftbl %0":"=r"(tick_old
));
70 asm volatile("mftbl %0":"=r"(tick
));
71 } while(tick
< (tick_old
+ 60));