Path: blob/master/arch/mips/loongson/common/platform.c
10819 views
/*1* Copyright (C) 2009 Lemote Inc.2* Author: Wu Zhangjin, [email protected]3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License as published by the6* Free Software Foundation; either version 2 of the License, or (at your7* option) any later version.8*/910#include <linux/err.h>11#include <linux/platform_device.h>1213static struct platform_device loongson2_cpufreq_device = {14.name = "loongson2_cpufreq",15.id = -1,16};1718static int __init loongson2_cpufreq_init(void)19{20struct cpuinfo_mips *c = ¤t_cpu_data;2122/* Only 2F revision and it's successors support CPUFreq */23if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_LOONGSON2F)24return platform_device_register(&loongson2_cpufreq_device);2526return -ENODEV;27}2829arch_initcall(loongson2_cpufreq_init);303132