/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family * of PCI-SCSI IO processors. * * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr> * * This driver is derived from the Linux sym53c8xx driver. * Copyright (C) 1998-2000 Gerard Roudier * * The sym53c8xx driver is derived from the ncr53c8xx driver that had been * a port of the FreeBSD ncr driver to Linux-1.2.13. * * The original ncr driver has been written for 386bsd and FreeBSD by * Wolfgang Stanglmeier <wolf@cologne.de> * Stefan Esser <se@mi.Uni-Koeln.de> * Copyright (C) 1994 Wolfgang Stanglmeier * * Other major contributions: * * NVRAM detection and reading. * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk> * *-----------------------------------------------------------------------------
*/
/* * Macro used to generate interfaces for script Z.
*/ #define SYM_GEN_FW_Z(s) \
SYM_GEN_Z(s, snooptest) SYM_GEN_Z(s, snoopend)
/* * Generates structure interface that contains * offsets within script A, B and Z.
*/ #define SYM_GEN_A(s, label) s label; #define SYM_GEN_B(s, label) s label; #define SYM_GEN_Z(s, label) s label; struct sym_fwa_ofs {
SYM_GEN_FW_A(u_short)
}; struct sym_fwb_ofs {
SYM_GEN_FW_B(u_short)
SYM_GEN_B(u_short, start64)
SYM_GEN_B(u_short, pm_handle)
}; struct sym_fwz_ofs {
SYM_GEN_FW_Z(u_short)
};
/* * Generates structure interface that contains * bus addresses within script A, B and Z.
*/ struct sym_fwa_ba {
SYM_GEN_FW_A(u32)
}; struct sym_fwb_ba {
SYM_GEN_FW_B(u32)
SYM_GEN_B(u32, start64);
SYM_GEN_B(u32, pm_handle);
}; struct sym_fwz_ba {
SYM_GEN_FW_Z(u32)
}; #undef SYM_GEN_A #undef SYM_GEN_B #undef SYM_GEN_Z
/* * Let cc know about the name of the controller data structure. * We need this for function prototype declarations just below.
*/ struct sym_hcb;
/* * Generic structure that defines a firmware.
*/ struct sym_fw { char *name; /* Name we want to print out */
u32 *a_base; /* Pointer to script A template */ int a_size; /* Size of script A */ struct sym_fwa_ofs
*a_ofs; /* Useful offsets in script A */
u32 *b_base; /* Pointer to script B template */ int b_size; /* Size of script B */ struct sym_fwb_ofs
*b_ofs; /* Useful offsets in script B */
u32 *z_base; /* Pointer to script Z template */ int z_size; /* Size of script Z */ struct sym_fwz_ofs
*z_ofs; /* Useful offsets in script Z */ /* Setup and patch methods for this firmware */ void (*setup)(struct sym_hcb *, struct sym_fw *); void (*patch)(struct Scsi_Host *);
};
/* * Macros used from the C code to get useful * SCRIPTS bus addresses.
*/ #define SCRIPTA_BA(np, label) (np->fwa_bas.label) #define SCRIPTB_BA(np, label) (np->fwb_bas.label) #define SCRIPTZ_BA(np, label) (np->fwz_bas.label)
/* * Macros used by scripts definitions. * * HADDR_1 generates a reference to a field of the controller data. * HADDR_2 generates a reference to a field of the controller data * with offset. * RADDR_1 generates a reference to a script processor register. * RADDR_2 generates a reference to a script processor register * with offset. * PADDR_A generates a reference to another part of script A. * PADDR_B generates a reference to another part of script B. * * SYM_GEN_PADDR_A and SYM_GEN_PADDR_B are used to define respectively * the PADDR_A and PADDR_B macros for each firmware by setting argument * `s' to the name of the corresponding structure. * * SCR_DATA_ZERO is used to allocate a DWORD of data in scripts areas.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.