summaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
diff options
context:
space:
mode:
authorDavid Daney2011-11-22 15:47:03 +0100
committerRalf Baechle2011-12-07 23:03:29 +0100
commit37d3bfd9927a8c509d31eac1036b2c3c905f8241 (patch)
treecf6db6e3ac5335313f1345829b0c9d3cd94da07e /arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
parentMIPS: Octeon: Update bootloader board type constants. (diff)
downloadkernel-qcow2-linux-37d3bfd9927a8c509d31eac1036b2c3c905f8241.tar.gz
kernel-qcow2-linux-37d3bfd9927a8c509d31eac1036b2c3c905f8241.tar.xz
kernel-qcow2-linux-37d3bfd9927a8c509d31eac1036b2c3c905f8241.zip
MIPS: Octeon: Rearrange CVMX files in preperation for device tree
Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Patchwork: https://patchwork.linux-mips.org/patch/2941/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cavium-octeon/executive/cvmx-helper-spi.c')
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-spi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
index 02a444230ef7..2830e4bdf7f3 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
@@ -51,6 +51,16 @@ void __cvmx_interrupt_stxx_int_msk_enable(int index);
#define CVMX_HELPER_SPI_TIMEOUT 10
#endif
+int __cvmx_helper_spi_enumerate(int interface)
+{
+ if ((cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) &&
+ cvmx_spi4000_is_present(interface)) {
+ return 10;
+ } else {
+ return 16;
+ }
+}
+
/**
* Probe a SPI interface and determine the number of ports
* connected to it. The SPI interface should still be down after