History log of /linux-master/arch/mips/pci/pci-ip27.c
Revision Date Author Comments
# 4bfb53e7 21-Sep-2023 Jiaxun Yang <jiaxun.yang@flygoat.com>

mips: add <asm-generic/io.h> including

With the adding, some default ioremap_xx methods defined in
asm-generic/io.h can be used. E.g the default ioremap_uc() returning
NULL.

We also massaged various headers to avoid nested includes.

Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
[jiaxun.yang@flygoat.com: Massage more headers, fix ioport defines]
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# b78e9d63 09-Jan-2020 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff

By including agent.h where hub related defines/structs are needed, we
have only one place to select, which agent chip (HUB or BEDROCK) is used.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# a8d0f11e 15-Oct-2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: SGI-IP27: Enable ethernet phy on second Origin 200 module

PROM only enables ethernet PHY on first Origin 200 module, so we must
do it ourselves for the second module.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-serial@vger.kernel.org


# b9e9defb 23-Oct-2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: PCI: make phys_to_dma/dma_to_phys for pci-xtalk-bridge common

All platforms using pci-xtalk-bridge can share common phys_to_dma/
dma_to_phys function. So we move it form ip27 specific file to
pci-xtalk-bridge.c

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# a57140e9 07-May-2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: SGI-IP27: use generic PCI driver

Converted bridge code to a platform driver using the PCI generic driver
framework and use adding platform devices during xtalk scan. This allows
easier sharing bridge driver for other SGI platforms like IP30 (Octane) and
IP35 (Origin 3k, Fuel, Tezro).

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
[paul.burton@mips.com:
- Leave __phys_to_dma(), __dma_to_phys() & pcibus_to_node() in
arch/mips/pci/pci-ip27.c since the motivation for moving them
disappeared when the driver stopped being moved to drivers/pci.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# 69a07a41 19-Feb-2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: SGI-IP27: rework HUB interrupts

This commit rearranges the HUB interrupt code by using MIPS_IRQ_CPU
interrupt handling code and modern Linux IRQ framework features to get
rid of global arrays. It also adds support for irq affinity setting.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# a44d924c 19-Feb-2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>

MIPS: SGI-IP27: clean up bridge access and header files

Introduced bridge_read/bridge_write/bridge_set/bridge_clr for accessing
bridge register and get rid of volatile declarations. Also removed
all typedefs from arch/mips/include/asm/pci/bridge.h and cleaned up
language in arch/mips/pci/ops-bridge.c

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# ff404a93 01-Jan-2015 Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

arch: mips: pci: pci-ip27.c: Remove unused function

Remove the function pci_enable_swapping() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Patchwork: https://patchwork.linux-mips.org/patch/8867/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org


# 54aed4dd 15-Jun-2018 Christoph Hellwig <hch@lst.de>

MIPS: IP27: use dma_direct_ops

IP27 is coherent and has a reasonably direct mapping, just with a little
per-bus offset added into the dma address.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Patchwork: https://patchwork.linux-mips.org/patch/19542/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: iommu@lists.linux-foundation.org
Cc: linux-mips@linux-mips.org


# 3b2663ca 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

mips: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6320/


# 078a55fc 18-Jun-2013 Paul Gortmaker <paul.gortmaker@windriver.com>

MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code

commit 3747069b25e419f6b51395f48127e9812abc3596 upstream.

The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
and are flagged as __cpuinit -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings. In any case, they are temporary and harmless.

Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
from asm files. MIPS is interesting in this respect, because there
are also uasm users hiding behind their own renamed versions of the
__cpuinit macros.

[1] https://lkml.org/lkml/2013/5/20/589

[ralf@linux-mips.org: Folded in Paul's followup fix.]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5494/
Patchwork: https://patchwork.linux-mips.org/patch/5495/
Patchwork: https://patchwork.linux-mips.org/patch/5509/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 4f675e8a 13-Jun-2013 Ralf Baechle <ralf@linux-mips.org>

MIPS: IP27: Fix build error if CONFIG_PCI=y and CONFIG_NUMA disabled.

Then <asm-generic/topology.h> will define cpp macro as default definition
for pcibus_to_node resulting in:

CC arch/mips/pci/pci-ip27.o
arch/mips/pci/pci-ip27.c:220:7: error: expected identifier or ‘(’ before ‘void’
arch/mips/pci/pci-ip27.c:220:12: error: expected ‘)’ before ‘(’ token
make[1]: *** [arch/mips/pci/pci-ip27.o] Error 1

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 70342287 21-Jan-2013 Ralf Baechle <ralf@linux-mips.org>

MIPS: Whitespace cleanup.

Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 28eb0e46 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

MIPS: drivers: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 85a053fa 18-Jul-2012 Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

MIPS: PCI: Move fixups from __init to __devinit.

Fixups are executed once the pci-device is found which is during boot
process so __init seems fine as long as the platform does not support
hotplug.
However it is possible to remove the PCI bus at run time and have it
rediscovered again via "echo 1 > /sys/bus/pci/rescan" and this will call
the fixups again.

[ralf@linux-mips.org: Made piixirqmap[] in malta_piix_func0_fixup()
__initdata.]

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: linux-mips@linux-mips.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 29090606 23-Feb-2012 Bjorn Helgaas <bhelgaas@google.com>

mips/PCI: replace pci_probe_only with pci_flags

Some architectures (alpha, mips, powerpc) have an arch-specific
"pci_probe_only" flag. Others use PCI_PROBE_ONLY in pci_flags for
the same purpose. This moves mips to the pci_flags approach so
generic code can use the same test across all architectures.

CC: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# cae39d13 28-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

mips: add export.h to files using EXPORT_SYMBOL/THIS_MODULE

Or else we get lots of variations on this:

arch/mips/pci/pci.c:330: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

scattered throughout the build.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>


# 631330f5 19-Jun-2009 Ralf Baechle <ralf@linux-mips.org>

MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.

Some of the were relying into smp.h being dragged in by another header
which of course is fragile. <asm/cpu-info.h> uses smp_processor_id()
only in macros and including smp.h there leads to an include loop, so
don't change cpu-info.h.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 30d546da 09-Dec-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PCI: mips: use generic pci_swizzle_interrupt_pin()

Use the generic pci_swizzle_interrupt_pin() instead of arch-specific code.

Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# f4d15f1c 27-Sep-2008 Ralf Baechle <ralf@linux-mips.org>

[MIPS] IP27: Switch to dynamic interrupt routing avoding panic on error.

pcibios_map_irq is no way of returning an error but on IP27 an interrupt
is possibly not routable when running out of resources. So do the
interrupt routing at pcibios_enable_device time.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# a571444a 05-Aug-2008 Ralf Baechle <ralf@linux-mips.org>

[MIPS] IP27: Export symbol pcibus_to_node to modules.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# af3e69cf 03-Jul-2008 Atsushi Nemoto <anemo@mba.ocn.ne.jp>

[MIPS] Declare some pci variables in header file

Declare pci_probe_only, etc. in asm-mips/pci.h file. This will fix
some sparse warnings.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 96173a6c 17-Apr-2008 Thomas Bogendoerfer <tsbogend@alpha.franken.de>

[MIPS] IP27: misc fixes

- fix PCI interrupt assignment by emulating ioc3 interrupt pin register
- use pci_probe_only mode
- select correct page size in bridge
- remove no longer needed ioc3_sio_init() code

[Ralf: Fix for 64kB or larger pagesizes]

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 234fcd14 08-Mar-2008 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Fix loads of section missmatches

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 19df0d11 10-Jul-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] PCI: Make dev pointer argument of pcibios_map_irq const.

This is to break the code of people who think they are supposed to scribble
into the pci device structure - it's off limits.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# da79e827 06-Sep-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] IP27: Delete useless declaration of allocate_irqno().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 9e0c7afd 16-Jun-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] IP27: Extract pci_ops into separate file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 3a115456 16-Jun-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] IP27: Use symbolic constants instead of magic numbers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# a3dddd56 11-Mar-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] War on whitespace: cleanup initial spaces followed by tabs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 9dbdfce8 15-Sep-2005 Ralf Baechle <ralf@linux-mips.org>

Define pcibus_to_node() for IP27.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!