From owner-p4-projects@FreeBSD.ORG Fri Jan 6 23:34:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 61A9E16A423; Fri, 6 Jan 2006 23:34:51 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2283116A41F for ; Fri, 6 Jan 2006 23:34:51 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08BCC43D75 for ; Fri, 6 Jan 2006 23:34:43 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k06NYhUI056519 for ; Fri, 6 Jan 2006 23:34:43 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k06NYh3U056516 for perforce@freebsd.org; Fri, 6 Jan 2006 23:34:43 GMT (envelope-from imp@freebsd.org) Date: Fri, 6 Jan 2006 23:34:43 GMT Message-Id: <200601062334.k06NYh3U056516@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 89308 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2006 23:34:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=89308 Change 89308 by imp@imp_Speedy on 2006/01/06 23:34:40 cleanup driver names while we only have a few. Most atmel specific drivers will start at91_foo, where FOO is the name in the AT91xxxx data sheet. So far the only exceptions to this rule are uart, ohci and ate. ate maybe should be called at91_emac, but that's an insanely long name for an interface... Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91.c#2 edit .. //depot/projects/arm/src/sys/arm/at91/at91st.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91.c#2 (text+ko) ==== @@ -255,12 +255,12 @@ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_IDCR, 0xffffffff); bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_ICCR, 0xffffffff); - at91_add_child(dev, 0, "at91rm92_timer", 0, 0, 0, 1); - at91_add_child(dev, 10, "atudp", 0, AT91RM92_BASE + // UDP + at91_add_child(dev, 0, "at91_st", 0, 0, 0, 1); + at91_add_child(dev, 10, "at91_udp", 0, AT91RM92_BASE + // UDP AT91RM92_UDP_BASE, AT91RM92_UDP_SIZE, AT91RM92_IRQ_UDP); - at91_add_child(dev, 10, "mci", 0, AT91RM92_BASE + // MCI + at91_add_child(dev, 10, "at91_mci", 0, AT91RM92_BASE + // MCI AT91RM92_MCI_BASE, AT91RM92_MCI_SIZE, AT91RM92_IRQ_MCI); - at91_add_child(dev, 10, "twi", 0, AT91RM92_BASE + // TWI + at91_add_child(dev, 10, "at91_twi", 0, AT91RM92_BASE + // TWI AT91RM92_TWI_BASE, AT91RM92_TWI_SIZE, AT91RM92_IRQ_TWI); at91_add_child(dev, 10, "ate", 0, AT91RM92_BASE + // EMAC AT91RM92_EMAC_BASE, AT91RM92_EMAC_SIZE, AT91RM92_IRQ_EMAC); @@ -274,13 +274,13 @@ AT91RM92_USART2_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART2); at91_add_child(dev, 10, "uart", 4, AT91RM92_BASE + // USART3 AT91RM92_USART3_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART3); - at91_add_child(dev, 10, "ssc", 0, AT91RM92_BASE + // SSC0 + at91_add_child(dev, 10, "at91_ssc", 0, AT91RM92_BASE + // SSC0 AT91RM92_SSC0_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC0); - at91_add_child(dev, 10, "ssc", 1, AT91RM92_BASE + // SSC1 + at91_add_child(dev, 10, "at91_ssc", 1, AT91RM92_BASE + // SSC1 AT91RM92_SSC1_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC1); - at91_add_child(dev, 10, "ssc", 2, AT91RM92_BASE + // SSC2 + at91_add_child(dev, 10, "at91_ssc", 2, AT91RM92_BASE + // SSC2 AT91RM92_SSC2_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC2); - at91_add_child(dev, 10, "spi", 0, AT91RM92_BASE + // SPI + at91_add_child(dev, 10, "at91_spi", 0, AT91RM92_BASE + // SPI AT91RM92_SPI_BASE, AT91RM92_SPI_SIZE, AT91RM92_IRQ_SPI); // Not sure that the following belongs on this bus. at91_add_child(dev, 10, "ohci", 0, AT91RM92_BASE + // UHP ==== //depot/projects/arm/src/sys/arm/at91/at91st.c#2 (text+ko) ==== @@ -44,7 +44,7 @@ #include #include -static struct at91rm92timer_softc { +static struct at91st_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; device_t dev; @@ -66,10 +66,10 @@ return (cur1); } -static unsigned at91rm92timer_get_timecount(struct timecounter *tc); +static unsigned at91st_get_timecount(struct timecounter *tc); -static struct timecounter at91rm92timer_timecounter = { - at91rm92timer_get_timecount, /* get_timecount */ +static struct timecounter at91st_timecounter = { + at91st_get_timecount, /* get_timecount */ NULL, /* no poll_pps */ 0xfffffu, /* counter_mask */ 32768, /* frequency */ @@ -78,13 +78,13 @@ }; static int -at91rm92timer_probe(device_t dev) +at91st_probe(device_t dev) { return (0); } static int -at91rm92timer_attach(device_t dev) +at91st_attach(device_t dev) { struct at91_softc *sc = device_get_softc(device_get_parent(dev)); @@ -103,24 +103,23 @@ return (0); } -static device_method_t at91rm92timer_methods[] = { - DEVMETHOD(device_probe, at91rm92timer_probe), - DEVMETHOD(device_attach, at91rm92timer_attach), +static device_method_t at91st_methods[] = { + DEVMETHOD(device_probe, at91st_probe), + DEVMETHOD(device_attach, at91st_attach), {0, 0}, }; -static driver_t at91rm92timer_driver = { - "at91rm92_timer", - at91rm92timer_methods, - sizeof(struct at91rm92timer_softc), +static driver_t at91st_driver = { + "at91_st", + at91st_methods, + sizeof(struct at91st_softc), }; -static devclass_t at91rm92timer_devclass; +static devclass_t at91st_devclass; -DRIVER_MODULE(at91rm92_timer, atmelarm, at91rm92timer_driver, - at91rm92timer_devclass, 0, 0); +DRIVER_MODULE(at91_st, atmelarm, at91st_driver, at91st_devclass, 0, 0); static unsigned -at91rm92timer_get_timecount(struct timecounter *tc) +at91st_get_timecount(struct timecounter *tc) { return (st_crtr()); } @@ -164,7 +163,7 @@ /* Enable PITS interrupts. */ WR4(ST_IER, ST_SR_PITS); - tc_init(&at91rm92timer_timecounter); + tc_init(&at91st_timecounter); } void