@@ -30,6 +30,7 @@ struct sg204x_msi_chip_info {
3030 * @doorbell_addr: see TRM, 10.1.32, GP_INTR0_SET
3131 * @irq_first: First vectors number that MSIs starts
3232 * @num_irqs: Number of vectors for MSIs
33+ * @irq_type: IRQ type for MSIs
3334 * @msi_map: mapping for allocated MSI vectors.
3435 * @msi_map_lock: Lock for msi_map
3536 * @chip_info: chip specific infomations
@@ -41,6 +42,7 @@ struct sg204x_msi_chipdata {
4142
4243 u32 irq_first ;
4344 u32 num_irqs ;
45+ unsigned int irq_type ;
4446
4547 unsigned long * msi_map ;
4648 struct mutex msi_map_lock ;
@@ -137,14 +139,14 @@ static int sg204x_msi_parent_domain_alloc(struct irq_domain *domain, unsigned in
137139 fwspec .fwnode = domain -> parent -> fwnode ;
138140 fwspec .param_count = 2 ;
139141 fwspec .param [0 ] = data -> irq_first + hwirq ;
140- fwspec .param [1 ] = IRQ_TYPE_EDGE_RISING ;
142+ fwspec .param [1 ] = data -> irq_type ;
141143
142144 ret = irq_domain_alloc_irqs_parent (domain , virq , 1 , & fwspec );
143145 if (ret )
144146 return ret ;
145147
146148 d = irq_domain_get_irq_data (domain -> parent , virq );
147- return d -> chip -> irq_set_type (d , IRQ_TYPE_EDGE_RISING );
149+ return d -> chip -> irq_set_type (d , data -> irq_type );
148150}
149151
150152static int sg204x_msi_middle_domain_alloc (struct irq_domain * domain , unsigned int virq ,
@@ -298,6 +300,7 @@ static int sg2042_msi_probe(struct platform_device *pdev)
298300 }
299301
300302 data -> irq_first = (u32 )args .args [0 ];
303+ data -> irq_type = (unsigned int )args .args [1 ];
301304 data -> num_irqs = (u32 )args .args [args .nargs - 1 ];
302305
303306 mutex_init (& data -> msi_map_lock );
0 commit comments