]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/matrix_vision/mvblm7/fpga.c
Merge branch 'u-boot/master' into u-boot-arm/master
[karo-tx-uboot.git] / board / matrix_vision / mvblm7 / fpga.c
index a60af019a7287cfff93baad7cf18fbd606274eb8..c0c5bedb2adfc8e799bacbf69fa3b4c1c3bda1a0 100644 (file)
@@ -6,24 +6,7 @@
  * (C) Copyright 2008
  * Andre Schwarz, Matrix Vision GmbH, andre.schwarz@matrix-vision.de
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -46,7 +29,6 @@ Altera_CYC2_Passive_Serial_fns altera_fns = {
        fpga_wr_fn,
        fpga_null_fn,
        fpga_null_fn,
-       0
 };
 
 Altera_desc cyclone2 = {
@@ -62,9 +44,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int mvblm7_init_fpga(void)
 {
-       fpga_debug("Initialize FPGA interface (reloc 0x%.8lx)\n",
-               gd->reloc_off);
-       fpga_init(gd->reloc_off);
+       fpga_debug("Initialize FPGA interface\n");
+       fpga_init();
        fpga_add(fpga_altera, &cyclone2);
        fpga_config_fn(0, 1, 0);
        udelay(60);
@@ -79,7 +60,7 @@ int fpga_null_fn(int cookie)
 
 int fpga_config_fn(int assert, int flush, int cookie)
 {
-       volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
+       volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
        u32 dvo = gpio->dat;
 
@@ -97,7 +78,7 @@ int fpga_config_fn(int assert, int flush, int cookie)
 
 int fpga_done_fn(int cookie)
 {
-       volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
+       volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
        int result = 0;
 
@@ -114,7 +95,7 @@ int fpga_done_fn(int cookie)
 
 int fpga_status_fn(int cookie)
 {
-       volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
+       volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
        int result = 0;
 
@@ -130,7 +111,7 @@ int fpga_status_fn(int cookie)
 
 int fpga_clk_fn(int assert_clk, int flush, int cookie)
 {
-       volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
+       volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
        u32 dvo = gpio->dat;
 
@@ -148,7 +129,7 @@ int fpga_clk_fn(int assert_clk, int flush, int cookie)
 
 static inline int _write_fpga(u8 val, int dump)
 {
-       volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
+       volatile immap_t *im = (volatile immap_t *)CONFIG_SYS_IMMR;
        volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
        int i;
        u32 dvo = gpio->dat;
@@ -174,7 +155,7 @@ static inline int _write_fpga(u8 val, int dump)
        return 0;
 }
 
-int fpga_wr_fn(void *buf, size_t len, int flush, int cookie)
+int fpga_wr_fn(const void *buf, size_t len, int flush, int cookie)
 {
        unsigned char *data = (unsigned char *) buf;
        int i;