Skip to content

Commit 56a3696

Browse files
committed
Fix HI3536CV100 chip generation detect
1 parent d780868 commit 56a3696

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

src/hal/hisi/hal_hisi.c

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -719,21 +719,6 @@ static const char *get_chip_V3(uint8_t scsysid0) {
719719
}
720720
}
721721

722-
static const char *get_chip_NVR3516(uint8_t scsysid0) {
723-
switch (scsysid0) {
724-
case 0:
725-
case 1:
726-
return "3521DV100";
727-
case 2:
728-
return "3536CV100";
729-
case 3:
730-
return "3520DV400";
731-
default:
732-
fprintf(stderr, "reserved value %#x", scsysid0);
733-
return "unknown";
734-
}
735-
}
736-
737722
static const char *get_hisi_chip_id(uint32_t family_id, uint8_t scsysid0) {
738723
switch (family_id) {
739724
case 0x3516A100:
@@ -800,7 +785,19 @@ static const char *get_hisi_chip_id(uint32_t family_id, uint8_t scsysid0) {
800785
case 0x3559A100:
801786
return "3559AV100";
802787
case 0xBDA9D100:
803-
return get_chip_NVR3516(scsysid0);
788+
switch (scsysid0) {
789+
case 0:
790+
case 1:
791+
return "3521DV100";
792+
case 2:
793+
chip_generation = HISI_3536C;
794+
return "3536CV100";
795+
case 3:
796+
return "3520DV400";
797+
default:
798+
fprintf(stderr, "reserved value %#x", scsysid0);
799+
return "unknown";
800+
}
804801
case 0x72050200:
805802
// former 3516EV200
806803
chip_generation = HISI_V4;

0 commit comments

Comments
 (0)