From: patrick Date: Wed, 17 Aug 2016 13:26:40 +0000 (+0000) Subject: Remove bogus suspend/resume code from armv7 com(4) attachment driver. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=592fb2eb63a3efa13b4d77efea237edb23bb5b7a;p=openbsd Remove bogus suspend/resume code from armv7 com(4) attachment driver. The code initially arrived when the zaurus driver was copied. As we don't suspend on ARMv7, just get rid of it. Prompted by jsg@ and kettenis@. --- diff --git a/sys/arch/armv7/dev/com_fdt.c b/sys/arch/armv7/dev/com_fdt.c index 54ad0467338..c31767af425 100644 --- a/sys/arch/armv7/dev/com_fdt.c +++ b/sys/arch/armv7/dev/com_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_fdt.c,v 1.4 2016/08/17 13:05:02 patrick Exp $ */ +/* $OpenBSD: com_fdt.c,v 1.5 2016/08/17 13:26:40 patrick Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. * All rights reserved. @@ -56,13 +56,10 @@ #include #include -#define com_isr 8 -#define ISR_RECV (ISR_RXPL | ISR_XMODE | ISR_RCVEIR) #define com_usr 31 /* Synopsys DesignWare UART */ int com_fdt_match(struct device *, void *, void *); void com_fdt_attach(struct device *, struct device *, void *); -int com_fdt_activate(struct device *, int); int com_fdt_intr_designware(void *); extern int comcnspeed; @@ -74,8 +71,7 @@ struct com_fdt_softc { }; struct cfattach com_fdt_ca = { - sizeof (struct com_fdt_softc), com_fdt_match, com_fdt_attach, NULL, - com_fdt_activate + sizeof (struct com_fdt_softc), com_fdt_match, com_fdt_attach }; void @@ -169,33 +165,6 @@ com_fdt_attach(struct device *parent, struct device *self, void *aux) sc, sc->sc.sc_dev.dv_xname); } -int -com_fdt_activate(struct device *self, int act) -{ - struct com_softc *sc = (struct com_softc *)self; - bus_space_tag_t iot = sc->sc_iot; - bus_space_handle_t ioh = sc->sc_ioh; - struct tty *tp = sc->sc_tty; - - switch (act) { - case DVACT_SUSPEND: - break; - case DVACT_RESUME: - if (sc->enabled) { - sc->sc_initialize = 1; - comparam(tp, &tp->t_termios); - bus_space_write_1(iot, ioh, com_ier, sc->sc_ier); - - if (ISSET(sc->sc_hwflags, COM_HW_SIR)) { - bus_space_write_1(iot, ioh, com_isr, - ISR_RECV); - } - } - break; - } - return 0; -} - int com_fdt_intr_designware(void *cookie) {