linux/drivers/cpufreq/pcc-cpufreq.c
<<
>>
Prefs
   1/*
   2 *  pcc-cpufreq.c - Processor Clocking Control firmware cpufreq interface
   3 *
   4 *  Copyright (C) 2009 Red Hat, Matthew Garrett <mjg@redhat.com>
   5 *  Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
   6 *      Nagananda Chumbalkar <nagananda.chumbalkar@hp.com>
   7 *
   8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   9 *
  10 *  This program is free software; you can redistribute it and/or modify
  11 *  it under the terms of the GNU General Public License as published by
  12 *  the Free Software Foundation; version 2 of the License.
  13 *
  14 *  This program is distributed in the hope that it will be useful, but
  15 *  WITHOUT ANY WARRANTY; without even the implied warranty of
  16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or NON
  17 *  INFRINGEMENT. See the GNU General Public License for more details.
  18 *
  19 *  You should have received a copy of the GNU General Public License along
  20 *  with this program; if not, write to the Free Software Foundation, Inc.,
  21 *  675 Mass Ave, Cambridge, MA 02139, USA.
  22 *
  23 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24 */
  25
  26#include <linux/kernel.h>
  27#include <linux/module.h>
  28#include <linux/init.h>
  29#include <linux/smp.h>
  30#include <linux/sched.h>
  31#include <linux/cpufreq.h>
  32#include <linux/compiler.h>
  33#include <linux/slab.h>
  34
  35#include <linux/acpi.h>
  36#include <linux/io.h>
  37#include <linux/spinlock.h>
  38#include <linux/uaccess.h>
  39
  40#include <acpi/processor.h>
  41
  42#define PCC_VERSION     "1.10.00"
  43#define POLL_LOOPS      300
  44
  45#define CMD_COMPLETE    0x1
  46#define CMD_GET_FREQ    0x0
  47#define CMD_SET_FREQ    0x1
  48
  49#define BUF_SZ          4
  50
  51struct pcc_register_resource {
  52        u8 descriptor;
  53        u16 length;
  54        u8 space_id;
  55        u8 bit_width;
  56        u8 bit_offset;
  57        u8 access_size;
  58        u64 address;
  59} __attribute__ ((packed));
  60
  61struct pcc_pcc_memory_reso {
  55    >3e="v2.6.16.28"
	  >
  v2.6.16.28p6.13
  
  
> The orig3" idLXR software by thebuffib"srehttp://>,ine"forge.net/projects/lx">>LXR ebuaun59=q/pc this experiss_w idet ="LLby uffib"sremailto:lx"@ ux.noesex"@ ux.noq/pc.
> ex". ux.no kr9dly hos 53