linux/drivers/scsi/aic94xx/aic94xx_sds.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Aic94xx SAS/SATA driver hardware interface header file.
 *
 * Copyright (C) 2005 Adaptec, Inc.  All rights reserved.
 * Copyright (C) 2005 Gilbert Wu <[email protected]>
 */
#ifndef _AIC94XX_SDS_H_
#define _AIC94XX_SDS_H_

enum {};

#define FLASH_MANUF_ID_AMD
#define FLASH_MANUF_ID_ST
#define FLASH_MANUF_ID_FUJITSU
#define FLASH_MANUF_ID_MACRONIX
#define FLASH_MANUF_ID_INTEL
#define FLASH_MANUF_ID_UNKNOWN

#define FLASH_DEV_ID_AM29LV008BT
#define FLASH_DEV_ID_AM29LV800DT
#define FLASH_DEV_ID_STM29W800DT
#define FLASH_DEV_ID_STM29LV640
#define FLASH_DEV_ID_STM29008
#define FLASH_DEV_ID_MBM29LV800TE
#define FLASH_DEV_ID_MBM29DL800TA
#define FLASH_DEV_ID_MBM29LV008TA
#define FLASH_DEV_ID_AM29LV640MT
#define FLASH_DEV_ID_AM29F800B
#define FLASH_DEV_ID_MX29LV800BT
#define FLASH_DEV_ID_MX29LV008CT
#define FLASH_DEV_ID_I28LV00TAT
#define FLASH_DEV_ID_UNKNOWN

/* status bit mask values */
#define FLASH_STATUS_BIT_MASK_DQ6
#define FLASH_STATUS_BIT_MASK_DQ5
#define FLASH_STATUS_BIT_MASK_DQ2

/* minimum value in micro seconds needed for checking status */
#define FLASH_STATUS_ERASE_DELAY_COUNT
#define FLASH_STATUS_WRITE_DELAY_COUNT

#define FLASH_SECTOR_SIZE
#define FLASH_SECTOR_SIZE_MASK

#define FLASH_OK
#define FAIL_OPEN_BIOS_FILE
#define FAIL_CHECK_PCI_ID
#define FAIL_CHECK_SUM
#define FAIL_UNKNOWN
#define FAIL_VERIFY
#define FAIL_RESET_FLASH
#define FAIL_FIND_FLASH_ID
#define FAIL_ERASE_FLASH
#define FAIL_WRITE_FLASH
#define FAIL_FILE_SIZE
#define FAIL_PARAMETERS
#define FAIL_OUT_MEMORY
#define FLASH_IN_PROGRESS

struct controller_id {};

struct image_info {};

struct bios_file_header {};

int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
		const void *src, u32 dest_offset, u32 bytes_to_verify);
int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
		const void *src, u32 dest_offset, u32 bytes_to_write);
int asd_chk_write_status(struct asd_ha_struct *asd_ha,
		u32 sector_addr, u8 erase_flag);
int asd_check_flash_type(struct asd_ha_struct *asd_ha);
int asd_erase_nv_sector(struct asd_ha_struct *asd_ha,
		u32 flash_addr, u32 size);
#endif