Lines Matching +full:product +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2014-2016 Glider bvba
21 .name = "R-Car Gen1",
22 .reg = 0xff000044, /* PRR (Product Register) */
26 .name = "R-Car Gen2",
27 .reg = 0xff000044, /* PRR (Product Register) */
31 .name = "R-Car Gen3",
32 .reg = 0xfff00044, /* PRR (Product Register) */
36 .name = "R-Car Gen4",
40 .name = "R-Mobile",
58 .reg = 0xff000044, /* PRR (Product Register) */
63 .reg = 0xfff00044, /* PRR (Product Register) */
87 .name = "SH-Mobile",
93 u32 id; member
102 .id = 0x3b,
107 .id = 0x3f,
112 .id = 0x40,
117 .id = 0x847c447,
122 .id = 0x45,
127 .id = 0x47,
132 .id = 0x4b,
137 .id = 0x4c,
142 .id = 0x53,
147 .id = 0x52,
152 .id = 0x55,
157 .id = 0x57,
162 .id = 0x4f,
167 .id = 0x841c447,
172 .id = 0x8450447,
177 .id = 0x85e0447,
182 .id = 0x8447447,
195 .id = 0x3b,
200 .id = 0x45,
205 .id = 0x47,
210 .id = 0x4a,
215 .id = 0x4b,
220 .id = 0x4c,
225 .id = 0x4f,
230 .id = 0x52,
235 .id = 0x55,
240 .id = 0x54,
245 .id = 0x56,
250 .id = 0x57,
255 .id = 0x58,
260 .id = 0x59,
265 .id = 0x5a,
270 .id = 0x5c,
275 .id = 0x37,
439 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
440 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
441 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
442 { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l },
443 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
451 unsigned int product, eshi = 0, eslo; in renesas_soc_init() local
455 const struct renesas_id *id; in renesas_soc_init() local
465 return -ENODEV; in renesas_soc_init()
467 soc_id = strchr(match->compatible, ',') + 1; in renesas_soc_init()
468 soc = match->data; in renesas_soc_init()
469 family = soc->family; in renesas_soc_init()
473 id = match->data; in renesas_soc_init()
476 } else if (soc->id && family->reg) { in renesas_soc_init()
478 id = &id_prr; in renesas_soc_init()
479 chipid = ioremap(family->reg, 4); in renesas_soc_init()
486 return -ENOMEM; in renesas_soc_init()
489 soc_dev_attr->family = kstrdup_const(family->name, GFP_KERNEL); in renesas_soc_init()
490 soc_dev_attr->soc_id = kstrdup_const(soc_id, GFP_KERNEL); in renesas_soc_init()
493 product = readl(chipid + id->offset); in renesas_soc_init()
496 if (id == &id_prr) { in renesas_soc_init()
497 /* R-Car M3-W ES1.1 incorrectly identifies as ES2.0 */ in renesas_soc_init()
498 if ((product & 0x7fff) == 0x5210) in renesas_soc_init()
499 product ^= 0x11; in renesas_soc_init()
500 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ in renesas_soc_init()
501 if ((product & 0x7fff) == 0x5211) in renesas_soc_init()
502 product ^= 0x12; in renesas_soc_init()
504 eshi = ((product >> 4) & 0x0f) + 1; in renesas_soc_init()
505 eslo = product & 0xf; in renesas_soc_init()
506 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", in renesas_soc_init()
508 } else if (id == &id_rzg2l) { in renesas_soc_init()
509 eshi = ((product >> 28) & 0x0f); in renesas_soc_init()
510 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", in renesas_soc_init()
513 } else if (id == &id_rzv2m) { in renesas_soc_init()
514 eshi = ((product >> 4) & 0x0f); in renesas_soc_init()
515 eslo = product & 0xf; in renesas_soc_init()
516 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", in renesas_soc_init()
520 if (soc->id && in renesas_soc_init()
521 ((product & id->mask) >> __ffs(id->mask)) != soc->id) { in renesas_soc_init()
522 pr_warn("SoC mismatch (product = 0x%x)\n", product); in renesas_soc_init()
523 ret = -ENODEV; in renesas_soc_init()
528 pr_info("Detected Renesas %s %s %s%s\n", soc_dev_attr->family, in renesas_soc_init()
529 soc_dev_attr->soc_id, rev_prefix, soc_dev_attr->revision ?: ""); in renesas_soc_init()
540 kfree(soc_dev_attr->revision); in renesas_soc_init()
541 kfree_const(soc_dev_attr->soc_id); in renesas_soc_init()
542 kfree_const(soc_dev_attr->family); in renesas_soc_init()