nand_write(void *opaque, target_phys_addr_t addr, uint64_t value,

           unsigned size)

{

    struct nand_state_t *s = opaque;

    int rdy;



    DNAND(printf("%s addr=%x v=%x\n", __func__, addr, (unsigned)value));

    nand_setpins(s->nand, s->cle, s->ale, s->ce, 1, 0);

    nand_setio(s->nand, value);

    nand_getpins(s->nand, &rdy);

    s->rdy = rdy;

}

nand_write(void *opaque, target_phys_addr_t addr, uint64_t value,

           unsigned size)

{

    struct nand_state_t *s = opaque;

    int rdy;



    DNAND(printf("%s addr=%x v=%x\n", __func__, addr, (unsigned)value));

    nand_setpins(s->nand, s->cle, s->ale, s->ce, 1, 0);

    nand_setio(s->nand, value);

    nand_getpins(s->nand, &rdy);

    s->rdy = rdy;

}

FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,

           unsigned VAR_3)

{

    struct nand_state_t *VAR_4 = VAR_0;

    int VAR_5;



    DNAND(printf("%VAR_4 VAR_1=%x v=%x\n", __func__, VAR_1, (unsigned)VAR_2));

    nand_setpins(VAR_4->nand, VAR_4->cle, VAR_4->ale, VAR_4->ce, 1, 0);

    nand_setio(VAR_4->nand, VAR_2);

    nand_getpins(VAR_4->nand, &VAR_5);

    VAR_4->VAR_5 = VAR_5;

}

FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{ struct nand_state_t *VAR_4 = VAR_0; int VAR_5; DNAND(printf("%VAR_4 VAR_1=%x v=%x\n", __func__, VAR_1, (unsigned)VAR_2)); nand_setpins(VAR_4->nand, VAR_4->cle, VAR_4->ale, VAR_4->ce, 1, 0); nand_setio(VAR_4->nand, VAR_2); nand_getpins(VAR_4->nand, &VAR_5); VAR_4->VAR_5 = VAR_5; }