.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Freescale SCFG MSI(-X) support |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2016 Freescale Semiconductor. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Minghuan Lian <Minghuan.Lian@nxp.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/kernel.h> |
---|
.. | .. |
---|
100 | 97 | msg->data |= cpumask_first(mask); |
---|
101 | 98 | } |
---|
102 | 99 | |
---|
103 | | - iommu_dma_map_msi_msg(data->irq, msg); |
---|
| 100 | + iommu_dma_compose_msi_msg(irq_data_get_msi_desc(data), msg); |
---|
104 | 101 | } |
---|
105 | 102 | |
---|
106 | 103 | static int ls_scfg_msi_set_affinity(struct irq_data *irq_data, |
---|
.. | .. |
---|
141 | 138 | unsigned int nr_irqs, |
---|
142 | 139 | void *args) |
---|
143 | 140 | { |
---|
| 141 | + msi_alloc_info_t *info = args; |
---|
144 | 142 | struct ls_scfg_msi *msi_data = domain->host_data; |
---|
145 | 143 | int pos, err = 0; |
---|
146 | 144 | |
---|
.. | .. |
---|
157 | 155 | if (err) |
---|
158 | 156 | return err; |
---|
159 | 157 | |
---|
| 158 | + err = iommu_dma_prepare_msi(info->desc, msi_data->msiir_addr); |
---|
| 159 | + if (err) |
---|
| 160 | + return err; |
---|
| 161 | + |
---|
160 | 162 | irq_domain_set_info(domain, virq, pos, |
---|
161 | 163 | &ls_scfg_msi_parent_chip, msi_data, |
---|
162 | 164 | handle_simple_irq, NULL, NULL); |
---|