ide.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * linux/include/asm-parisc/ide.h
  3. *
  4. * Copyright (C) 1994-1996 Linus Torvalds & authors
  5. */
  6. /*
  7. * This file contains the PARISC architecture specific IDE code.
  8. */
  9. #ifndef __ASM_PARISC_IDE_H
  10. #define __ASM_PARISC_IDE_H
  11. #ifdef __KERNEL__
  12. /* Generic I/O and MEMIO string operations. */
  13. #define __ide_insw insw
  14. #define __ide_insl insl
  15. #define __ide_outsw outsw
  16. #define __ide_outsl outsl
  17. static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
  18. {
  19. while (count--) {
  20. *(u16 *)addr = __raw_readw(port);
  21. addr += 2;
  22. }
  23. }
  24. static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
  25. {
  26. while (count--) {
  27. *(u32 *)addr = __raw_readl(port);
  28. addr += 4;
  29. }
  30. }
  31. static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
  32. {
  33. while (count--) {
  34. __raw_writew(*(u16 *)addr, port);
  35. addr += 2;
  36. }
  37. }
  38. static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
  39. {
  40. while (count--) {
  41. __raw_writel(*(u32 *)addr, port);
  42. addr += 4;
  43. }
  44. }
  45. #endif /* __KERNEL__ */
  46. #endif /* __ASM_PARISC_IDE_H */