diff options
-rw-r--r-- | drivers/scsi/isci/firmware/Makefile | 19 | ||||
-rw-r--r-- | drivers/scsi/isci/firmware/README | 36 | ||||
-rw-r--r-- | drivers/scsi/isci/firmware/create_fw.c | 99 | ||||
-rw-r--r-- | drivers/scsi/isci/firmware/create_fw.h | 77 | ||||
-rw-r--r-- | firmware/Makefile | 1 | ||||
-rw-r--r-- | firmware/isci/isci_firmware.bin.ihex | 16 |
6 files changed, 0 insertions, 248 deletions
diff --git a/drivers/scsi/isci/firmware/Makefile b/drivers/scsi/isci/firmware/Makefile deleted file mode 100644 index 5f54461cabc5..000000000000 --- a/drivers/scsi/isci/firmware/Makefile +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # Makefile for create_fw | ||
2 | # | ||
3 | CC=gcc | ||
4 | CFLAGS=-c -Wall -O2 -g | ||
5 | LDFLAGS= | ||
6 | SOURCES=create_fw.c | ||
7 | OBJECTS=$(SOURCES:.cpp=.o) | ||
8 | EXECUTABLE=create_fw | ||
9 | |||
10 | all: $(SOURCES) $(EXECUTABLE) | ||
11 | |||
12 | $(EXECUTABLE): $(OBJECTS) | ||
13 | $(CC) $(LDFLAGS) $(OBJECTS) -o $@ | ||
14 | |||
15 | .c.o: | ||
16 | $(CC) $(CFLAGS) $< -O $@ | ||
17 | |||
18 | clean: | ||
19 | rm -f *.o $(EXECUTABLE) | ||
diff --git a/drivers/scsi/isci/firmware/README b/drivers/scsi/isci/firmware/README deleted file mode 100644 index 8056d2bd233b..000000000000 --- a/drivers/scsi/isci/firmware/README +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | This defines the temporary binary blow we are to pass to the SCU | ||
2 | driver to emulate the binary firmware that we will eventually be | ||
3 | able to access via NVRAM on the SCU controller. | ||
4 | |||
5 | The current size of the binary blob is expected to be 149 bytes or larger | ||
6 | |||
7 | Header Types: | ||
8 | 0x1: Phy Masks | ||
9 | 0x2: Phy Gens | ||
10 | 0x3: SAS Addrs | ||
11 | 0xff: End of Data | ||
12 | |||
13 | ID string - u8[12]: "#SCU MAGIC#\0" | ||
14 | Version - u8: 1 | ||
15 | SubVersion - u8: 0 | ||
16 | |||
17 | Header Type - u8: 0x1 | ||
18 | Size - u8: 8 | ||
19 | Phy Mask - u32[8] | ||
20 | |||
21 | Header Type - u8: 0x2 | ||
22 | Size - u8: 8 | ||
23 | Phy Gen - u32[8] | ||
24 | |||
25 | Header Type - u8: 0x3 | ||
26 | Size - u8: 8 | ||
27 | Sas Addr - u64[8] | ||
28 | |||
29 | Header Type - u8: 0xf | ||
30 | |||
31 | |||
32 | ============================================================================== | ||
33 | |||
34 | Place isci_firmware.bin in /lib/firmware | ||
35 | Be sure to recreate the initramfs image to include the firmware. | ||
36 | |||
diff --git a/drivers/scsi/isci/firmware/create_fw.c b/drivers/scsi/isci/firmware/create_fw.c deleted file mode 100644 index c7a2887a7e95..000000000000 --- a/drivers/scsi/isci/firmware/create_fw.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <unistd.h> | ||
4 | #include <sys/types.h> | ||
5 | #include <sys/stat.h> | ||
6 | #include <fcntl.h> | ||
7 | #include <string.h> | ||
8 | #include <errno.h> | ||
9 | #include <asm/types.h> | ||
10 | #include <strings.h> | ||
11 | #include <stdint.h> | ||
12 | |||
13 | #include "create_fw.h" | ||
14 | #include "../probe_roms.h" | ||
15 | |||
16 | int write_blob(struct isci_orom *isci_orom) | ||
17 | { | ||
18 | FILE *fd; | ||
19 | int err; | ||
20 | size_t count; | ||
21 | |||
22 | fd = fopen(blob_name, "w+"); | ||
23 | if (!fd) { | ||
24 | perror("Open file for write failed"); | ||
25 | fclose(fd); | ||
26 | return -EIO; | ||
27 | } | ||
28 | |||
29 | count = fwrite(isci_orom, sizeof(struct isci_orom), 1, fd); | ||
30 | if (count != 1) { | ||
31 | perror("Write data failed"); | ||
32 | fclose(fd); | ||
33 | return -EIO; | ||
34 | } | ||
35 | |||
36 | fclose(fd); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | void set_binary_values(struct isci_orom *isci_orom) | ||
42 | { | ||
43 | int ctrl_idx, phy_idx, port_idx; | ||
44 | |||
45 | /* setting OROM signature */ | ||
46 | strncpy(isci_orom->hdr.signature, sig, strlen(sig)); | ||
47 | isci_orom->hdr.version = version; | ||
48 | isci_orom->hdr.total_block_length = sizeof(struct isci_orom); | ||
49 | isci_orom->hdr.hdr_length = sizeof(struct sci_bios_oem_param_block_hdr); | ||
50 | isci_orom->hdr.num_elements = num_elements; | ||
51 | |||
52 | for (ctrl_idx = 0; ctrl_idx < 2; ctrl_idx++) { | ||
53 | isci_orom->ctrl[ctrl_idx].controller.mode_type = mode_type; | ||
54 | isci_orom->ctrl[ctrl_idx].controller.max_concurrent_dev_spin_up = | ||
55 | max_num_concurrent_dev_spin_up; | ||
56 | isci_orom->ctrl[ctrl_idx].controller.do_enable_ssc = | ||
57 | enable_ssc; | ||
58 | |||
59 | for (port_idx = 0; port_idx < 4; port_idx++) | ||
60 | isci_orom->ctrl[ctrl_idx].ports[port_idx].phy_mask = | ||
61 | phy_mask[ctrl_idx][port_idx]; | ||
62 | |||
63 | for (phy_idx = 0; phy_idx < 4; phy_idx++) { | ||
64 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].sas_address.high = | ||
65 | (__u32)(sas_addr[ctrl_idx][phy_idx] >> 32); | ||
66 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].sas_address.low = | ||
67 | (__u32)(sas_addr[ctrl_idx][phy_idx]); | ||
68 | |||
69 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control0 = | ||
70 | afe_tx_amp_control0; | ||
71 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control1 = | ||
72 | afe_tx_amp_control1; | ||
73 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control2 = | ||
74 | afe_tx_amp_control2; | ||
75 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control3 = | ||
76 | afe_tx_amp_control3; | ||
77 | } | ||
78 | } | ||
79 | } | ||
80 | |||
81 | int main(void) | ||
82 | { | ||
83 | int err; | ||
84 | struct isci_orom *isci_orom; | ||
85 | |||
86 | isci_orom = malloc(sizeof(struct isci_orom)); | ||
87 | memset(isci_orom, 0, sizeof(struct isci_orom)); | ||
88 | |||
89 | set_binary_values(isci_orom); | ||
90 | |||
91 | err = write_blob(isci_orom); | ||
92 | if (err < 0) { | ||
93 | free(isci_orom); | ||
94 | return err; | ||
95 | } | ||
96 | |||
97 | free(isci_orom); | ||
98 | return 0; | ||
99 | } | ||
diff --git a/drivers/scsi/isci/firmware/create_fw.h b/drivers/scsi/isci/firmware/create_fw.h deleted file mode 100644 index 5f298828d22e..000000000000 --- a/drivers/scsi/isci/firmware/create_fw.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | #ifndef _CREATE_FW_H_ | ||
2 | #define _CREATE_FW_H_ | ||
3 | #include "../probe_roms.h" | ||
4 | |||
5 | |||
6 | /* we are configuring for 2 SCUs */ | ||
7 | static const int num_elements = 2; | ||
8 | |||
9 | /* | ||
10 | * For all defined arrays: | ||
11 | * elements 0-3 are for SCU0, ports 0-3 | ||
12 | * elements 4-7 are for SCU1, ports 0-3 | ||
13 | * | ||
14 | * valid configurations for one SCU are: | ||
15 | * P0 P1 P2 P3 | ||
16 | * ---------------- | ||
17 | * 0xF,0x0,0x0,0x0 # 1 x4 port | ||
18 | * 0x3,0x0,0x4,0x8 # Phys 0 and 1 are a x2 port, phy 2 and phy 3 are each x1 | ||
19 | * # ports | ||
20 | * 0x1,0x2,0xC,0x0 # Phys 0 and 1 are each x1 ports, phy 2 and phy 3 are a x2 | ||
21 | * # port | ||
22 | * 0x3,0x0,0xC,0x0 # Phys 0 and 1 are a x2 port, phy 2 and phy 3 are a x2 port | ||
23 | * 0x1,0x2,0x4,0x8 # Each phy is a x1 port (this is the default configuration) | ||
24 | * | ||
25 | * if there is a port/phy on which you do not wish to override the default | ||
26 | * values, use the value assigned to UNINIT_PARAM (255). | ||
27 | */ | ||
28 | |||
29 | /* discovery mode type (port auto config mode by default ) */ | ||
30 | |||
31 | /* | ||
32 | * if there is a port/phy on which you do not wish to override the default | ||
33 | * values, use the value "0000000000000000". SAS address of zero's is | ||
34 | * considered invalid and will not be used. | ||
35 | */ | ||
36 | #ifdef MPC | ||
37 | static const int mode_type = SCIC_PORT_MANUAL_CONFIGURATION_MODE; | ||
38 | static const __u8 phy_mask[2][4] = { {1, 2, 4, 8}, | ||
39 | {1, 2, 4, 8} }; | ||
40 | static const unsigned long long sas_addr[2][4] = { { 0x5FCFFFFFF0000001ULL, | ||
41 | 0x5FCFFFFFF0000002ULL, | ||
42 | 0x5FCFFFFFF0000003ULL, | ||
43 | 0x5FCFFFFFF0000004ULL }, | ||
44 | { 0x5FCFFFFFF0000005ULL, | ||
45 | 0x5FCFFFFFF0000006ULL, | ||
46 | 0x5FCFFFFFF0000007ULL, | ||
47 | 0x5FCFFFFFF0000008ULL } }; | ||
48 | #else /* APC (default) */ | ||
49 | static const int mode_type = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE; | ||
50 | static const __u8 phy_mask[2][4]; | ||
51 | static const unsigned long long sas_addr[2][4] = { { 0x5FCFFFFF00000001ULL, | ||
52 | 0x5FCFFFFF00000001ULL, | ||
53 | 0x5FCFFFFF00000001ULL, | ||
54 | 0x5FCFFFFF00000001ULL }, | ||
55 | { 0x5FCFFFFF00000002ULL, | ||
56 | 0x5FCFFFFF00000002ULL, | ||
57 | 0x5FCFFFFF00000002ULL, | ||
58 | 0x5FCFFFFF00000002ULL } }; | ||
59 | #endif | ||
60 | |||
61 | /* Maximum number of concurrent device spin up */ | ||
62 | static const int max_num_concurrent_dev_spin_up = 1; | ||
63 | |||
64 | /* enable of ssc operation */ | ||
65 | static const int enable_ssc; | ||
66 | |||
67 | /* AFE_TX_AMP_CONTROL */ | ||
68 | static const unsigned int afe_tx_amp_control0 = 0x000bdd08; | ||
69 | static const unsigned int afe_tx_amp_control1 = 0x000ffc00; | ||
70 | static const unsigned int afe_tx_amp_control2 = 0x000b7c09; | ||
71 | static const unsigned int afe_tx_amp_control3 = 0x000afc6e; | ||
72 | |||
73 | static const char blob_name[] = "isci_firmware.bin"; | ||
74 | static const char sig[] = "ISCUOEMB"; | ||
75 | static const unsigned char version = 0x10; | ||
76 | |||
77 | #endif | ||
diff --git a/firmware/Makefile b/firmware/Makefile index 5f43bfba3c7a..0d15a3d113a2 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -82,7 +82,6 @@ fw-shipped-$(CONFIG_SERIAL_8250_CS) += cis/MT5634ZLX.cis cis/RS-COM-2P.cis \ | |||
82 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin | 82 | fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin |
83 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ | 83 | fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ |
84 | advansys/3550.bin advansys/38C0800.bin | 84 | advansys/3550.bin advansys/38C0800.bin |
85 | fw-shipped-$(CONFIG_SCSI_ISCI) += isci/isci_firmware.bin | ||
86 | fw-shipped-$(CONFIG_SCSI_QLOGIC_1280) += qlogic/1040.bin qlogic/1280.bin \ | 85 | fw-shipped-$(CONFIG_SCSI_QLOGIC_1280) += qlogic/1040.bin qlogic/1280.bin \ |
87 | qlogic/12160.bin | 86 | qlogic/12160.bin |
88 | fw-shipped-$(CONFIG_SCSI_QLOGICPTI) += qlogic/isp1000.bin | 87 | fw-shipped-$(CONFIG_SCSI_QLOGICPTI) += qlogic/isp1000.bin |
diff --git a/firmware/isci/isci_firmware.bin.ihex b/firmware/isci/isci_firmware.bin.ihex deleted file mode 100644 index 2e6619570072..000000000000 --- a/firmware/isci/isci_firmware.bin.ihex +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | :10000000495343554F454D42E80018100002000087 | ||
2 | :1000100000000000000000000101000000000000DE | ||
3 | :10002000FFFFCF5F0100000008DD0B0000FC0F00A8 | ||
4 | :10003000097C0B006EFC0A00FFFFCF5F010000008F | ||
5 | :1000400008DD0B0000FC0F00097C0B006EFC0A00B1 | ||
6 | :10005000FFFFCF5F0100000008DD0B0000FC0F0078 | ||
7 | :10006000097C0B006EFC0A00FFFFCF5F010000005F | ||
8 | :1000700008DD0B0000FC0F00097C0B006EFC0A0081 | ||
9 | :100080000101000000000000FFFFCF5F0200000040 | ||
10 | :1000900008DD0B0000FC0F00097C0B006EFC0A0061 | ||
11 | :1000A000FFFFCF5F0200000008DD0B0000FC0F0027 | ||
12 | :1000B000097C0B006EFC0A00FFFFCF5F020000000E | ||
13 | :1000C00008DD0B0000FC0F00097C0B006EFC0A0031 | ||
14 | :1000D000FFFFCF5F0200000008DD0B0000FC0F00F7 | ||
15 | :0800E000097C0B006EFC0A0014 | ||
16 | :00000001FF | ||