Skip to content

Commit ede6b8b

Browse files
committed
feat: prod_id in motorola,unit-info
1 parent 7c619cb commit ede6b8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lk2nd/device/2nd/gpl/motorola-unit-info.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define SMEM_KERNEL_RESERVE SMEM_ID_VENDOR0
1414
#define SMEM_KERNEL_RESERVE_SIZE 1024
1515

16+
static uint32_t prod_id;
1617
static const struct mmi_unit_info *mmi_unit_info;
1718

1819
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 *
2627

2728
static void print_unit_info(const struct mmi_unit_info *info)
2829
{
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, "
3031
"machine='%s', barcode='%s', carrier='%s', baseband='%s', device='%s', "
3132
"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,
3334
info->machine, info->barcode, info->carrier, info->baseband, info->device,
3435
info->radio_str, info->radio, info->powerup_reason);
3536
}
@@ -67,6 +68,7 @@ static int motorola_unit_info(const void *dtb, int node)
6768
memset(info, 0, SMEM_KERNEL_RESERVE_SIZE);
6869
info->version = MMI_UNIT_INFO_VER;
6970

71+
readprop_u32(dtb, chosen, "mmi,prod_id", &prod_id);
7072
readprop_u32(dtb, chosen, "linux,hwrev", &info->system_rev);
7173
readprop_u32(dtb, chosen, "linux,seriallow", &info->system_serial_low);
7274
readprop_u32(dtb, chosen, "linux,serialhigh", &info->system_serial_high);

0 commit comments

Comments
 (0)