linux/drivers/scsi/ipr.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * ipr.h -- driver for IBM Power Linux RAID adapters
 *
 * Written By: Brian King <[email protected]>, IBM Corporation
 *
 * Copyright (C) 2003, 2004 IBM Corporation
 *
 * Alan Cox <[email protected]> - Removed several careless u32/dma_addr_t errors
 *				that broke 64bit platforms.
 */

#ifndef _IPR_H
#define _IPR_H

#include <asm/unaligned.h>
#include <linux/types.h>
#include <linux/completion.h>
#include <linux/list.h>
#include <linux/kref.h>
#include <linux/irq_poll.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>

/*
 * Literals
 */
#define IPR_DRIVER_VERSION
#define IPR_DRIVER_DATE

/*
 * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
 *	ops per device for devices not running tagged command queuing.
 *	This can be adjusted at runtime through sysfs device attributes.
 */
#define IPR_MAX_CMD_PER_LUN

/*
 * IPR_NUM_BASE_CMD_BLKS: This defines the maximum number of
 *	ops the mid-layer can send to the adapter.
 */
#define IPR_NUM_BASE_CMD_BLKS

#define PCI_DEVICE_ID_IBM_OBSIDIAN_E

#define PCI_DEVICE_ID_IBM_CROC_FPGA_E2
#define PCI_DEVICE_ID_IBM_CROCODILE
#define PCI_DEVICE_ID_IBM_RATTLESNAKE

#define IPR_SUBS_DEV_ID_2780
#define IPR_SUBS_DEV_ID_5702
#define IPR_SUBS_DEV_ID_5703
#define IPR_SUBS_DEV_ID_572E
#define IPR_SUBS_DEV_ID_573E
#define IPR_SUBS_DEV_ID_573D
#define IPR_SUBS_DEV_ID_571A
#define IPR_SUBS_DEV_ID_571B
#define IPR_SUBS_DEV_ID_571E
#define IPR_SUBS_DEV_ID_571F
#define IPR_SUBS_DEV_ID_572A
#define IPR_SUBS_DEV_ID_572B
#define IPR_SUBS_DEV_ID_572F
#define IPR_SUBS_DEV_ID_574E
#define IPR_SUBS_DEV_ID_575B
#define IPR_SUBS_DEV_ID_575C
#define IPR_SUBS_DEV_ID_57B3
#define IPR_SUBS_DEV_ID_57B7
#define IPR_SUBS_DEV_ID_57B8

#define IPR_SUBS_DEV_ID_57B4
#define IPR_SUBS_DEV_ID_57B2
#define IPR_SUBS_DEV_ID_57C0
#define IPR_SUBS_DEV_ID_57C3
#define IPR_SUBS_DEV_ID_57C4
#define IPR_SUBS_DEV_ID_57C6
#define IPR_SUBS_DEV_ID_57CC

#define IPR_SUBS_DEV_ID_57B5
#define IPR_SUBS_DEV_ID_57CE
#define IPR_SUBS_DEV_ID_57B1

#define IPR_SUBS_DEV_ID_574D
#define IPR_SUBS_DEV_ID_57C8

#define IPR_SUBS_DEV_ID_57D5
#define IPR_SUBS_DEV_ID_57D6
#define IPR_SUBS_DEV_ID_57D7
#define IPR_SUBS_DEV_ID_57D8
#define IPR_SUBS_DEV_ID_57D9
#define IPR_SUBS_DEV_ID_57DA
#define IPR_SUBS_DEV_ID_57EB
#define IPR_SUBS_DEV_ID_57EC
#define IPR_SUBS_DEV_ID_57ED
#define IPR_SUBS_DEV_ID_57EE
#define IPR_SUBS_DEV_ID_57EF
#define IPR_SUBS_DEV_ID_57F0
#define IPR_SUBS_DEV_ID_2CCA
#define IPR_SUBS_DEV_ID_2CD2
#define IPR_SUBS_DEV_ID_2CCD
#define IPR_SUBS_DEV_ID_580A
#define IPR_SUBS_DEV_ID_580B
#define IPR_NAME

/*
 * Return codes
 */
#define IPR_RC_JOB_CONTINUE
#define IPR_RC_JOB_RETURN

/*
 * IOASCs
 */
#define IPR_IOASC_NR_INIT_CMD_REQUIRED
#define IPR_IOASC_NR_IOA_RESET_REQUIRED
#define IPR_IOASC_SYNC_REQUIRED
#define IPR_IOASC_MED_DO_NOT_REALLOC
#define IPR_IOASC_HW_SEL_TIMEOUT
#define IPR_IOASC_HW_DEV_BUS_STATUS
#define IPR_IOASC_IOASC_MASK
#define IPR_IOASC_SCSI_STATUS_MASK
#define IPR_IOASC_HW_CMD_FAILED
#define IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT
#define IPR_IOASC_IR_RESOURCE_HANDLE
#define IPR_IOASC_IR_NO_CMDS_TO_2ND_IOA
#define IPR_IOASA_IR_DUAL_IOA_DISABLED
#define IPR_IOASC_BUS_WAS_RESET
#define IPR_IOASC_BUS_WAS_RESET_BY_OTHER
#define IPR_IOASC_ABORTED_CMD_TERM_BY_HOST
#define IPR_IOASC_IR_NON_OPTIMIZED

#define IPR_FIRST_DRIVER_IOASC
#define IPR_IOASC_IOA_WAS_RESET
#define IPR_IOASC_PCI_ACCESS_ERROR

/* Driver data flags */
#define IPR_USE_LONG_TRANSOP_TIMEOUT
#define IPR_USE_PCI_WARM_RESET

#define IPR_DEFAULT_MAX_ERROR_DUMP
#define IPR_NUM_LOG_HCAMS
#define IPR_NUM_CFG_CHG_HCAMS
#define IPR_NUM_HCAM_QUEUE
#define IPR_NUM_HCAMS
#define IPR_MAX_HCAMS

#define IPR_MAX_SIS64_TARGETS_PER_BUS
#define IPR_MAX_SIS64_LUNS_PER_TARGET

#define IPR_MAX_NUM_TARGETS_PER_BUS
#define IPR_MAX_NUM_LUNS_PER_TARGET
#define IPR_VSET_BUS
#define IPR_IOA_BUS
#define IPR_IOA_TARGET
#define IPR_IOA_LUN
#define IPR_MAX_NUM_BUSES

#define IPR_NUM_RESET_RELOAD_RETRIES

/* We need resources for HCAMS, IOA reset, IOA bringdown, and ERP */
#define IPR_NUM_INTERNAL_CMD_BLKS

#define IPR_MAX_COMMANDS
#define IPR_NUM_CMD_BLKS

#define IPR_MAX_PHYSICAL_DEVS
#define IPR_DEFAULT_SIS64_DEVS
#define IPR_MAX_SIS64_DEVS

#define IPR_MAX_SGLIST
#define IPR_IOA_MAX_SECTORS
#define IPR_VSET_MAX_SECTORS
#define IPR_MAX_CDB_LEN
#define IPR_MAX_HRRQ_RETRIES

#define IPR_DEFAULT_BUS_WIDTH
#define IPR_80MBs_SCSI_RATE
#define IPR_U160_SCSI_RATE
#define IPR_U320_SCSI_RATE
#define IPR_MAX_SCSI_RATE(width)

#define IPR_IOA_RES_HANDLE
#define IPR_INVALID_RES_HANDLE
#define IPR_IOA_RES_ADDR

/*
 * Adapter Commands
 */
#define IPR_CANCEL_REQUEST
#define IPR_CANCEL_64BIT_IOARCB
#define IPR_QUERY_RSRC_STATE
#define IPR_RESET_DEVICE
#define IPR_RESET_TYPE_SELECT
#define IPR_LUN_RESET
#define IPR_TARGET_RESET
#define IPR_BUS_RESET
#define IPR_ID_HOST_RR_Q
#define IPR_QUERY_IOA_CONFIG
#define IPR_CANCEL_ALL_REQUESTS
#define IPR_HOST_CONTROLLED_ASYNC
#define IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE
#define IPR_HCAM_CDB_OP_CODE_LOG_DATA
#define IPR_SET_SUPPORTED_DEVICES
#define IPR_SET_ALL_SUPPORTED_DEVICES
#define IPR_IOA_SHUTDOWN
#define IPR_WR_BUF_DOWNLOAD_AND_SAVE
#define IPR_IOA_SERVICE_ACTION

/* IOA Service Actions */
#define IPR_IOA_SA_CHANGE_CACHE_PARAMS

/*
 * Timeouts
 */
#define IPR_SHUTDOWN_TIMEOUT
#define IPR_VSET_RW_TIMEOUT
#define IPR_ABBREV_SHUTDOWN_TIMEOUT
#define IPR_DUAL_IOA_ABBR_SHUTDOWN_TO
#define IPR_DEVICE_RESET_TIMEOUT
#define IPR_CANCEL_TIMEOUT
#define IPR_CANCEL_ALL_TIMEOUT
#define IPR_ABORT_TASK_TIMEOUT
#define IPR_INTERNAL_TIMEOUT
#define IPR_WRITE_BUFFER_TIMEOUT
#define IPR_SET_SUP_DEVICE_TIMEOUT
#define IPR_REQUEST_SENSE_TIMEOUT
#define IPR_OPERATIONAL_TIMEOUT
#define IPR_LONG_OPERATIONAL_TIMEOUT
#define IPR_WAIT_FOR_RESET_TIMEOUT
#define IPR_CHECK_FOR_RESET_TIMEOUT
#define IPR_WAIT_FOR_BIST_TIMEOUT
#define IPR_PCI_ERROR_RECOVERY_TIMEOUT
#define IPR_PCI_RESET_TIMEOUT
#define IPR_SIS32_DUMP_TIMEOUT
#define IPR_SIS64_DUMP_TIMEOUT
#define IPR_DUMP_DELAY_SECONDS
#define IPR_DUMP_DELAY_TIMEOUT

/*
 * SCSI Literals
 */
#define IPR_VENDOR_ID_LEN
#define IPR_PROD_ID_LEN
#define IPR_SERIAL_NUM_LEN

/*
 * Hardware literals
 */
#define IPR_FMT2_MBX_ADDR_MASK
#define IPR_FMT2_MBX_BAR_SEL_MASK
#define IPR_FMT2_MKR_BAR_SEL_SHIFT
#define IPR_GET_FMT2_BAR_SEL(mbx)
#define IPR_SDT_FMT2_BAR0_SEL
#define IPR_SDT_FMT2_BAR1_SEL
#define IPR_SDT_FMT2_BAR2_SEL
#define IPR_SDT_FMT2_BAR3_SEL
#define IPR_SDT_FMT2_BAR4_SEL
#define IPR_SDT_FMT2_BAR5_SEL
#define IPR_SDT_FMT2_EXP_ROM_SEL
#define IPR_FMT2_SDT_READY_TO_USE
#define IPR_FMT3_SDT_READY_TO_USE
#define IPR_DOORBELL
#define IPR_RUNTIME_RESET

#define IPR_IPL_INIT_MIN_STAGE_TIME
#define IPR_IPL_INIT_DEFAULT_STAGE_TIME
#define IPR_IPL_INIT_STAGE_UNKNOWN
#define IPR_IPL_INIT_STAGE_TRANSOP
#define IPR_IPL_INIT_STAGE_MASK
#define IPR_IPL_INIT_STAGE_TIME_MASK
#define IPR_PCII_IPL_STAGE_CHANGE

#define IPR_PCII_MAILBOX_STABLE
#define IPR_WAIT_FOR_MAILBOX

#define IPR_PCII_IOA_TRANS_TO_OPER
#define IPR_PCII_IOARCB_XFER_FAILED
#define IPR_PCII_IOA_UNIT_CHECKED
#define IPR_PCII_NO_HOST_RRQ
#define IPR_PCII_CRITICAL_OPERATION
#define IPR_PCII_IO_DEBUG_ACKNOWLEDGE
#define IPR_PCII_IOARRIN_LOST
#define IPR_PCII_MMIO_ERROR
#define IPR_PCII_PROC_ERR_STATE
#define IPR_PCII_HRRQ_UPDATED
#define IPR_PCII_CORE_ISSUED_RST_REQ

#define IPR_PCII_ERROR_INTERRUPTS

#define IPR_PCII_OPER_INTERRUPTS

#define IPR_UPROCI_RESET_ALERT
#define IPR_UPROCI_IO_DEBUG_ALERT
#define IPR_UPROCI_SIS64_START_BIST

#define IPR_LDUMP_MAX_LONG_ACK_DELAY_IN_USEC
#define IPR_LDUMP_MAX_SHORT_ACK_DELAY_IN_USEC

/*
 * Dump literals
 */
#define IPR_FMT2_MAX_IOA_DUMP_SIZE
#define IPR_FMT3_MAX_IOA_DUMP_SIZE
#define IPR_FMT2_NUM_SDT_ENTRIES
#define IPR_FMT3_NUM_SDT_ENTRIES
#define IPR_FMT2_MAX_NUM_DUMP_PAGES
#define IPR_FMT3_MAX_NUM_DUMP_PAGES

/*
 * Misc literals
 */
#define IPR_NUM_IOADL_ENTRIES
#define IPR_MAX_MSIX_VECTORS
#define IPR_MAX_HRRQ_NUM
#define IPR_INIT_HRRQ

/*
 * Adapter interface types
 */

struct ipr_res_addr {}__attribute__((packed, aligned));

struct ipr_std_inq_vpids {}__attribute__((packed));

struct ipr_vpd {}__attribute__((packed));

struct ipr_ext_vpd {}__attribute__((packed));

struct ipr_ext_vpd64 {}__attribute__((packed));

struct ipr_std_inq_data {}__attribute__ ((packed));

#define IPR_RES_TYPE_AF_DASD
#define IPR_RES_TYPE_GENERIC_SCSI
#define IPR_RES_TYPE_VOLUME_SET
#define IPR_RES_TYPE_REMOTE_AF_DASD
#define IPR_RES_TYPE_GENERIC_ATA
#define IPR_RES_TYPE_ARRAY
#define IPR_RES_TYPE_IOAFP

struct ipr_config_table_entry {}__attribute__ ((packed, aligned));

struct ipr_config_table_entry64 {}__attribute__ ((packed, aligned));

struct ipr_config_table_hdr {}__attribute__((packed, aligned));

struct ipr_config_table_hdr64 {}__attribute__((packed, aligned));

struct ipr_config_table {}__attribute__((packed, aligned));

struct ipr_config_table64 {}__attribute__((packed, aligned));

struct ipr_config_table_entry_wrapper {};

struct ipr_hostrcb_cfg_ch_not {}__attribute__((packed, aligned));

struct ipr_supported_device {}__attribute__((packed, aligned));

struct ipr_hrr_queue {};

/* Command packet structure */
struct ipr_cmd_pkt {}__attribute__ ((packed, aligned));

struct ipr_ioadl_desc {}__attribute__((packed, aligned));

struct ipr_ioadl64_desc {}__attribute__((packed, aligned));

struct ipr_ioarcb_add_data {}__attribute__ ((packed, aligned));

struct ipr_ioarcb_sis64_add_addr_ecb {}__attribute__((packed, aligned));

/* IOA Request Control Block    128 bytes  */
struct ipr_ioarcb {}__attribute__((packed, aligned));

struct ipr_ioasa_vset {}__attribute__((packed, aligned));

struct ipr_ioasa_af_dasd {}__attribute__((packed, aligned));

struct ipr_ioasa_gpdd {}__attribute__((packed, aligned));

struct ipr_auto_sense {};

struct ipr_ioasa_hdr {}__attribute__((packed, aligned));

struct ipr_ioasa {}__attribute__((packed, aligned));

struct ipr_ioasa64 {}__attribute__((packed, aligned));

struct ipr_mode_parm_hdr {}__attribute__((packed));

struct ipr_mode_pages {}__attribute__((packed));

struct ipr_mode_page_hdr {}__attribute__ ((packed));

struct ipr_dev_bus_entry {}__attribute__((packed, aligned));

struct ipr_mode_page28 {}__attribute__((packed));

struct ipr_mode_page24 {}__attribute__((packed));

struct ipr_ioa_vpd {}__attribute__((packed));

struct ipr_inquiry_page3 {}__attribute__((packed));

struct ipr_inquiry_cap {}__attribute__((packed));

#define IPR_INQUIRY_PAGE0_ENTRIES
struct ipr_inquiry_page0 {}__attribute__((packed));

struct ipr_inquiry_pageC4 {} __packed;

struct ipr_hostrcb_device_data_entry {}__attribute__((packed, aligned));

struct ipr_hostrcb_device_data_entry_enhanced {}__attribute__((packed, aligned));

struct ipr_hostrcb64_device_data_entry_enhanced {}__attribute__((packed, aligned));

struct ipr_hostrcb_array_data_entry {}__attribute__((packed, aligned));

struct ipr_hostrcb64_array_data_entry {}__attribute__((packed, aligned));

struct ipr_hostrcb_array_data_entry_enhanced {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_ff_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_01_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_21_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_02_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_12_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_03_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_13_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_23_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_04_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_14_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_24_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_07_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_17_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_config_element {}__attribute__((packed, aligned));

struct ipr_hostrcb64_config_element {}__attribute__((packed, aligned));

struct ipr_hostrcb_fabric_desc {}__attribute__((packed, aligned));

struct ipr_hostrcb64_fabric_desc {}__attribute__((packed, aligned));

#define for_each_hrrq(hrrq, ioa_cfg)

#define for_each_fabric_cfg(fabric, cfg)

struct ipr_hostrcb_type_20_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_30_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_type_41_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_error {}__attribute__((packed, aligned));

struct ipr_hostrcb64_error {}__attribute__((packed, aligned));

struct ipr_hostrcb_raw {}__attribute__((packed, aligned));

struct ipr_hcam {}__attribute__((packed, aligned));

struct ipr_hostrcb {};

/* IPR smart dump table structures */
struct ipr_sdt_entry {}__attribute__((packed, aligned));

struct ipr_sdt_header {}__attribute__((packed, aligned));

struct ipr_sdt {}__attribute__((packed, aligned));

struct ipr_uc_sdt {}__attribute__((packed, aligned));

/*
 * Driver types
 */
struct ipr_bus_attributes {};

struct ipr_resource_entry {}; /* struct ipr_resource_entry */

struct ipr_resource_hdr {};

struct ipr_misc_cbs {};

struct ipr_interrupt_offsets {};

struct ipr_interrupts {};

struct ipr_chip_cfg_t {};

struct ipr_chip_t {};

enum ipr_shutdown_type {};

struct ipr_trace_entry {};

struct ipr_sglist {};

enum ipr_sdt_state {};

/* Per-controller data */
struct ipr_ioa_cfg {}; /* struct ipr_ioa_cfg */

struct ipr_cmnd {};

struct ipr_ses_table_entry {};

struct ipr_dump_header {}__attribute__((packed, aligned));

struct ipr_dump_entry_header {}__attribute__((packed, aligned));

struct ipr_dump_location_entry {}__attribute__((packed, aligned));

struct ipr_dump_trace_entry {}__attribute__((packed, aligned));

struct ipr_dump_version_entry {};

struct ipr_dump_ioa_type_entry {};

struct ipr_driver_dump {}__attribute__((packed, aligned));

struct ipr_ioa_dump {}__attribute__((packed, aligned));

struct ipr_dump {};

struct ipr_error_table_t {};

struct ipr_software_inq_lid_info {}__attribute__((packed, aligned));

struct ipr_ucode_image_header {}__attribute__((packed, aligned));

/*
 * Macros
 */
#define IPR_DBG_CMD(CMD)

#ifdef CONFIG_SCSI_IPR_TRACE
#define ipr_create_trace_file(kobj, attr)
#define ipr_remove_trace_file(kobj, attr)
#else
#define ipr_create_trace_file
#define ipr_remove_trace_file
#endif

#ifdef CONFIG_SCSI_IPR_DUMP
#define ipr_create_dump_file(kobj, attr)
#define ipr_remove_dump_file(kobj, attr)
#else
#define ipr_create_dump_file
#define ipr_remove_dump_file
#endif

/*
 * Error logging macros
 */
#define ipr_err(...)
#define ipr_info(...)
#define ipr_dbg(...)

#define ipr_res_printk(level, ioa_cfg, bus, target, lun, fmt, ...)

#define ipr_res_err(ioa_cfg, res, fmt, ...)

#define ipr_ra_printk(level, ioa_cfg, ra, fmt, ...)

#define ipr_ra_err(ioa_cfg, ra, fmt, ...)

#define ipr_phys_res_err(ioa_cfg, res, fmt, ...)

#define ipr_hcam_err(hostrcb, fmt, ...)

#define ipr_trace

#define ENTER
#define LEAVE

#define ipr_err_separator


/*
 * Inlines
 */

/**
 * ipr_is_ioa_resource - Determine if a resource is the IOA
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if IOA / 0 if not IOA
 **/
static inline int ipr_is_ioa_resource(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_af_dasd_device - Determine if a resource is an AF DASD
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if AF DASD / 0 if not AF DASD
 **/
static inline int ipr_is_af_dasd_device(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_vset_device - Determine if a resource is a VSET
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if VSET / 0 if not VSET
 **/
static inline int ipr_is_vset_device(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_gscsi - Determine if a resource is a generic scsi resource
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if GSCSI / 0 if not GSCSI
 **/
static inline int ipr_is_gscsi(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_scsi_disk - Determine if a resource is a SCSI disk
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if SCSI disk / 0 if not SCSI disk
 **/
static inline int ipr_is_scsi_disk(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_gata - Determine if a resource is a generic ATA resource
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if GATA / 0 if not GATA
 **/
static inline int ipr_is_gata(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_naca_model - Determine if a resource is using NACA queueing model
 * @res:	resource entry struct
 *
 * Return value:
 * 	1 if NACA queueing model / 0 if not NACA queueing model
 **/
static inline int ipr_is_naca_model(struct ipr_resource_entry *res)
{}

/**
 * ipr_is_device - Determine if the hostrcb structure is related to a device
 * @hostrcb:	host resource control blocks struct
 *
 * Return value:
 * 	1 if AF / 0 if not AF
 **/
static inline int ipr_is_device(struct ipr_hostrcb *hostrcb)
{}

/**
 * ipr_sdt_is_fmt2 - Determine if a SDT address is in format 2
 * @sdt_word:	SDT address
 *
 * Return value:
 * 	1 if format 2 / 0 if not
 **/
static inline int ipr_sdt_is_fmt2(u32 sdt_word)
{}

#ifndef writeq
static inline void writeq(u64 val, void __iomem *addr)
{
        writel(((u32) (val >> 32)), addr);
        writel(((u32) (val)), (addr + 4));
}
#endif

#endif /* _IPR_H */