mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
The PL031 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20191003230404.19384-3-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
2baa483bb7
commit
877c181cd4
13 changed files with 21 additions and 17 deletions
47
include/hw/rtc/pl031.h
Normal file
47
include/hw/rtc/pl031.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* ARM AMBA PrimeCell PL031 RTC
|
||||
*
|
||||
* Copyright (c) 2007 CodeSourcery
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Contributions after 2012-01-13 are licensed under the terms of the
|
||||
* GNU GPL, version 2 or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef HW_RTC_PL031_H
|
||||
#define HW_RTC_PL031_H
|
||||
|
||||
#include "hw/sysbus.h"
|
||||
#include "qemu/timer.h"
|
||||
|
||||
#define TYPE_PL031 "pl031"
|
||||
#define PL031(obj) OBJECT_CHECK(PL031State, (obj), TYPE_PL031)
|
||||
|
||||
typedef struct PL031State {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
MemoryRegion iomem;
|
||||
QEMUTimer *timer;
|
||||
qemu_irq irq;
|
||||
|
||||
/*
|
||||
* Needed to preserve the tick_count across migration, even if the
|
||||
* absolute value of the rtc_clock is different on the source and
|
||||
* destination.
|
||||
*/
|
||||
uint32_t tick_offset_vmstate;
|
||||
uint32_t tick_offset;
|
||||
bool tick_offset_migrated;
|
||||
bool migrate_tick_offset;
|
||||
|
||||
uint32_t mr;
|
||||
uint32_t lr;
|
||||
uint32_t cr;
|
||||
uint32_t im;
|
||||
uint32_t is;
|
||||
} PL031State;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue