diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cs5535.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/cs5535.h b/include/linux/cs5535.h new file mode 100644 index 000000000000..cfea689dfa34 --- /dev/null +++ b/include/linux/cs5535.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * AMD CS5535/CS5536 definitions | ||
3 | * Copyright (C) 2006 Advanced Micro Devices, Inc. | ||
4 | * Copyright (C) 2009 Andres Salomon <dilinger@collabora.co.uk> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of version 2 of the GNU General Public License | ||
8 | * as published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _CS5535_H | ||
12 | #define _CS5535_H | ||
13 | |||
14 | /* MSRs */ | ||
15 | #define MSR_LBAR_SMB 0x5140000B | ||
16 | #define MSR_LBAR_GPIO 0x5140000C | ||
17 | #define MSR_LBAR_MFGPT 0x5140000D | ||
18 | #define MSR_LBAR_ACPI 0x5140000E | ||
19 | #define MSR_LBAR_PMS 0x5140000F | ||
20 | |||
21 | /* resource sizes */ | ||
22 | #define LBAR_GPIO_SIZE 0xFF | ||
23 | #define LBAR_MFGPT_SIZE 0x40 | ||
24 | #define LBAR_ACPI_SIZE 0x40 | ||
25 | #define LBAR_PMS_SIZE 0x80 | ||
26 | |||
27 | /* GPIOs */ | ||
28 | #define GPIO_OUTPUT_VAL 0x00 | ||
29 | #define GPIO_OUTPUT_ENABLE 0x04 | ||
30 | #define GPIO_OUTPUT_OPEN_DRAIN 0x08 | ||
31 | #define GPIO_OUTPUT_INVERT 0x0C | ||
32 | #define GPIO_OUTPUT_AUX1 0x10 | ||
33 | #define GPIO_OUTPUT_AUX2 0x14 | ||
34 | #define GPIO_PULL_UP 0x18 | ||
35 | #define GPIO_PULL_DOWN 0x1C | ||
36 | #define GPIO_INPUT_ENABLE 0x20 | ||
37 | #define GPIO_INPUT_INVERT 0x24 | ||
38 | #define GPIO_INPUT_FILTER 0x28 | ||
39 | #define GPIO_INPUT_EVENT_COUNT 0x2C | ||
40 | #define GPIO_READ_BACK 0x30 | ||
41 | #define GPIO_INPUT_AUX1 0x34 | ||
42 | #define GPIO_EVENTS_ENABLE 0x38 | ||
43 | #define GPIO_LOCK_ENABLE 0x3C | ||
44 | #define GPIO_POSITIVE_EDGE_EN 0x40 | ||
45 | #define GPIO_NEGATIVE_EDGE_EN 0x44 | ||
46 | #define GPIO_POSITIVE_EDGE_STS 0x48 | ||
47 | #define GPIO_NEGATIVE_EDGE_STS 0x4C | ||
48 | |||
49 | #define GPIO_MAP_X 0xE0 | ||
50 | #define GPIO_MAP_Y 0xE4 | ||
51 | #define GPIO_MAP_Z 0xE8 | ||
52 | #define GPIO_MAP_W 0xEC | ||
53 | |||
54 | void cs5535_gpio_set(unsigned offset, unsigned int reg); | ||
55 | void cs5535_gpio_clear(unsigned offset, unsigned int reg); | ||
56 | int cs5535_gpio_isset(unsigned offset, unsigned int reg); | ||
57 | |||
58 | #endif | ||