Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cs5535.h File Reference
#include <asm/msr.h>
#include <linux/io.h>

Go to the source code of this file.

Macros

#define MSR_GLIU_P2D_RO0   0x10000029
 
#define MSR_LX_GLD_MSR_CONFIG   0x48002001
 
#define MSR_LX_MSR_PADSEL
 
#define MSR_GLCP_SYS_RSTPLL   0x4C000014
 
#define MSR_GLCP_DOTPLL   0x4C000015
 
#define MSR_LBAR_SMB   0x5140000B
 
#define MSR_LBAR_GPIO   0x5140000C
 
#define MSR_LBAR_MFGPT   0x5140000D
 
#define MSR_LBAR_ACPI   0x5140000E
 
#define MSR_LBAR_PMS   0x5140000F
 
#define MSR_DIVIL_SOFT_RESET   0x51400017
 
#define MSR_PIC_YSEL_LOW   0x51400020
 
#define MSR_PIC_YSEL_HIGH   0x51400021
 
#define MSR_PIC_ZSEL_LOW   0x51400022
 
#define MSR_PIC_ZSEL_HIGH   0x51400023
 
#define MSR_PIC_IRQM_LPC   0x51400025
 
#define MSR_MFGPT_IRQ   0x51400028
 
#define MSR_MFGPT_NR   0x51400029
 
#define MSR_MFGPT_SETUP   0x5140002B
 
#define MSR_RTC_DOMA_OFFSET   0x51400055
 
#define MSR_RTC_MONA_OFFSET   0x51400056
 
#define MSR_RTC_CEN_OFFSET   0x51400057
 
#define MSR_LX_SPARE_MSR   0x80000011 /* DC-specific */
 
#define MSR_GX_GLD_MSR_CONFIG   0xC0002001
 
#define MSR_GX_MSR_PADSEL   0xC0002011
 
#define CS5536_PIC_INT_SEL1   0x4d0
 
#define CS5536_PIC_INT_SEL2   0x4d1
 
#define LBAR_GPIO_SIZE   0xFF
 
#define LBAR_MFGPT_SIZE   0x40
 
#define LBAR_ACPI_SIZE   0x40
 
#define LBAR_PMS_SIZE   0x80
 
#define CS5536_PM_SCLK   0x10
 
#define CS5536_PM_IN_SLPCTL   0x20
 
#define CS5536_PM_WKXD   0x34
 
#define CS5536_PM_WKD   0x30
 
#define CS5536_PM_SSC   0x54
 
#define CS5536_PM1_STS   0x00
 
#define CS5536_PM1_EN   0x02
 
#define CS5536_PM1_CNT   0x08
 
#define CS5536_PM_GPE0_STS   0x18
 
#define CS5536_PM_GPE0_EN   0x1c
 
#define CS5536_WAK_FLAG   (1 << 15)
 
#define CS5536_RTC_FLAG   (1 << 10)
 
#define CS5536_PWRBTN_FLAG   (1 << 8)
 
#define CS5536_PM_PWRBTN   (1 << 8)
 
#define CS5536_PM_RTC   (1 << 10)
 
#define CS5536_GPIOM7_PME_FLAG   (1 << 31)
 
#define CS5536_GPIOM6_PME_FLAG   (1 << 30)
 
#define CS5536_GPIOM7_PME_EN   (1 << 31)
 
#define CS5536_GPIOM6_PME_EN   (1 << 30)
 
#define VSA_VRC_INDEX   0xAC1C
 
#define VSA_VRC_DATA   0xAC1E
 
#define VSA_VR_UNLOCK   0xFC53 /* unlock virtual register */
 
#define VSA_VR_SIGNATURE   0x0003
 
#define VSA_VR_MEM_SIZE   0x0200
 
#define AMD_VSA_SIG   0x4132 /* signature is ascii 'VSA2' */
 
#define GSW_VSA_SIG   0x534d /* General Software signature */
 
#define GPIO_OUTPUT_VAL   0x00
 
#define GPIO_OUTPUT_ENABLE   0x04
 
#define GPIO_OUTPUT_OPEN_DRAIN   0x08
 
#define GPIO_OUTPUT_INVERT   0x0C
 
#define GPIO_OUTPUT_AUX1   0x10
 
#define GPIO_OUTPUT_AUX2   0x14
 
#define GPIO_PULL_UP   0x18
 
#define GPIO_PULL_DOWN   0x1C
 
#define GPIO_INPUT_ENABLE   0x20
 
#define GPIO_INPUT_INVERT   0x24
 
#define GPIO_INPUT_FILTER   0x28
 
#define GPIO_INPUT_EVENT_COUNT   0x2C
 
#define GPIO_READ_BACK   0x30
 
#define GPIO_INPUT_AUX1   0x34
 
#define GPIO_EVENTS_ENABLE   0x38
 
#define GPIO_LOCK_ENABLE   0x3C
 
#define GPIO_POSITIVE_EDGE_EN   0x40
 
#define GPIO_NEGATIVE_EDGE_EN   0x44
 
#define GPIO_POSITIVE_EDGE_STS   0x48
 
#define GPIO_NEGATIVE_EDGE_STS   0x4C
 
#define GPIO_FLTR7_AMOUNT   0xD8
 
#define GPIO_MAP_X   0xE0
 
#define GPIO_MAP_Y   0xE4
 
#define GPIO_MAP_Z   0xE8
 
#define GPIO_MAP_W   0xEC
 
#define GPIO_FE7_SEL   0xF7
 
#define MFGPT_MAX_TIMERS   8
 
#define MFGPT_TIMER_ANY   (-1)
 
#define MFGPT_DOMAIN_WORKING   1
 
#define MFGPT_DOMAIN_STANDBY   2
 
#define MFGPT_DOMAIN_ANY   (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY)
 
#define MFGPT_CMP1   0
 
#define MFGPT_CMP2   1
 
#define MFGPT_EVENT_IRQ   0
 
#define MFGPT_EVENT_NMI   1
 
#define MFGPT_EVENT_RESET   3
 
#define MFGPT_REG_CMP1   0
 
#define MFGPT_REG_CMP2   2
 
#define MFGPT_REG_COUNTER   4
 
#define MFGPT_REG_SETUP   6
 
#define MFGPT_SETUP_CNTEN   (1 << 15)
 
#define MFGPT_SETUP_CMP2   (1 << 14)
 
#define MFGPT_SETUP_CMP1   (1 << 13)
 
#define MFGPT_SETUP_SETUP   (1 << 12)
 
#define MFGPT_SETUP_STOPEN   (1 << 11)
 
#define MFGPT_SETUP_EXTEN   (1 << 10)
 
#define MFGPT_SETUP_REVEN   (1 << 5)
 
#define MFGPT_SETUP_CLKSEL   (1 << 4)
 

Functions

void cs5535_gpio_set (unsigned offset, unsigned int reg)
 
void cs5535_gpio_clear (unsigned offset, unsigned int reg)
 
int cs5535_gpio_isset (unsigned offset, unsigned int reg)
 
int cs5535_gpio_set_irq (unsigned group, unsigned irq)
 
void cs5535_gpio_setup_event (unsigned offset, int pair, int pme)
 
uint16_t cs5535_mfgpt_read (struct cs5535_mfgpt_timer *timer, uint16_t reg)
 
void cs5535_mfgpt_write (struct cs5535_mfgpt_timer *timer, uint16_t reg, uint16_t value)
 
int cs5535_mfgpt_toggle_event (struct cs5535_mfgpt_timer *timer, int cmp, int event, int enable)
 
int cs5535_mfgpt_set_irq (struct cs5535_mfgpt_timer *timer, int cmp, int *irq, int enable)
 
struct cs5535_mfgpt_timercs5535_mfgpt_alloc_timer (int timer, int domain)
 
void cs5535_mfgpt_free_timer (struct cs5535_mfgpt_timer *timer)
 

Macro Definition Documentation

#define AMD_VSA_SIG   0x4132 /* signature is ascii 'VSA2' */

Definition at line 118 of file cs5535.h.

#define CS5536_GPIOM6_PME_EN   (1 << 30)

Definition at line 110 of file cs5535.h.

#define CS5536_GPIOM6_PME_FLAG   (1 << 30)

Definition at line 106 of file cs5535.h.

#define CS5536_GPIOM7_PME_EN   (1 << 31)

Definition at line 109 of file cs5535.h.

#define CS5536_GPIOM7_PME_FLAG   (1 << 31)

Definition at line 105 of file cs5535.h.

#define CS5536_PIC_INT_SEL1   0x4d0

Definition at line 64 of file cs5535.h.

#define CS5536_PIC_INT_SEL2   0x4d1

Definition at line 65 of file cs5535.h.

#define CS5536_PM1_CNT   0x08

Definition at line 91 of file cs5535.h.

#define CS5536_PM1_EN   0x02

Definition at line 90 of file cs5535.h.

#define CS5536_PM1_STS   0x00

Definition at line 89 of file cs5535.h.

#define CS5536_PM_GPE0_EN   0x1c

Definition at line 93 of file cs5535.h.

#define CS5536_PM_GPE0_STS   0x18

Definition at line 92 of file cs5535.h.

#define CS5536_PM_IN_SLPCTL   0x20

Definition at line 79 of file cs5535.h.

#define CS5536_PM_PWRBTN   (1 << 8)

Definition at line 101 of file cs5535.h.

#define CS5536_PM_RTC   (1 << 10)

Definition at line 102 of file cs5535.h.

#define CS5536_PM_SCLK   0x10

Definition at line 78 of file cs5535.h.

#define CS5536_PM_SSC   0x54

Definition at line 82 of file cs5535.h.

#define CS5536_PM_WKD   0x30

Definition at line 81 of file cs5535.h.

#define CS5536_PM_WKXD   0x34

Definition at line 80 of file cs5535.h.

#define CS5536_PWRBTN_FLAG   (1 << 8)

Definition at line 98 of file cs5535.h.

#define CS5536_RTC_FLAG   (1 << 10)

Definition at line 97 of file cs5535.h.

#define CS5536_WAK_FLAG   (1 << 15)

Definition at line 96 of file cs5535.h.

#define GPIO_EVENTS_ENABLE   0x38

Definition at line 159 of file cs5535.h.

#define GPIO_FE7_SEL   0xF7

Definition at line 173 of file cs5535.h.

#define GPIO_FLTR7_AMOUNT   0xD8

Definition at line 166 of file cs5535.h.

#define GPIO_INPUT_AUX1   0x34

Definition at line 158 of file cs5535.h.

#define GPIO_INPUT_ENABLE   0x20

Definition at line 153 of file cs5535.h.

#define GPIO_INPUT_EVENT_COUNT   0x2C

Definition at line 156 of file cs5535.h.

#define GPIO_INPUT_FILTER   0x28

Definition at line 155 of file cs5535.h.

#define GPIO_INPUT_INVERT   0x24

Definition at line 154 of file cs5535.h.

#define GPIO_LOCK_ENABLE   0x3C

Definition at line 160 of file cs5535.h.

#define GPIO_MAP_W   0xEC

Definition at line 171 of file cs5535.h.

#define GPIO_MAP_X   0xE0

Definition at line 168 of file cs5535.h.

#define GPIO_MAP_Y   0xE4

Definition at line 169 of file cs5535.h.

#define GPIO_MAP_Z   0xE8

Definition at line 170 of file cs5535.h.

#define GPIO_NEGATIVE_EDGE_EN   0x44

Definition at line 162 of file cs5535.h.

#define GPIO_NEGATIVE_EDGE_STS   0x4C

Definition at line 164 of file cs5535.h.

#define GPIO_OUTPUT_AUX1   0x10

Definition at line 149 of file cs5535.h.

#define GPIO_OUTPUT_AUX2   0x14

Definition at line 150 of file cs5535.h.

#define GPIO_OUTPUT_ENABLE   0x04

Definition at line 146 of file cs5535.h.

#define GPIO_OUTPUT_INVERT   0x0C

Definition at line 148 of file cs5535.h.

#define GPIO_OUTPUT_OPEN_DRAIN   0x08

Definition at line 147 of file cs5535.h.

#define GPIO_OUTPUT_VAL   0x00

Definition at line 145 of file cs5535.h.

#define GPIO_POSITIVE_EDGE_EN   0x40

Definition at line 161 of file cs5535.h.

#define GPIO_POSITIVE_EDGE_STS   0x48

Definition at line 163 of file cs5535.h.

#define GPIO_PULL_DOWN   0x1C

Definition at line 152 of file cs5535.h.

#define GPIO_PULL_UP   0x18

Definition at line 151 of file cs5535.h.

#define GPIO_READ_BACK   0x30

Definition at line 157 of file cs5535.h.

#define GSW_VSA_SIG   0x534d /* General Software signature */

Definition at line 119 of file cs5535.h.

#define LBAR_ACPI_SIZE   0x40

Definition at line 70 of file cs5535.h.

#define LBAR_GPIO_SIZE   0xFF

Definition at line 68 of file cs5535.h.

#define LBAR_MFGPT_SIZE   0x40

Definition at line 69 of file cs5535.h.

#define LBAR_PMS_SIZE   0x80

Definition at line 71 of file cs5535.h.

#define MFGPT_CMP1   0

Definition at line 190 of file cs5535.h.

#define MFGPT_CMP2   1

Definition at line 191 of file cs5535.h.

#define MFGPT_DOMAIN_ANY   (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY)

Definition at line 188 of file cs5535.h.

#define MFGPT_DOMAIN_STANDBY   2

Definition at line 187 of file cs5535.h.

#define MFGPT_DOMAIN_WORKING   1

Definition at line 186 of file cs5535.h.

#define MFGPT_EVENT_IRQ   0

Definition at line 193 of file cs5535.h.

#define MFGPT_EVENT_NMI   1

Definition at line 194 of file cs5535.h.

#define MFGPT_EVENT_RESET   3

Definition at line 195 of file cs5535.h.

#define MFGPT_MAX_TIMERS   8

Definition at line 183 of file cs5535.h.

#define MFGPT_REG_CMP1   0

Definition at line 197 of file cs5535.h.

#define MFGPT_REG_CMP2   2

Definition at line 198 of file cs5535.h.

#define MFGPT_REG_COUNTER   4

Definition at line 199 of file cs5535.h.

#define MFGPT_REG_SETUP   6

Definition at line 200 of file cs5535.h.

#define MFGPT_SETUP_CLKSEL   (1 << 4)

Definition at line 209 of file cs5535.h.

#define MFGPT_SETUP_CMP1   (1 << 13)

Definition at line 204 of file cs5535.h.

#define MFGPT_SETUP_CMP2   (1 << 14)

Definition at line 203 of file cs5535.h.

#define MFGPT_SETUP_CNTEN   (1 << 15)

Definition at line 202 of file cs5535.h.

#define MFGPT_SETUP_EXTEN   (1 << 10)

Definition at line 207 of file cs5535.h.

#define MFGPT_SETUP_REVEN   (1 << 5)

Definition at line 208 of file cs5535.h.

#define MFGPT_SETUP_SETUP   (1 << 12)

Definition at line 205 of file cs5535.h.

#define MFGPT_SETUP_STOPEN   (1 << 11)

Definition at line 206 of file cs5535.h.

#define MFGPT_TIMER_ANY   (-1)

Definition at line 184 of file cs5535.h.

#define MSR_DIVIL_SOFT_RESET   0x51400017

Definition at line 30 of file cs5535.h.

#define MSR_GLCP_DOTPLL   0x4C000015

Definition at line 22 of file cs5535.h.

#define MSR_GLCP_SYS_RSTPLL   0x4C000014

Definition at line 21 of file cs5535.h.

#define MSR_GLIU_P2D_RO0   0x10000029

Definition at line 17 of file cs5535.h.

#define MSR_GX_GLD_MSR_CONFIG   0xC0002001

Definition at line 48 of file cs5535.h.

#define MSR_GX_MSR_PADSEL   0xC0002011

Definition at line 49 of file cs5535.h.

#define MSR_LBAR_ACPI   0x5140000E

Definition at line 27 of file cs5535.h.

#define MSR_LBAR_GPIO   0x5140000C

Definition at line 25 of file cs5535.h.

#define MSR_LBAR_MFGPT   0x5140000D

Definition at line 26 of file cs5535.h.

#define MSR_LBAR_PMS   0x5140000F

Definition at line 28 of file cs5535.h.

#define MSR_LBAR_SMB   0x5140000B

Definition at line 24 of file cs5535.h.

#define MSR_LX_GLD_MSR_CONFIG   0x48002001

Definition at line 19 of file cs5535.h.

#define MSR_LX_MSR_PADSEL
Value:
0x48002011 /* NOT 0x48000011; the data
* sheet has the wrong value */

Definition at line 20 of file cs5535.h.

#define MSR_LX_SPARE_MSR   0x80000011 /* DC-specific */

Definition at line 46 of file cs5535.h.

#define MSR_MFGPT_IRQ   0x51400028

Definition at line 38 of file cs5535.h.

#define MSR_MFGPT_NR   0x51400029

Definition at line 39 of file cs5535.h.

#define MSR_MFGPT_SETUP   0x5140002B

Definition at line 40 of file cs5535.h.

#define MSR_PIC_IRQM_LPC   0x51400025

Definition at line 36 of file cs5535.h.

#define MSR_PIC_YSEL_HIGH   0x51400021

Definition at line 33 of file cs5535.h.

#define MSR_PIC_YSEL_LOW   0x51400020

Definition at line 32 of file cs5535.h.

#define MSR_PIC_ZSEL_HIGH   0x51400023

Definition at line 35 of file cs5535.h.

#define MSR_PIC_ZSEL_LOW   0x51400022

Definition at line 34 of file cs5535.h.

#define MSR_RTC_CEN_OFFSET   0x51400057

Definition at line 44 of file cs5535.h.

#define MSR_RTC_DOMA_OFFSET   0x51400055

Definition at line 42 of file cs5535.h.

#define MSR_RTC_MONA_OFFSET   0x51400056

Definition at line 43 of file cs5535.h.

#define VSA_VR_MEM_SIZE   0x0200

Definition at line 117 of file cs5535.h.

#define VSA_VR_SIGNATURE   0x0003

Definition at line 116 of file cs5535.h.

#define VSA_VR_UNLOCK   0xFC53 /* unlock virtual register */

Definition at line 115 of file cs5535.h.

#define VSA_VRC_DATA   0xAC1E

Definition at line 114 of file cs5535.h.

#define VSA_VRC_INDEX   0xAC1C

Definition at line 113 of file cs5535.h.

Function Documentation

void cs5535_gpio_clear ( unsigned  offset,
unsigned int  reg 
)

Definition at line 115 of file gpio-cs5535.c.

int cs5535_gpio_isset ( unsigned  offset,
unsigned int  reg 
)

Definition at line 126 of file gpio-cs5535.c.

void cs5535_gpio_set ( unsigned  offset,
unsigned int  reg 
)

Definition at line 93 of file gpio-cs5535.c.

int cs5535_gpio_set_irq ( unsigned  group,
unsigned  irq 
)

Definition at line 147 of file gpio-cs5535.c.

void cs5535_gpio_setup_event ( unsigned  offset,
int  pair,
int  pme 
)

Definition at line 164 of file gpio-cs5535.c.

struct cs5535_mfgpt_timer* cs5535_mfgpt_alloc_timer ( int  timer,
int  domain 
)
read

Definition at line 145 of file cs5535-mfgpt.c.

void cs5535_mfgpt_free_timer ( struct cs5535_mfgpt_timer timer)

Definition at line 211 of file cs5535-mfgpt.c.

uint16_t cs5535_mfgpt_read ( struct cs5535_mfgpt_timer timer,
uint16_t  reg 
)

Definition at line 228 of file cs5535-mfgpt.c.

int cs5535_mfgpt_set_irq ( struct cs5535_mfgpt_timer timer,
int  cmp,
int irq,
int  enable 
)

Definition at line 96 of file cs5535-mfgpt.c.

int cs5535_mfgpt_toggle_event ( struct cs5535_mfgpt_timer timer,
int  cmp,
int  event,
int  enable 
)

Definition at line 44 of file cs5535-mfgpt.c.

void cs5535_mfgpt_write ( struct cs5535_mfgpt_timer timer,
uint16_t  reg,
uint16_t  value 
)

Definition at line 234 of file cs5535-mfgpt.c.