uint32_t sprdfb_get_chip_id(void) { uint32_t adie_chip_id = sci_get_chip_id(); if((adie_chip_id & 0xffff0000) < 0x50000000) { printk("sprdfb: [%s], chip id 0x%08x is invalidate, try to get it by reading reg directly!\n", __FUNCTION__, adie_chip_id); adie_chip_id = dispc_glb_read(SPRD_AONAPB_BASE+0xFC); if((adie_chip_id & 0xffff0000) < 0x50000000) { printk("sprdfb: [%s], chip id 0x%08x from reg is invalidate too!\n", __FUNCTION__, adie_chip_id); } } printk("sprdfb: return chip id 0x%08x \n", adie_chip_id); return adie_chip_id; }
int sprd_thm_chip_id_check(void) { u32 chip_id_tmp; chip_id_tmp = sci_get_chip_id(); #if !defined(CONFIG_ARCH_SCX15) return 0; #else if ((TSMC_DOLPHINW4T_CHIP_ID_1 == chip_id_tmp) || (TSMC_DOLPHINW4T_CHIP_ID_2 == chip_id_tmp) || (TSMC_DOLPHINWT4T_CHIP_ID_1 == chip_id_tmp)) { //printk("Sprd thm the chip support thermal CHIP_ID:0x%x \n",chip_id_tmp); return 0; } else { printk("Sprd thm the chip don't support thermal CHIP_ID:0x%x \n",chip_id_tmp); return -1; } #endif }