1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2009 Lemote Inc.
4 * Author: Wu Zhangjin, wuzhangjin@gmail.com
9 #include <linux/platform_device.h>
11 static struct platform_device loongson2_cpufreq_device = {
12 .name = "loongson2_cpufreq",
16 static int __init loongson2_cpufreq_init(void)
18 struct cpuinfo_mips *c = ¤t_cpu_data;
20 /* Only 2F revision and it's successors support CPUFreq */
21 if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_LOONGSON2F)
22 return platform_device_register(&loongson2_cpufreq_device);
27 arch_initcall(loongson2_cpufreq_init);