diff options
author | Paul Mackerras <paulus@samba.org> | 2006-09-27 17:18:28 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-27 17:18:28 -0400 |
commit | 4e6d816e51728d5006c53e78e079ac62b902f8aa (patch) | |
tree | d388c87dabc063c08c52d17610738d2f49b3855c /include/asm-ppc | |
parent | d86d9b8cab45adf64e2ea8fe975bec3282b5de81 (diff) | |
parent | 611a15afcdaacec6efba984c7eb089b853564bdf (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/cpm2.h | 63 | ||||
-rw-r--r-- | include/asm-ppc/fs_pd.h | 36 |
2 files changed, 98 insertions, 1 deletions
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index f6a7ff04ffe5..220cc2debe08 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -42,6 +42,8 @@ | |||
42 | #define CPM_CR_IDMA4_SBLOCK (0x17) | 42 | #define CPM_CR_IDMA4_SBLOCK (0x17) |
43 | #define CPM_CR_MCC1_SBLOCK (0x1c) | 43 | #define CPM_CR_MCC1_SBLOCK (0x1c) |
44 | 44 | ||
45 | #define CPM_CR_FCC_SBLOCK(x) (x + 0x10) | ||
46 | |||
45 | #define CPM_CR_SCC1_PAGE (0x00) | 47 | #define CPM_CR_SCC1_PAGE (0x00) |
46 | #define CPM_CR_SCC2_PAGE (0x01) | 48 | #define CPM_CR_SCC2_PAGE (0x01) |
47 | #define CPM_CR_SCC3_PAGE (0x02) | 49 | #define CPM_CR_SCC3_PAGE (0x02) |
@@ -62,6 +64,8 @@ | |||
62 | #define CPM_CR_MCC1_PAGE (0x07) | 64 | #define CPM_CR_MCC1_PAGE (0x07) |
63 | #define CPM_CR_MCC2_PAGE (0x08) | 65 | #define CPM_CR_MCC2_PAGE (0x08) |
64 | 66 | ||
67 | #define CPM_CR_FCC_PAGE(x) (x + 0x04) | ||
68 | |||
65 | /* Some opcodes (there are more...later) | 69 | /* Some opcodes (there are more...later) |
66 | */ | 70 | */ |
67 | #define CPM_CR_INIT_TRX ((ushort)0x0000) | 71 | #define CPM_CR_INIT_TRX ((ushort)0x0000) |
@@ -173,6 +177,10 @@ typedef struct cpm_buf_desc { | |||
173 | #define PROFF_I2C_BASE ((uint)0x8afc) | 177 | #define PROFF_I2C_BASE ((uint)0x8afc) |
174 | #define PROFF_IDMA4_BASE ((uint)0x8afe) | 178 | #define PROFF_IDMA4_BASE ((uint)0x8afe) |
175 | 179 | ||
180 | #define PROFF_SCC_SIZE ((uint)0x100) | ||
181 | #define PROFF_FCC_SIZE ((uint)0x100) | ||
182 | #define PROFF_SMC_SIZE ((uint)64) | ||
183 | |||
176 | /* The SMCs are relocated to any of the first eight DPRAM pages. | 184 | /* The SMCs are relocated to any of the first eight DPRAM pages. |
177 | * We will fix these at the first locations of DPRAM, until we | 185 | * We will fix these at the first locations of DPRAM, until we |
178 | * get some microcode patches :-). | 186 | * get some microcode patches :-). |
@@ -1186,7 +1194,60 @@ typedef struct im_idma { | |||
1186 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | 1194 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) |
1187 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | 1195 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) |
1188 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | 1196 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) |
1189 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2) | 1197 | #define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2) |
1198 | |||
1199 | /* Clocks and GRG's */ | ||
1200 | |||
1201 | enum cpm_clk_dir { | ||
1202 | CPM_CLK_RX, | ||
1203 | CPM_CLK_TX, | ||
1204 | CPM_CLK_RTX | ||
1205 | }; | ||
1206 | |||
1207 | enum cpm_clk_target { | ||
1208 | CPM_CLK_SCC1, | ||
1209 | CPM_CLK_SCC2, | ||
1210 | CPM_CLK_SCC3, | ||
1211 | CPM_CLK_SCC4, | ||
1212 | CPM_CLK_FCC1, | ||
1213 | CPM_CLK_FCC2, | ||
1214 | CPM_CLK_FCC3 | ||
1215 | }; | ||
1216 | |||
1217 | enum cpm_clk { | ||
1218 | CPM_CLK_NONE = 0, | ||
1219 | CPM_BRG1, /* Baud Rate Generator 1 */ | ||
1220 | CPM_BRG2, /* Baud Rate Generator 2 */ | ||
1221 | CPM_BRG3, /* Baud Rate Generator 3 */ | ||
1222 | CPM_BRG4, /* Baud Rate Generator 4 */ | ||
1223 | CPM_BRG5, /* Baud Rate Generator 5 */ | ||
1224 | CPM_BRG6, /* Baud Rate Generator 6 */ | ||
1225 | CPM_BRG7, /* Baud Rate Generator 7 */ | ||
1226 | CPM_BRG8, /* Baud Rate Generator 8 */ | ||
1227 | CPM_CLK1, /* Clock 1 */ | ||
1228 | CPM_CLK2, /* Clock 2 */ | ||
1229 | CPM_CLK3, /* Clock 3 */ | ||
1230 | CPM_CLK4, /* Clock 4 */ | ||
1231 | CPM_CLK5, /* Clock 5 */ | ||
1232 | CPM_CLK6, /* Clock 6 */ | ||
1233 | CPM_CLK7, /* Clock 7 */ | ||
1234 | CPM_CLK8, /* Clock 8 */ | ||
1235 | CPM_CLK9, /* Clock 9 */ | ||
1236 | CPM_CLK10, /* Clock 10 */ | ||
1237 | CPM_CLK11, /* Clock 11 */ | ||
1238 | CPM_CLK12, /* Clock 12 */ | ||
1239 | CPM_CLK13, /* Clock 13 */ | ||
1240 | CPM_CLK14, /* Clock 14 */ | ||
1241 | CPM_CLK15, /* Clock 15 */ | ||
1242 | CPM_CLK16, /* Clock 16 */ | ||
1243 | CPM_CLK17, /* Clock 17 */ | ||
1244 | CPM_CLK18, /* Clock 18 */ | ||
1245 | CPM_CLK19, /* Clock 19 */ | ||
1246 | CPM_CLK20, /* Clock 20 */ | ||
1247 | CPM_CLK_DUMMY | ||
1248 | }; | ||
1249 | |||
1250 | extern int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode); | ||
1190 | 1251 | ||
1191 | #endif /* __CPM2__ */ | 1252 | #endif /* __CPM2__ */ |
1192 | #endif /* __KERNEL__ */ | 1253 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/fs_pd.h b/include/asm-ppc/fs_pd.h new file mode 100644 index 000000000000..8691327653af --- /dev/null +++ b/include/asm-ppc/fs_pd.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Platform information definitions. | ||
3 | * | ||
4 | * 2006 (c) MontaVista Software, Inc. | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef FS_PD_H | ||
13 | #define FS_PD_H | ||
14 | |||
15 | static inline int uart_baudrate(void) | ||
16 | { | ||
17 | int baud; | ||
18 | bd_t *bd = (bd_t *) __res; | ||
19 | |||
20 | if (bd->bi_baudrate) | ||
21 | baud = bd->bi_baudrate; | ||
22 | else | ||
23 | baud = -1; | ||
24 | return baud; | ||
25 | } | ||
26 | |||
27 | static inline int uart_clock(void) | ||
28 | { | ||
29 | return (((bd_t *) __res)->bi_intfreq); | ||
30 | } | ||
31 | |||
32 | #define cpm2_map(member) (&cpm2_immr->member) | ||
33 | #define cpm2_map_size(member, size) (&cpm2_immr->member) | ||
34 | #define cpm2_unmap(addr) do {} while(0) | ||
35 | |||
36 | #endif | ||