mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] bcb: fix compilation
@ 2013-10-24 13:26 Eric Bénard
  2013-10-28 13:20 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bénard @ 2013-10-24 13:26 UTC (permalink / raw)
  To: barebox

this fix :
arch/arm/mach-mxs/bcb.c:268: error: too few arguments to function 'chip->ecc.read_page_raw'
arch/arm/mach-mxs/bcb.c:309: error: too few arguments to function 'chip->write_page'

caution : this is NOT runtime tested.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/mach-mxs/bcb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index af51d24..b5d793e 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -265,7 +265,7 @@ static int find_fcb(struct mtd_info *mtd, void *ref, int page)
 
 	chip->select_chip(mtd, 0);
 	chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
-	ret = chip->ecc.read_page_raw(mtd, chip, buf);
+	ret = chip->ecc.read_page_raw(mtd, chip, buf, 1, page);
 	if (ret) {
 		printf("Failed to read FCB from page %u: %d\n", page, ret);
 		return ret;
@@ -306,7 +306,7 @@ static int write_fcb(struct mtd_info *mtd, void *buf, int block)
 
 	printf("Writing FCB to block %08x\n", block);
 	chip->select_chip(mtd, 0);
-	ret = chip->write_page(mtd, chip, buf, page, 0, 1);
+	ret = chip->write_page(mtd, chip, 0, mtd->erasesize, buf, 1, page, 0, 1);
 	if (ret) {
 		printf("Failed to write FCB to block %08x: %d\n", block, ret);
 	}
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] bcb: fix compilation
  2013-10-24 13:26 [PATCH] bcb: fix compilation Eric Bénard
@ 2013-10-28 13:20 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-10-28 13:20 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Thu, Oct 24, 2013 at 03:26:52PM +0200, Eric Bénard wrote:
> this fix :
> arch/arm/mach-mxs/bcb.c:268: error: too few arguments to function 'chip->ecc.read_page_raw'
> arch/arm/mach-mxs/bcb.c:309: error: too few arguments to function 'chip->write_page'
> 
> caution : this is NOT runtime tested.
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>

Applied, thanks

Sascha

> ---
>  arch/arm/mach-mxs/bcb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
> index af51d24..b5d793e 100644
> --- a/arch/arm/mach-mxs/bcb.c
> +++ b/arch/arm/mach-mxs/bcb.c
> @@ -265,7 +265,7 @@ static int find_fcb(struct mtd_info *mtd, void *ref, int page)
>  
>  	chip->select_chip(mtd, 0);
>  	chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
> -	ret = chip->ecc.read_page_raw(mtd, chip, buf);
> +	ret = chip->ecc.read_page_raw(mtd, chip, buf, 1, page);
>  	if (ret) {
>  		printf("Failed to read FCB from page %u: %d\n", page, ret);
>  		return ret;
> @@ -306,7 +306,7 @@ static int write_fcb(struct mtd_info *mtd, void *buf, int block)
>  
>  	printf("Writing FCB to block %08x\n", block);
>  	chip->select_chip(mtd, 0);
> -	ret = chip->write_page(mtd, chip, buf, page, 0, 1);
> +	ret = chip->write_page(mtd, chip, 0, mtd->erasesize, buf, 1, page, 0, 1);
>  	if (ret) {
>  		printf("Failed to write FCB to block %08x: %d\n", block, ret);
>  	}
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-28 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 13:26 [PATCH] bcb: fix compilation Eric Bénard
2013-10-28 13:20 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox