diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/at91/at91_st.c | 15 | ||||
-rw-r--r-- | sys/arm/at91/at91rm9200.c | 4 | ||||
-rw-r--r-- | sys/arm/at91/uart_bus_at91usart.c | 4 | ||||
-rw-r--r-- | sys/arm/at91/uart_cpu_at91rm9200usart.c | 5 | ||||
-rw-r--r-- | sys/arm/at91/uart_dev_at91usart.c | 24 |
5 files changed, 0 insertions, 52 deletions
diff --git a/sys/arm/at91/at91_st.c b/sys/arm/at91/at91_st.c index df28a9f..e195653 100644 --- a/sys/arm/at91/at91_st.c +++ b/sys/arm/at91/at91_st.c @@ -77,11 +77,7 @@ static unsigned at91st_get_timecount(struct timecounter *tc); static struct timecounter at91st_timecounter = { at91st_get_timecount, /* get_timecount */ NULL, /* no poll_pps */ -#ifdef SKYEYE_WORKAROUNDS - 0xffffffffu, /* counter_mask */ -#else 0xfffffu, /* counter_mask */ -#endif 32768, /* frequency */ "AT91RM9200 timer", /* name */ 1000 /* quality */ @@ -138,18 +134,10 @@ static devclass_t at91st_devclass; DRIVER_MODULE(at91_st, atmelarm, at91st_driver, at91st_devclass, 0, 0); -#ifdef SKYEYE_WORKAROUNDS -static unsigned long tot_count = 0; -#endif - static unsigned at91st_get_timecount(struct timecounter *tc) { -#ifdef SKYEYE_WORKAROUNDS - return (tot_count); -#else return (st_crtr()); -#endif } /* @@ -189,9 +177,6 @@ clock_intr(void *arg) /* The interrupt is shared, so we have to make sure it's for us. */ if (RD4(ST_SR) & ST_SR_PITS) { -#ifdef SKYEYE_WORKAROUNDS - tot_count += 32768 / hz; -#endif hardclock(TRAPF_USERMODE(fp), TRAPF_PC(fp)); return (FILTER_HANDLED); } diff --git a/sys/arm/at91/at91rm9200.c b/sys/arm/at91/at91rm9200.c index 27faaff..9a0fae5 100644 --- a/sys/arm/at91/at91rm9200.c +++ b/sys/arm/at91/at91rm9200.c @@ -121,15 +121,11 @@ static const struct cpu_devs at91_devs[] = DEVICE("at91_ssc", SSC2, 2), DEVICE("spi", SPI, 0), -#ifndef SKYEYE_WORKAROUNDS DEVICE("uart", DBGU, 0), DEVICE("uart", USART0, 1), DEVICE("uart", USART1, 2), DEVICE("uart", USART2, 3), DEVICE("uart", USART3, 4), -#else - DEVICE("uart", USART0, 0), -#endif DEVICE("at91_aic", AIC, 0), DEVICE("at91_mc", MC, 0), DEVICE("at91_tc", TC0, 0), diff --git a/sys/arm/at91/uart_bus_at91usart.c b/sys/arm/at91/uart_bus_at91usart.c index aa246cb..c5e3f82 100644 --- a/sys/arm/at91/uart_bus_at91usart.c +++ b/sys/arm/at91/uart_bus_at91usart.c @@ -76,11 +76,7 @@ usart_at91rm92_probe(device_t dev) switch (device_get_unit(dev)) { case 0: -#ifdef SKYEYE_WORKAROUNDS - device_set_desc(dev, "USART0"); -#else device_set_desc(dev, "DBGU"); -#endif /* * Setting sc_sysdev makes this device a 'system device' and * indirectly makes it the system console. diff --git a/sys/arm/at91/uart_cpu_at91rm9200usart.c b/sys/arm/at91/uart_cpu_at91rm9200usart.c index 9e9baa2..7988993 100644 --- a/sys/arm/at91/uart_cpu_at91rm9200usart.c +++ b/sys/arm/at91/uart_cpu_at91rm9200usart.c @@ -73,13 +73,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) * XXX: Not pretty, but will work because we map the needed addresses * early. */ -#ifdef SKYEYE_WORKAROUNDS - di->bas.bsh = AT91RM92_BASE + AT91RM92_USART0_BASE; - di->baudrate = 38400; -#else di->bas.bsh = AT91RM92_BASE + AT91RM92_DBGU_BASE; di->baudrate = 115200; -#endif di->bas.regshft = 0; di->bas.rclk = 0; di->databits = 8; 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 |