Lines Matching +full:product +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2014-2016 Glider bvba
16 const char name[16]; member
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",
45 .name = "RZ/A1",
49 .name = "RZ/A2",
53 .name = "RZ/Five",
57 .name = "RZ/G1",
58 .reg = 0xff000044, /* PRR (Product Register) */
62 .name = "RZ/G2",
63 .reg = 0xfff00044, /* PRR (Product Register) */
67 .name = "RZ/G2L",
71 .name = "RZ/G2UL",
75 .name = "RZ/V2L",
79 .name = "RZ/V2M",
83 .name = "SH-Mobile",
434 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
435 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
436 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
437 { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l },
438 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
446 unsigned int product, eshi = 0, eslo; in renesas_soc_init() local
460 return -ENODEV; in renesas_soc_init()
462 soc_id = strchr(match->compatible, ',') + 1; in renesas_soc_init()
463 soc = match->data; in renesas_soc_init()
464 family = soc->family; in renesas_soc_init()
468 id = match->data; in renesas_soc_init()
471 } else if (soc->id && family->reg) { in renesas_soc_init()
474 chipid = ioremap(family->reg, 4); in renesas_soc_init()
481 return -ENOMEM; in renesas_soc_init()
484 soc_dev_attr->family = kstrdup_const(family->name, GFP_KERNEL); in renesas_soc_init()
485 soc_dev_attr->soc_id = kstrdup_const(soc_id, GFP_KERNEL); in renesas_soc_init()
488 product = readl(chipid + id->offset); in renesas_soc_init()
492 /* R-Car M3-W ES1.1 incorrectly identifies as ES2.0 */ in renesas_soc_init()
493 if ((product & 0x7fff) == 0x5210) in renesas_soc_init()
494 product ^= 0x11; in renesas_soc_init()
495 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ in renesas_soc_init()
496 if ((product & 0x7fff) == 0x5211) in renesas_soc_init()
497 product ^= 0x12; in renesas_soc_init()
499 eshi = ((product >> 4) & 0x0f) + 1; in renesas_soc_init()
500 eslo = product & 0xf; in renesas_soc_init()
501 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", in renesas_soc_init()
504 eshi = ((product >> 28) & 0x0f); in renesas_soc_init()
505 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", in renesas_soc_init()
509 eshi = ((product >> 4) & 0x0f); in renesas_soc_init()
510 eslo = product & 0xf; in renesas_soc_init()
511 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", in renesas_soc_init()
515 if (soc->id && in renesas_soc_init()
516 ((product & id->mask) >> __ffs(id->mask)) != soc->id) { in renesas_soc_init()
517 pr_warn("SoC mismatch (product = 0x%x)\n", product); in renesas_soc_init()
518 ret = -ENODEV; in renesas_soc_init()
523 pr_info("Detected Renesas %s %s %s%s\n", soc_dev_attr->family, in renesas_soc_init()
524 soc_dev_attr->soc_id, rev_prefix, soc_dev_attr->revision ?: ""); in renesas_soc_init()
535 kfree(soc_dev_attr->revision); in renesas_soc_init()
536 kfree_const(soc_dev_attr->soc_id); in renesas_soc_init()
537 kfree_const(soc_dev_attr->family); in renesas_soc_init()