renesas-soc.c (100c85421b52e41269ada88f7d71a6b8a06c7a11) | renesas-soc.c (0be9a322307994443e854efd6a05b129c26ce287) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Renesas SoC Identification 4 * 5 * Copyright (C) 2014-2016 Glider bvba 6 */ 7 8#include <linux/io.h> --- 61 unchanged lines hidden (view full) --- 70static const struct renesas_family fam_rzg2ul __initconst __maybe_unused = { 71 .name = "RZ/G2UL", 72}; 73 74static const struct renesas_family fam_rzg3s __initconst __maybe_unused = { 75 .name = "RZ/G3S", 76}; 77 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Renesas SoC Identification 4 * 5 * Copyright (C) 2014-2016 Glider bvba 6 */ 7 8#include <linux/io.h> --- 61 unchanged lines hidden (view full) --- 70static const struct renesas_family fam_rzg2ul __initconst __maybe_unused = { 71 .name = "RZ/G2UL", 72}; 73 74static const struct renesas_family fam_rzg3s __initconst __maybe_unused = { 75 .name = "RZ/G3S", 76}; 77 |
78static const struct renesas_family fam_rzv2h __initconst __maybe_unused = { 79 .name = "RZ/V2H", 80}; 81 |
|
78static const struct renesas_family fam_rzv2l __initconst __maybe_unused = { 79 .name = "RZ/V2L", 80}; 81 82static const struct renesas_family fam_rzv2m __initconst __maybe_unused = { 83 .name = "RZ/V2M", 84}; 85 --- 86 unchanged lines hidden (view full) --- 172 .id = 0x8450447, 173}; 174 175static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused = { 176 .family = &fam_rzg3s, 177 .id = 0x85e0447, 178}; 179 | 82static const struct renesas_family fam_rzv2l __initconst __maybe_unused = { 83 .name = "RZ/V2L", 84}; 85 86static const struct renesas_family fam_rzv2m __initconst __maybe_unused = { 87 .name = "RZ/V2M", 88}; 89 --- 86 unchanged lines hidden (view full) --- 176 .id = 0x8450447, 177}; 178 179static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused = { 180 .family = &fam_rzg3s, 181 .id = 0x85e0447, 182}; 183 |
184static const struct renesas_soc soc_rz_v2h __initconst __maybe_unused = { 185 .family = &fam_rzv2h, 186 .id = 0x847a447, 187}; 188 |
|
180static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = { 181 .family = &fam_rzv2l, 182 .id = 0x8447447, 183}; 184 185static const struct renesas_soc soc_rz_v2m __initconst __maybe_unused = { 186 .family = &fam_rzv2m, 187}; --- 214 unchanged lines hidden (view full) --- 402 { .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l }, 403#endif 404#ifdef CONFIG_ARCH_R9A08G045 405 { .compatible = "renesas,r9a08g045", .data = &soc_rz_g3s }, 406#endif 407#ifdef CONFIG_ARCH_R9A09G011 408 { .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m }, 409#endif | 189static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = { 190 .family = &fam_rzv2l, 191 .id = 0x8447447, 192}; 193 194static const struct renesas_soc soc_rz_v2m __initconst __maybe_unused = { 195 .family = &fam_rzv2m, 196}; --- 214 unchanged lines hidden (view full) --- 411 { .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l }, 412#endif 413#ifdef CONFIG_ARCH_R9A08G045 414 { .compatible = "renesas,r9a08g045", .data = &soc_rz_g3s }, 415#endif 416#ifdef CONFIG_ARCH_R9A09G011 417 { .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m }, 418#endif |
419#ifdef CONFIG_ARCH_R9A09G057 420 { .compatible = "renesas,r9a09g057", .data = &soc_rz_v2h }, 421#endif |
|
410#ifdef CONFIG_ARCH_SH73A0 411 { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 }, 412#endif 413 { /* sentinel */ } 414}; 415 416struct renesas_id { 417 unsigned int offset; --- 9 unchanged lines hidden (view full) --- 427 */ 428}; 429 430static const struct renesas_id id_rzg2l __initconst = { 431 .offset = 0xa04, 432 .mask = 0xfffffff, 433}; 434 | 422#ifdef CONFIG_ARCH_SH73A0 423 { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 }, 424#endif 425 { /* sentinel */ } 426}; 427 428struct renesas_id { 429 unsigned int offset; --- 9 unchanged lines hidden (view full) --- 439 */ 440}; 441 442static const struct renesas_id id_rzg2l __initconst = { 443 .offset = 0xa04, 444 .mask = 0xfffffff, 445}; 446 |
447static const struct renesas_id id_rzv2h __initconst = { 448 .offset = 0x304, 449 .mask = 0xfffffff, 450}; 451 |
|
435static const struct renesas_id id_rzv2m __initconst = { 436 .offset = 0x104, 437 .mask = 0xff, 438}; 439 440static const struct renesas_id id_prr __initconst = { 441 .offset = 0, 442 .mask = 0xff00, 443}; 444 445static const struct of_device_id renesas_ids[] __initconst = { 446 { .compatible = "renesas,bsid", .data = &id_bsid }, 447 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l }, 448 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l }, 449 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l }, 450 { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l }, 451 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m }, | 452static const struct renesas_id id_rzv2m __initconst = { 453 .offset = 0x104, 454 .mask = 0xff, 455}; 456 457static const struct renesas_id id_prr __initconst = { 458 .offset = 0, 459 .mask = 0xff00, 460}; 461 462static const struct of_device_id renesas_ids[] __initconst = { 463 { .compatible = "renesas,bsid", .data = &id_bsid }, 464 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l }, 465 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l }, 466 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l }, 467 { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l }, 468 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m }, |
469 { .compatible = "renesas,r9a09g057-sys", .data = &id_rzv2h }, |
|
452 { .compatible = "renesas,prr", .data = &id_prr }, 453 { /* sentinel */ } 454}; 455 456static int __init renesas_soc_init(void) 457{ 458 struct soc_device_attribute *soc_dev_attr; 459 unsigned int product, eshi = 0, eslo; --- 48 unchanged lines hidden (view full) --- 508 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ 509 if ((product & 0x7fff) == 0x5211) 510 product ^= 0x12; 511 512 eshi = ((product >> 4) & 0x0f) + 1; 513 eslo = product & 0xf; 514 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", 515 eshi, eslo); | 470 { .compatible = "renesas,prr", .data = &id_prr }, 471 { /* sentinel */ } 472}; 473 474static int __init renesas_soc_init(void) 475{ 476 struct soc_device_attribute *soc_dev_attr; 477 unsigned int product, eshi = 0, eslo; --- 48 unchanged lines hidden (view full) --- 526 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ 527 if ((product & 0x7fff) == 0x5211) 528 product ^= 0x12; 529 530 eshi = ((product >> 4) & 0x0f) + 1; 531 eslo = product & 0xf; 532 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", 533 eshi, eslo); |
516 } else if (id == &id_rzg2l) { | 534 } else if (id == &id_rzg2l || id == &id_rzv2h) { |
517 eshi = ((product >> 28) & 0x0f); 518 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", 519 eshi); 520 rev_prefix = "Rev "; 521 } else if (id == &id_rzv2m) { 522 eshi = ((product >> 4) & 0x0f); 523 eslo = product & 0xf; 524 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", --- 30 unchanged lines hidden --- | 535 eshi = ((product >> 28) & 0x0f); 536 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", 537 eshi); 538 rev_prefix = "Rev "; 539 } else if (id == &id_rzv2m) { 540 eshi = ((product >> 4) & 0x0f); 541 eslo = product & 0xf; 542 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", --- 30 unchanged lines hidden --- |