| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * QLogic Fibre Channel HBA Driver |
|---|
| 3 | 4 | * Copyright (c) 2003-2014 QLogic Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * See LICENSE.qla2xxx for copyright and licensing details. |
|---|
| 6 | 5 | */ |
|---|
| 7 | 6 | #ifndef __QLA_NX_H |
|---|
| 8 | 7 | #define __QLA_NX_H |
|---|
| 9 | 8 | |
|---|
| 10 | | -#include <linux/io-64-nonatomic-lo-hi.h> |
|---|
| 9 | +#include <scsi/scsi.h> |
|---|
| 11 | 10 | |
|---|
| 12 | 11 | /* |
|---|
| 13 | 12 | * Following are the states of the Phantom. Phantom will set them and |
|---|
| .. | .. |
|---|
| 486 | 485 | #define QLA82XX_ADDR_QDR_NET (0x0000000300000000ULL) |
|---|
| 487 | 486 | #define QLA82XX_P3_ADDR_QDR_NET_MAX (0x0000000303ffffffULL) |
|---|
| 488 | 487 | |
|---|
| 489 | | -#define QLA82XX_PCI_CRBSPACE (unsigned long)0x06000000 |
|---|
| 490 | | -#define QLA82XX_PCI_DIRECT_CRB (unsigned long)0x04400000 |
|---|
| 491 | | -#define QLA82XX_PCI_CAMQM (unsigned long)0x04800000 |
|---|
| 492 | | -#define QLA82XX_PCI_CAMQM_MAX (unsigned long)0x04ffffff |
|---|
| 493 | | -#define QLA82XX_PCI_DDR_NET (unsigned long)0x00000000 |
|---|
| 494 | | -#define QLA82XX_PCI_QDR_NET (unsigned long)0x04000000 |
|---|
| 495 | | -#define QLA82XX_PCI_QDR_NET_MAX (unsigned long)0x043fffff |
|---|
| 488 | +#define QLA82XX_PCI_CRBSPACE 0x06000000UL |
|---|
| 489 | +#define QLA82XX_PCI_DIRECT_CRB 0x04400000UL |
|---|
| 490 | +#define QLA82XX_PCI_CAMQM 0x04800000UL |
|---|
| 491 | +#define QLA82XX_PCI_CAMQM_MAX 0x04ffffffUL |
|---|
| 492 | +#define QLA82XX_PCI_DDR_NET 0x00000000UL |
|---|
| 493 | +#define QLA82XX_PCI_QDR_NET 0x04000000UL |
|---|
| 494 | +#define QLA82XX_PCI_QDR_NET_MAX 0x043fffffUL |
|---|
| 496 | 495 | |
|---|
| 497 | 496 | /* |
|---|
| 498 | 497 | * Register offsets for MN |
|---|
| .. | .. |
|---|
| 800 | 799 | #define QLA82XX_URI_FIRMWARE_IDX_OFF 29 |
|---|
| 801 | 800 | |
|---|
| 802 | 801 | struct qla82xx_uri_table_desc{ |
|---|
| 803 | | - uint32_t findex; |
|---|
| 804 | | - uint32_t num_entries; |
|---|
| 805 | | - uint32_t entry_size; |
|---|
| 806 | | - uint32_t reserved[5]; |
|---|
| 802 | + __le32 findex; |
|---|
| 803 | + __le32 num_entries; |
|---|
| 804 | + __le32 entry_size; |
|---|
| 805 | + __le32 reserved[5]; |
|---|
| 807 | 806 | }; |
|---|
| 808 | 807 | |
|---|
| 809 | 808 | struct qla82xx_uri_data_desc{ |
|---|
| 810 | | - uint32_t findex; |
|---|
| 811 | | - uint32_t size; |
|---|
| 812 | | - uint32_t reserved[5]; |
|---|
| 809 | + __le32 findex; |
|---|
| 810 | + __le32 size; |
|---|
| 811 | + __le32 reserved[5]; |
|---|
| 813 | 812 | }; |
|---|
| 814 | 813 | |
|---|
| 815 | 814 | /* UNIFIED ROMIMAGE END */ |
|---|
| .. | .. |
|---|
| 829 | 828 | * ISP 8021 I/O Register Set structure definitions. |
|---|
| 830 | 829 | */ |
|---|
| 831 | 830 | struct device_reg_82xx { |
|---|
| 832 | | - uint32_t req_q_out[64]; /* Request Queue out-Pointer (64 * 4) */ |
|---|
| 833 | | - uint32_t rsp_q_in[64]; /* Response Queue In-Pointer. */ |
|---|
| 834 | | - uint32_t rsp_q_out[64]; /* Response Queue Out-Pointer. */ |
|---|
| 831 | + __le32 req_q_out[64]; /* Request Queue out-Pointer (64 * 4) */ |
|---|
| 832 | + __le32 rsp_q_in[64]; /* Response Queue In-Pointer. */ |
|---|
| 833 | + __le32 rsp_q_out[64]; /* Response Queue Out-Pointer. */ |
|---|
| 835 | 834 | |
|---|
| 836 | | - uint16_t mailbox_in[32]; /* Mail box In registers */ |
|---|
| 837 | | - uint16_t unused_1[32]; |
|---|
| 838 | | - uint32_t hint; /* Host interrupt register */ |
|---|
| 835 | + __le16 mailbox_in[32]; /* Mailbox In registers */ |
|---|
| 836 | + __le16 unused_1[32]; |
|---|
| 837 | + __le32 hint; /* Host interrupt register */ |
|---|
| 839 | 838 | #define HINT_MBX_INT_PENDING BIT_0 |
|---|
| 840 | | - uint16_t unused_2[62]; |
|---|
| 841 | | - uint16_t mailbox_out[32]; /* Mail box Out registers */ |
|---|
| 842 | | - uint32_t unused_3[48]; |
|---|
| 839 | + __le16 unused_2[62]; |
|---|
| 840 | + __le16 mailbox_out[32]; /* Mailbox Out registers */ |
|---|
| 841 | + __le32 unused_3[48]; |
|---|
| 843 | 842 | |
|---|
| 844 | | - uint32_t host_status; /* host status */ |
|---|
| 843 | + __le32 host_status; /* host status */ |
|---|
| 845 | 844 | #define HSRX_RISC_INT BIT_15 /* RISC to Host interrupt. */ |
|---|
| 846 | 845 | #define HSRX_RISC_PAUSED BIT_8 /* RISC Paused. */ |
|---|
| 847 | | - uint32_t host_int; /* Interrupt status. */ |
|---|
| 846 | + __le32 host_int; /* Interrupt status. */ |
|---|
| 848 | 847 | #define ISRX_NX_RISC_INT BIT_0 /* RISC interrupt. */ |
|---|
| 849 | 848 | }; |
|---|
| 850 | 849 | |
|---|