Merge pull request #35 from dimerr/patch-1

Fix Hi3536 series support
pull/38/head
Igor Zalatov 2021-08-08 13:55:23 +03:00 committed by GitHub
commit e7643ae955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -301,6 +301,13 @@ void get_chip_id(unsigned long *Chip_Id, unsigned char *cpu, unsigned char *hard
*Chip_Id = 0;
return;
}
SCBASE = 0x12050000; //Hi3536
if(GetValueRegister(SCBASE)==-1) //затем читаем другой
{
sprintf(cpu,"unknown");
*Chip_Id = 0;
return;
}
}
//---------------------------------------------
if((GetValueRegister(SCBASE+SCSYSID0) & 0xFF000000) >> 24 == 0x35) //если старший байт = 0x35 значит все ID в одном регистре