X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Fnomadik.c;h=a7cee5138db2a4a51ee26d47c420a8751ad051e7;hb=af1679bc30b11b90f9f6650d211b3fe350f4044f;hp=08944d1cfa153786ee6f037d7c6bf0b54893124f;hpb=0d8c6eab2481046e9446264bfe9402bb98ddf433;p=u-boot diff --git a/drivers/mtd/nand/nomadik.c b/drivers/mtd/nand/nomadik.c index 08944d1cfa..a7cee5138d 100644 --- a/drivers/mtd/nand/nomadik.c +++ b/drivers/mtd/nand/nomadik.c @@ -2,23 +2,7 @@ * (C) Copyright 2007 STMicroelectronics, * (C) Copyright 2009 Alessandro Rubini * - * 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 @@ -42,7 +26,7 @@ static inline int parity(int b) /* b is really a byte; returns 0 or ~0 */ * HW claims to make the calculation but not the correction; so we must * recalculate the bytes for a comparison. */ -static int ecc512(unsigned char *data, unsigned char *ecc) +static int ecc512(const unsigned char *data, unsigned char *ecc) { int gpar = 0; int i, val, par; @@ -212,6 +196,7 @@ int board_nand_init(struct nand_chip *chip) chip->ecc.mode = NAND_ECC_HW; chip->ecc.bytes = 3; chip->ecc.size = 512; + chip->ecc.strength = 1; chip->ecc.layout = &nomadik_ecc_layout; chip->ecc.calculate = nomadik_ecc_calculate; chip->ecc.hwctl = nomadik_ecc_hwctl;