summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium
Commit message (Collapse)AuthorAgeFilesLines
* The GPIO drivers were initialising their mutexes with type ofrpaulo2012-08-171-2/+1
| | | | | MTX_NETWORK_LOCK. This is wrong since these mutexes have nothing to do with networking.
* octeon_uart_class was removed some time ago everywhere but here.imp2012-06-281-3/+0
|
* Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.jmallett2012-03-291-1/+1
| | | | | | | | | | | | | | | This makes our naming scheme more closely match other systems and the expectations of much third-party software. MIPS builds which are little-endian should require and exhibit no changes. Big-endian TARGET_ARCHes must be changed: From: To: mipseb mips mipsn32eb mipsn32 mips64eb mips64 An entry has been added to UPDATING and some foot-shooting protection (complete with warnings which should become errors in the near future) to the top-level base system Makefile.
* Turn on messages from the Simple Executive codebase, what few there are.jmallett2012-03-291-0/+3
|
* Remap PMC interrupt for all coresgonzo2012-03-243-11/+12
|
* Add pseudo-device for handling PMC interrupts and link everythinggonzo2012-03-232-0/+145
| | | | PMC-related to build
* Setup fake MODINFO variables for octeon kernelgonzo2012-03-231-0/+2
|
* o) Don't keep drive parameters in a global, put them in the softc.jmallett2012-03-211-60/+52
| | | | | o) Don't report a bogus stripesize. o) Eliminate a nearby gratuitous "proxy" indirection.
* Disable the Simple Executive's error decoding/reporting code.jmallett2012-03-111-20/+0
|
* Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD tojmallett2012-03-1117-67/+255
| | | | | | | | | | | | | | | | | | 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.
* Fix promiscuous mode with if_octm:jmallett2012-03-111-11/+18
| | | | | | | | | | | o) The MAC set must occur before the multicast list is set up as the former will enable the CAM unconditionally, while promiscuous mode disables it, so if promiscuous mode is to be set this must occur after the MAC is programmed. o) The multicast list must be set up unconditionally as even if flags have not changed, if the interface has gone through a reinitialization, the state of the CAM as changed by the MAC initialization could be incorrect. o) Call octm_init when flags change, even if the interface is already running.
* When creating a handle for a subregion, be sure to actually math out the newjmallett2012-03-021-5/+4
| | | | | | | | handle address, where we're using handles as raw addresses. This fixes devices with subregions on Octeon PCI specifically, and likely also on MIPS more generally, where there isn't another bus_space in use that was doing the math already.
* Unbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo intojmallett2012-03-021-0/+1
| | | | sysinfo. This should have been done as part of replacing bootinfo with sysinfo.
* Revert part of old logic of assigning MAC addressess:gonzo2012-02-293-16/+34
| | | | | | | | - Reserver respective number of addresses for managment port - octm uses base address directly - other drivers get MACs on "first come first served" basis Reviewed by: juli
* Refctor address assignment for Octeon's ethernet ports:gonzo2012-02-229-52/+71
| | | | | | | | - Centralize address assignment - Make sure managment ports get first MAC address in pool - Properly propagate fail if address allocation failed Submitted by: Andrew Duane <aduane@juniper.net>
* We use port_index field of struct octusb_qh to reference USB stategonzo2012-01-202-16/+25
| | | | | | | | | of root HUB. Although it is initialized with port index of the device's parent hub, which is worng. So track the USB tree up to root HUB and initialize this filed ptroprly Rename port_index to root_port_index in order to reflect its real semantics.
* - Add better COP2 (crypto coprocessor) context handler for Octeon. Keepgonzo2012-01-064-86/+437
| | | | | COP2 disabled and lazily allocate COP2 context structure in exception handler. Keep kernel and userland contexts separated.
* - Octeon-SDK strictly requires multi_count to be zero forgonzo2012-01-031-1/+1
| | | | full and low speed devices.
* - Properly set IRQ handlers for all USB portsgonzo2012-01-012-37/+47
|
* - struct clocktime sets different ranges for DOW and monthgonzo2011-12-311-10/+17
| | | | | | | comparing to struct timeval. for clocktime they should be 1..7 and 1..12 respectively - CAPK-0100ND uses RTC without centruy bit (DS1307) so set it 21st
* - Pass proper endpoint number (without direction flag) togonzo2011-12-311-1/+1
| | | | cvmx_usb_open_pipe
* - Add generic GPIO driver for Cavium Octeon. At the moment pin definition isgonzo2011-12-283-0/+551
| | | | hardcoded but will be changed later with more flexible way to define them.
* - Initialize compact_flash_attribute_base_addr from bootinfo structuregonzo2011-12-241-0/+2
|
* - Set CF physical address base in sysinfo structuregonzo2011-12-231-0/+2
|
* Unbreak the OCTEON1 kernel build after r228483 removing the left overbz2011-12-171-1/+0
| | | | | | declaration. MFC after: 11 days
* Implement better support for USB controller suspend and resume.hselasky2011-12-143-25/+31
| | | | | | | | | | This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume. This patch also fixes some build issues in avr32dci.c MFC after: 2 weeks
* - Copy base MAC address from bootinfo descriptor to sysinfo structgonzo2011-11-281-0/+2
| | | | Reviewed by: Andrew Duane
* Rename device_delete_all_children() into device_delete_children().hselasky2011-11-221-1/+1
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* - There's no need to overwrite the default device method with the defaultmarius2011-11-222-6/+2
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Add default address for FLASH mapping on the boot bus.marcel2011-10-041-0/+5
| | | | | | Reviewed by: jmallett, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
* Remove octeon_bootinfo from all files except octeon_machdep.c.marcel2011-10-045-25/+10
| | | | | | | | Use instead cvmx_sysinfo_get() consistently. Reviewed by: jmallett, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
* o Clean up some ID printfs, and put under bootverbosemarcel2011-10-041-8/+17
| | | | | | | | | | | o Remove redundant lookups of base address in cf_identify o Fix some indenting issues o Fix an identification bug that uses DRQ to checlk for ident block returned. The correct spec is to look for BSY to be cleared. Reviewed by: imp, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
* Partially revert r224661:marcel2011-10-042-6/+5
| | | | | | | | | octeon_ap_boot is not a bitmask. It holds the CPU Id of the AP currently being started. As such there's no need to make it a 64-bit integral and we're not limited to 64 CPUs. Reported by: jmallet Obtained from: Andre Duane
* Make octeon_ap_boot 64 bits to handle MAXCPU up to 64.marcel2011-08-052-12/+26
| | | | | | | | | | Better construction of CPU mask in platform_cpu_mask(). Release cores still in reset when platform_start_ap() is called. Reviewed by: imp, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane Approved by: re (kib)
* MFCattilio2011-06-041-137/+194
|\
| * Add support for True IDE mode to the Octeon CF driver. This mode isimp2011-06-041-137/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | signalled when the attribute address for the CF is 0 in the octeon sysinfo structure. In this mode, the DATA port is 16-bits, but the other ports are 8-bits, but on a 16-bit bus (so you have to access it a short at a time, but only believe the lower byte). See the code for more details on this slightly odd arrangement. I'm still not 100% happy with the abstractions here on many levels (starting with the globals for these settings, on down to no bus_space use, etc), but the driver had these problems before the change. Also, clean up the code a bit to make this support easier, and the code a bit easier to read. I tried to follow existing style, but may have missed a few spots. Add some comments. Fix probe/attach routine to return a proper error for the simulator. With this change, my EBH5200 eval board now recognizes the CF well enough to boot to the login prompt. Before it would say it never became ready. My CN3010-EVB-HS5 still boots properly. My older CN3860-based board won't load the 64-bit kernel, either before or after the change, and I didn't chase that down.
* | Fix a brain-o in platform_cpu_mask() by just specifying a possibleattilio2011-05-131-6/+4
| | | | | | | | | | | | | | cpuset_t to be copied, rather than return the array. I can't rely anymore on this being a simple int/long object. Reported by: art
* | Add the cpuset_t conversion for mips.attilio2011-05-131-2/+12
|/
* - Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOPmarius2011-05-031-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE. Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@
* o) Set MAC addresses starting at the MAC base for all management ports, notjmallett2011-03-164-39/+34
| | | | | | | just the MR-730. o) Start MAC addresses for the non-management ports after the management ports. Submitted by: Bhanu Prakash (with modifications)
* o) Tear down receive interrupt on detach.jmallett2011-03-164-7/+7
| | | | Submitted by: Bhanu Prakash
* o) Clean up FPA pools on module unload.jmallett2011-03-162-9/+47
| | | | | | o) Allocate output buffer pool based on available output queues. Submitted by: Bhanu Prakash (with modifications)
* The Lanner MR-730 uses the first two MACs at its MAC base for the 10/100jmallett2011-02-122-4/+37
| | | | | management ports, and gigabit ports start at an offset of 2 from the MAC base.
* Allow the platform code to return a bitmask of running cores rather than justjmallett2011-02-121-3/+3
| | | | | | | | | | | | | | a number of cores, this allows for a sparse set of CPUs. Implement support for sparse core masks on Octeon. XXX jeff@ suggests that all_cpus should include cores that are offline or running other applications/OSes, so the platform API should be further extended to allow us to set all_cpus to include all cores that are physically-present as opposed to only those that are running FreeBSD. Submitted by: Bhanu Prakash (with modifications) Reviewed by: jchandra Glanced at by: kib, jeff, jhb
* If there is no WQE available for a packet that needs segmentation, drop itjmallett2011-01-201-1/+6
| | | | and return.
* Remove some compile-time options from the driver, particularly async IOBDMAjmallett2011-01-204-114/+19
| | | | | support which is unused on FreeBSD and which complicates working on the code now, can easily be added back later by someone determined to use it.
* Fix build by changing format for size_t to %jdgonzo2011-01-201-14/+14
|
* Don't do a device_identify to add uart0, it's already hinted.jmallett2011-01-191-8/+0
| | | | Reported by: imp
* Save the CPU model, the board and the CPU clock rate so they are reported byimp2011-01-171-9/+16
| | | | the approrpiate sysctl.
OpenPOWER on IntegriCloud