PERFORCE change 89308 for review

Warner Losh imp at FreeBSD.org
Fri Jan 6 15:34:52 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=89308

Change 89308 by imp at 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 <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91var.h>
 
-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


More information about the p4-projects mailing list