1
/* Copyright (c) 2005 Advanced Micro Devices, Inc.
3
* Permission is hereby granted, free of charge, to any person obtaining a copy
4
* of this software and associated documentation files (the "Software"), to
5
* deal in the Software without restriction, including without limitation the
6
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
* sell copies of the Software, and to permit persons to whom the Software is
8
* furnished to do so, subject to the following conditions:
10
* The above copyright notice and this permission notice shall be included in
11
* all copies or substantial portions of the Software.
13
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
* Neither the name of the Advanced Micro Devices, Inc. nor the names of its
22
* contributors may be used to endorse or promote products derived from this
23
* software without specific prior written permission.
27
* File Contents: This header file defines the Durango routines and
28
* variables used to access the memory mapped regions.
30
* SubModule: Geode FlatPanel library
39
/* Centaurus/97317 GPIO PORT defines */
41
#define CENT_97317_CLOCK_PORT 0xE0
42
#define CENT_97317_DATA_OUTPORT 0xE0
43
#define CENT_97317_CHIP_SELECT 0xE4
44
#define CENT_97317_DATA_INPORT 0xE4
45
#define CENT_PORT1_DIRECTION 0xE1
46
#define CENT_PORT2_DIRECTION 0xE5
47
#define CENT_PORT1_OUTPUT_TYPE 0xE2
48
#define CENT_PORT2_OUTPUT_TYPE 0xE6
51
* Centaurus/97317 GPIO bit masks.
52
* In and out are with respect to the 97317.
55
#define CENT_97317_CLOCK_MASK 0x10
56
#define CENT_97317_CHIP_SEL_MASK 0x01
57
#define CENT_97317_DATA_IN_MASK 0x02
58
#define CENT_97317_DATA_OUT_MASK 0x80
62
#define CENT_READ 0x0000
63
#define CENT_WRITE 0x0001
64
#define CENT_NO_DATA 0
66
#define CENT_CONFIG_INDEX 0x2E
67
#define CENT_SIOC2 0x22
68
#define CENT_CONFIG_DATA 0x2F
69
#define CENT_GPIO_BANK_SELECT 0x80
71
#define CENT_NUM_READ_CLOCK_TOGGLES 1
72
#define CENT_NUM_WRITE_CLOCK_TOGGLES 4
75
void set_Centaurus_92xx_mode_params(int mode);
76
void enable_Centaurus_9211_chip_select(void);
77
void disable_Centaurus_9211_chip_select(void);
78
void toggle_Centaurus_9211_clock(void);
79
void write_Centaurus_CX9211_GPIO(unsigned char databit);
80
void write_Centaurus_CX9211_DWdata(unsigned long data);
81
void Centaurus_write_gpio(int width, unsigned long address, unsigned long data);
82
void Centaurus_Power_Up(void);
83
void Centaurus_Power_Down(void);
84
unsigned long Centaurus_read_gpio(int width, unsigned long address);
85
unsigned char read_Centaurus_CX9211_GPIO(void);
86
unsigned long read_Centaurus_CX9211_DWdata(void);
87
unsigned char restore_Centaurus_97317_SIOC2(void);
88
unsigned char init_Centaurus_GPIO(void);
89
unsigned char init_Centaurus_9211(void);
90
unsigned char set_Centaurus_92xx_mode(Pnl_PanelStat * pstat);
91
void CentaurusProgramFRMload(void);
92
void Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam);
93
void Centaurus_Save_Panel_State(void);
94
void Centaurus_Restore_Panel_State(void);
95
void Centaurus_9211init(Pnl_PanelStat * pstat);
97
#endif /* !_CEN9211_h */