#define PROMDEV_SCREEN 0 /* output to screen */
#define PROMDEV_TTYA 1 /* in/out to ttya */
-/* DECLARE data structures for the nodes. */
-DECLARE_UNNAMED_NODE( ob_obio, INSTALL_OPEN, sizeof(int) );
void
ob_new_obio_device(const char *name, const char *type)
sizeof(struct smp_cfg));
}
-static void
-ob_obio_open(__attribute__((unused))int *idx)
-{
- int ret=1;
- RET ( -ret );
-}
-
-static void
-ob_obio_close(__attribute__((unused))int *idx)
-{
- selfword("close-deblocker");
-}
-
-static void
-ob_obio_initialize(__attribute__((unused))int *idx)
-{
- push_str("/");
- fword("find-device");
- fword("new-device");
-
- push_str("obio");
- fword("device-name");
-
- push_str("hierarchical");
- fword("device-type");
-
- PUSH(2);
- fword("encode-int");
- push_str("#address-cells");
- fword("property");
-
- PUSH(1);
- fword("encode-int");
- push_str("#size-cells");
- fword("property");
-
- fword("finish-device");
-}
-
static void
ob_set_obio_ranges(uint64_t base)
{
fword("property");
}
-static void
-ob_obio_decodeunit(__attribute__((unused)) int *idx)
-{
- fword("decode-unit-sbus");
-}
-
-
-static void
-ob_obio_encodeunit(__attribute__((unused)) int *idx)
-{
- fword("encode-unit-sbus");
-}
-
-NODE_METHODS(ob_obio) = {
- { NULL, ob_obio_initialize },
- { "open", ob_obio_open },
- { "close", ob_obio_close },
- { "encode-unit", ob_obio_encodeunit },
- { "decode-unit", ob_obio_decodeunit },
-};
-
int
ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
// http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR89C105.txt
//printk("Initializing OBIO devices...\n");
-#if 0 // XXX
- REGISTER_NAMED_NODE(ob_obio, "/obio");
- device_end();
-#endif
ob_set_obio_ranges(slavio_base);
// Zilog Z8530 serial ports, see http://www.zilog.com