Lines Matching +full:ls2k +full:- +full:chipid
1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright (C) 2022-2023 Loongson Technology Corporation Limited
36 u8 res2[0x3ff8 - 0x18];
51 /* SoC die attribute definition for Loongson-2 platform */
55 * LoongArch-based SoCs Loongson-2 Series
69 while (matches->svr) { in loongson2_soc_die_match()
70 if (matches->svr == (svr & matches->mask)) in loongson2_soc_die_match()
82 if (!guts || !guts->regs) in loongson2_guts_get_svr()
85 if (guts->little_endian) in loongson2_guts_get_svr()
86 svr = ioread32(&guts->regs->svr); in loongson2_guts_get_svr()
88 svr = ioread32be(&guts->regs->svr); in loongson2_guts_get_svr()
95 struct device_node *root, *np = pdev->dev.of_node; in loongson2_guts_probe()
96 struct device *dev = &pdev->dev; in loongson2_guts_probe()
104 return -ENOMEM; in loongson2_guts_probe()
106 guts->little_endian = of_property_read_bool(np, "little-endian"); in loongson2_guts_probe()
108 guts->regs = devm_platform_ioremap_resource(pdev, 0); in loongson2_guts_probe()
109 if (IS_ERR(guts->regs)) in loongson2_guts_probe()
110 return PTR_ERR(guts->regs); in loongson2_guts_probe()
124 "Loongson %s", soc_die->die); in loongson2_guts_probe()
129 return -ENOMEM; in loongson2_guts_probe()
133 return -ENOMEM; in loongson2_guts_probe()
137 return -ENOMEM; in loongson2_guts_probe()
158 * guts node, for Loongson-2 SoCs.
161 { .compatible = "loongson,ls2k-chipid", },
168 .name = "loongson2-guts",