| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver code for Tegra's Legacy Interrupt Controller |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 10 | 11 | * Colin Cross <ccross@android.com> |
|---|
| 11 | 12 | * |
|---|
| 12 | 13 | * Copyright (C) 2010,2013, NVIDIA Corporation |
|---|
| 13 | | - * |
|---|
| 14 | | - * This software is licensed under the terms of the GNU General Public |
|---|
| 15 | | - * License version 2, as published by the Free Software Foundation, and |
|---|
| 16 | | - * may be copied, distributed, and modified under those terms. |
|---|
| 17 | | - * |
|---|
| 18 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 21 | | - * GNU General Public License for more details. |
|---|
| 22 | | - * |
|---|
| 23 | 14 | */ |
|---|
| 24 | 15 | |
|---|
| 25 | 16 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 157 | 148 | lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS); |
|---|
| 158 | 149 | |
|---|
| 159 | 150 | /* Disable COP interrupts */ |
|---|
| 160 | | - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); |
|---|
| 151 | + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR); |
|---|
| 161 | 152 | |
|---|
| 162 | 153 | /* Disable CPU interrupts */ |
|---|
| 163 | | - writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); |
|---|
| 154 | + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR); |
|---|
| 164 | 155 | |
|---|
| 165 | 156 | /* Enable the wakeup sources of ictlr */ |
|---|
| 166 | 157 | writel_relaxed(lic->ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET); |
|---|
| .. | .. |
|---|
| 181 | 172 | |
|---|
| 182 | 173 | writel_relaxed(lic->cpu_iep[i], |
|---|
| 183 | 174 | ictlr + ICTLR_CPU_IEP_CLASS); |
|---|
| 184 | | - writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); |
|---|
| 175 | + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR); |
|---|
| 185 | 176 | writel_relaxed(lic->cpu_ier[i], |
|---|
| 186 | 177 | ictlr + ICTLR_CPU_IER_SET); |
|---|
| 187 | 178 | writel_relaxed(lic->cop_iep[i], |
|---|
| 188 | 179 | ictlr + ICTLR_COP_IEP_CLASS); |
|---|
| 189 | | - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); |
|---|
| 180 | + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR); |
|---|
| 190 | 181 | writel_relaxed(lic->cop_ier[i], |
|---|
| 191 | 182 | ictlr + ICTLR_COP_IER_SET); |
|---|
| 192 | 183 | } |
|---|
| .. | .. |
|---|
| 321 | 312 | lic->base[i] = base; |
|---|
| 322 | 313 | |
|---|
| 323 | 314 | /* Disable all interrupts */ |
|---|
| 324 | | - writel_relaxed(~0UL, base + ICTLR_CPU_IER_CLR); |
|---|
| 315 | + writel_relaxed(GENMASK(31, 0), base + ICTLR_CPU_IER_CLR); |
|---|
| 325 | 316 | /* All interrupts target IRQ */ |
|---|
| 326 | 317 | writel_relaxed(0, base + ICTLR_CPU_IEP_CLASS); |
|---|
| 327 | 318 | |
|---|