13
13
#define SMEM_KERNEL_RESERVE SMEM_ID_VENDOR0
14
14
#define SMEM_KERNEL_RESERVE_SIZE 1024
15
15
16
+ static uint32_t prod_id ;
16
17
static const struct mmi_unit_info * mmi_unit_info ;
17
18
18
19
static void readprop_u32 (const void * dtb , int node , const char * name , uint32_t * val ) {
@@ -26,10 +27,10 @@ static void readprop_u32(const void *dtb, int node, const char *name, uint32_t *
26
27
27
28
static void print_unit_info (const struct mmi_unit_info * info )
28
29
{
29
- dprintf (INFO , "Motorola unit info v%d: rev=%#04x, serial=%#08x%08x, "
30
+ dprintf (INFO , "Motorola unit info v%d: prod_id=%#04x, rev=%#04x, serial=%#08x%08x, "
30
31
"machine='%s', barcode='%s', carrier='%s', baseband='%s', device='%s', "
31
32
"radio='%s' (%#x), powerup_reason=%#08x\n" ,
32
- info -> version , info -> system_rev , info -> system_serial_high , info -> system_serial_low ,
33
+ info -> version , prod_id , info -> system_rev , info -> system_serial_high , info -> system_serial_low ,
33
34
info -> machine , info -> barcode , info -> carrier , info -> baseband , info -> device ,
34
35
info -> radio_str , info -> radio , info -> powerup_reason );
35
36
}
@@ -67,6 +68,7 @@ static int motorola_unit_info(const void *dtb, int node)
67
68
memset (info , 0 , SMEM_KERNEL_RESERVE_SIZE );
68
69
info -> version = MMI_UNIT_INFO_VER ;
69
70
71
+ readprop_u32 (dtb , chosen , "mmi,prod_id" , & prod_id );
70
72
readprop_u32 (dtb , chosen , "linux,hwrev" , & info -> system_rev );
71
73
readprop_u32 (dtb , chosen , "linux,seriallow" , & info -> system_serial_low );
72
74
readprop_u32 (dtb , chosen , "linux,serialhigh" , & info -> system_serial_high );
0 commit comments