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 18 #ifndef HW_CHAR_DIGIC_UART_H 19 #define HW_CHAR_DIGIC_UART_H 20 21 #include "hw/sysbus.h" 22 23 #define TYPE_DIGIC_UART "digic-uart" 24 #define DIGIC_UART(obj) \ 25 OBJECT_CHECK(DigicUartState, (obj), TYPE_DIGIC_UART) 26 27 enum { 28 R_TX = 0x00, 29 R_RX, 30 R_ST = (0x14 >> 2), 31 R_MAX 32 }; 33 34 typedef struct DigicUartState { 35 /*< private >*/ 36 SysBusDevice parent_obj; 37 /*< public >*/ 38 39 MemoryRegion regs_region; 40 CharDriverState *chr; 41 42 uint32_t reg_rx; 43 uint32_t reg_st; 44 } DigicUartState; 45 46 #endif /* HW_CHAR_DIGIC_UART_H */ 47