struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s *mpu,

                                   hwaddr base,

                                   qemu_irq irq, qemu_irq drq)

{

    int cs;

    struct omap_gpmc_s *s = (struct omap_gpmc_s *)

            g_malloc0(sizeof(struct omap_gpmc_s));



    memory_region_init_io(&s->iomem, NULL, &omap_gpmc_ops, s, "omap-gpmc", 0x1000);

    memory_region_add_subregion(get_system_memory(), base, &s->iomem);



    s->irq = irq;

    s->drq = drq;

    s->accept_256 = cpu_is_omap3630(mpu);

    s->revision = cpu_class_omap3(mpu) ? 0x50 : 0x20;

    s->lastirq = 0;

    omap_gpmc_reset(s);



    /* We have to register a different IO memory handler for each

     * chip select region in case a NAND device is mapped there. We

     * make the region the worst-case size of 256MB and rely on the

     * container memory region in cs_map to chop it down to the actual

     * guest-requested size.

     */

    for (cs = 0; cs < 8; cs++) {

        memory_region_init_io(&s->cs_file[cs].nandiomem, NULL,

                              &omap_nand_ops,

                              &s->cs_file[cs],

                              "omap-nand",

                              256 * 1024 * 1024);

    }



    memory_region_init_io(&s->prefetch.iomem, NULL, &omap_prefetch_ops, s,

                          "omap-gpmc-prefetch", 256 * 1024 * 1024);

    return s;

}

struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s *mpu,

                                   hwaddr base,

                                   qemu_irq irq, qemu_irq drq)

{

    int cs;

    struct omap_gpmc_s *s = (struct omap_gpmc_s *)

            g_malloc0(sizeof(struct omap_gpmc_s));



    memory_region_init_io(&s->iomem, NULL, &omap_gpmc_ops, s, "omap-gpmc", 0x1000);

    memory_region_add_subregion(get_system_memory(), base, &s->iomem);



    s->irq = irq;

    s->drq = drq;

    s->accept_256 = cpu_is_omap3630(mpu);

    s->revision = cpu_class_omap3(mpu) ? 0x50 : 0x20;

    s->lastirq = 0;

    omap_gpmc_reset(s);



    











    for (cs = 0; cs < 8; cs++) {

        memory_region_init_io(&s->cs_file[cs].nandiomem, NULL,

                              &omap_nand_ops,

                              &s->cs_file[cs],

                              "omap-nand",

                              256 * 1024 * 1024);

    }



    memory_region_init_io(&s->prefetch.iomem, NULL, &omap_prefetch_ops, s,

                          "omap-gpmc-prefetch", 256 * 1024 * 1024);

    return s;

}

    struct omap_gpmc_s *s = (struct omap_gpmc_s *)             g_malloc0(sizeof(struct omap_gpmc_s));
struct omap_gpmc_s *FUNC_0(struct omap_mpu_state_s *VAR_0,

                                   hwaddr VAR_1,

                                   qemu_irq VAR_2, qemu_irq VAR_3)

{

    int VAR_4;

    struct omap_gpmc_s *VAR_5 = (struct omap_gpmc_s *)

            g_malloc0(sizeof(struct omap_gpmc_s));



    memory_region_init_io(&VAR_5->iomem, NULL, &omap_gpmc_ops, VAR_5, "omap-gpmc", 0x1000);

    memory_region_add_subregion(get_system_memory(), VAR_1, &VAR_5->iomem);



    VAR_5->VAR_2 = VAR_2;

    VAR_5->VAR_3 = VAR_3;

    VAR_5->accept_256 = cpu_is_omap3630(VAR_0);

    VAR_5->revision = cpu_class_omap3(VAR_0) ? 0x50 : 0x20;

    VAR_5->lastirq = 0;

    omap_gpmc_reset(VAR_5);



    











    for (VAR_4 = 0; VAR_4 < 8; VAR_4++) {

        memory_region_init_io(&VAR_5->cs_file[VAR_4].nandiomem, NULL,

                              &omap_nand_ops,

                              &VAR_5->cs_file[VAR_4],

                              "omap-nand",

                              256 * 1024 * 1024);

    }



    memory_region_init_io(&VAR_5->prefetch.iomem, NULL, &omap_prefetch_ops, VAR_5,

                          "omap-gpmc-prefetch", 256 * 1024 * 1024);

    return VAR_5;

}

struct omap_gpmc_s *FUNC_0(struct omap_mpu_state_s *VAR_0,
hwaddr VAR_1,
qemu_irq VAR_2, qemu_irq VAR_3)
{ int VAR_4; struct omap_gpmc_s *VAR_5 = (struct omap_gpmc_s *)
g_malloc0(sizeof(struct omap_gpmc_s)); memory_region_init_io(&VAR_5->iomem, NULL, &omap_gpmc_ops, VAR_5, "omap-gpmc", 0x1000); memory_region_add_subregion(get_system_memory(), VAR_1, &VAR_5->iomem); VAR_5->VAR_2 = VAR_2; VAR_5->VAR_3 = VAR_3; VAR_5->accept_256 = cpu_is_omap3630(VAR_0); VAR_5->revision = cpu_class_omap3(VAR_0) ? 0x50 : 0x20; VAR_5->lastirq = 0; omap_gpmc_reset(VAR_5); for (VAR_4 = 0; VAR_4 < 8; VAR_4++) { memory_region_init_io(&VAR_5->cs_file[VAR_4].nandiomem, NULL,
&omap_nand_ops,
&VAR_5->cs_file[VAR_4],
"omap-nand",
256 * 1024 * 1024); } memory_region_init_io(&VAR_5->prefetch.iomem, NULL, &omap_prefetch_ops, VAR_5,
"omap-gpmc-prefetch", 256 * 1024 * 1024); return VAR_5; }