static void stream_desc_store(struct Stream *s, hwaddr addr)

{

    struct SDesc *d = &s->desc;

    int i;



    /* Convert from host endianness into LE.  */

    d->buffer_address = cpu_to_le64(d->buffer_address);

    d->nxtdesc = cpu_to_le64(d->nxtdesc);

    d->control = cpu_to_le32(d->control);

    d->status = cpu_to_le32(d->status);

    for (i = 0; i < ARRAY_SIZE(d->app); i++) {

        d->app[i] = cpu_to_le32(d->app[i]);

    }

    cpu_physical_memory_write(addr, (void *) d, sizeof *d);

}

static void stream_desc_store(struct Stream *s, hwaddr addr)

{

    struct SDesc *d = &s->desc;

    int i;



    

    d->buffer_address = cpu_to_le64(d->buffer_address);

    d->nxtdesc = cpu_to_le64(d->nxtdesc);

    d->control = cpu_to_le32(d->control);

    d->status = cpu_to_le32(d->status);

    for (i = 0; i < ARRAY_SIZE(d->app); i++) {

        d->app[i] = cpu_to_le32(d->app[i]);

    }

    cpu_physical_memory_write(addr, (void *) d, sizeof *d);

}

static void FUNC_0(struct Stream *VAR_0, hwaddr VAR_1)

{

    struct SDesc *VAR_2 = &VAR_0->desc;

    int VAR_3;



    

    VAR_2->buffer_address = cpu_to_le64(VAR_2->buffer_address);

    VAR_2->nxtdesc = cpu_to_le64(VAR_2->nxtdesc);

    VAR_2->control = cpu_to_le32(VAR_2->control);

    VAR_2->status = cpu_to_le32(VAR_2->status);

    for (VAR_3 = 0; VAR_3 < ARRAY_SIZE(VAR_2->app); VAR_3++) {

        VAR_2->app[VAR_3] = cpu_to_le32(VAR_2->app[VAR_3]);

    }

    cpu_physical_memory_write(VAR_1, (void *) VAR_2, sizeof *VAR_2);

}

static void FUNC_0(struct Stream *VAR_0, hwaddr VAR_1)
{ struct SDesc *VAR_2 = &VAR_0->desc; int VAR_3; VAR_2->buffer_address = cpu_to_le64(VAR_2->buffer_address); VAR_2->nxtdesc = cpu_to_le64(VAR_2->nxtdesc); VAR_2->control = cpu_to_le32(VAR_2->control); VAR_2->status = cpu_to_le32(VAR_2->status); for (VAR_3 = 0; VAR_3 < ARRAY_SIZE(VAR_2->app); VAR_3++) { VAR_2->app[VAR_3] = cpu_to_le32(VAR_2->app[VAR_3]); } cpu_physical_memory_write(VAR_1, (void *) VAR_2, sizeof *VAR_2); }