Lines Matching +full:0 +full:x2000

30 	u8   major;          /* 0 */
31 u8 minor; /* 0 */
37 #define OCM_DE_OCM_DIR 0x00
38 #define OCM_DE_WIN_DRVR 0x01
39 #define OCM_DE_BIOS_CHIM 0x02
40 #define OCM_DE_RAID_ENGN 0x03
41 #define OCM_DE_BIOS_INTL 0x04
42 #define OCM_DE_BIOS_CHIM_OSM 0x05
43 #define OCM_DE_BIOS_CHIM_DYNAMIC 0x06
44 #define OCM_DE_ADDC2C_RES0 0x07
45 #define OCM_DE_ADDC2C_RES1 0x08
46 #define OCM_DE_ADDC2C_RES2 0x09
47 #define OCM_DE_ADDC2C_RES3 0x0A
55 .sig = {0x4D, 0x4F}, /* signature */
67 .size = {0, 4}, /* size */
72 .size = {0, 4}, /* size */
77 .size = {0, 4}, /* size */
82 .size = {0, 4}, /* size */
94 u8 minor; /* 0 */
114 * Return the number of bytes not read. Return 0 on success.
123 for ( ; size > 0; size--, offs++, p++) in asd_read_ocm_seg()
138 if (dir->sig[0] != 'M' || dir->sig[1] != 'O') { in asd_read_ocm_dir()
140 dir->sig[0], dir->sig[1]); in asd_read_ocm_dir()
143 if (dir->major != 0) { in asd_read_ocm_dir()
144 asd_printk("unsupported major version of ocm dir:0x%x\n", in asd_read_ocm_dir()
148 dir->num_de &= 0xf; in asd_read_ocm_dir()
149 return 0; in asd_read_ocm_dir()
159 * Return the number of bytes not written. Return 0 on success.
168 for ( ; size > 0; size--, offs++, p++) in asd_write_ocm_seg()
174 #define THREE_TO_NUM(X) ((X)[0] | ((X)[1] << 8) | ((X)[2] << 16))
182 for (i = 0; i < dir->num_de; i++) { in asd_find_dir_entry()
191 return 0; in asd_find_dir_entry()
224 bc_struct->sig[0], bc_struct->sig[1], in asd_get_bios_chim()
230 asd_printk("BIOS_CHIM unsupported major version:0x%x\n", in asd_get_bios_chim()
250 if (size > 0) { in asd_get_bios_chim()
260 asd_ha->hw_prof.ue.num = 0; in asd_get_bios_chim()
261 asd_ha->hw_prof.ue.size = 0; in asd_get_bios_chim()
277 for (i = 0; i < OCM_MAX_SIZE; i += 4) in asd_hwi_initialize_ocm_dir()
278 asd_write_ocm_dword(asd_ha, i, 0); in asd_hwi_initialize_ocm_dir()
281 asd_write_ocm_seg(asd_ha, &OCMDirInit, 0, in asd_hwi_initialize_ocm_dir()
285 for (i = 0; i < OCM_INIT_DIR_ENTRIES; i++) in asd_hwi_initialize_ocm_dir()
298 int err = 0; in asd_hwi_check_ocm_access()
314 "is 0x%x\n", v); in asd_hwi_check_ocm_access()
350 err = asd_read_ocm_dir(asd_ha, dir, 0); in asd_read_ocm()
362 #define FLASH_RESET 0xF0
364 #define ASD_FLASH_SIZE 0x200000
366 #define FLASH_NEXT_ENTRY_OFFS 0x2000
369 #define FLASH_DE_TYPE_MASK 0x3FFFFFFF
370 #define FLASH_DE_MS 0x120
371 #define FLASH_DE_CTRL_A_USER 0xE0
401 u8 maj; /* 0 */
402 u8 min; /* 0 */
414 #define MS_PHY_STATE_ENABLED 0
419 u8 phy_control_0; /* mode 5 reg 0x160 */
420 u8 phy_control_1; /* mode 5 reg 0x161 */
421 u8 phy_control_2; /* mode 5 reg 0x162 */
422 u8 phy_control_3; /* mode 5 reg 0x163 */
428 u8 maj; /* 0 */
438 #if 0
442 [2 ... 0x7F] = "unknown",
443 [0x80] = "ADPT_I2C",
444 [0x81 ... 0xFF] = "VENDOR_UNIQUExx"
455 #if 0
457 [0 ... 7] = "unknown",
461 [0x80] = "PCIX_DAUGHTER0",
462 [0x81] = "SAS_DAUGHTER0",
463 [0x82 ... 0xFF] = "VENDOR_UNIQUExx"
489 #if 0
512 u8 maj; /* 0 */
513 u8 min; /* 0 */
555 for (c = 5000; c > 0; c--) { in asd_poll_flash()
559 return 0; in asd_poll_flash()
583 return 0; in asd_read_flash_seg()
592 * @flash_dir. Return 1 if found, 0 if not.
598 for (v = 0; v < ASD_FLASH_SIZE; v += FLASH_NEXT_ENTRY_OFFS) { in asd_find_flash_dir()
602 sizeof(FLASH_DIR_COOKIE)-1) == 0) { in asd_find_flash_dir()
609 return 0; in asd_find_flash_dir()
614 int err = 0; in asd_flash_getid()
626 asd_ha->hw_prof.flash.wide = reg & FLASHW ? 1 : 0; in asd_flash_getid()
632 return 0; in asd_flash_getid()
637 u16 chksum = 0; in asd_calc_flash_chksum()
639 while (size-- > 0) in asd_calc_flash_chksum()
652 for (i = 0; i < FLASH_MAX_DIR_ENTRIES; i++) { in asd_find_flash_de()
664 return 0; in asd_find_flash_de()
669 if (ms->sig[0] != 'S' || ms->sig[1] != 'M') { in asd_validate_ms()
671 ms->sig[0], ms->sig[1]); in asd_validate_ms()
674 if (ms->maj != 0) { in asd_validate_ms()
687 return 0; in asd_validate_ms()
694 return 0; in asd_ms_get_sas_addr()
701 asd_ha->hw_prof.pcba_sn[ASD_PCBA_SN_SIZE] = '\0'; in asd_ms_get_pcba_sn()
702 return 0; in asd_ms_get_pcba_sn()
708 * @id0: the first byte of the id (offs 0)
714 * you can pass 0xFF for the second.
725 case 0xFF: in asd_find_ll_by_id()
750 * report. E.g., it is possible for phys 0, 1 and 2 to be HIDDEN,
760 int en_phys = 0; in asd_ms_get_phy_params()
761 int rep_phys = 0; in asd_ms_get_phy_params()
769 dflt_phy_param.sig[0] = 'P'; in asd_ms_get_phy_params()
771 dflt_phy_param.maj = 0; in asd_ms_get_phy_params()
775 for (i =0; i < ASD_MAX_PHYS; i++) { in asd_ms_get_phy_params()
776 dflt_phy_param.phy_desc[i].state = 0; in asd_ms_get_phy_params()
778 dflt_phy_param.phy_desc[i].phy_control_0 = 0xf6; in asd_ms_get_phy_params()
779 dflt_phy_param.phy_desc[i].phy_control_1 = 0x10; in asd_ms_get_phy_params()
780 dflt_phy_param.phy_desc[i].phy_control_2 = 0x43; in asd_ms_get_phy_params()
781 dflt_phy_param.phy_desc[i].phy_control_3 = 0xeb; in asd_ms_get_phy_params()
788 if (phy_param->maj != 0) { in asd_ms_get_phy_params()
789 asd_printk("unsupported manuf. phy param major version:0x%x\n", in asd_ms_get_phy_params()
795 asd_ha->hw_prof.enabled_phys = 0; in asd_ms_get_phy_params()
796 for (i = 0; i < phy_param->num_phy_desc; i++) { in asd_ms_get_phy_params()
798 switch (pd->state & 0xF) { in asd_ms_get_phy_params()
820 ASD_DPRINTK("ms: max_phys:0x%x, num_phys:0x%x\n", in asd_ms_get_phy_params()
822 ASD_DPRINTK("ms: enabled_phys:0x%x\n", asd_ha->hw_prof.enabled_phys); in asd_ms_get_phy_params()
823 return 0; in asd_ms_get_phy_params()
834 return 0; in asd_ms_get_connector_map()
837 if (cm->maj != 0) { in asd_ms_get_connector_map()
838 ASD_DPRINTK("ms: unsupported: connector map major version 0x%x" in asd_ms_get_connector_map()
845 return 0; in asd_ms_get_connector_map()
867 if (size == 0) in asd_process_ms()
879 ASD_DPRINTK("couldn't read manuf sector at 0x%x, size 0x%x\n", in asd_process_ms()
927 for (i = 0; i < ps->num_phys; i++) { in asd_process_ctrla_phy_settings()
932 if (*(u64 *)pe->sas_addr == 0) { in asd_process_ctrla_phy_settings()
940 (pe->sas_link_rates & 0xF0) >> 4; in asd_process_ctrla_phy_settings()
942 (pe->sas_link_rates & 0x0F); in asd_process_ctrla_phy_settings()
944 (pe->sata_link_rates & 0xF0) >> 4; in asd_process_ctrla_phy_settings()
946 (pe->sata_link_rates & 0x0F); in asd_process_ctrla_phy_settings()
948 ASD_DPRINTK("ctrla: phy%d: sas_addr: %llx, sas rate:0x%x-0x%x," in asd_process_ctrla_phy_settings()
949 " sata rate:0x%x-0x%x, flags:0x%x\n", in asd_process_ctrla_phy_settings()
959 return 0; in asd_process_ctrla_phy_settings()
983 for (i =0; i < ASD_MAX_PHYS; i++) { in asd_process_ctrl_a_user()
986 dflt_ps.phy_ent[i].sas_link_rates = 0x98; in asd_process_ctrl_a_user()
987 dflt_ps.phy_ent[i].flags = 0x0; in asd_process_ctrl_a_user()
988 dflt_ps.phy_ent[i].sata_link_rates = 0x0; in asd_process_ctrl_a_user()
996 if (size == 0) in asd_process_ctrl_a_user()
1013 ps = asd_find_ll_by_id(el, 'h', 0xFF); in asd_process_ctrl_a_user()
1054 asd_printk("unsupported flash dir version:0x%x\n", in asd_read_flash()
1097 for (i = 0; i < bytes_to_verify; i++) { in asd_verify_flash_seg()
1133 ASD_DPRINTK("Erase failed at offset:0x%x\n", in asd_write_flash_seg()
1145 for (i = 0; i < bytes_to_write; i++) { in asd_write_flash_seg()
1151 (reg + 0xAAA), 0xAA); in asd_write_flash_seg()
1153 (reg + 0x555), 0x55); in asd_write_flash_seg()
1155 (reg + 0xAAA), 0xA0); in asd_write_flash_seg()
1164 (reg + 0x555), 0xAA); in asd_write_flash_seg()
1166 (reg + 0x2AA), 0x55); in asd_write_flash_seg()
1168 (reg + 0x555), 0xA0); in asd_write_flash_seg()
1178 (nv_offset + i), 0) != 0) { in asd_write_flash_seg()
1179 ASD_DPRINTK("aicx: Write failed at offset:0x%x\n", in asd_write_flash_seg()
1190 return 0; in asd_write_flash_seg()
1207 for (loop_cnt = 0; loop_cnt < 50000; loop_cnt++) { in asd_chk_write_status()
1214 if (toggle_bit1 == 0) { in asd_chk_write_status()
1215 return 0; in asd_chk_write_status()
1226 if (toggle_bit1 == 0) in asd_chk_write_status()
1227 return 0; in asd_chk_write_status()
1273 asd_write_reg_byte(asd_ha, (reg + 0xAAA), 0xAA); in asd_erase_nv_sector()
1274 asd_write_reg_byte(asd_ha, (reg + 0x555), 0x55); in asd_erase_nv_sector()
1275 asd_write_reg_byte(asd_ha, (reg + 0xAAA), 0x80); in asd_erase_nv_sector()
1276 asd_write_reg_byte(asd_ha, (reg + 0xAAA), 0xAA); in asd_erase_nv_sector()
1277 asd_write_reg_byte(asd_ha, (reg + 0x555), 0x55); in asd_erase_nv_sector()
1278 asd_write_reg_byte(asd_ha, (reg + sector_addr), 0x30); in asd_erase_nv_sector()
1281 asd_write_reg_byte(asd_ha, (reg + 0x555), 0xAA); in asd_erase_nv_sector()
1282 asd_write_reg_byte(asd_ha, (reg + 0x2AA), 0x55); in asd_erase_nv_sector()
1283 asd_write_reg_byte(asd_ha, (reg + 0x555), 0x80); in asd_erase_nv_sector()
1284 asd_write_reg_byte(asd_ha, (reg + 0x555), 0xAA); in asd_erase_nv_sector()
1285 asd_write_reg_byte(asd_ha, (reg + 0x2AA), 0x55); in asd_erase_nv_sector()
1286 asd_write_reg_byte(asd_ha, (reg + sector_addr), 0x30); in asd_erase_nv_sector()
1292 if (asd_chk_write_status(asd_ha, sector_addr, 1) != 0) in asd_erase_nv_sector()
1298 return 0; in asd_erase_nv_sector()
1329 asd_write_reg_byte(asd_ha, reg + 0xAAA, 0xAA); in asd_check_flash_type()
1330 asd_write_reg_byte(asd_ha, reg + 0x555, 0x55); in asd_check_flash_type()
1331 asd_write_reg_byte(asd_ha, reg + 0xAAA, 0x90); in asd_check_flash_type()
1341 ASD_DPRINTK("Flash MethodA manuf_id(0x%x) dev_id(0x%x) " in asd_check_flash_type()
1342 "sec_prot(0x%x)\n", manuf_id, dev_id, sec_prot); in asd_check_flash_type()
1344 if (err != 0) in asd_check_flash_type()
1394 asd_write_reg_byte(asd_ha, (reg + 0x555), 0xAA); in asd_check_flash_type()
1395 asd_write_reg_byte(asd_ha, (reg + 0x2AA), 0x55); in asd_check_flash_type()
1396 asd_write_reg_byte(asd_ha, (reg + 0x555), 0x90); in asd_check_flash_type()
1401 ASD_DPRINTK("Flash MethodB manuf_id(0x%x) dev_id(0x%x) sec_prot" in asd_check_flash_type()
1402 "(0x%x)\n", manuf_id, dev_id, sec_prot); in asd_check_flash_type()
1405 if (err != 0) { in asd_check_flash_type()
1461 return 0; in asd_check_flash_type()