 ff68dacbc7
			
		
	
	
		ff68dacbc7
		
	
	
	
	
		
			
			The SysTick timer isn't really part of the NVIC proper; we just modelled it that way back when we couldn't easily have devices that only occupied a small chunk of a memory region. Split it out into its own device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1487604965-23220-10-git-send-email-peter.maydell@linaro.org Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
		
			
				
	
	
		
			35 lines
		
	
	
		
			676 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			676 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * ARMv7M SysTick timer
 | |
|  *
 | |
|  * Copyright (c) 2006-2007 CodeSourcery.
 | |
|  * Written by Paul Brook
 | |
|  * Copyright (c) 2017 Linaro Ltd
 | |
|  * Written by Peter Maydell
 | |
|  *
 | |
|  * This code is licensed under the GPL (version 2 or later).
 | |
|  */
 | |
| 
 | |
| #ifndef HW_TIMER_ARMV7M_SYSTICK_H
 | |
| #define HW_TIMER_ARMV7M_SYSTICK_H
 | |
| 
 | |
| #include "hw/sysbus.h"
 | |
| 
 | |
| #define TYPE_SYSTICK "armv7m_systick"
 | |
| 
 | |
| #define SYSTICK(obj) OBJECT_CHECK(SysTickState, (obj), TYPE_SYSTICK)
 | |
| 
 | |
| typedef struct SysTickState {
 | |
|     /*< private >*/
 | |
|     SysBusDevice parent_obj;
 | |
|     /*< public >*/
 | |
| 
 | |
|     uint32_t control;
 | |
|     uint32_t reload;
 | |
|     int64_t tick;
 | |
|     QEMUTimer *timer;
 | |
|     MemoryRegion iomem;
 | |
|     qemu_irq irq;
 | |
| } SysTickState;
 | |
| 
 | |
| #endif
 |