From owner-svn-src-head@FreeBSD.ORG Wed Jan 5 23:45:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E792106564A; Wed, 5 Jan 2011 23:45:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0178FC15; Wed, 5 Jan 2011 23:45:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p05Nj824094944; Wed, 5 Jan 2011 23:45:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p05Nj855094938; Wed, 5 Jan 2011 23:45:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201101052345.p05Nj855094938@svn.freebsd.org> From: Warner Losh Date: Wed, 5 Jan 2011 23:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217036 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 23:45:08 -0000 Author: imp Date: Wed Jan 5 23:45:07 2011 New Revision: 217036 URL: http://svn.freebsd.org/changeset/base/217036 Log: Remove support for SKYEYE simulator Modified: head/sys/arm/at91/at91_st.c head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/uart_bus_at91usart.c head/sys/arm/at91/uart_cpu_at91rm9200usart.c head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/at91_st.c ============================================================================== --- head/sys/arm/at91/at91_st.c Wed Jan 5 23:17:29 2011 (r217035) +++ head/sys/arm/at91/at91_st.c Wed Jan 5 23:45:07 2011 (r217036) @@ -77,11 +77,7 @@ static unsigned at91st_get_timecount(str 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); } Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Wed Jan 5 23:17:29 2011 (r217035) +++ head/sys/arm/at91/at91rm9200.c Wed Jan 5 23:45:07 2011 (r217036) @@ -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), Modified: head/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_bus_at91usart.c Wed Jan 5 23:17:29 2011 (r217035) +++ head/sys/arm/at91/uart_bus_at91usart.c Wed Jan 5 23:45:07 2011 (r217036) @@ -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. Modified: head/sys/arm/at91/uart_cpu_at91rm9200usart.c ============================================================================== --- head/sys/arm/at91/uart_cpu_at91rm9200usart.c Wed Jan 5 23:17:29 2011 (r217035) +++ head/sys/arm/at91/uart_cpu_at91rm9200usart.c Wed Jan 5 23:45:07 2011 (r217036) @@ -73,13 +73,8 @@ uart_cpu_getdev(int devtype, struct uart * 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; Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Wed Jan 5 23:17:29 2011 (r217035) +++ head/sys/arm/at91/uart_dev_at91usart.c Wed Jan 5 23:45:07 2011 (r217036) @@ -315,7 +315,6 @@ at91_usart_bus_probe(struct uart_softc * 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_ 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 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 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 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_soft 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