/*
* Aic94xx SAS/SATA driver access to shared data structures and memory
* maps.
*
* Copyright (C) 2005 Adaptec, Inc. All rights reserved.
* Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
*
* This file is licensed under GPLv2.
*
* This file is part of the aic94xx driver.
*
* The aic94xx driver is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the
* License.
*
* The aic94xx driver is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the aic94xx driver; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <linux/pci.h>
#include <linux/delay.h>
#include "aic94xx.h"
#include "aic94xx_reg.h"
#include "aic94xx_sds.h"
/* ---------- OCM stuff ---------- */
struct asd_ocm_dir_ent {
u8 type;
u8 offs[3];
u8 _r1;
u8 size[3];
} __attribute__ ((packed));
struct asd_ocm_dir {
char sig[2];
u8 _r1[2];
u8 major; /* 0 */
u8 minor; /* 0 */
u8 _r2;
u8 num_de;
struct asd_ocm_dir_ent entry[15];
} __attribute__ ((packed));
#define OCM_DE_OCM_DIR 0x00
#define OCM_DE_WIN_DRVR 0x01
#define OCM_DE_BIOS_CHIM 0x02
#define OCM_DE_RAID_ENGN 0x03
#define OCM_DE_BIOS_INTL 0x04
#define OCM_DE_BIOS_CHIM_OSM 0x05
#define OCM_DE_BIOS_CHIM_DYNAMIC 0x06
#define OCM_DE_ADDC2C_RES0 0x07
#define OCM_DE_ADDC2C_RES1 0x08
#define OCM_DE_ADDC2C_RES2 0x09
#define OCM_DE_ADDC2C_R