From 7b5fb1c0fe7951487bba2244d8e9f2bee0f7c77c Mon Sep 17 00:00:00 2001 From: njl Date: Mon, 12 Jul 2004 20:49:26 +0000 Subject: Update in preparation for adding the ACPI attachment. * Add an fdtype ivar. This will be the equivalent of fd->type. * Move enabling the FIFO to the end of attach. * Unify reset code into fdc_initial_reset(). * Add fdc_write_ivar(). * Update isa and pccard attachments accordingly. * Set the flags unconditionally in probe since they may be overridden by other probe routines. Both before and now, we're depending on probe being called a final time on the winning driver so the flags we get are the ones we intended. * Use the bus accessor macros instead of defining our own. * Remove duplicate assigns of fd->type. --- sys/dev/fdc/fdcvar.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys/dev/fdc/fdcvar.h') diff --git a/sys/dev/fdc/fdcvar.h b/sys/dev/fdc/fdcvar.h index 4271b7a..30dd825 100644 --- a/sys/dev/fdc/fdcvar.h +++ b/sys/dev/fdc/fdcvar.h @@ -124,11 +124,21 @@ typedef enum fdc_type fdc_t; extern devclass_t fdc_devclass; +enum fdc_device_ivars { + FDC_IVAR_FDUNIT, + FDC_IVAR_FDTYPE, +}; + +__BUS_ACCESSOR(fdc, fdunit, FDC, FDUNIT, int); +__BUS_ACCESSOR(fdc, fdtype, FDC, FDTYPE, int); + int fdc_alloc_resources(struct fdc_data *); void fdout_wr(fdc_p, u_int8_t); int fd_cmd(struct fdc_data *, int, ...); void fdc_release_resources(struct fdc_data *); int fdc_attach(device_t); int fdc_detach(device_t dev); +int fdc_initial_reset(struct fdc_data *); int fdc_print_child(device_t, device_t); int fdc_read_ivar(device_t, device_t, int, uintptr_t *); +int fdc_write_ivar(device_t, device_t, int, uintptr_t); -- cgit v1.1