2 /***************************************************************************
3 * Copyright (C) 2008 Lou Deluxe *
4 * lou.openocd012@fixit.nospammail.net *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 ***************************************************************************/
20 m4_undefine(`CTRL_MPEG_L')
21 m4_undefine(`CTRL_CARD_L')
23 m4_ifelse(SHIFTER_PRESCALER, 1, `
24 m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')
26 m4_ifelse(SHIFTER_PRESCALER, 2, `
27 m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')
28 m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')
30 m4_ifelse(SHIFTER_PRESCALER, 8, `
31 m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')
33 m4_ifelse(SHIFTER_PRESCALER, 11, `
34 m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')
36 m4_ifelse(SHIFTER_PRESCALER, 64, `
37 m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')
40 m4_ifdef(`CTRL_MPEG_L',,`
41 m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value
52 DR_MPEG = A ; TDI and TCK start out low
53 DR_CARD = A ; TMS starts out low
57 CTRL_FCI = A ; MPEG and CARD driven by FCI
58 DDR_MPEG = A ; TDI and TCK are outputs
63 DDR_CARD = A ; TMS is output
67 m4_ifdef(`CTRL_CARD_L',