Skip to content

Commit a04ca92

Browse files
committed
escc: remove register changes from escc_reset_chn()
Now that register values at reset are handled elsewhere for all of device reset, soft reset and hard reset, escc_reset_chn() only needs to handle initialisation of internal device state. Signed-off-by: Mark Cave-Ayland <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Mark Cave-Ayland <[email protected]>
1 parent 160509a commit a04ca92

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

hw/char/escc.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
#define MISC2_PLLCMD0 0x20
140140
#define MISC2_PLLCMD1 0x40
141141
#define MISC2_PLLCMD2 0x80
142-
#define MISC2_PLLDIS 0x30
143142
#define W_EXTINT 15
144143
#define EXTINT_DCD 0x08
145144
#define EXTINT_SYNCINT 0x10
@@ -279,31 +278,7 @@ static void escc_update_irq(ESCCChannelState *s)
279278

280279
static void escc_reset_chn(ESCCChannelState *s)
281280
{
282-
int i;
283-
284281
s->reg = 0;
285-
for (i = 0; i < ESCC_SERIAL_REGS; i++) {
286-
s->rregs[i] = 0;
287-
s->wregs[i] = 0;
288-
}
289-
/* 1X divisor, 1 stop bit, no parity */
290-
s->wregs[W_TXCTRL1] = TXCTRL1_1STOP;
291-
s->wregs[W_MINTR] = MINTR_RST_ALL;
292-
/* Synch mode tx clock = TRxC */
293-
s->wregs[W_CLOCK] = CLOCK_TRXC;
294-
/* PLL disabled */
295-
s->wregs[W_MISC2] = MISC2_PLLDIS;
296-
/* Enable most interrupts */
297-
s->wregs[W_EXTINT] = EXTINT_DCD | EXTINT_SYNCINT | EXTINT_CTSINT |
298-
EXTINT_TXUNDRN | EXTINT_BRKINT;
299-
if (s->disabled) {
300-
s->rregs[R_STATUS] = STATUS_TXEMPTY | STATUS_DCD | STATUS_SYNC |
301-
STATUS_CTS | STATUS_TXUNDRN;
302-
} else {
303-
s->rregs[R_STATUS] = STATUS_TXEMPTY | STATUS_TXUNDRN;
304-
}
305-
s->rregs[R_SPEC] = SPEC_BITS8 | SPEC_ALLSENT;
306-
307282
s->rx = s->tx = 0;
308283
s->rxint = s->txint = 0;
309284
s->rxint_under_svc = s->txint_under_svc = 0;

0 commit comments

Comments
 (0)