fiq_debugger.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * arch/arm/include/asm/fiq_debugger.h
  3. *
  4. * Copyright (C) 2010 Google, Inc.
  5. * Author: Colin Cross <ccross@android.com>
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_
  18. #define _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_
  19. #include <linux/serial_core.h>
  20. #define FIQ_DEBUGGER_NO_CHAR NO_POLL_CHAR
  21. #define FIQ_DEBUGGER_BREAK 0x00ff0100
  22. #define FIQ_DEBUGGER_FIQ_IRQ_NAME "fiq"
  23. #define FIQ_DEBUGGER_SIGNAL_IRQ_NAME "signal"
  24. #define FIQ_DEBUGGER_WAKEUP_IRQ_NAME "wakeup"
  25. /**
  26. * struct fiq_debugger_pdata - fiq debugger platform data
  27. * @uart_resume: used to restore uart state right before enabling
  28. * the fiq.
  29. * @uart_enable: Do the work necessary to communicate with the uart
  30. * hw (enable clocks, etc.). This must be ref-counted.
  31. * @uart_disable: Do the work necessary to disable the uart hw
  32. * (disable clocks, etc.). This must be ref-counted.
  33. * @uart_dev_suspend: called during PM suspend, generally not needed
  34. * for real fiq mode debugger.
  35. * @uart_dev_resume: called during PM resume, generally not needed
  36. * for real fiq mode debugger.
  37. */
  38. struct fiq_debugger_pdata {
  39. int (*uart_init)(struct platform_device *pdev);
  40. void (*uart_free)(struct platform_device *pdev);
  41. int (*uart_resume)(struct platform_device *pdev);
  42. int (*uart_getc)(struct platform_device *pdev);
  43. void (*uart_putc)(struct platform_device *pdev, unsigned int c);
  44. void (*uart_flush)(struct platform_device *pdev);
  45. void (*uart_enable)(struct platform_device *pdev);
  46. void (*uart_disable)(struct platform_device *pdev);
  47. int (*uart_dev_suspend)(struct platform_device *pdev);
  48. int (*uart_dev_resume)(struct platform_device *pdev);
  49. void (*fiq_enable)(struct platform_device *pdev, unsigned int fiq,
  50. bool enable);
  51. void (*fiq_ack)(struct platform_device *pdev, unsigned int fiq);
  52. void (*force_irq)(struct platform_device *pdev, unsigned int irq);
  53. void (*force_irq_ack)(struct platform_device *pdev, unsigned int irq);
  54. };
  55. #endif