ide_iops.h 752 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Generic I/O and MEMIO string operations. */
  2. #define __ide_insw insw
  3. #define __ide_insl insl
  4. #define __ide_outsw outsw
  5. #define __ide_outsl outsl
  6. static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
  7. {
  8. while (count--) {
  9. *(u16 *)addr = readw(port);
  10. addr += 2;
  11. }
  12. }
  13. static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
  14. {
  15. while (count--) {
  16. *(u32 *)addr = readl(port);
  17. addr += 4;
  18. }
  19. }
  20. static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
  21. {
  22. while (count--) {
  23. writew(*(u16 *)addr, port);
  24. addr += 2;
  25. }
  26. }
  27. static __inline__ void __ide_mm_outsl(void __iomem * port, void *addr, u32 count)
  28. {
  29. while (count--) {
  30. writel(*(u32 *)addr, port);
  31. addr += 4;
  32. }
  33. }