mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
OMAP STI/XTI console.
Add a dummy serial to receive the output from STI console (OMAP debugging/emulation interface). Add some more OMAP UART dummy registers. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4331 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4c54e87568
commit
54585ffec7
3 changed files with 217 additions and 0 deletions
20
hw/omap1.c
20
hw/omap1.c
|
@ -1987,6 +1987,8 @@ struct omap_uart_s {
|
|||
uint8_t syscontrol;
|
||||
uint8_t wkup;
|
||||
uint8_t cfps;
|
||||
uint8_t mdr[2];
|
||||
uint8_t scr;
|
||||
};
|
||||
|
||||
void omap_uart_reset(struct omap_uart_s *s)
|
||||
|
@ -2015,6 +2017,14 @@ static uint32_t omap_uart_read(void *opaque, target_phys_addr_t addr)
|
|||
int offset = addr - s->base;
|
||||
|
||||
switch (offset) {
|
||||
case 0x20: /* MDR1 */
|
||||
return s->mdr[0];
|
||||
case 0x24: /* MDR2 */
|
||||
return s->mdr[1];
|
||||
case 0x40: /* SCR */
|
||||
return s->scr;
|
||||
case 0x44: /* SSR */
|
||||
return 0x0;
|
||||
case 0x48: /* EBLR */
|
||||
return s->eblr;
|
||||
case 0x50: /* MVR */
|
||||
|
@ -2040,9 +2050,19 @@ static void omap_uart_write(void *opaque, target_phys_addr_t addr,
|
|||
int offset = addr - s->base;
|
||||
|
||||
switch (offset) {
|
||||
case 0x20: /* MDR1 */
|
||||
s->mdr[0] = value & 0x7f;
|
||||
break;
|
||||
case 0x24: /* MDR2 */
|
||||
s->mdr[1] = value & 0xff;
|
||||
break;
|
||||
case 0x40: /* SCR */
|
||||
s->scr = value & 0xff;
|
||||
break;
|
||||
case 0x48: /* EBLR */
|
||||
s->eblr = value & 0xff;
|
||||
break;
|
||||
case 0x44: /* SSR */
|
||||
case 0x50: /* MVR */
|
||||
case 0x58: /* SYSS */
|
||||
OMAP_RO_REG(addr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue