static void pxa2xx_descriptor_load(PXA2xxLCDState *s)

{

    PXAFrameDescriptor desc;

    target_phys_addr_t descptr;

    int i;



    for (i = 0; i < PXA_LCDDMA_CHANS; i ++) {

        s->dma_ch[i].source = 0;



        if (!s->dma_ch[i].up)

            continue;



        if (s->dma_ch[i].branch & FBR_BRA) {

            descptr = s->dma_ch[i].branch & FBR_SRCADDR;

            if (s->dma_ch[i].branch & FBR_BINT)

                pxa2xx_dma_bs_set(s, i);

            s->dma_ch[i].branch &= ~FBR_BRA;

        } else

            descptr = s->dma_ch[i].descriptor;



        if (!(descptr >= PXA2XX_SDRAM_BASE && descptr +

                    sizeof(desc) <= PXA2XX_SDRAM_BASE + ram_size))

            continue;



        cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc));

        s->dma_ch[i].descriptor = tswap32(desc.fdaddr);

        s->dma_ch[i].source = tswap32(desc.fsaddr);

        s->dma_ch[i].id = tswap32(desc.fidr);

        s->dma_ch[i].command = tswap32(desc.ldcmd);

    }

}

static void pxa2xx_descriptor_load(PXA2xxLCDState *s)

{

    PXAFrameDescriptor desc;

    target_phys_addr_t descptr;

    int i;



    for (i = 0; i < PXA_LCDDMA_CHANS; i ++) {

        s->dma_ch[i].source = 0;



        if (!s->dma_ch[i].up)

            continue;



        if (s->dma_ch[i].branch & FBR_BRA) {

            descptr = s->dma_ch[i].branch & FBR_SRCADDR;

            if (s->dma_ch[i].branch & FBR_BINT)

                pxa2xx_dma_bs_set(s, i);

            s->dma_ch[i].branch &= ~FBR_BRA;

        } else

            descptr = s->dma_ch[i].descriptor;



        if (!(descptr >= PXA2XX_SDRAM_BASE && descptr +

                    sizeof(desc) <= PXA2XX_SDRAM_BASE + ram_size))

            continue;



        cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc));

        s->dma_ch[i].descriptor = tswap32(desc.fdaddr);

        s->dma_ch[i].source = tswap32(desc.fsaddr);

        s->dma_ch[i].id = tswap32(desc.fidr);

        s->dma_ch[i].command = tswap32(desc.ldcmd);

    }

}

static void FUNC_0(PXA2xxLCDState *VAR_0)

{

    PXAFrameDescriptor desc;

    target_phys_addr_t descptr;

    int VAR_1;



    for (VAR_1 = 0; VAR_1 < PXA_LCDDMA_CHANS; VAR_1 ++) {

        VAR_0->dma_ch[VAR_1].source = 0;



        if (!VAR_0->dma_ch[VAR_1].up)

            continue;



        if (VAR_0->dma_ch[VAR_1].branch & FBR_BRA) {

            descptr = VAR_0->dma_ch[VAR_1].branch & FBR_SRCADDR;

            if (VAR_0->dma_ch[VAR_1].branch & FBR_BINT)

                pxa2xx_dma_bs_set(VAR_0, VAR_1);

            VAR_0->dma_ch[VAR_1].branch &= ~FBR_BRA;

        } else

            descptr = VAR_0->dma_ch[VAR_1].descriptor;



        if (!(descptr >= PXA2XX_SDRAM_BASE && descptr +

                    sizeof(desc) <= PXA2XX_SDRAM_BASE + ram_size))

            continue;



        cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc));

        VAR_0->dma_ch[VAR_1].descriptor = tswap32(desc.fdaddr);

        VAR_0->dma_ch[VAR_1].source = tswap32(desc.fsaddr);

        VAR_0->dma_ch[VAR_1].id = tswap32(desc.fidr);

        VAR_0->dma_ch[VAR_1].command = tswap32(desc.ldcmd);

    }

}

static void FUNC_0(PXA2xxLCDState *VAR_0)
{ PXAFrameDescriptor desc; target_phys_addr_t descptr; int VAR_1; for (VAR_1 = 0; VAR_1 < PXA_LCDDMA_CHANS; VAR_1 ++) { VAR_0->dma_ch[VAR_1].source = 0; if (!VAR_0->dma_ch[VAR_1].up)
continue; if (VAR_0->dma_ch[VAR_1].branch & FBR_BRA) { descptr = VAR_0->dma_ch[VAR_1].branch & FBR_SRCADDR; if (VAR_0->dma_ch[VAR_1].branch & FBR_BINT)
pxa2xx_dma_bs_set(VAR_0, VAR_1); VAR_0->dma_ch[VAR_1].branch &= ~FBR_BRA; } else descptr = VAR_0->dma_ch[VAR_1].descriptor; if (!(descptr >= PXA2XX_SDRAM_BASE && descptr +
sizeof(desc) <= PXA2XX_SDRAM_BASE + ram_size))
continue; cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc)); VAR_0->dma_ch[VAR_1].descriptor = tswap32(desc.fdaddr); VAR_0->dma_ch[VAR_1].source = tswap32(desc.fsaddr); VAR_0->dma_ch[VAR_1].id = tswap32(desc.fidr); VAR_0->dma_ch[VAR_1].command = tswap32(desc.ldcmd); } }