* [PATCH] ARM/PCI: Remove struct msi_controller from struct hw_pci
@ 2020-09-04 14:16 Lorenzo Pieralisi
2020-09-04 19:08 ` Rob Herring
2020-09-16 10:30 ` [PATCH v2] ARM/PCI: Remove unused fields " Lorenzo Pieralisi
0 siblings, 2 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2020-09-04 14:16 UTC (permalink / raw)
To: linux-pci; +Cc: Lorenzo Pieralisi, Rob Herring, Russell King, linux-arm-kernel
The msi_ctrl field in struct hw_pci is currently unused by arm/mach
PCI host controller drivers.
Remove it.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
---
arch/arm/include/asm/mach/pci.h | 1 -
arch/arm/kernel/bios32.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 83d340702680..f3a284e6a90b 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -17,7 +17,6 @@ struct pci_host_bridge;
struct device;
struct hw_pci {
- struct msi_controller *msi_ctrl;
struct pci_ops *ops;
int nr_controllers;
unsigned int io_optional:1;
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index eecec16aa708..6b73e60cf95a 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -480,7 +480,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
bridge->sysdata = sys;
bridge->busnr = sys->busnr;
bridge->ops = hw->ops;
- bridge->msi = hw->msi_ctrl;
bridge->align_resource =
hw->align_resource;
--
2.26.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM/PCI: Remove struct msi_controller from struct hw_pci
2020-09-04 14:16 [PATCH] ARM/PCI: Remove struct msi_controller from struct hw_pci Lorenzo Pieralisi
@ 2020-09-04 19:08 ` Rob Herring
2020-09-16 10:30 ` [PATCH v2] ARM/PCI: Remove unused fields " Lorenzo Pieralisi
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-09-04 19:08 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: PCI, Russell King,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
On Fri, Sep 4, 2020 at 8:16 AM Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
>
> The msi_ctrl field in struct hw_pci is currently unused by arm/mach
> PCI host controller drivers.
And we won't be adding any new users.
>
> Remove it.
io_optional and align_resource fields are also unused.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Russell King <linux@armlinux.org.uk>
> ---
> arch/arm/include/asm/mach/pci.h | 1 -
> arch/arm/kernel/bios32.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
> index 83d340702680..f3a284e6a90b 100644
> --- a/arch/arm/include/asm/mach/pci.h
> +++ b/arch/arm/include/asm/mach/pci.h
> @@ -17,7 +17,6 @@ struct pci_host_bridge;
> struct device;
>
> struct hw_pci {
> - struct msi_controller *msi_ctrl;
> struct pci_ops *ops;
> int nr_controllers;
> unsigned int io_optional:1;
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index eecec16aa708..6b73e60cf95a 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -480,7 +480,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
> bridge->sysdata = sys;
> bridge->busnr = sys->busnr;
> bridge->ops = hw->ops;
> - bridge->msi = hw->msi_ctrl;
> bridge->align_resource =
> hw->align_resource;
>
> --
> 2.26.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ARM/PCI: Remove unused fields from struct hw_pci
2020-09-04 14:16 [PATCH] ARM/PCI: Remove struct msi_controller from struct hw_pci Lorenzo Pieralisi
2020-09-04 19:08 ` Rob Herring
@ 2020-09-16 10:30 ` Lorenzo Pieralisi
2020-09-17 15:09 ` Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Lorenzo Pieralisi @ 2020-09-16 10:30 UTC (permalink / raw)
To: linux-pci; +Cc: linux-arm-kernel, Lorenzo Pieralisi, Rob Herring, Russell King
The msi_ctrl, io_optional and align_resource fields in struct hw_pci are
currently unused by arm/mach PCI host controller drivers and we won't
be adding any new users.
Remove them and related code.
Link: https://lore.kernel.org/r/20200904141607.4066-1-lorenzo.pieralisi@arm.com
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
---
v1->v2
- Removed io_optional and align_resource fields as well
[v1] https://lore.kernel.org/linux-pci/20200904141607.4066-1-lorenzo.pieralisi@arm.com
arch/arm/include/asm/mach/pci.h | 7 -------
arch/arm/kernel/bios32.c | 16 ++--------------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 83d340702680..ea9bd08895b7 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -17,10 +17,8 @@ struct pci_host_bridge;
struct device;
struct hw_pci {
- struct msi_controller *msi_ctrl;
struct pci_ops *ops;
int nr_controllers;
- unsigned int io_optional:1;
void **private_data;
int (*setup)(int nr, struct pci_sys_data *);
int (*scan)(int nr, struct pci_host_bridge *);
@@ -28,11 +26,6 @@ struct hw_pci {
void (*postinit)(void);
u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
- resource_size_t (*align_resource)(struct pci_dev *dev,
- const struct resource *res,
- resource_size_t start,
- resource_size_t size,
- resource_size_t align);
};
/*
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index eecec16aa708..e7ef2b5bea9c 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -394,8 +394,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return irq;
}
-static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
- int io_optional)
+static int pcibios_init_resource(int busnr, struct pci_sys_data *sys)
{
int ret;
struct resource_entry *window;
@@ -405,14 +404,6 @@ static int pcibios_init_resource(int busnr, struct pci_sys_data *sys,
&iomem_resource, sys->mem_offset);
}
- /*
- * If a platform says I/O port support is optional, we don't add
- * the default I/O space. The platform is responsible for adding
- * any I/O space it needs.
- */
- if (io_optional)
- return 0;
-
resource_list_for_each_entry(window, &sys->resources)
if (resource_type(window->res) == IORESOURCE_IO)
return 0;
@@ -462,7 +453,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
if (ret > 0) {
- ret = pcibios_init_resource(nr, sys, hw->io_optional);
+ ret = pcibios_init_resource(nr, sys);
if (ret) {
pci_free_host_bridge(bridge);
break;
@@ -480,9 +471,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
bridge->sysdata = sys;
bridge->busnr = sys->busnr;
bridge->ops = hw->ops;
- bridge->msi = hw->msi_ctrl;
- bridge->align_resource =
- hw->align_resource;
ret = pci_scan_root_bus_bridge(bridge);
}
--
2.26.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM/PCI: Remove unused fields from struct hw_pci
2020-09-16 10:30 ` [PATCH v2] ARM/PCI: Remove unused fields " Lorenzo Pieralisi
@ 2020-09-17 15:09 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-09-17 15:09 UTC (permalink / raw)
To: Lorenzo Pieralisi; +Cc: PCI, linux-arm-kernel, Russell King
On Wed, Sep 16, 2020 at 4:30 AM Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
>
> The msi_ctrl, io_optional and align_resource fields in struct hw_pci are
> currently unused by arm/mach PCI host controller drivers and we won't
> be adding any new users.
>
> Remove them and related code.
>
> Link: https://lore.kernel.org/r/20200904141607.4066-1-lorenzo.pieralisi@arm.com
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Russell King <linux@armlinux.org.uk>
> ---
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-17 15:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 14:16 [PATCH] ARM/PCI: Remove struct msi_controller from struct hw_pci Lorenzo Pieralisi
2020-09-04 19:08 ` Rob Herring
2020-09-16 10:30 ` [PATCH v2] ARM/PCI: Remove unused fields " Lorenzo Pieralisi
2020-09-17 15:09 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).