struct omap_mcspi_s *omap_mcspi_init(struct omap_target_agent_s *ta, int chnum,

                qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk)

{

    struct omap_mcspi_s *s = (struct omap_mcspi_s *)

            g_malloc0(sizeof(struct omap_mcspi_s));

    struct omap_mcspi_ch_s *ch = s->ch;



    s->irq = irq;

    s->chnum = chnum;

    while (chnum --) {

        ch->txdrq = *drq ++;

        ch->rxdrq = *drq ++;

        ch ++;

    }

    omap_mcspi_reset(s);



    memory_region_init_io(&s->iomem, NULL, &omap_mcspi_ops, s, "omap.mcspi",

                          omap_l4_region_size(ta, 0));

    omap_l4_attach(ta, 0, &s->iomem);



    return s;

}

struct omap_mcspi_s *omap_mcspi_init(struct omap_target_agent_s *ta, int chnum,

                qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk)

{

    struct omap_mcspi_s *s = (struct omap_mcspi_s *)

            g_malloc0(sizeof(struct omap_mcspi_s));

    struct omap_mcspi_ch_s *ch = s->ch;



    s->irq = irq;

    s->chnum = chnum;

    while (chnum --) {

        ch->txdrq = *drq ++;

        ch->rxdrq = *drq ++;

        ch ++;

    }

    omap_mcspi_reset(s);



    memory_region_init_io(&s->iomem, NULL, &omap_mcspi_ops, s, "omap.mcspi",

                          omap_l4_region_size(ta, 0));

    omap_l4_attach(ta, 0, &s->iomem);



    return s;

}

    struct omap_mcspi_s *s = (struct omap_mcspi_s *)             g_malloc0(sizeof(struct omap_mcspi_s));
struct omap_mcspi_s *FUNC_0(struct omap_target_agent_s *VAR_0, int VAR_1,

                qemu_irq VAR_2, qemu_irq *VAR_3, omap_clk VAR_4, omap_clk VAR_5)

{

    struct omap_mcspi_s *VAR_6 = (struct omap_mcspi_s *)

            g_malloc0(sizeof(struct omap_mcspi_s));

    struct omap_mcspi_ch_s *VAR_7 = VAR_6->VAR_7;



    VAR_6->VAR_2 = VAR_2;

    VAR_6->VAR_1 = VAR_1;

    while (VAR_1 --) {

        VAR_7->txdrq = *VAR_3 ++;

        VAR_7->rxdrq = *VAR_3 ++;

        VAR_7 ++;

    }

    omap_mcspi_reset(VAR_6);



    memory_region_init_io(&VAR_6->iomem, NULL, &omap_mcspi_ops, VAR_6, "omap.mcspi",

                          omap_l4_region_size(VAR_0, 0));

    omap_l4_attach(VAR_0, 0, &VAR_6->iomem);



    return VAR_6;

}

struct omap_mcspi_s *FUNC_0(struct omap_target_agent_s *VAR_0, int VAR_1,
qemu_irq VAR_2, qemu_irq *VAR_3, omap_clk VAR_4, omap_clk VAR_5)
{ struct omap_mcspi_s *VAR_6 = (struct omap_mcspi_s *)
g_malloc0(sizeof(struct omap_mcspi_s)); struct omap_mcspi_ch_s *VAR_7 = VAR_6->VAR_7; VAR_6->VAR_2 = VAR_2; VAR_6->VAR_1 = VAR_1; while (VAR_1 --) { VAR_7->txdrq = *VAR_3 ++; VAR_7->rxdrq = *VAR_3 ++; VAR_7 ++; } omap_mcspi_reset(VAR_6); memory_region_init_io(&VAR_6->iomem, NULL, &omap_mcspi_ops, VAR_6, "omap.mcspi",
omap_l4_region_size(VAR_0, 0)); omap_l4_attach(VAR_0, 0, &VAR_6->iomem); return VAR_6; }