/linux/drivers/soc/fsl/ |
H A D | guts.c | 183 struct soc_device_attribute *soc_dev_attr; in fsl_guts_init() local 216 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in fsl_guts_init() 217 if (!soc_dev_attr) in fsl_guts_init() 223 soc_dev_attr->machine = kstrdup(machine, GFP_KERNEL); in fsl_guts_init() 224 if (!soc_dev_attr->machine) in fsl_guts_init() 230 soc_dev_attr->family = kasprintf(GFP_KERNEL, "QorIQ %s", in fsl_guts_init() 233 soc_dev_attr->family = kasprintf(GFP_KERNEL, "QorIQ"); in fsl_guts_init() 235 if (!soc_dev_attr->family) in fsl_guts_init() 238 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "svr:0x%08x", svr); in fsl_guts_init() 239 if (!soc_dev_attr->soc_id) in fsl_guts_init() [all …]
|
/linux/drivers/soc/ti/ |
H A D | k3-socinfo.c | 69 struct soc_device_attribute *soc_dev_attr) in k3_chipinfo_partno_to_names() argument 75 soc_dev_attr->family = k3_soc_ids[i].family_name; in k3_chipinfo_partno_to_names() 84 struct soc_device_attribute *soc_dev_attr) in k3_chipinfo_variant_to_sr() argument 90 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%s", in k3_chipinfo_variant_to_sr() 95 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%x.0", in k3_chipinfo_variant_to_sr() 99 if (!soc_dev_attr->revision) in k3_chipinfo_variant_to_sr() 111 struct soc_device_attribute *soc_dev_attr; in k3_chipinfo_probe() local 143 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in k3_chipinfo_probe() 144 if (!soc_dev_attr) in k3_chipinfo_probe() 147 ret = k3_chipinfo_partno_to_names(partno_id, soc_dev_attr); in k3_chipinfo_probe() [all …]
|
/linux/drivers/firmware/smccc/ |
H A D | soc_id.c | 33 static struct soc_device_attribute *soc_dev_attr; variable 61 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in smccc_soc_init() 62 if (!soc_dev_attr) in smccc_soc_init() 72 soc_dev_attr->soc_id = soc_id_str; in smccc_soc_init() 73 soc_dev_attr->revision = soc_id_rev_str; in smccc_soc_init() 74 soc_dev_attr->family = soc_id_jep106_id_str; in smccc_soc_init() 76 soc_dev = soc_device_register(soc_dev_attr); in smccc_soc_init() 78 kfree(soc_dev_attr); in smccc_soc_init() 82 pr_info("ID = %s Revision = %s\n", soc_dev_attr->soc_id, in smccc_soc_init() 83 soc_dev_attr->revision); in smccc_soc_init() [all …]
|
/linux/drivers/soc/amlogic/ |
H A D | meson-mx-socinfo.c | 109 struct soc_device_attribute *soc_dev_attr; in meson_mx_socinfo_init() local 149 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in meson_mx_socinfo_init() 150 if (!soc_dev_attr) in meson_mx_socinfo_init() 153 soc_dev_attr->family = "Amlogic Meson"; in meson_mx_socinfo_init() 156 of_property_read_string(np, "model", &soc_dev_attr->machine); in meson_mx_socinfo_init() 159 soc_dev_attr->revision = meson_mx_socinfo_revision(major_ver, misc_ver, in meson_mx_socinfo_init() 161 soc_dev_attr->soc_id = meson_mx_socinfo_soc_id(major_ver, metal_rev); in meson_mx_socinfo_init() 163 soc_dev = soc_device_register(soc_dev_attr); in meson_mx_socinfo_init() 165 kfree_const(soc_dev_attr->revision); in meson_mx_socinfo_init() 166 kfree_const(soc_dev_attr->soc_id); in meson_mx_socinfo_init() [all …]
|
H A D | meson-gx-socinfo.c | 142 struct soc_device_attribute *soc_dev_attr; in meson_gx_socinfo_init() local 184 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in meson_gx_socinfo_init() 185 if (!soc_dev_attr) in meson_gx_socinfo_init() 188 soc_dev_attr->family = "Amlogic Meson"; in meson_gx_socinfo_init() 189 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%x:%x - %x:%x", in meson_gx_socinfo_init() 194 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%s (%s)", in meson_gx_socinfo_init() 198 soc_dev = soc_device_register(soc_dev_attr); in meson_gx_socinfo_init() 200 kfree(soc_dev_attr->revision); in meson_gx_socinfo_init() 201 kfree_const(soc_dev_attr->soc_id); in meson_gx_socinfo_init() 202 kfree(soc_dev_attr); in meson_gx_socinfo_init() [all …]
|
/linux/drivers/soc/imx/ |
H A D | soc-imx.c | 28 struct soc_device_attribute *soc_dev_attr; in imx_soc_device_init() local 43 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in imx_soc_device_init() 44 if (!soc_dev_attr) in imx_soc_device_init() 47 soc_dev_attr->family = "Freescale i.MX"; in imx_soc_device_init() 50 ret = of_property_read_string(root, "model", &soc_dev_attr->machine); in imx_soc_device_init() 144 soc_dev_attr->soc_id = soc_id; in imx_soc_device_init() 181 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d.%d", in imx_soc_device_init() 184 if (!soc_dev_attr->revision) { in imx_soc_device_init() 189 soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); in imx_soc_device_init() 190 if (!soc_dev_attr->serial_number) { in imx_soc_device_init() [all …]
|
/linux/drivers/soc/loongson/ |
H A D | loongson2_guts.c | 15 static struct soc_device_attribute soc_dev_attr; variable 118 soc_dev_attr.machine = devm_kstrdup(dev, machine, GFP_KERNEL); in loongson2_guts_probe() 119 if (!soc_dev_attr.machine) in loongson2_guts_probe() 126 soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, in loongson2_guts_probe() 129 soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, "Loongson"); in loongson2_guts_probe() 131 if (!soc_dev_attr.family) in loongson2_guts_probe() 133 soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL, in loongson2_guts_probe() 135 if (!soc_dev_attr.soc_id) in loongson2_guts_probe() 137 soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", in loongson2_guts_probe() 139 if (!soc_dev_attr.revision) in loongson2_guts_probe() [all …]
|
/linux/drivers/soc/bcm/brcmstb/ |
H A D | common.c | 73 struct soc_device_attribute *soc_dev_attr; in brcmstb_soc_device_init() local 85 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in brcmstb_soc_device_init() 86 if (!soc_dev_attr) { in brcmstb_soc_device_init() 91 soc_dev_attr->family = kasprintf(GFP_KERNEL, "%x", in brcmstb_soc_device_init() 94 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%x", in brcmstb_soc_device_init() 97 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c%d", in brcmstb_soc_device_init() 101 soc_dev = soc_device_register(soc_dev_attr); in brcmstb_soc_device_init() 103 kfree(soc_dev_attr->family); in brcmstb_soc_device_init() 104 kfree(soc_dev_attr->soc_id); in brcmstb_soc_device_init() 105 kfree(soc_dev_attr->revision); in brcmstb_soc_device_init() [all …]
|
/linux/arch/nios2/platform/ |
H A D | platform.c | 28 struct soc_device_attribute *soc_dev_attr; in nios2_soc_device_init() local 31 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in nios2_soc_device_init() 32 if (soc_dev_attr) { in nios2_soc_device_init() 35 soc_dev_attr->machine = kasprintf(GFP_KERNEL, "%s", in nios2_soc_device_init() 38 soc_dev_attr->family = "Nios II"; in nios2_soc_device_init() 40 soc_dev = soc_device_register(soc_dev_attr); in nios2_soc_device_init() 42 kfree(soc_dev_attr->machine); in nios2_soc_device_init() 43 kfree(soc_dev_attr); in nios2_soc_device_init()
|
/linux/arch/arm/mach-mvebu/ |
H A D | mvebu-soc-id.c | 150 struct soc_device_attribute *soc_dev_attr; in mvebu_soc_device() local 157 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in mvebu_soc_device() 158 if (!soc_dev_attr) in mvebu_soc_device() 161 soc_dev_attr->family = kasprintf(GFP_KERNEL, "Marvell"); in mvebu_soc_device() 162 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%X", soc_rev); in mvebu_soc_device() 163 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%X", soc_dev_id); in mvebu_soc_device() 165 soc_dev = soc_device_register(soc_dev_attr); in mvebu_soc_device() 167 kfree(soc_dev_attr->family); in mvebu_soc_device() 168 kfree(soc_dev_attr->revision); in mvebu_soc_device() 169 kfree(soc_dev_attr->soc_id); in mvebu_soc_device() [all …]
|
/linux/arch/arm/mach-zynq/ |
H A D | common.c | 107 struct soc_device_attribute *soc_dev_attr; in zynq_init_machine() local 111 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in zynq_init_machine() 112 if (!soc_dev_attr) in zynq_init_machine() 117 soc_dev_attr->family = kasprintf(GFP_KERNEL, "Xilinx Zynq"); in zynq_init_machine() 118 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "0x%x", system_rev); in zynq_init_machine() 119 soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "0x%x", in zynq_init_machine() 122 soc_dev = soc_device_register(soc_dev_attr); in zynq_init_machine() 124 kfree(soc_dev_attr->family); in zynq_init_machine() 125 kfree(soc_dev_attr->revision); in zynq_init_machine() 126 kfree(soc_dev_attr->soc_id); in zynq_init_machine() [all …]
|
/linux/drivers/soc/ux500/ |
H A D | ux500-soc-id.c | 186 static void __init soc_info_populate(struct soc_device_attribute *soc_dev_attr, in soc_info_populate() argument 189 soc_dev_attr->soc_id = db8500_read_soc_id(backupram); in soc_info_populate() 190 soc_dev_attr->machine = ux500_get_machine(); in soc_info_populate() 191 soc_dev_attr->family = ux500_get_family(); in soc_info_populate() 192 soc_dev_attr->revision = ux500_get_revision(); in soc_info_populate() 193 soc_dev_attr->custom_attr_group = ux500_soc_groups[0]; in soc_info_populate() 199 struct soc_device_attribute *soc_dev_attr; in ux500_soc_device_init() local 208 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in ux500_soc_device_init() 209 if (!soc_dev_attr) { in ux500_soc_device_init() 214 soc_info_populate(soc_dev_attr, backupram); in ux500_soc_device_init() [all …]
|
/linux/drivers/firmware/imx/ |
H A D | imx-scu-soc.c | 99 struct soc_device_attribute *soc_dev_attr; in imx_scu_soc_init() local 109 soc_dev_attr = devm_kzalloc(dev, sizeof(*soc_dev_attr), in imx_scu_soc_init() 111 if (!soc_dev_attr) in imx_scu_soc_init() 114 soc_dev_attr->family = "Freescale i.MX"; in imx_scu_soc_init() 118 &soc_dev_attr->machine); in imx_scu_soc_init() 132 soc_dev_attr->soc_id = imx_scu_soc_name(val); in imx_scu_soc_init() 137 soc_dev_attr->revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", in imx_scu_soc_init() 139 if (!soc_dev_attr->revision) in imx_scu_soc_init() 142 soc_dev_attr->serial_number = devm_kasprintf(dev, GFP_KERNEL, in imx_scu_soc_init() 144 if (!soc_dev_attr->serial_number) in imx_scu_soc_init() [all …]
|
/linux/arch/mips/ralink/ |
H A D | rt3883.c | 69 struct soc_device_attribute *soc_dev_attr; in rt3883_soc_dev_init() local 71 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in rt3883_soc_dev_init() 72 if (!soc_dev_attr) in rt3883_soc_dev_init() 75 soc_dev_attr->family = "Ralink"; in rt3883_soc_dev_init() 76 soc_dev_attr->soc_id = rt3883_get_soc_name(); in rt3883_soc_dev_init() 78 soc_dev_attr->data = soc_info_ptr; in rt3883_soc_dev_init() 80 soc_dev = soc_device_register(soc_dev_attr); in rt3883_soc_dev_init() 82 kfree(soc_dev_attr); in rt3883_soc_dev_init()
|
H A D | rt288x.c | 69 struct soc_device_attribute *soc_dev_attr; in rt2880_soc_dev_init() local 71 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in rt2880_soc_dev_init() 72 if (!soc_dev_attr) in rt2880_soc_dev_init() 75 soc_dev_attr->family = "Ralink"; in rt2880_soc_dev_init() 76 soc_dev_attr->soc_id = rt2880_get_soc_name(); in rt2880_soc_dev_init() 78 soc_dev_attr->data = soc_info_ptr; in rt2880_soc_dev_init() 80 soc_dev = soc_device_register(soc_dev_attr); in rt2880_soc_dev_init() 82 kfree(soc_dev_attr); in rt2880_soc_dev_init()
|
H A D | mt7621.c | 145 struct soc_device_attribute *soc_dev_attr; in mt7621_soc_dev_init() local 147 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in mt7621_soc_dev_init() 148 if (!soc_dev_attr) in mt7621_soc_dev_init() 151 soc_dev_attr->soc_id = "mt7621"; in mt7621_soc_dev_init() 152 soc_dev_attr->family = "Ralink"; in mt7621_soc_dev_init() 153 soc_dev_attr->revision = mt7621_get_soc_revision(); in mt7621_soc_dev_init() 155 soc_dev_attr->data = soc_info_ptr; in mt7621_soc_dev_init() 157 soc_dev = soc_device_register(soc_dev_attr); in mt7621_soc_dev_init() 159 kfree(soc_dev_attr); in mt7621_soc_dev_init()
|
H A D | rt305x.c | 172 struct soc_device_attribute *soc_dev_attr; in rt305x_soc_dev_init() local 174 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in rt305x_soc_dev_init() 175 if (!soc_dev_attr) in rt305x_soc_dev_init() 178 soc_dev_attr->family = "Ralink"; in rt305x_soc_dev_init() 179 soc_dev_attr->soc_id = rt305x_get_soc_id_name(); in rt305x_soc_dev_init() 181 soc_dev_attr->data = soc_info_ptr; in rt305x_soc_dev_init() 183 soc_dev = soc_device_register(soc_dev_attr); in rt305x_soc_dev_init() 185 kfree(soc_dev_attr); in rt305x_soc_dev_init()
|
H A D | mt7620.c | 199 struct soc_device_attribute *soc_dev_attr; in mt7620_soc_dev_init() local 201 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in mt7620_soc_dev_init() 202 if (!soc_dev_attr) in mt7620_soc_dev_init() 205 soc_dev_attr->family = "Ralink"; in mt7620_soc_dev_init() 206 soc_dev_attr->soc_id = mt7620_get_soc_id_name(); in mt7620_soc_dev_init() 208 soc_dev_attr->data = soc_info_ptr; in mt7620_soc_dev_init() 210 soc_dev = soc_device_register(soc_dev_attr); in mt7620_soc_dev_init() 212 kfree(soc_dev_attr); in mt7620_soc_dev_init()
|
/linux/drivers/soc/versatile/ |
H A D | soc-integrator.c | 105 struct soc_device_attribute *soc_dev_attr; in integrator_soc_init() local 126 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in integrator_soc_init() 127 if (!soc_dev_attr) in integrator_soc_init() 130 soc_dev_attr->soc_id = "Integrator"; in integrator_soc_init() 131 soc_dev_attr->machine = "Integrator"; in integrator_soc_init() 132 soc_dev_attr->family = "Versatile"; in integrator_soc_init() 133 soc_dev_attr->custom_attr_group = integrator_groups[0]; in integrator_soc_init() 134 soc_dev = soc_device_register(soc_dev_attr); in integrator_soc_init() 136 kfree(soc_dev_attr); in integrator_soc_init()
|
H A D | soc-realview.c | 96 struct soc_device_attribute *soc_dev_attr; in realview_soc_probe() local 104 soc_dev_attr = devm_kzalloc(&pdev->dev, sizeof(*soc_dev_attr), GFP_KERNEL); in realview_soc_probe() 105 if (!soc_dev_attr) in realview_soc_probe() 109 &soc_dev_attr->soc_id); in realview_soc_probe() 113 soc_dev_attr->machine = "RealView"; in realview_soc_probe() 114 soc_dev_attr->family = "Versatile"; in realview_soc_probe() 115 soc_dev_attr->custom_attr_group = realview_groups[0]; in realview_soc_probe() 116 soc_dev = soc_device_register(soc_dev_attr); in realview_soc_probe()
|
/linux/arch/arm/mach-mxs/ |
H A D | mach-mxs.c | 385 struct soc_device_attribute *soc_dev_attr; in mxs_machine_init() local 390 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in mxs_machine_init() 391 if (!soc_dev_attr) in mxs_machine_init() 395 ret = of_property_read_string(root, "model", &soc_dev_attr->machine); in mxs_machine_init() 397 kfree(soc_dev_attr); in mxs_machine_init() 401 soc_dev_attr->family = "Freescale MXS Family"; in mxs_machine_init() 402 soc_dev_attr->soc_id = mxs_get_soc_id(); in mxs_machine_init() 403 soc_dev_attr->revision = mxs_get_revision(); in mxs_machine_init() 415 soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); in mxs_machine_init() 417 soc_dev = soc_device_register(soc_dev_attr); in mxs_machine_init() [all …]
|
/linux/drivers/soc/renesas/ |
H A D | renesas-soc.c | 476 struct soc_device_attribute *soc_dev_attr; in renesas_soc_init() local 508 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in renesas_soc_init() 509 if (!soc_dev_attr) { in renesas_soc_init() 515 soc_dev_attr->family = kstrdup_const(family->name, GFP_KERNEL); in renesas_soc_init() 516 soc_dev_attr->soc_id = kstrdup_const(soc_id, GFP_KERNEL); in renesas_soc_init() 532 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", in renesas_soc_init() 536 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", in renesas_soc_init() 542 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", in renesas_soc_init() 554 pr_info("Detected Renesas %s %s %s%s\n", soc_dev_attr->family, in renesas_soc_init() 555 soc_dev_attr->soc_id, rev_prefix, soc_dev_attr->revision ?: ""); in renesas_soc_init() [all …]
|
/linux/arch/arm/mach-omap2/ |
H A D | id.c | 788 struct soc_device_attribute *soc_dev_attr; in omap_soc_device_init() local 790 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); in omap_soc_device_init() 791 if (!soc_dev_attr) in omap_soc_device_init() 794 soc_dev_attr->machine = soc_name; in omap_soc_device_init() 795 soc_dev_attr->family = omap_get_family(); in omap_soc_device_init() 796 if (!soc_dev_attr->family) { in omap_soc_device_init() 797 kfree(soc_dev_attr); in omap_soc_device_init() 800 soc_dev_attr->revision = soc_rev; in omap_soc_device_init() 801 soc_dev_attr->custom_attr_group = omap_soc_groups[0]; in omap_soc_device_init() 803 soc_dev = soc_device_register(soc_dev_attr); in omap_soc_device_init() [all …]
|
/linux/drivers/base/ |
H A D | soc.c | 114 static void soc_device_get_machine(struct soc_device_attribute *soc_dev_attr) in soc_device_get_machine() argument 118 if (soc_dev_attr->machine) in soc_device_get_machine() 122 of_property_read_string(np, "model", &soc_dev_attr->machine); in soc_device_get_machine() 128 struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr) in soc_device_register() argument 134 soc_device_get_machine(soc_dev_attr); in soc_device_register() 139 early_soc_dev_attr = soc_dev_attr; in soc_device_register() 155 soc_attr_groups[1] = soc_dev_attr->custom_attr_group; in soc_device_register() 163 soc_dev->attr = soc_dev_attr; in soc_device_register()
|