emu_att - int slot = lamebus_probe(sc, LB_VENDOR_CS161,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * Code for probe/attach of the emu device to lamebus. */ #include <types.h> #include <lib.h> #include <lamebus/lamebus.h> #include <lamebus/emu.h> #include "autoconf.h" /* Lowest revision we support */ #define LOW_VERSION 1 /* Highest revision we support */ #define HIGH_VERSION 1 struct emu_softc * attach_emu_to_lamebus(int emuno, struct lamebus_softc *sc) { struct emu_softc *es;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int slot = lamebus_probe(sc, LB_VENDOR_CS161, LBCS161_EMUFS, LOW_VERSION, HIGH_VERSION); if (slot &lt; 0) { return NULL; } es = kmalloc(sizeof(struct emu_softc)); if (es==NULL) { return NULL; } es-&gt;e_busdata = sc; es-&gt;e_buspos = slot; es-&gt;e_unit = emuno; lamebus_mark(sc, slot); lamebus_attach_interrupt(sc, slot, es, emu_irq); return es; }...
View Full Document

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Ask a homework question - tutors are online