27 #include <linux/kernel.h>
38 'R',
's',
't',
'S',
'c',
'u',
'O'
48 struct isci_oem_hdr oem_hdr;
58 "Unable to allocate memory for orom\n");
71 copy_len =
min(oem_hdr.len -
sizeof(oem_hdr),
75 oprom + i +
sizeof(oem_hdr),
80 for (j = 0, sum = 0; j <
sizeof(oem_hdr); j++, tmp++)
84 for (j = 0; j <
sizeof(*rom); j++, tmp++)
89 "OEM table checksum failed\n");
94 if (
memcmp(rom->hdr.signature,
100 "OEM parameter table found in OROM\n");
122 if (fw->
size <
sizeof(*orom))
137 if (is_c0(pdev) || is_c1(pdev))
146 orom->
ctrl[
i].phys[
j].afe_tx_amp_control0 = 0xe7c03;
147 orom->
ctrl[
i].phys[
j].afe_tx_amp_control1 = 0xe7c03;
148 orom->
ctrl[
i].phys[
j].afe_tx_amp_control2 = 0xe7c03;
149 orom->
ctrl[
i].phys[
j].afe_tx_amp_control3 = 0xe7c03;
157 static struct efi *get_efi(
void)
170 struct isci_oem_hdr *oem_hdr;
181 "Unable to allocate memory for EFI data\n");
185 rom = (
struct isci_orom *)(efi_data +
sizeof(
struct isci_oem_hdr));
188 status = get_efi()->get_variable(isci_efivar_name,
198 "Unable to obtain EFI var data for OEM parms\n");
202 oem_hdr = (
struct isci_oem_hdr *)efi_data;
206 "Invalid OEM header signature\n");
211 tmp = (
u8 *)efi_data;
212 for (j = 0, sum = 0; j < (
sizeof(*oem_hdr) +
sizeof(*rom)); j++, tmp++)
217 "OEM table checksum failed\n");
225 "Invalid OEM table signature\n");