sse-timer.c (6f8a81fc296535f73c48cf9563862e088cc71c57) sse-timer.c (9323e79f10e5f5d8fffc3b307776173ca11faeae)
1/*
2 * Arm SSE Subsystem System Timer
3 *
4 * Copyright (c) 2020 Linaro Limited
5 * Written by Peter Maydell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or

--- 310 unchanged lines hidden (view full) ---

319 }
320 case A_CNTP_AIVAL_RELOAD:
321 s->cntp_aival_reload = value;
322 break;
323 case A_CNTP_AIVAL_CTL:
324 {
325 uint32_t old_ctl = s->cntp_aival_ctl;
326
1/*
2 * Arm SSE Subsystem System Timer
3 *
4 * Copyright (c) 2020 Linaro Limited
5 * Written by Peter Maydell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or

--- 310 unchanged lines hidden (view full) ---

319 }
320 case A_CNTP_AIVAL_RELOAD:
321 s->cntp_aival_reload = value;
322 break;
323 case A_CNTP_AIVAL_CTL:
324 {
325 uint32_t old_ctl = s->cntp_aival_ctl;
326
327 /* EN bit is writeable; CLR bit is write-0-to-clear, write-1-ignored */
327 /* EN bit is writable; CLR bit is write-0-to-clear, write-1-ignored */
328 s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_EN_MASK;
329 s->cntp_aival_ctl |= value & R_CNTP_AIVAL_CTL_EN_MASK;
330 if (!(value & R_CNTP_AIVAL_CTL_CLR_MASK)) {
331 s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_CLR_MASK;
332 }
333 if ((old_ctl ^ s->cntp_aival_ctl) & R_CNTP_AIVAL_CTL_EN_MASK) {
334 /* Auto-increment toggled on/off */
335 if (sse_enabled(s)) {

--- 136 unchanged lines hidden ---
328 s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_EN_MASK;
329 s->cntp_aival_ctl |= value & R_CNTP_AIVAL_CTL_EN_MASK;
330 if (!(value & R_CNTP_AIVAL_CTL_CLR_MASK)) {
331 s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_CLR_MASK;
332 }
333 if ((old_ctl ^ s->cntp_aival_ctl) & R_CNTP_AIVAL_CTL_EN_MASK) {
334 /* Auto-increment toggled on/off */
335 if (sse_enabled(s)) {

--- 136 unchanged lines hidden ---