3 * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
4 * Keith Outwater, keith_outwater@mvis.com.
7 * Andre Schwarz, Matrix Vision GmbH, andre.schwarz@matrix-vision.de
9 * See file CREDITS for list of people who contributed to this
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
36 Xilinx_Spartan3_Slave_Serial_fns fpga_fns = {
46 Xilinx_desc spartan3 = {
54 DECLARE_GLOBAL_DATA_PTR;
56 int mvsmr_init_fpga(void)
59 fpga_add(fpga_xilinx, &spartan3);
64 int fpga_init_fn(int cookie)
66 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
68 if (in_be32(&gpio->simple_ival) & FPGA_CONFIG)
74 int fpga_done_fn(int cookie)
76 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
80 if (in_be32(&gpio->simple_ival) & FPGA_DONE)
86 int fpga_pgm_fn(int assert, int flush, int cookie)
88 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
91 setbits_8(&gpio->sint_dvo, FPGA_STATUS);
93 clrbits_8(&gpio->sint_dvo, FPGA_STATUS);
98 int fpga_clk_fn(int assert_clk, int flush, int cookie)
100 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
103 setbits_be32(&gpio->simple_dvo, FPGA_CCLK);
105 clrbits_be32(&gpio->simple_dvo, FPGA_CCLK);
110 int fpga_wr_fn(int assert_write, int flush, int cookie)
112 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
115 setbits_be32(&gpio->simple_dvo, FPGA_DIN);
117 clrbits_be32(&gpio->simple_dvo, FPGA_DIN);
122 int fpga_pre_config_fn(int cookie)
124 struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
126 setbits_8(&gpio->sint_dvo, FPGA_STATUS);