| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Broadcom BCM7120 style Level 2 interrupt controller driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2014 Broadcom Corporation |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 146 | 143 | |
|---|
| 147 | 144 | irq_set_chained_handler_and_data(parent_irq, |
|---|
| 148 | 145 | bcm7120_l2_intc_irq_handle, l1_data); |
|---|
| 146 | + if (data->can_wake) |
|---|
| 147 | + enable_irq_wake(parent_irq); |
|---|
| 148 | + |
|---|
| 149 | 149 | return 0; |
|---|
| 150 | 150 | } |
|---|
| 151 | 151 | |
|---|
| .. | .. |
|---|
| 250 | 250 | if (ret < 0) |
|---|
| 251 | 251 | goto out_free_l1_data; |
|---|
| 252 | 252 | |
|---|
| 253 | + data->can_wake = of_property_read_bool(dn, "brcm,irq-can-wake"); |
|---|
| 254 | + |
|---|
| 253 | 255 | for (irq = 0; irq < data->num_parent_irqs; irq++) { |
|---|
| 254 | 256 | ret = bcm7120_l2_intc_init_one(dn, data, irq, valid_mask); |
|---|
| 255 | 257 | if (ret) |
|---|
| .. | .. |
|---|
| 276 | 278 | pr_err("failed to allocate generic irq chip\n"); |
|---|
| 277 | 279 | goto out_free_domain; |
|---|
| 278 | 280 | } |
|---|
| 279 | | - |
|---|
| 280 | | - if (of_property_read_bool(dn, "brcm,irq-can-wake")) |
|---|
| 281 | | - data->can_wake = true; |
|---|
| 282 | 281 | |
|---|
| 283 | 282 | for (idx = 0; idx < data->n_words; idx++) { |
|---|
| 284 | 283 | irq = idx * IRQS_PER_WORD; |
|---|
| .. | .. |
|---|
| 318 | 317 | } |
|---|
| 319 | 318 | } |
|---|
| 320 | 319 | |
|---|
| 320 | + pr_info("registered %s intc (%pOF, parent IRQ(s): %d)\n", |
|---|
| 321 | + intc_name, dn, data->num_parent_irqs); |
|---|
| 322 | + |
|---|
| 321 | 323 | return 0; |
|---|
| 322 | 324 | |
|---|
| 323 | 325 | out_free_domain: |
|---|