X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftest-framework%2Fnandsim.c;h=e6b70df28921c1a2acdce6191d42f6d4452c9154;hb=f83f5b03c1eea3fe26a0929583ffbd16df7c64f0;hp=9c8a6fe26d816f8eeb456e6eaae0c031dd95a4b6;hpb=cabb7b51f48a784fbd8bd04ea8878abe2196167a;p=yaffs2.git diff --git a/direct/test-framework/nandsim.c b/direct/test-framework/nandsim.c index 9c8a6fe..e6b70df 100644 --- a/direct/test-framework/nandsim.c +++ b/direct/test-framework/nandsim.c @@ -1,7 +1,7 @@ /* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2010-2011 Aleph One Ltd. + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * @@ -94,6 +94,8 @@ static void check_last(struct nandsim_private *ns, static void idle(struct nandsim_private *ns, int line) { + (void) line; + ns->read_offset = -1; ns->write_offset = -1; ns->addr_offset = -1; @@ -175,27 +177,35 @@ static void set_offset(struct nandsim_private *ns) static void load_read_buffer(struct nandsim_private *ns) { int addr = get_page_address(ns); + debug(1, "Store read at address %d\n", addr); ns->store->retrieve(ns->store, addr,ns->buffer); } static void save_write_buffer(struct nandsim_private *ns) { int addr = get_page_address(ns); + debug(1, "Store write at address %d\n", addr); ns->store->store(ns->store, addr, ns->buffer); } static void check_read_buffer(struct nandsim_private *ns, int line) { + (void) ns; + (void) line; } static void end_cmd(struct nandsim_private *ns, int line) { + (void) line; + ns->last_cmd_byte = 0xff; } static void set_busy(struct nandsim_private *ns, int cycles, int line) { + (void) line; + ns->busy_count = cycles; } @@ -380,11 +390,13 @@ static void read_status(struct nandsim_private *ns) static void read_id(struct nandsim_private *ns) { + (void) ns; } static void unsupported(struct nandsim_private *ns) { + (void) ns; } static void nandsim_cl_write(struct nandsim_private *ns, unsigned char val) @@ -447,7 +459,7 @@ static void nandsim_al_write(struct nandsim_private *ns, unsigned char val) check_not_busy(ns, __LINE__); if(ns->addr_expected < 1 || ns->addr_offset < 0 || - ns->addr_offset >= sizeof(ns->addr_buffer)){ + ns->addr_offset >= (int)sizeof(ns->addr_buffer)){ debug(1, "Address write when not expected\n"); } else { debug(1, "Address write when expecting %d bytes\n", @@ -461,7 +473,7 @@ static void nandsim_al_write(struct nandsim_private *ns, unsigned char val) } } -static void nandsim_dl_write(struct nandsim_private *ns, +static void nandsim_dl_write(struct nandsim_private *ns, unsigned val, int bus_width_shift) {