digic-uart.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Canon DIGIC UART block declarations.
  3. *
  4. * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  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 HW_CHAR_DIGIC_UART_H
  18. #define HW_CHAR_DIGIC_UART_H
  19. #include "hw/sysbus.h"
  20. #include "chardev/char-fe.h"
  21. #include "qom/object.h"
  22. #define TYPE_DIGIC_UART "digic-uart"
  23. OBJECT_DECLARE_SIMPLE_TYPE(DigicUartState, DIGIC_UART)
  24. enum {
  25. R_TX = 0x00,
  26. R_RX,
  27. R_ST = (0x14 >> 2),
  28. R_MAX
  29. };
  30. struct DigicUartState {
  31. /*< private >*/
  32. SysBusDevice parent_obj;
  33. /*< public >*/
  34. MemoryRegion regs_region;
  35. CharBackend chr;
  36. uint32_t reg_rx;
  37. uint32_t reg_st;
  38. };
  39. #endif /* HW_CHAR_DIGIC_UART_H */