diff options
| author | ad <ad@NetBSD.org> | 2001-05-06 19:53:04 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2001-05-06 19:53:04 +0000 |
| commit | 95450fbced9ad7795ce877a0abd12b2d70f7b9df (patch) | |
| tree | 8eef1b3315e4557b8f307f086b245f29c43d37b8 /sys/dev | |
| parent | d4d6497c45aefb7847b94d0f08cc80319ad8c549 (diff) | |
Make provision for resetting the board at start-up.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/mlx.c | 11 | ||||
| -rw-r--r-- | sys/dev/ic/mlxreg.h | 5 | ||||
| -rw-r--r-- | sys/dev/ic/mlxvar.h | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/ic/mlx.c b/sys/dev/ic/mlx.c index a1f57654d6a..186b7722892 100644 --- a/sys/dev/ic/mlx.c +++ b/sys/dev/ic/mlx.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlx.c,v 1.7 2001/04/30 03:48:06 lukem Exp $ */ +/* $NetBSD: mlx.c,v 1.8 2001/05/06 19:53:04 ad Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -343,6 +343,15 @@ mlx_init(struct mlx_softc *mlx, const char *intrstr) /* Disable interrupts before we start talking to the controller */ (*mlx->mlx_intaction)(mlx, 0); + /* If we've got a reset routine, then reset the controller now. */ + if (mlx->mlx_reset != NULL) { + printf("%s: resetting controller...\n", mlx->mlx_dv.dv_xname); + if ((*mlx->mlx_reset)(mlx) != 0) { + printf("%s: reset failed\n", mlx->mlx_dv.dv_xname); + return; + } + } + /* * Wait for the controller to come ready, handshaking with the * firmware if required. This is typically only necessary on diff --git a/sys/dev/ic/mlxreg.h b/sys/dev/ic/mlxreg.h index 006b1f5b057..12291518d28 100644 --- a/sys/dev/ic/mlxreg.h +++ b/sys/dev/ic/mlxreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: mlxreg.h,v 1.1 2001/02/04 17:05:12 ad Exp $ */ +/* $NetBSD: mlxreg.h,v 1.2 2001/05/06 19:53:04 ad Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -120,8 +120,10 @@ #define MLX_V1_IDB_INIT_BUSY 0x02 /* init in progress */ #define MLX_V1_IDB_SACK 0x02 /* acknowledge status read */ +#define MLX_V1_IDB_RESET 0x10 /* reset controller */ #define MLX_V1_ODB_SAVAIL 0x01 /* status is available */ +#define MLX_V1_ODB_RESET 0x02 /* reset controller */ #define MLX_V1_FWERROR_PEND 0x04 /* firmware error pending */ @@ -144,6 +146,7 @@ #define MLX_V3_IDB_INIT_BUSY 0x02 /* init in progress */ #define MLX_V3_IDB_SACK 0x02 /* acknowledge status read */ +#define MLX_V3_IDB_RESET 0x08 /* reset controller */ #define MLX_V3_ODB_SAVAIL 0x01 /* status is available */ diff --git a/sys/dev/ic/mlxvar.h b/sys/dev/ic/mlxvar.h index cef4ec94464..194d7e148b1 100644 --- a/sys/dev/ic/mlxvar.h +++ b/sys/dev/ic/mlxvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: mlxvar.h,v 1.1 2001/02/04 17:05:12 ad Exp $ */ +/* $NetBSD: mlxvar.h,v 1.2 2001/05/06 19:53:04 ad Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -146,6 +146,7 @@ struct mlx_softc { int (*mlx_findcomplete)(struct mlx_softc *, u_int *, u_int *); void (*mlx_intaction)(struct mlx_softc *, int); int (*mlx_fw_handshake)(struct mlx_softc *, int *, int *, int *); + int (*mlx_reset)(struct mlx_softc *); int mlx_max_queuecnt; struct mlx_enquiry2 *mlx_enq2; |
