18c2ecf20Sopenharmony_ci /*
28c2ecf20Sopenharmony_ci  * PMC-Sierra SPC 8001 SAS/SATA based host adapters driver
38c2ecf20Sopenharmony_ci  *
48c2ecf20Sopenharmony_ci  * Copyright (c) 2008-2009 USI Co., Ltd.
58c2ecf20Sopenharmony_ci  * All rights reserved.
68c2ecf20Sopenharmony_ci  *
78c2ecf20Sopenharmony_ci  * Redistribution and use in source and binary forms, with or without
88c2ecf20Sopenharmony_ci  * modification, are permitted provided that the following conditions
98c2ecf20Sopenharmony_ci  * are met:
108c2ecf20Sopenharmony_ci  * 1. Redistributions of source code must retain the above copyright
118c2ecf20Sopenharmony_ci  *    notice, this list of conditions, and the following disclaimer,
128c2ecf20Sopenharmony_ci  *    without modification.
138c2ecf20Sopenharmony_ci  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
148c2ecf20Sopenharmony_ci  *    substantially similar to the "NO WARRANTY" disclaimer below
158c2ecf20Sopenharmony_ci  *    ("Disclaimer") and any redistribution must be conditioned upon
168c2ecf20Sopenharmony_ci  *    including a substantially similar Disclaimer requirement for further
178c2ecf20Sopenharmony_ci  *    binary redistribution.
188c2ecf20Sopenharmony_ci  * 3. Neither the names of the above-listed copyright holders nor the names
198c2ecf20Sopenharmony_ci  *    of any contributors may be used to endorse or promote products derived
208c2ecf20Sopenharmony_ci  *    from this software without specific prior written permission.
218c2ecf20Sopenharmony_ci  *
228c2ecf20Sopenharmony_ci  * Alternatively, this software may be distributed under the terms of the
238c2ecf20Sopenharmony_ci  * GNU General Public License ("GPL") version 2 as published by the Free
248c2ecf20Sopenharmony_ci  * Software Foundation.
258c2ecf20Sopenharmony_ci  *
268c2ecf20Sopenharmony_ci  * NO WARRANTY
278c2ecf20Sopenharmony_ci  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
288c2ecf20Sopenharmony_ci  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
298c2ecf20Sopenharmony_ci  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
308c2ecf20Sopenharmony_ci  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
318c2ecf20Sopenharmony_ci  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
328c2ecf20Sopenharmony_ci  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
338c2ecf20Sopenharmony_ci  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
348c2ecf20Sopenharmony_ci  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
358c2ecf20Sopenharmony_ci  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
368c2ecf20Sopenharmony_ci  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
378c2ecf20Sopenharmony_ci  * POSSIBILITY OF SUCH DAMAGES.
388c2ecf20Sopenharmony_ci  *
398c2ecf20Sopenharmony_ci  */
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#ifndef PM8001_CTL_H_INCLUDED
428c2ecf20Sopenharmony_ci#define PM8001_CTL_H_INCLUDED
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#define IOCTL_BUF_SIZE		4096
458c2ecf20Sopenharmony_ci#define HEADER_LEN			28
468c2ecf20Sopenharmony_ci#define SIZE_OFFSET			16
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#define BIOSOFFSET			56
498c2ecf20Sopenharmony_ci#define BIOS_OFFSET_LIMIT		61
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define FLASH_OK                        0x000000
528c2ecf20Sopenharmony_ci#define FAIL_OPEN_BIOS_FILE             0x000100
538c2ecf20Sopenharmony_ci#define FAIL_FILE_SIZE                  0x000a00
548c2ecf20Sopenharmony_ci#define FAIL_PARAMETERS                 0x000b00
558c2ecf20Sopenharmony_ci#define FAIL_OUT_MEMORY                 0x000c00
568c2ecf20Sopenharmony_ci#define FLASH_IN_PROGRESS               0x001000
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#define IB_OB_READ_TIMES                256
598c2ecf20Sopenharmony_ci#define SYSFS_OFFSET                    1024
608c2ecf20Sopenharmony_ci#define PM80XX_IB_OB_QUEUE_SIZE         (32 * 1024)
618c2ecf20Sopenharmony_ci#define PM8001_IB_OB_QUEUE_SIZE         (16 * 1024)
628c2ecf20Sopenharmony_ci#endif /* PM8001_CTL_H_INCLUDED */
638c2ecf20Sopenharmony_ci
64