~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to hw/misc/exynos4210_pmu.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
386
386
#define PMU_NUM_OF_REGISTERS     \
387
387
    (sizeof(exynos4210_pmu_regs) / sizeof(Exynos4210PmuReg))
388
388
 
 
389
#define TYPE_EXYNOS4210_PMU "exynos4210.pmu"
 
390
#define EXYNOS4210_PMU(obj) \
 
391
    OBJECT_CHECK(Exynos4210PmuState, (obj), TYPE_EXYNOS4210_PMU)
 
392
 
389
393
typedef struct Exynos4210PmuState {
390
 
    SysBusDevice busdev;
 
394
    SysBusDevice parent_obj;
 
395
 
391
396
    MemoryRegion iomem;
392
397
    uint32_t reg[PMU_NUM_OF_REGISTERS];
393
398
} Exynos4210PmuState;
443
448
 
444
449
static void exynos4210_pmu_reset(DeviceState *dev)
445
450
{
446
 
    Exynos4210PmuState *s =
447
 
            container_of(dev, Exynos4210PmuState, busdev.qdev);
 
451
    Exynos4210PmuState *s = EXYNOS4210_PMU(dev);
448
452
    unsigned i;
449
453
 
450
454
    /* Set default values for registers */
455
459
 
456
460
static int exynos4210_pmu_init(SysBusDevice *dev)
457
461
{
458
 
    Exynos4210PmuState *s = FROM_SYSBUS(Exynos4210PmuState, dev);
 
462
    Exynos4210PmuState *s = EXYNOS4210_PMU(dev);
459
463
 
460
464
    /* memory mapping */
461
 
    memory_region_init_io(&s->iomem, &exynos4210_pmu_ops, s, "exynos4210.pmu",
462
 
                          EXYNOS4210_PMU_REGS_MEM_SIZE);
 
465
    memory_region_init_io(&s->iomem, OBJECT(dev), &exynos4210_pmu_ops, s,
 
466
                          "exynos4210.pmu", EXYNOS4210_PMU_REGS_MEM_SIZE);
463
467
    sysbus_init_mmio(dev, &s->iomem);
464
468
    return 0;
465
469
}
485
489
}
486
490
 
487
491
static const TypeInfo exynos4210_pmu_info = {
488
 
    .name          = "exynos4210.pmu",
 
492
    .name          = TYPE_EXYNOS4210_PMU,
489
493
    .parent        = TYPE_SYS_BUS_DEVICE,
490
494
    .instance_size = sizeof(Exynos4210PmuState),
491
495
    .class_init    = exynos4210_pmu_class_init,