From 8c8b0b95fd12235956940ba14a16192eae4f2315 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 5 Jan 2011 23:45:07 +0000 Subject: Remove support for SKYEYE simulator --- sys/arm/at91/uart_dev_at91usart.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'sys/arm/at91/uart_dev_at91usart.c') diff --git a/sys/arm/at91/uart_dev_at91usart.c b/sys/arm/at91/uart_dev_at91usart.c index 89ed2d2..94ea9de 100644 --- a/sys/arm/at91/uart_dev_at91usart.c +++ b/sys/arm/at91/uart_dev_at91usart.c @@ -315,7 +315,6 @@ at91_usart_bus_probe(struct uart_softc *sc) return (0); } -#ifndef SKYEYE_WORKAROUNDS static void at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { @@ -323,15 +322,12 @@ at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) return; *(bus_addr_t *)arg = segs[0].ds_addr; } -#endif static int at91_usart_bus_attach(struct uart_softc *sc) { -#ifndef SKYEYE_WORKAROUNDS int err; int i; -#endif uint32_t cr; struct at91_usart_softc *atsc; @@ -349,7 +345,6 @@ at91_usart_bus_attach(struct uart_softc *sc) atsc->flags |= HAS_TIMEOUT; WR4(&sc->sc_bas, USART_IDR, 0xffffffff); -#ifndef SKYEYE_WORKAROUNDS /* * Allocate DMA tags and maps */ @@ -380,7 +375,6 @@ at91_usart_bus_attach(struct uart_softc *sc) atsc->ping = &atsc->ping_pong[0]; atsc->pong = &atsc->ping_pong[1]; } -#endif /* * Prime the pump with the RX buffer. We use two 64 byte bounce @@ -414,34 +408,25 @@ at91_usart_bus_attach(struct uart_softc *sc) WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); } WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK); -#ifndef SKYEYE_WORKAROUNDS errout:; // XXX bad return (err); -#else - return (0); -#endif } static int at91_usart_bus_transmit(struct uart_softc *sc) { -#ifndef SKYEYE_WORKAROUNDS bus_addr_t addr; -#endif struct at91_usart_softc *atsc; atsc = (struct at91_usart_softc *)sc; -#ifndef SKYEYE_WORKAROUNDS if (bus_dmamap_load(atsc->dmatag, atsc->tx_map, sc->sc_txbuf, sc->sc_txdatasz, at91_getaddr, &addr, 0) != 0) return (EAGAIN); bus_dmamap_sync(atsc->dmatag, atsc->tx_map, BUS_DMASYNC_PREWRITE); -#endif uart_lock(sc->sc_hwmtx); sc->sc_txbusy = 1; -#ifndef SKYEYE_WORKAROUNDS /* * Setup the PDC to transfer the data and interrupt us when it * is done. We've already requested the interrupt. @@ -451,15 +436,6 @@ at91_usart_bus_transmit(struct uart_softc *sc) WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_TXTEN); WR4(&sc->sc_bas, USART_IER, USART_CSR_ENDTX); uart_unlock(sc->sc_hwmtx); -#else - for (int i = 0; i < sc->sc_txdatasz; i++) - at91_usart_putc(&sc->sc_bas, sc->sc_txbuf[i]); - /* - * XXX: Gross hack : Skyeye doesn't raise an interrupt once the - * transfer is done, so simulate it. - */ - WR4(&sc->sc_bas, USART_IER, USART_CSR_TXRDY); -#endif return (0); } static int -- cgit v1.1