ssp.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * ssp.h
  3. *
  4. * Copyright (C) 2003 Russell King, All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This driver supports the following PXA CPU/SSP ports:-
  11. *
  12. * PXA250 SSP
  13. * PXA255 SSP, NSSP
  14. * PXA26x SSP, NSSP, ASSP
  15. * PXA27x SSP1, SSP2, SSP3
  16. */
  17. #ifndef SSP_H
  18. #define SSP_H
  19. struct ssp_state {
  20. u32 cr0;
  21. u32 cr1;
  22. u32 to;
  23. u32 psp;
  24. };
  25. struct ssp_dev {
  26. u32 port;
  27. u32 mode;
  28. u32 flags;
  29. u32 psp_flags;
  30. u32 speed;
  31. };
  32. int ssp_write_word(struct ssp_dev *dev, u32 data);
  33. int ssp_read_word(struct ssp_dev *dev);
  34. void ssp_flush(struct ssp_dev *dev);
  35. void ssp_enable(struct ssp_dev *dev);
  36. void ssp_disable(struct ssp_dev *dev);
  37. void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
  38. void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
  39. int ssp_init(struct ssp_dev *dev, u32 port);
  40. int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
  41. void ssp_exit(struct ssp_dev *dev);
  42. #endif