X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Fnandsim.c;fp=direct%2Ftest-framework%2Fnandsim.c;h=ded465b461bb864744378e621cd40b1c2f3f0955;hp=9c8a6fe26d816f8eeb456e6eaae0c031dd95a4b6;hb=b4d5215f18486403d16f2e776000e43eba052f40;hpb=93d04b9574a71315361b3ae5294b8ff95a6d848c diff --git a/direct/test-framework/nandsim.c b/direct/test-framework/nandsim.c index 9c8a6fe..ded465b 100644 --- a/direct/test-framework/nandsim.c +++ b/direct/test-framework/nandsim.c @@ -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) {