69 lines · c
1 /*2 * PMC-Sierra SPC 8001 SAS/SATA based host adapters driver3 *4 * Copyright (c) 2008-2009 USI Co., Ltd.5 * All rights reserved.6 *7 * Redistribution and use in source and binary forms, with or without8 * modification, are permitted provided that the following conditions9 * are met:10 * 1. Redistributions of source code must retain the above copyright11 * notice, this list of conditions, and the following disclaimer,12 * without modification.13 * 2. Redistributions in binary form must reproduce at minimum a disclaimer14 * substantially similar to the "NO WARRANTY" disclaimer below15 * ("Disclaimer") and any redistribution must be conditioned upon16 * including a substantially similar Disclaimer requirement for further17 * binary redistribution.18 * 3. Neither the names of the above-listed copyright holders nor the names19 * of any contributors may be used to endorse or promote products derived20 * from this software without specific prior written permission.21 *22 * Alternatively, this software may be distributed under the terms of the23 * GNU General Public License ("GPL") version 2 as published by the Free24 * Software Foundation.25 *26 * NO WARRANTY27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT31 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,35 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING36 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE37 * POSSIBILITY OF SUCH DAMAGES.38 *39 */40 41#ifndef PM8001_CTL_H_INCLUDED42#define PM8001_CTL_H_INCLUDED43 44#define IOCTL_BUF_SIZE 409645#define HEADER_LEN 2846#define SIZE_OFFSET 1647 48#define BIOSOFFSET 5649#define BIOS_OFFSET_LIMIT 6150 51#define FLASH_OK 0x00000052#define FAIL_OPEN_BIOS_FILE 0x00010053#define FAIL_FILE_SIZE 0x000a0054#define FAIL_PARAMETERS 0x000b0055#define FAIL_OUT_MEMORY 0x000c0056#define FLASH_IN_PROGRESS 0x00100057 58#define IB_OB_READ_TIMES 25659#define SYSFS_OFFSET 102460#define PM80XX_IB_OB_QUEUE_SIZE (32 * 1024)61#define PM8001_IB_OB_QUEUE_SIZE (16 * 1024)62 63static inline u32 pm8001_ctl_aap1_memmap(u8 *ptr, int idx, int off)64{65 return *(u32 *)(ptr + idx * 32 + off);66}67#endif /* PM8001_CTL_H_INCLUDED */68 69