Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/atkbdc/atkbdc_ebus.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
DRIVER_MODULE(atkbdc, ebus, atkbdc_ebus_driver, atkbdc_devclass, 0, 0); | DRIVER_MODULE(atkbdc, ebus, atkbdc_ebus_driver, atkbdc_devclass, 0, 0); | ||||
static int | static int | ||||
atkbdc_ebus_probe(device_t dev) | atkbdc_ebus_probe(device_t dev) | ||||
{ | { | ||||
struct resource *port0, *port1; | struct resource *port0, *port1; | ||||
u_long count, start; | rman_res_t count, start; | ||||
int error, rid; | int error, rid; | ||||
if (strcmp(ofw_bus_get_name(dev), "8042") != 0) | if (strcmp(ofw_bus_get_name(dev), "8042") != 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* | /* | ||||
* On AXi and AXmp boards the NS16550 (used to connect keyboard/ | * On AXi and AXmp boards the NS16550 (used to connect keyboard/ | ||||
* mouse) share their IRQ lines with the i8042. Any IRQ activity | * mouse) share their IRQ lines with the i8042. Any IRQ activity | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
atkbdc_ebus_attach(device_t dev) | atkbdc_ebus_attach(device_t dev) | ||||
{ | { | ||||
atkbdc_softc_t *sc; | atkbdc_softc_t *sc; | ||||
atkbdc_device_t *adi; | atkbdc_device_t *adi; | ||||
device_t cdev; | device_t cdev; | ||||
phandle_t child; | phandle_t child; | ||||
u_long count, intr, start; | rman_res_t count, intr, start; | ||||
int children, error, rid, unit; | int children, error, rid, unit; | ||||
char *cname, *dname; | char *cname, *dname; | ||||
unit = device_get_unit(dev); | unit = device_get_unit(dev); | ||||
sc = *(atkbdc_softc_t **)device_get_softc(dev); | sc = *(atkbdc_softc_t **)device_get_softc(dev); | ||||
if (sc == NULL) { | if (sc == NULL) { | ||||
/* | /* | ||||
* We have to maintain two copies of the kbdc_softc struct, | * We have to maintain two copies of the kbdc_softc struct, | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |