X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Ffpga%2Flattice.c;h=615a485089d266a0218c67769bb7c1441d8edf17;hb=1c6f6a6ef9f3edf38360a204bc62de83a8039df3;hp=a0e782310241580edce899f13127a201b0a5036a;hpb=6ca803750e1e08fce26e508f1c35170bf9259bb4;p=u-boot diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c index a0e7823102..615a485089 100644 --- a/drivers/fpga/lattice.c +++ b/drivers/fpga/lattice.c @@ -8,24 +8,7 @@ * ispVM functions adapted from Lattice's ispmVMEmbedded code: * Copyright 2009 Lattice Semiconductor Corp. * - * 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 @@ -34,7 +17,7 @@ #include static lattice_board_specific_func *pfns; -static char *fpga_image; +static const char *fpga_image; static unsigned long read_bytes; static unsigned long bufsize; static unsigned short expectedCRC; @@ -275,7 +258,7 @@ signed char ispVM(void) static int lattice_validate(Lattice_desc *desc, const char *fn) { - int ret_val = FALSE; + int ret_val = false; if (desc) { if ((desc->family > min_lattice_type) && @@ -283,7 +266,7 @@ static int lattice_validate(Lattice_desc *desc, const char *fn) if ((desc->iface > min_lattice_iface_type) && (desc->iface < max_lattice_iface_type)) { if (desc->size) { - ret_val = TRUE; + ret_val = true; } else { printf("%s: NULL part size\n", fn); } @@ -302,7 +285,7 @@ static int lattice_validate(Lattice_desc *desc, const char *fn) return ret_val; } -int lattice_load(Lattice_desc *desc, void *buf, size_t bsize) +int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize) { int ret_val = FPGA_FAIL; @@ -317,7 +300,7 @@ int lattice_load(Lattice_desc *desc, void *buf, size_t bsize) read_bytes = 0; bufsize = bsize; debug("%s: Launching the Lattice ISPVME Loader:" - " addr 0x%x size 0x%x...\n", + " addr %p size 0x%lx...\n", __func__, fpga_image, bufsize); ret_val = ispVM(); if (ret_val) @@ -335,7 +318,7 @@ int lattice_load(Lattice_desc *desc, void *buf, size_t bsize) return ret_val; } -int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize) +int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize) { puts("Dump not supported for Lattice FPGA\n"); @@ -395,5 +378,3 @@ int lattice_info(Lattice_desc *desc) return ret_val; } - -