linux/drivers/scsi/sym53c8xx_2/sym_nvram.h

/* 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 <[email protected]>
 *
 * 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        <[email protected]>
 *         Stefan Esser                <[email protected]>
 * Copyright (C) 1994  Wolfgang Stanglmeier
 *
 * Other major contributions:
 *
 * NVRAM detection and reading.
 * Copyright (C) 1997 Richard Waltham <[email protected]>
 *
 *-----------------------------------------------------------------------------
 */

#ifndef SYM_NVRAM_H
#define SYM_NVRAM_H

#include "sym53c8xx.h"

/*
 *	Symbios NVRAM data format
 */
#define SYMBIOS_NVRAM_SIZE
#define SYMBIOS_NVRAM_ADDRESS

struct Symbios_nvram {};
Symbios_nvram;
Symbios_host;
Symbios_target;
Symbios_scam;

/*
 *	Tekram NvRAM data format.
 */
#define TEKRAM_NVRAM_SIZE
#define TEKRAM_93C46_NVRAM_ADDRESS
#define TEKRAM_24C16_NVRAM_ADDRESS

struct Tekram_nvram {};
Tekram_nvram;
Tekram_target;

#ifndef CONFIG_PARISC
struct pdc_initiator {};
#endif

/*
 *  Union of supported NVRAM formats.
 */
struct sym_nvram {};

#if SYM_CONF_NVRAM_SUPPORT
void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram);
void sym_nvram_setup_target (struct sym_tcb *tp, int target, struct sym_nvram *nvp);
int sym_read_nvram (struct sym_device *np, struct sym_nvram *nvp);
char *sym_nvram_type(struct sym_nvram *nvp);
#else
static inline void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) { }
static inline void sym_nvram_setup_target(struct sym_tcb *tp, struct sym_nvram *nvram) { }
static inline int sym_read_nvram(struct sym_device *np, struct sym_nvram *nvp)
{
	nvp->type = 0;
	return 0;
}
static inline char *sym_nvram_type(struct sym_nvram *nvp)
{
	return "No NVRAM";
}
#endif

#endif /* SYM_NVRAM_H */