Message ID | 20190507210917.4691-2-tbogendoerfer@suse.de (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | MIPS: SGI-IP27 rework part2 | expand |
On Tue, May 07, 2019 at 11:09:13PM +0200, Thomas Bogendoerfer wrote: > Code in pci-ip27.c will be moved to drivers/pci/controller therefore > platform specific needs to be extracted and put to the right place. I thogh the drivers/pci/controller was nixed by Lorenzo?
On Tue, 7 May 2019 23:18:15 -0700 Christoph Hellwig <hch@infradead.org> wrote: > On Tue, May 07, 2019 at 11:09:13PM +0200, Thomas Bogendoerfer wrote: > > Code in pci-ip27.c will be moved to drivers/pci/controller therefore > > platform specific needs to be extracted and put to the right place. > > I thogh the drivers/pci/controller was nixed by Lorenzo? yes, I missed this. Paul should I respin ? Thomas.
Hi Thomas, On Wed, May 08, 2019 at 09:52:39AM +0200, Thomas Bogendoerfer wrote: > On Tue, 7 May 2019 23:18:15 -0700 > Christoph Hellwig <hch@infradead.org> wrote: > > > On Tue, May 07, 2019 at 11:09:13PM +0200, Thomas Bogendoerfer wrote: > > > Code in pci-ip27.c will be moved to drivers/pci/controller therefore > > > platform specific needs to be extracted and put to the right place. > > > > I thogh the drivers/pci/controller was nixed by Lorenzo? > > yes, I missed this. Paul should I respin ? No, I've basically dropped this patch whilst applying patches 2 & 3. Could you check that mips-next looks good? I checked that ip27_defconfig builds but don't have any way to run it. Thanks, Paul
On Thu, 9 May 2019 23:54:46 +0000 Paul Burton <paul.burton@mips.com> wrote: > Hi Thomas, > > On Wed, May 08, 2019 at 09:52:39AM +0200, Thomas Bogendoerfer wrote: > > On Tue, 7 May 2019 23:18:15 -0700 > > Christoph Hellwig <hch@infradead.org> wrote: > > > > > On Tue, May 07, 2019 at 11:09:13PM +0200, Thomas Bogendoerfer wrote: > > > > Code in pci-ip27.c will be moved to drivers/pci/controller therefore > > > > platform specific needs to be extracted and put to the right place. > > > > > > I thogh the drivers/pci/controller was nixed by Lorenzo? > > > > yes, I missed this. Paul should I respin ? > > No, I've basically dropped this patch whilst applying patches 2 & 3. > Could you check that mips-next looks good? I checked that ip27_defconfig > builds but don't have any way to run it. tested on the dual module O200 and it runs as expected. Thank you Thomas.
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index 3c177b4d0609..0b0f9c4eaf04 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c @@ -164,19 +164,6 @@ int pcibios_plat_dev_init(struct pci_dev *dev) return 0; } -dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr) -{ - struct pci_dev *pdev = to_pci_dev(dev); - struct bridge_controller *bc = BRIDGE_CONTROLLER(pdev->bus); - - return bc->baddr + paddr; -} - -phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) -{ - return dma_addr & ~(0xffUL << 56); -} - /* * Device might live on a subordinate PCI bus. XXX Walk up the chain of buses * to find the slot number in sense of the bridge device register. @@ -200,15 +187,5 @@ static void pci_fixup_ioc3(struct pci_dev *d) pci_disable_swapping(d); } -#ifdef CONFIG_NUMA -int pcibus_to_node(struct pci_bus *bus) -{ - struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); - - return bc->nasid; -} -EXPORT_SYMBOL(pcibus_to_node); -#endif /* CONFIG_NUMA */ - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3, pci_fixup_ioc3); diff --git a/arch/mips/sgi-ip27/Makefile b/arch/mips/sgi-ip27/Makefile index 27c14ede191e..f9694f2b20b1 100644 --- a/arch/mips/sgi-ip27/Makefile +++ b/arch/mips/sgi-ip27/Makefile @@ -3,8 +3,8 @@ # Makefile for the IP27 specific kernel interface routines under Linux. # -obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o \ - ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o \ +obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o ip27-klnuma.o \ + ip27-memory.o ip27-nmi.o ip27-pci.o ip27-reset.o ip27-timer.o \ ip27-hubio.o ip27-xtalk.o obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o diff --git a/arch/mips/sgi-ip27/ip27-pci.c b/arch/mips/sgi-ip27/ip27-pci.c new file mode 100644 index 000000000000..d3efa5fbe8a3 --- /dev/null +++ b/arch/mips/sgi-ip27/ip27-pci.c @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ip27-pci.c: misc PCI related helper code for IP27 architecture + */ + +#include <asm/pci/bridge.h> + +dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr) +{ + struct pci_dev *pdev = to_pci_dev(dev); + struct bridge_controller *bc = BRIDGE_CONTROLLER(pdev->bus); + + return bc->baddr + paddr; +} + +phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) +{ + return dma_addr & ~(0xffUL << 56); +} + +#ifdef CONFIG_NUMA +int pcibus_to_node(struct pci_bus *bus) +{ + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); + + return bc->nasid; +} +EXPORT_SYMBOL(pcibus_to_node); +#endif /* CONFIG_NUMA */ +
Code in pci-ip27.c will be moved to drivers/pci/controller therefore platform specific needs to be extracted and put to the right place. Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> --- arch/mips/pci/pci-ip27.c | 23 ----------------------- arch/mips/sgi-ip27/Makefile | 4 ++-- arch/mips/sgi-ip27/ip27-pci.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 25 deletions(-) create mode 100644 arch/mips/sgi-ip27/ip27-pci.c