Lines Matching +full:product +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2014-2016 Glider bvba
17 const char name[16]; member
22 .name = "R-Car Gen1",
23 .reg = 0xff000044, /* PRR (Product Register) */
27 .name = "R-Car Gen2",
28 .reg = 0xff000044, /* PRR (Product Register) */
32 .name = "R-Car Gen3",
33 .reg = 0xfff00044, /* PRR (Product Register) */
37 .name = "R-Car Gen4",
41 .name = "R-Mobile",
46 .name = "RZ/A1",
50 .name = "RZ/A2",
54 .name = "RZ/Five",
58 .name = "RZ/G1",
59 .reg = 0xff000044, /* PRR (Product Register) */
63 .name = "RZ/G2",
64 .reg = 0xfff00044, /* PRR (Product Register) */
68 .name = "RZ/G2L",
72 .name = "RZ/G2UL",
76 .name = "RZ/V2L",
80 .name = "RZ/V2M",
84 .name = "SH-Mobile",
429 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
430 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
431 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
432 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
440 unsigned int product, eshi = 0, eslo; in renesas_soc_init() local
454 return -ENODEV; in renesas_soc_init()
456 soc_id = strchr(match->compatible, ',') + 1; in renesas_soc_init()
457 soc = match->data; in renesas_soc_init()
458 family = soc->family; in renesas_soc_init()
462 id = match->data; in renesas_soc_init()
465 } else if (soc->id && family->reg) { in renesas_soc_init()
468 chipid = ioremap(family->reg, 4); in renesas_soc_init()
475 return -ENOMEM; in renesas_soc_init()
479 of_property_read_string(np, "model", &soc_dev_attr->machine); in renesas_soc_init()
482 soc_dev_attr->family = kstrdup_const(family->name, GFP_KERNEL); in renesas_soc_init()
483 soc_dev_attr->soc_id = kstrdup_const(soc_id, GFP_KERNEL); in renesas_soc_init()
486 product = readl(chipid + id->offset); in renesas_soc_init()
490 /* R-Car M3-W ES1.1 incorrectly identifies as ES2.0 */ in renesas_soc_init()
491 if ((product & 0x7fff) == 0x5210) in renesas_soc_init()
492 product ^= 0x11; in renesas_soc_init()
493 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ in renesas_soc_init()
494 if ((product & 0x7fff) == 0x5211) in renesas_soc_init()
495 product ^= 0x12; in renesas_soc_init()
497 eshi = ((product >> 4) & 0x0f) + 1; in renesas_soc_init()
498 eslo = product & 0xf; in renesas_soc_init()
499 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", in renesas_soc_init()
502 eshi = ((product >> 28) & 0x0f); in renesas_soc_init()
503 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", in renesas_soc_init()
507 eshi = ((product >> 4) & 0x0f); in renesas_soc_init()
508 eslo = product & 0xf; in renesas_soc_init()
509 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", in renesas_soc_init()
513 if (soc->id && in renesas_soc_init()
514 ((product & id->mask) >> __ffs(id->mask)) != soc->id) { in renesas_soc_init()
515 pr_warn("SoC mismatch (product = 0x%x)\n", product); in renesas_soc_init()
516 ret = -ENODEV; in renesas_soc_init()
521 pr_info("Detected Renesas %s %s %s%s\n", soc_dev_attr->family, in renesas_soc_init()
522 soc_dev_attr->soc_id, rev_prefix, soc_dev_attr->revision ?: ""); in renesas_soc_init()
533 kfree(soc_dev_attr->revision); in renesas_soc_init()
534 kfree_const(soc_dev_attr->soc_id); in renesas_soc_init()
535 kfree_const(soc_dev_attr->family); in renesas_soc_init()