diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-05-25 11:06:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-05-25 11:06:29 +0000 |
commit | 48f83b1a2e0a034c1b28a72c41c85a27a3a01266 (patch) | |
tree | 9bdce36ba1f7f3df9cbe2081f66aa979ee3f7696 /sim/common/hw-base.h | |
parent | c14db36dbbcef966978f8d8aee0b3670d3243bb0 (diff) | |
download | gdb-48f83b1a2e0a034c1b28a72c41c85a27a3a01266.zip gdb-48f83b1a2e0a034c1b28a72c41c85a27a3a01266.tar.gz gdb-48f83b1a2e0a034c1b28a72c41c85a27a3a01266.tar.bz2 |
Make hw-main.h the main header file for H/W devices. Like sim-main.h
Update dv-*.c
Replace *_callback with more correct. *_method. Update dv-*.c
Diffstat (limited to 'sim/common/hw-base.h')
-rw-r--r-- | sim/common/hw-base.h | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/sim/common/hw-base.h b/sim/common/hw-base.h index da37986..4cb574b 100644 --- a/sim/common/hw-base.h +++ b/sim/common/hw-base.h @@ -19,27 +19,8 @@ */ -#ifndef HW_ROOT -#define HW_ROOT - -/* A root device from which dv-* devices can be built */ - -#include "hw-device.h" - -#include "hw-properties.h" -#include "hw-events.h" -#include "hw-alloc.h" -/* #include "hw-instances.h" */ -/* #include "hw-handles.h" */ -#include "hw-ports.h" - -typedef void (hw_finish_callback) - (struct hw *me); - -struct hw_device_descriptor { - const char *family; - hw_finish_callback *to_finish; -}; +#ifndef HW_BASE +#define HW_BASE /* Create a primative device */ @@ -77,32 +58,6 @@ typedef void (hw_delete_callback) ((hw)->base_of_hw->to_delete = (method)) -/* Helper functions to make the implementation of a device easier */ - -/* Go through the devices reg properties and look for those specifying - an address to attach various registers to */ - -void do_hw_attach_regs (struct hw *me); - -/* Perform a polling read on FD returning either the number of bytes - or a hw_io status code that indicates the reason for the read - failure */ - -enum { - HW_IO_EOF = -1, HW_IO_NOT_READY = -2, /* See: IEEE 1275 */ -}; - -typedef int (do_hw_poll_read_method) - (SIM_DESC sd, int, char *, int); - -int do_hw_poll_read -(struct hw *me, - do_hw_poll_read_method *read, - int sim_io_fd, - void *buf, - unsigned size_of_buf); - - /* ALLOC */ extern void create_hw_alloc_data |