mmc-mackerel.h 1001 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef MMC_MACKEREL_H
  2. #define MMC_MACKEREL_H
  3. #define PORT0CR (void __iomem *)0xe6051000
  4. #define PORT1CR (void __iomem *)0xe6051001
  5. #define PORT2CR (void __iomem *)0xe6051002
  6. #define PORT159CR (void __iomem *)0xe605009f
  7. #define PORTR031_000DR (void __iomem *)0xe6055000
  8. #define PORTL159_128DR (void __iomem *)0xe6054010
  9. static inline void mmc_init_progress(void)
  10. {
  11. /* Initialise LEDS0-3
  12. * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
  13. * value: 0x10 - enable output
  14. */
  15. __raw_writeb(0x10, PORT0CR);
  16. __raw_writeb(0x10, PORT1CR);
  17. __raw_writeb(0x10, PORT2CR);
  18. __raw_writeb(0x10, PORT159CR);
  19. }
  20. static inline void mmc_update_progress(int n)
  21. {
  22. unsigned a = 0, b = 0;
  23. if (n < 3)
  24. a = 1 << n;
  25. else
  26. b = 1 << 31;
  27. __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a,
  28. PORTR031_000DR);
  29. __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
  30. PORTL159_128DR);
  31. }
  32. #endif /* MMC_MACKEREL_H */