blackfin.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (C) 2007 by Analog Devices, Inc.
  3. *
  4. * The Inventra Controller Driver for Linux is free software; you
  5. * can redistribute it and/or modify it under the terms of the GNU
  6. * General Public License version 2 as published by the Free Software
  7. * Foundation.
  8. */
  9. #ifndef __MUSB_BLACKFIN_H__
  10. #define __MUSB_BLACKFIN_H__
  11. /*
  12. * Blackfin specific definitions
  13. */
  14. #undef DUMP_FIFO_DATA
  15. #ifdef DUMP_FIFO_DATA
  16. static void dump_fifo_data(u8 *buf, u16 len)
  17. {
  18. u8 *tmp = buf;
  19. int i;
  20. for (i = 0; i < len; i++) {
  21. if (!(i % 16) && i)
  22. pr_debug("\n");
  23. pr_debug("%02x ", *tmp++);
  24. }
  25. pr_debug("\n");
  26. }
  27. #else
  28. #define dump_fifo_data(buf, len) do {} while (0)
  29. #endif
  30. #ifdef CONFIG_BF52x
  31. #define USB_DMA_BASE USB_DMA_INTERRUPT
  32. #define USB_DMAx_CTRL 0x04
  33. #define USB_DMAx_ADDR_LOW 0x08
  34. #define USB_DMAx_ADDR_HIGH 0x0C
  35. #define USB_DMAx_COUNT_LOW 0x10
  36. #define USB_DMAx_COUNT_HIGH 0x14
  37. #define USB_DMA_REG(ep, reg) (USB_DMA_BASE + 0x20 * ep + reg)
  38. #endif
  39. /* Almost 1 second */
  40. #define TIMER_DELAY (1 * HZ)
  41. static struct timer_list musb_conn_timer;
  42. #endif /* __MUSB_BLACKFIN_H__ */