aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/geode.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@collabora.co.uk>2009-12-14 21:00:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:28 -0500
commitc95d1e53ed89b75a4d7b68d1cbae4607b1479243 (patch)
treeb82d2ef1e349a3da948fe4c7dbd56ebed0ad0e84 /arch/x86/include/asm/geode.h
parentf3a57a60d3e107d17aebb9e52b61c503e5bc14f9 (diff)
cs5535: drop the Geode-specific MFGPT/GPIO code
With generic modular drivers handling all of this stuff, the geode-specific code can go away. The cs5535-gpio, cs5535-mfgpt, and cs5535-clockevt drivers now handle this. Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/geode.h')
-rw-r--r--arch/x86/include/asm/geode.h117
1 files changed, 0 insertions, 117 deletions
diff --git a/arch/x86/include/asm/geode.h b/arch/x86/include/asm/geode.h
index ae104da6ad5a..7cd73552a4e8 100644
--- a/arch/x86/include/asm/geode.h
+++ b/arch/x86/include/asm/geode.h
@@ -14,98 +14,6 @@
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/cs5535.h> 15#include <linux/cs5535.h>
16 16
17/* Generic southbridge functions */
18
19#define GEODE_DEV_PMS 0
20#define GEODE_DEV_ACPI 1
21#define GEODE_DEV_GPIO 2
22#define GEODE_DEV_MFGPT 3
23
24extern int geode_get_dev_base(unsigned int dev);
25
26/* Useful macros */
27#define geode_pms_base() geode_get_dev_base(GEODE_DEV_PMS)
28#define geode_acpi_base() geode_get_dev_base(GEODE_DEV_ACPI)
29#define geode_gpio_base() geode_get_dev_base(GEODE_DEV_GPIO)
30#define geode_mfgpt_base() geode_get_dev_base(GEODE_DEV_MFGPT)
31
32/* MSRS */
33
34#define MSR_LBAR_SMB 0x5140000B
35#define MSR_LBAR_GPIO 0x5140000C
36#define MSR_LBAR_MFGPT 0x5140000D
37#define MSR_LBAR_ACPI 0x5140000E
38#define MSR_LBAR_PMS 0x5140000F
39
40/* Resource Sizes */
41
42#define LBAR_GPIO_SIZE 0xFF
43#define LBAR_MFGPT_SIZE 0x40
44#define LBAR_ACPI_SIZE 0x40
45#define LBAR_PMS_SIZE 0x80
46
47/* ACPI registers (PMS block) */
48
49/*
50 * PM1_EN is only valid when VSA is enabled for 16 bit reads.
51 * When VSA is not enabled, *always* read both PM1_STS and PM1_EN
52 * with a 32 bit read at offset 0x0
53 */
54
55#define PM1_STS 0x00
56#define PM1_EN 0x02
57#define PM1_CNT 0x08
58#define PM2_CNT 0x0C
59#define PM_TMR 0x10
60#define PM_GPE0_STS 0x18
61#define PM_GPE0_EN 0x1C
62
63/* PMC registers (PMS block) */
64
65#define PM_SSD 0x00
66#define PM_SCXA 0x04
67#define PM_SCYA 0x08
68#define PM_OUT_SLPCTL 0x0C
69#define PM_SCLK 0x10
70#define PM_SED 0x1
71#define PM_SCXD 0x18
72#define PM_SCYD 0x1C
73#define PM_IN_SLPCTL 0x20
74#define PM_WKD 0x30
75#define PM_WKXD 0x34
76#define PM_RD 0x38
77#define PM_WKXA 0x3C
78#define PM_FSD 0x40
79#define PM_TSD 0x44
80#define PM_PSD 0x48
81#define PM_NWKD 0x4C
82#define PM_AWKD 0x50
83#define PM_SSC 0x54
84
85static inline u32 geode_gpio(unsigned int nr)
86{
87 BUG_ON(nr > 28);
88 return 1 << nr;
89}
90
91extern void geode_gpio_set(u32, unsigned int);
92extern void geode_gpio_clear(u32, unsigned int);
93extern int geode_gpio_isset(u32, unsigned int);
94extern void geode_gpio_setup_event(unsigned int, int, int);
95extern void geode_gpio_set_irq(unsigned int, unsigned int);
96
97static inline void geode_gpio_event_irq(unsigned int gpio, int pair)
98{
99 geode_gpio_setup_event(gpio, pair, 0);
100}
101
102static inline void geode_gpio_event_pme(unsigned int gpio, int pair)
103{
104 geode_gpio_setup_event(gpio, pair, 1);
105}
106
107/* Specific geode tests */
108
109static inline int is_geode_gx(void) 17static inline int is_geode_gx(void)
110{ 18{
111 return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) && 19 return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
@@ -125,29 +33,4 @@ static inline int is_geode(void)
125 return (is_geode_gx() || is_geode_lx()); 33 return (is_geode_gx() || is_geode_lx());
126} 34}
127 35
128static inline void geode_mfgpt_write(int timer, u16 reg, u16 value)
129{
130 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
131 outw(value, base + reg + (timer * 8));
132}
133
134static inline u16 geode_mfgpt_read(int timer, u16 reg)
135{
136 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
137 return inw(base + reg + (timer * 8));
138}
139
140extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable);
141extern int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable);
142extern int geode_mfgpt_alloc_timer(int timer, int domain);
143
144#define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1)
145#define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0)
146
147#ifdef CONFIG_GEODE_MFGPT_TIMER
148extern int __init mfgpt_timer_setup(void);
149#else
150static inline int mfgpt_timer_setup(void) { return 0; }
151#endif
152
153#endif /* _ASM_X86_GEODE_H */ 36#endif /* _ASM_X86_GEODE_H */