diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2012-03-11 06:17:49 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2012-03-11 06:17:49 +0000 |
commit | dc4ee6ca91929036d4a954bfb58195f9908610d6 (patch) | |
tree | af4d9dcf90392eaadc4a3c38e945d006122e33c9 /sys/mips/cavium/octopci.c | |
parent | 47c022f2abd188b996d7687c7dafde6b12422f95 (diff) | |
parent | f8b73ad2e16934621a86fd1fd67b46aa21521d0b (diff) |
Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to
make use of it where possible.
This primarily brings in support for newer hardware, and FreeBSD is not yet
able to support the abundance of IRQs on new hardware and many features in the
Ethernet driver.
Because of the changes to IRQs in the Simple Executive, we have to maintain our
own list of Octeon IRQs now, which probably can be pared-down and be specific
to the CIU interrupt unit soon, and when other interrupt mechanisms are added
they can maintain their own definitions.
Remove unmasking of interrupts from within the UART device now that the
function used is no longer present in the Simple Executive. The unmasking
seems to have been gratuitous as this is more properly handled by the buses
above the UART device, and seems to work on that basis.
Notes
Notes:
svn path=/head/; revision=232812
Diffstat (limited to 'sys/mips/cavium/octopci.c')
-rw-r--r-- | sys/mips/cavium/octopci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/mips/cavium/octopci.c b/sys/mips/cavium/octopci.c index 392aed83004a..e9d5b6f25cde 100644 --- a/sys/mips/cavium/octopci.c +++ b/sys/mips/cavium/octopci.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include <machine/pmap.h> #include <contrib/octeon-sdk/cvmx.h> -#include <contrib/octeon-sdk/cvmx-interrupt.h> +#include <mips/cavium/octeon_irq.h> #include <contrib/octeon-sdk/cvmx-pcie.h> #include <dev/pci/pcireg.h> @@ -424,7 +424,7 @@ octopci_route_interrupt(device_t dev, device_t child, int pin) sc = device_get_softc(dev); if (octeon_has_feature(OCTEON_FEATURE_PCIE)) - return (CVMX_IRQ_PCI_INT0 + pin - 1); + return (OCTEON_IRQ_PCI_INT0 + pin - 1); bus = pci_get_bus(child); slot = pci_get_slot(child); @@ -435,7 +435,7 @@ octopci_route_interrupt(device_t dev, device_t child, int pin) */ #if defined(OCTEON_BOARD_CAPK_0100ND) if (bus == 0 && slot == 12 && func == 0) - return (CVMX_IRQ_PCI_INT2); + return (OCTEON_IRQ_PCI_INT2); #endif /* @@ -444,14 +444,14 @@ octopci_route_interrupt(device_t dev, device_t child, int pin) switch (cvmx_sysinfo_get()->board_type) { #if defined(OCTEON_VENDOR_LANNER) case CVMX_BOARD_TYPE_CUST_LANNER_MR955: - return (CVMX_IRQ_PCI_INT0 + pin - 1); + return (OCTEON_IRQ_PCI_INT0 + pin - 1); case CVMX_BOARD_TYPE_CUST_LANNER_MR320: if (slot < 32) { if (slot == 3 || slot == 9) irq = pin; else irq = pin - 1; - return (CVMX_IRQ_PCI_INT0 + (irq & 3)); + return (OCTEON_IRQ_PCI_INT0 + (irq & 3)); } break; #endif @@ -461,7 +461,7 @@ octopci_route_interrupt(device_t dev, device_t child, int pin) irq = slot + pin - 3; - return (CVMX_IRQ_PCI_INT0 + (irq & 3)); + return (OCTEON_IRQ_PCI_INT0 + (irq & 3)); } static unsigned |