2017-02-07 21:29:59 +03:00
|
|
|
/*
|
|
|
|
* ASPEED Watchdog Controller
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016-2017 IBM Corp.
|
|
|
|
*
|
|
|
|
* This code is licensed under the GPL version 2 or later. See the
|
|
|
|
* COPYING file in the top-level directory.
|
|
|
|
*/
|
2019-03-15 17:51:20 +03:00
|
|
|
|
|
|
|
#ifndef WDT_ASPEED_H
|
|
|
|
#define WDT_ASPEED_H
|
2017-02-07 21:29:59 +03:00
|
|
|
|
2019-08-12 08:23:31 +03:00
|
|
|
#include "hw/misc/aspeed_scu.h"
|
2017-02-07 21:29:59 +03:00
|
|
|
#include "hw/sysbus.h"
|
|
|
|
|
|
|
|
#define TYPE_ASPEED_WDT "aspeed.wdt"
|
|
|
|
#define ASPEED_WDT(obj) \
|
|
|
|
OBJECT_CHECK(AspeedWDTState, (obj), TYPE_ASPEED_WDT)
|
|
|
|
|
|
|
|
#define ASPEED_WDT_REGS_MAX (0x20 / 4)
|
|
|
|
|
|
|
|
typedef struct AspeedWDTState {
|
|
|
|
/*< private >*/
|
|
|
|
SysBusDevice parent_obj;
|
|
|
|
QEMUTimer *timer;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
MemoryRegion iomem;
|
|
|
|
uint32_t regs[ASPEED_WDT_REGS_MAX];
|
|
|
|
|
2019-07-01 19:26:18 +03:00
|
|
|
AspeedSCUState *scu;
|
2017-02-07 21:29:59 +03:00
|
|
|
uint32_t pclk_freq;
|
2017-09-04 17:21:54 +03:00
|
|
|
uint32_t silicon_rev;
|
|
|
|
uint32_t ext_pulse_width_mask;
|
2017-02-07 21:29:59 +03:00
|
|
|
} AspeedWDTState;
|
|
|
|
|
2019-03-15 17:51:20 +03:00
|
|
|
#endif /* WDT_ASPEED_H */
|