summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/gscpmreg.h
blob: 4ee9b1a1b7d59abcd5ed3cec41efc2f2428de2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*	$OpenBSD: gscpmreg.h,v 1.1 2004/09/15 20:28:53 grange Exp $	*/
/*
 * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef _DEV_PCI_GSCPMREG_H_
#define _DEV_PCI_GSCPMREG_H_

/*
 * National Semiconductor Geode SC1100 SMI/ACPI module register definitions.
 */

/* PCI configuration space */
#define GSCPM_ACPIBASE		0x40	/* ACPI I/O space base address */
#define GSCPM_ACPISIZE		256	/* ACPI I/O space size */

/* ACPI I/O space */
#define GSCPM_P_CNT		0x00	/* processor control */
#define		GSCPM_P_CNT_CLK(val)	((val) & 0x7)
#define		GSCPM_P_CNT_THTEN	(1 << 4)  /* throttle enable */
#define GSCPM_PM_TMR		0x1c	/* PM timer */

/* CPU throttling values */
static const struct {
	int level;
	int value;
} gscpm_tht[] = {
	{ 88, 1 },
	{ 75, 2 },
	{ 63, 3 },
	{ 50, 4 },
	{ 38, 5 },
	{ 25, 6 },
	{ 13, 7 }
};

#define GSCPM_THT_LEVELS (sizeof(gscpm_tht) / sizeof(gscpm_tht[0]))

#endif	/* !_DEV_PCI_GSCPMREG_H_ */