예제 #1
0
void
gscattach(device_t parent, device_t self, void *aux)
{
	struct gsc_softc *sc = device_private(self);
	struct gsc_attach_args *ga = aux;
	struct cpu_info *ci = &cpus[0];

	sc->sc_dev = self;
	sc->sc_ga = *ga;

#ifdef USELEDS
	if (machine_ledaddr)
		aprint_normal(": %sleds", machine_ledword? "word" : "");
#endif

	aprint_normal("\n");

	/* Add the I/O subsystem's interrupt register. */
	ga->ga_ir->ir_name = device_xname(self);
	sc->sc_ih = hppa_intr_establish(IPL_NONE, NULL, ga->ga_ir,
	    &ci->ci_ir, ga->ga_irq);

	ga->ga_ca.ca_nmodules = MAXMODBUS;
	ga->ga_ca.ca_hpabase = 0;
	pdc_scanbus(self, &ga->ga_ca, gsc_module_callback);
}
예제 #2
0
void
phantomasattach(struct device *parent, struct device *self, void *aux)
{
	struct confargs *ca = aux, nca;

	printf("\n");

	nca = *ca;
	nca.ca_hpamask = HPPA_IOBEGIN;
	pdc_scanbus(self, &nca, MAXMODBUS, 0);
}
예제 #3
0
void
phantomasattach(device_t parent, device_t self, void *aux)
{
	struct phantomas_softc *sc = device_private(self);
	struct confargs *ca = aux, nca;

	sc->sc_dev = self;
	nca = *ca;
	nca.ca_hpabase = 0;
	nca.ca_nmodules = MAXMODBUS;

	aprint_normal("\n");
	pdc_scanbus(self, &nca, phantomas_callback);
}
예제 #4
0
파일: gscbus.c 프로젝트: MarginC/kame
void
gscattach(struct device *parent, struct device *self, void *aux)
{
	struct gsc_softc *sc = (struct gsc_softc *)self;
	struct gsc_attach_args *ga = aux;

	sc->sc_ga = *ga;

	if (machine_ledaddr)
		printf(": %sleds", machine_ledword? "word" : "");

	printf ("\n");

	/* Add the I/O subsystem's interrupt register. */
	ga->ga_int_reg->int_reg_dev = parent->dv_xname;
	sc->sc_ih = hp700_intr_establish(&sc->sc_dev, IPL_NONE,
					 NULL, ga->ga_int_reg,
					 &int_reg_cpu, ga->ga_irq);

	pdc_scanbus(self, &ga->ga_ca, gsc_module_callback);
}