dv-bfin_spi.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Blackfin Serial Peripheral Interface (SPI) model
  2. Copyright (C) 2010-2015 Free Software Foundation, Inc.
  3. Contributed by Analog Devices, Inc.
  4. This file is part of simulators.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef DV_BFIN_SPI_H
  16. #define DV_BFIN_SPI_H
  17. /* SPI_CTL Masks. */
  18. #define TIMOD (3 << 0)
  19. #define RDBR_CORE (0 << 0)
  20. #define TDBR_CORE (1 << 0)
  21. #define RDBR_DMA (2 << 0)
  22. #define TDBR_DMA (3 << 0)
  23. #define SZ (1 << 2)
  24. #define GM (1 << 3)
  25. #define PSSE (1 << 4)
  26. #define EMISO (1 << 5)
  27. #define SZE (1 << 8)
  28. #define LSBF (1 << 9)
  29. #define CPHA (1 << 10)
  30. #define CPOL (1 << 11)
  31. #define MSTR (1 << 12)
  32. #define WOM (1 << 13)
  33. #define SPE (1 << 14)
  34. /* SPI_STAT Masks. */
  35. #define SPIF (1 << 0)
  36. #define MODF (1 << 1)
  37. #define TXE (1 << 2)
  38. #define TXS (1 << 3)
  39. #define RBSY (1 << 4)
  40. #define RXS (1 << 5)
  41. #define TXCOL (1 << 6)
  42. #endif