Merge Perforce changeset 219952 to head:

Make different bus attachments for Altera and Terasice
  device drivers share the same devclass_t.

Sponsored by:	DARPA, AFRL
This commit is contained in:
Robert Watson 2013-01-13 16:57:11 +00:00
parent e360ca5ade
commit 6a347d023b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245380
24 changed files with 24 additions and 24 deletions

View File

@ -60,6 +60,8 @@ __FBSDID("$FreeBSD$");
* system-on-chip bus environments would work fine with the same code.
*/
devclass_t altera_avgen_devclass;
static d_mmap_t altera_avgen_mmap;
static d_read_t altera_avgen_read;
static d_write_t altera_avgen_write;

View File

@ -82,4 +82,6 @@ int altera_avgen_attach(struct altera_avgen_softc *sc,
const char *str_devname, int devunit);
void altera_avgen_detach(struct altera_avgen_softc *sc);
extern devclass_t altera_avgen_devclass;
#endif /* _DEV_ALTERA_AVALON_H_ */

View File

@ -150,7 +150,5 @@ static driver_t altera_avgen_fdt_driver = {
sizeof(struct altera_avgen_softc),
};
static devclass_t altera_avgen_devclass;
DRIVER_MODULE(avgen, simplebus, altera_avgen_fdt_driver,
altera_avgen_devclass, 0, 0);

View File

@ -137,7 +137,5 @@ static driver_t altera_avgen_nexus_driver = {
sizeof(struct altera_avgen_softc),
};
static devclass_t altera_avgen_devclass;
DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass,
0, 0);

View File

@ -194,4 +194,6 @@ extern u_int aju_cons_jtag_missed;
int altera_jtag_uart_attach(struct altera_jtag_uart_softc *sc);
void altera_jtag_uart_detach(struct altera_jtag_uart_softc *sc);
extern devclass_t altera_jtag_uart_devclass;
#endif /* _DEV_ALTERA_JTAG_UART_H_ */

View File

@ -32,6 +32,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/cons.h>
#include <sys/endian.h>
#include <sys/kdb.h>
@ -46,6 +47,8 @@ __FBSDID("$FreeBSD$");
#include <dev/altera/jtag_uart/altera_jtag_uart.h>
devclass_t altera_jtag_uart_devclass;
/*
* One-byte buffer as we can't check whether the UART is readable without
* actually reading from it, synchronised by a spinlock; this lock also

View File

@ -143,7 +143,5 @@ static driver_t altera_jtag_uart_fdt_driver = {
sizeof(struct altera_jtag_uart_softc),
};
static devclass_t altera_jtag_uart_devclass;
DRIVER_MODULE(altera_jtag_uart, simplebus, altera_jtag_uart_fdt_driver,
altera_jtag_uart_devclass, 0, 0);

View File

@ -137,7 +137,5 @@ static driver_t altera_jtag_uart_nexus_driver = {
sizeof(struct altera_jtag_uart_softc),
};
static devclass_t altera_jtag_uart_devclass;
DRIVER_MODULE(altera_jtag_uart, nexus, altera_jtag_uart_nexus_driver,
altera_jtag_uart_devclass, 0, 0);

View File

@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
* 3. Handle read-only SD Cards.
* 4. Tune timeouts based on real-world SD Card speeds.
*/
devclass_t altera_sdcard_devclass;
void
altera_sdcard_attach(struct altera_sdcard_softc *sc)

View File

@ -244,4 +244,6 @@ void altera_sdcard_start(struct altera_sdcard_softc *sc);
void altera_sdcard_disk_insert(struct altera_sdcard_softc *sc);
void altera_sdcard_disk_remove(struct altera_sdcard_softc *sc);
extern devclass_t altera_sdcard_devclass;
#endif /* _DEV_ALTERA_SDCARD_H_ */

View File

@ -116,7 +116,5 @@ static driver_t altera_sdcard_fdt_driver = {
sizeof(struct altera_sdcard_softc),
};
static devclass_t altera_sdcard_devclass;
DRIVER_MODULE(altera_sdcard, simplebus, altera_sdcard_fdt_driver,
altera_sdcard_devclass, 0, 0);

View File

@ -110,7 +110,5 @@ static driver_t altera_sdcard_nexus_driver = {
sizeof(struct altera_sdcard_softc),
};
static devclass_t altera_sdcard_devclass;
DRIVER_MODULE(altera_sdcard, nexus, altera_sdcard_nexus_driver,
altera_sdcard_devclass, 0, 0);

View File

@ -150,6 +150,7 @@ static void isf_task(void *arg);
* physical package, due to variable block size support in the StrataFlash
* part.
*/
devclass_t isf_devclass;
static uint16_t
isf_read_reg(struct isf_softc *sc, uint16_t reg)

View File

@ -89,6 +89,8 @@ struct isf_softc {
int isf_attach(struct isf_softc *sc);
void isf_detach(struct isf_softc *sc);
extern devclass_t isf_devclass;
#endif /* _KERNEL */
#endif /* _DEV_ISF_H_ */

View File

@ -121,6 +121,4 @@ static driver_t isf_fdt_driver = {
sizeof(struct isf_softc),
};
static devclass_t isf_devclass;
DRIVER_MODULE(isf, simplebus, isf_fdt_driver, isf_devclass, 0, 0);

View File

@ -115,6 +115,4 @@ static driver_t isf_nexus_driver = {
sizeof(struct isf_softc),
};
static devclass_t isf_devclass;
DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0);

View File

@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$");
#include <dev/led/led.h>
#include <dev/terasic/de4led/terasic_de4led.h>
devclass_t terasic_de4led_devclass;
static void
terasic_de4led_update(struct terasic_de4led_softc *sc)
{

View File

@ -72,4 +72,6 @@ struct terasic_de4led_softc {
void terasic_de4led_attach(struct terasic_de4led_softc *sc);
void terasic_de4led_detach(struct terasic_de4led_softc *sc);
extern devclass_t terasic_de4led_devclass;
#endif /* _DEV_TERASIC_DE4LED_H_ */

View File

@ -114,7 +114,5 @@ static driver_t terasic_de4led_fdt_driver = {
sizeof(struct terasic_de4led_softc),
};
static devclass_t terasic_de4led_devclass;
DRIVER_MODULE(terasic_de4led, simplebus, terasic_de4led_fdt_driver,
terasic_de4led_devclass, 0, 0);

View File

@ -106,7 +106,5 @@ static driver_t terasic_de4led_nexus_driver = {
sizeof(struct terasic_de4led_softc),
};
static devclass_t terasic_de4led_devclass;
DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver,
terasic_de4led_devclass, 0, 0);

View File

@ -63,6 +63,9 @@ __FBSDID("$FreeBSD$");
* attached as they may be called even if the attach routine hasn't been, on
* an error.
*/
devclass_t terasic_mtl_devclass;
int
terasic_mtl_attach(struct terasic_mtl_softc *sc)
{

View File

@ -159,6 +159,8 @@ struct terasic_mtl_softc {
int terasic_mtl_attach(struct terasic_mtl_softc *sc);
void terasic_mtl_detach(struct terasic_mtl_softc *sc);
extern devclass_t terasic_mtl_devclass;
/*
* Sub-driver setup routines.
*/

View File

@ -196,7 +196,5 @@ static driver_t terasic_mtl_fdt_driver = {
sizeof(struct terasic_mtl_softc),
};
static devclass_t terasic_mtl_devclass;
DRIVER_MODULE(mtl, simplebus, terasic_mtl_fdt_driver, terasic_mtl_devclass, 0,
0);

View File

@ -190,7 +190,5 @@ static driver_t terasic_mtl_nexus_driver = {
sizeof(struct terasic_mtl_softc),
};
static devclass_t terasic_mtl_devclass;
DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0,
0);