@@ -262,7 +262,7 @@ struct mc_msi {
262
262
DECLARE_BITMAP (used , MC_NUM_MSI_IRQS );
263
263
};
264
264
265
- struct mc_port {
265
+ struct mc_pcie {
266
266
void __iomem * axi_base_addr ;
267
267
struct device * dev ;
268
268
struct irq_domain * intx_domain ;
@@ -382,7 +382,7 @@ static struct {
382
382
383
383
static char poss_clks [][5 ] = { "fic0" , "fic1" , "fic2" , "fic3" };
384
384
385
- static void mc_pcie_enable_msi (struct mc_port * port , void __iomem * base )
385
+ static void mc_pcie_enable_msi (struct mc_pcie * port , void __iomem * base )
386
386
{
387
387
struct mc_msi * msi = & port -> msi ;
388
388
u32 cap_offset = MC_MSI_CAP_CTRL_OFFSET ;
@@ -405,7 +405,7 @@ static void mc_pcie_enable_msi(struct mc_port *port, void __iomem *base)
405
405
406
406
static void mc_handle_msi (struct irq_desc * desc )
407
407
{
408
- struct mc_port * port = irq_desc_get_handler_data (desc );
408
+ struct mc_pcie * port = irq_desc_get_handler_data (desc );
409
409
struct device * dev = port -> dev ;
410
410
struct mc_msi * msi = & port -> msi ;
411
411
void __iomem * bridge_base_addr =
@@ -428,7 +428,7 @@ static void mc_handle_msi(struct irq_desc *desc)
428
428
429
429
static void mc_msi_bottom_irq_ack (struct irq_data * data )
430
430
{
431
- struct mc_port * port = irq_data_get_irq_chip_data (data );
431
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
432
432
void __iomem * bridge_base_addr =
433
433
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
434
434
u32 bitpos = data -> hwirq ;
@@ -443,7 +443,7 @@ static void mc_msi_bottom_irq_ack(struct irq_data *data)
443
443
444
444
static void mc_compose_msi_msg (struct irq_data * data , struct msi_msg * msg )
445
445
{
446
- struct mc_port * port = irq_data_get_irq_chip_data (data );
446
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
447
447
phys_addr_t addr = port -> msi .vector_phy ;
448
448
449
449
msg -> address_lo = lower_32_bits (addr );
@@ -470,7 +470,7 @@ static struct irq_chip mc_msi_bottom_irq_chip = {
470
470
static int mc_irq_msi_domain_alloc (struct irq_domain * domain , unsigned int virq ,
471
471
unsigned int nr_irqs , void * args )
472
472
{
473
- struct mc_port * port = domain -> host_data ;
473
+ struct mc_pcie * port = domain -> host_data ;
474
474
struct mc_msi * msi = & port -> msi ;
475
475
void __iomem * bridge_base_addr =
476
476
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
@@ -503,7 +503,7 @@ static void mc_irq_msi_domain_free(struct irq_domain *domain, unsigned int virq,
503
503
unsigned int nr_irqs )
504
504
{
505
505
struct irq_data * d = irq_domain_get_irq_data (domain , virq );
506
- struct mc_port * port = irq_data_get_irq_chip_data (d );
506
+ struct mc_pcie * port = irq_data_get_irq_chip_data (d );
507
507
struct mc_msi * msi = & port -> msi ;
508
508
509
509
mutex_lock (& msi -> lock );
@@ -534,7 +534,7 @@ static struct msi_domain_info mc_msi_domain_info = {
534
534
.chip = & mc_msi_irq_chip ,
535
535
};
536
536
537
- static int mc_allocate_msi_domains (struct mc_port * port )
537
+ static int mc_allocate_msi_domains (struct mc_pcie * port )
538
538
{
539
539
struct device * dev = port -> dev ;
540
540
struct fwnode_handle * fwnode = of_node_to_fwnode (dev -> of_node );
@@ -562,7 +562,7 @@ static int mc_allocate_msi_domains(struct mc_port *port)
562
562
563
563
static void mc_handle_intx (struct irq_desc * desc )
564
564
{
565
- struct mc_port * port = irq_desc_get_handler_data (desc );
565
+ struct mc_pcie * port = irq_desc_get_handler_data (desc );
566
566
struct device * dev = port -> dev ;
567
567
void __iomem * bridge_base_addr =
568
568
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
@@ -585,7 +585,7 @@ static void mc_handle_intx(struct irq_desc *desc)
585
585
586
586
static void mc_ack_intx_irq (struct irq_data * data )
587
587
{
588
- struct mc_port * port = irq_data_get_irq_chip_data (data );
588
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
589
589
void __iomem * bridge_base_addr =
590
590
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
591
591
u32 mask = BIT (data -> hwirq + PM_MSI_INT_INTX_SHIFT );
@@ -595,7 +595,7 @@ static void mc_ack_intx_irq(struct irq_data *data)
595
595
596
596
static void mc_mask_intx_irq (struct irq_data * data )
597
597
{
598
- struct mc_port * port = irq_data_get_irq_chip_data (data );
598
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
599
599
void __iomem * bridge_base_addr =
600
600
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
601
601
unsigned long flags ;
@@ -611,7 +611,7 @@ static void mc_mask_intx_irq(struct irq_data *data)
611
611
612
612
static void mc_unmask_intx_irq (struct irq_data * data )
613
613
{
614
- struct mc_port * port = irq_data_get_irq_chip_data (data );
614
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
615
615
void __iomem * bridge_base_addr =
616
616
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
617
617
unsigned long flags ;
@@ -698,7 +698,7 @@ static u32 local_events(void __iomem *addr)
698
698
return val ;
699
699
}
700
700
701
- static u32 get_events (struct mc_port * port )
701
+ static u32 get_events (struct mc_pcie * port )
702
702
{
703
703
void __iomem * bridge_base_addr =
704
704
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
@@ -715,7 +715,7 @@ static u32 get_events(struct mc_port *port)
715
715
716
716
static irqreturn_t mc_event_handler (int irq , void * dev_id )
717
717
{
718
- struct mc_port * port = dev_id ;
718
+ struct mc_pcie * port = dev_id ;
719
719
struct device * dev = port -> dev ;
720
720
struct irq_data * data ;
721
721
@@ -731,7 +731,7 @@ static irqreturn_t mc_event_handler(int irq, void *dev_id)
731
731
732
732
static void mc_handle_event (struct irq_desc * desc )
733
733
{
734
- struct mc_port * port = irq_desc_get_handler_data (desc );
734
+ struct mc_pcie * port = irq_desc_get_handler_data (desc );
735
735
unsigned long events ;
736
736
u32 bit ;
737
737
struct irq_chip * chip = irq_desc_get_chip (desc );
@@ -748,7 +748,7 @@ static void mc_handle_event(struct irq_desc *desc)
748
748
749
749
static void mc_ack_event_irq (struct irq_data * data )
750
750
{
751
- struct mc_port * port = irq_data_get_irq_chip_data (data );
751
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
752
752
u32 event = data -> hwirq ;
753
753
void __iomem * addr ;
754
754
u32 mask ;
@@ -763,7 +763,7 @@ static void mc_ack_event_irq(struct irq_data *data)
763
763
764
764
static void mc_mask_event_irq (struct irq_data * data )
765
765
{
766
- struct mc_port * port = irq_data_get_irq_chip_data (data );
766
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
767
767
u32 event = data -> hwirq ;
768
768
void __iomem * addr ;
769
769
u32 mask ;
@@ -793,7 +793,7 @@ static void mc_mask_event_irq(struct irq_data *data)
793
793
794
794
static void mc_unmask_event_irq (struct irq_data * data )
795
795
{
796
- struct mc_port * port = irq_data_get_irq_chip_data (data );
796
+ struct mc_pcie * port = irq_data_get_irq_chip_data (data );
797
797
u32 event = data -> hwirq ;
798
798
void __iomem * addr ;
799
799
u32 mask ;
@@ -881,7 +881,7 @@ static int mc_pcie_init_clks(struct device *dev)
881
881
return 0 ;
882
882
}
883
883
884
- static int mc_pcie_init_irq_domains (struct mc_port * port )
884
+ static int mc_pcie_init_irq_domains (struct mc_pcie * port )
885
885
{
886
886
struct device * dev = port -> dev ;
887
887
struct device_node * node = dev -> of_node ;
@@ -957,7 +957,7 @@ static void mc_pcie_setup_window(void __iomem *bridge_base_addr, u32 index,
957
957
}
958
958
959
959
static int mc_pcie_setup_windows (struct platform_device * pdev ,
960
- struct mc_port * port )
960
+ struct mc_pcie * port )
961
961
{
962
962
void __iomem * bridge_base_addr =
963
963
port -> axi_base_addr + MC_PCIE_BRIDGE_ADDR ;
@@ -983,7 +983,7 @@ static int mc_platform_init(struct pci_config_window *cfg)
983
983
{
984
984
struct device * dev = cfg -> parent ;
985
985
struct platform_device * pdev = to_platform_device (dev );
986
- struct mc_port * port ;
986
+ struct mc_pcie * port ;
987
987
void __iomem * bridge_base_addr ;
988
988
void __iomem * ctrl_base_addr ;
989
989
int ret ;
0 commit comments