aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/siba
Commit message (Collapse)AuthorAgeFilesLines
* bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.Landon J. Fuller2018-02-055-4800/+0
| | | | | | | | | | | | | - Remove the shim interface that allowed bwn(4) to use either siba_bwn or bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents. - Drop the legay, now-unused siba_bwn bus driver. - Clean up bhnd(4) board flag defines referenced by bwn(4). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13518 Notes: svn path=/head/; revision=328912
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-275-0/+10
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Switch mips/sentry5 to bhnd(4), and unify with mips/broadcomLandon J. Fuller2016-06-044-1278/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now that bhnd(4) provides feature parity with the previous siba/mips implementation, we can switch sentry5 over and begin lifting common support code out for use across bhnd(4) embedded targets. Changes: - Fixed enumeration of siba(4) per-core address maps, required for discovery of memory mapped chipc flash region on siba(4) devices. - Simplified bhnd kernel configuration (dropped 'bhndbus' option). - Replaced files.broadcom's direct file references with their corresponding standard kernel options. - Lifted out common bcma/siba nexus support, inheriting from the new generic bhnd_nexus driver. - Dropped now-unused sentry5 siba code. - Re-integrated BCM into the universe build now that it actually compiles. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6712 Notes: svn path=/head/; revision=301410
* [siba] use the generic bus methods where appropriate.Adrian Chadd2016-05-261-38/+6
| | | | | | | | Submitted by: jhibbits Differential Revision: https://reviews.freebsd.org/D802 Notes: svn path=/head/; revision=300760
* [siba] update device ids.Adrian Chadd2016-05-231-2/+2
| | | | | | | | | Tested: * BCM4322 11abgn, STA mode Notes: svn path=/head/; revision=300474
* [siba] use consistent naming.Adrian Chadd2016-05-192-19/+19
| | | | Notes: svn path=/head/; revision=300185
* [siba] implement PMU behaviour for chips with a separate PMU module.Adrian Chadd2016-05-191-2/+30
| | | | | | | | | | | | | | | | * PMU controls the clock setup * Correctly set idle low power handling * Use a hard-coded powerup delay for some of the newer hardware (including the BCM4322, which I've tested with.) Tested: * BCM4322, 2G + 5G STA mode Obtained from: Linux b43 (PMU behaviour) Notes: svn path=/head/; revision=300184
* [siba] handle the PMU resource setup/init for 0x4322 series chips.Adrian Chadd2016-05-191-0/+11
| | | | | | | | | Tested (with other changes): * BCM4322 11abgn device, chip id 0x4322. Notes: svn path=/head/; revision=300183
* [siba] fix up some comments and debug output.Adrian Chadd2016-05-191-1/+4
| | | | Notes: svn path=/head/; revision=300182
* [siba] add DMA debugging section, for changes later on to DMA addressing.Adrian Chadd2016-05-191-0/+1
| | | | Notes: svn path=/head/; revision=300181
* [siba] fix incorrect SPROM offsets.Adrian Chadd2016-05-181-4/+4
| | | | | | | All my fault. Notes: svn path=/head/; revision=300128
* [siba] use the correct SPROM offsets.Adrian Chadd2016-05-181-10/+10
| | | | | | | | | | | | | | I transcribed the linux ssb offsets and .. didn't pick up that our SIBA SPROM code has an offset of 0x1000. This fixes a bunch of odd parsing values that showed up when I tried using a newer NIC. The NIC still doesn't yet work but now the SPROM values are right. Oops! Notes: svn path=/head/; revision=300125
* [siba] fix up debugging.Adrian Chadd2016-05-161-7/+9
| | | | | | | | | | | | | | | | | * unbreak non-debug builds - don't default to debugging SCAN; that was left-over from my testing. * include opt_siba.h, now that it's generated as appropriate. * stick the debug enum outside the debug block, just so it's there for any code that wants to set siba_debug for some reason (like say, my debugging muckup.) * make DPRINTF() use __VA_ARGS__ for formatting too, so it correctly handles printing w/ no args. * Make DPRINTF() use device_printf(). Sponsored by: Palm Springs Notes: svn path=/head/; revision=299975
* [siba] make the debug code somewhat useful again.Adrian Chadd2016-05-162-1/+5
| | | | | | | | | It's still not configurable by a kernel option; that'll come next. Sponsored by: Palm Springs Notes: svn path=/head/; revision=299969
* [siba] add more MCS tx power offset decoding.Adrian Chadd2016-05-123-0/+69
| | | | | | | | | This is required by the bwn(4) N-PHY support. Obtained from: Linux ssb (definitions) Notes: svn path=/head/; revision=299541
* [siba] add TX power index entry parsing.Adrian Chadd2016-05-123-0/+155
| | | | | | | | | This is required by the bwn(4) N-PHY support. Obtained from: Linux ssb (definitions) Notes: svn path=/head/; revision=299538
* [siba] add extra methods for chipcommon access and PLL configuration.Adrian Chadd2016-05-123-0/+131
| | | | | | | | | This is needed by the PHY-N bwn(4) support. Obtained from: Linux b43 (definitions) Notes: svn path=/head/; revision=299534
* [siba] add r4 and r8 sprom formats for core_pwr_info.Adrian Chadd2016-05-114-2/+180
| | | | | | | | | | The upcoming bwn(4) N-PHY support requires this (among other things that are (hopefully) upcoming.) Obtained from: Linux ssb (definitions) Notes: svn path=/head/; revision=299409
* [siba] migrate siba.c to siba_mips.cAdrian Chadd2016-05-101-0/+0
| | | | | | | | | | | | | | | | Turns out that ye olde siba.c is /just/ the siba mips code (used by the initial SENTRY5 port. However, I don't think it was ever finished enough to be useful, and I do have this nagging feeling that we'll eventually replace it with the bhnd code. But, since bhnd(4) introduced siba.c too, we ended up with a source file name clash, and that broke the SENTRY5 build. It /looks/ like this is the only place siba.c / device siba is used. Notes: svn path=/head/; revision=299316
* [siba] add 2GHz/5GHz FEM parameter fetching and accessor methods.Adrian Chadd2016-05-092-1/+87
| | | | | | | This is used by the bwn(4) PHY-N code that I'm working on. Notes: svn path=/head/; revision=299248
* [siba] add FEM variables from the r8 SPROM layout.Adrian Chadd2016-05-091-0/+7
| | | | | | | | | | This will eventually be used the bwn(4) N-PHY code that I'm (slowly) writing. Obtained from: Linux b43 Notes: svn path=/head/; revision=299247
* sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni2016-04-261-2/+2
| | | | | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
* siba(4): remove slightly used 'bound' variable.Pedro F. Giffuni2016-04-211-7/+4
| | | | | | | | | It can be replaced with nitems(). While here simplify the function Suggested by: jhb Notes: svn path=/head/; revision=298409
* Fix the resource_list_print_type() calls to use uintmax_t.Justin Hibbits2016-03-221-2/+2
| | | | | | | Missed a bunch from r297000. Notes: svn path=/head/; revision=297199
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.Justin Hibbits2016-02-201-1/+1
| | | | | | | | | | | | | | This simplifies checking for default resource range for bus_alloc_resource(), and improves readability. This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t. Discussed with: jhb Suggested by: marcel Notes: svn path=/head/; revision=295832
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-273-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* Remove some unused variables.Christian Brueffer2014-05-161-2/+0
| | | | | | | | Found with: Clang Static Analyzer MFC after: 2 weeks Notes: svn path=/head/; revision=266270
* Include necessary headers that now are available due to pollutionGleb Smirnoff2013-10-282-0/+2
| | | | | | | | | | via if_var.h. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257241
* Expand the set of APIs available for locating PCI capabilities:John Baldwin2012-03-031-0/+18
| | | | | | | | | | | | - pci_find_extcap() is repurposed to be used for fetching PCI-express extended capabilities (PCIZ_* constants in <dev/pci/pcireg.h>). - pci_find_htcap() can be used to locate a specific HyperTransport capability (PCIM_HTCAP_* constants in <dev/pci/pcireg.h>). - Cache the starting location of the PCI-express capability for PCI-express devices in PCI device ivars. Notes: svn path=/head/; revision=232472
* Correct capitalization of "Hz" in user-visible text (manpages, printf(),Gavin Atkinson2012-02-281-1/+1
| | | | | | | | | etc). MFC after: 3 days Notes: svn path=/head/; revision=232250
* Rename device_delete_all_children() into device_delete_children().Hans Petter Selasky2011-11-221-1/+1
| | | | | | | | Suggested by: jhb @ and marius @ MFC after: 1 week Notes: svn path=/head/; revision=227849
* s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mentionMarius Strobl2011-11-223-3/+3
| | | | | | | of kobj(9) from device drivers. Notes: svn path=/head/; revision=227848
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-2/+1
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=227843
* Move the device_delete_all_children() function from usb_util.cHans Petter Selasky2011-11-191-10/+2
| | | | | | | | | | | to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children(). MFC after: 1 week Notes: svn path=/head/; revision=227701
* Properly free resources in case of an error.Christian Brueffer2011-10-151-0/+1
| | | | | | | | | CID: 4222 Found with: Coverity Prevent(tm) MFC after: 1 week Notes: svn path=/head/; revision=226406
* Fix an infinite loop in siba_bwn_suspend().Christian Brueffer2011-10-081-1/+1
| | | | | | | | | CID: 3536 Found with: Coverity Prevent(tm) MFC after: 1 week Notes: svn path=/head/; revision=226149
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls toJohn Baldwin2011-03-231-1/+1
| | | | | | | pci_find_cap() instead. Notes: svn path=/head/; revision=219902
* Fix double ;;Kevin Lo2010-12-061-1/+1
| | | | Notes: svn path=/head/; revision=216227
* bus_add_child: change type of order parameter to u_intAndriy Gapon2010-09-101-2/+2
| | | | | | | | | | | | | This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds. Followup to: r212213 MFC after: 10 days Notes: svn path=/head/; revision=212413
* Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug andAndrew Thompson2010-03-111-4/+6
| | | | | | | non-debug cases. Notes: svn path=/head/; revision=205003
* fixes a compile error if INVARIANTS is disabled.Weongyo Jeong2010-03-111-4/+4
| | | | | | | | Pointy hat to: me Submitted by: Michael Butler <imb at protected-networks dot net> Notes: svn path=/head/; revision=204992
* uses KOBJMETHOD_END macro to indicate the end of method table.Weongyo Jeong2010-03-094-4/+4
| | | | | | | Submitted by: yongari Notes: svn path=/head/; revision=204923
* o uses bus accessor macros to read values from ivar so no more valuesWeongyo Jeong2010-03-093-120/+846
| | | | | | | | | | | | | | are referenced directly from ivar pointer. It's to do like what other buses do. [1] o changes exported prototypes. It doesn't use struct siba_* structures anymore that instead of it it uses only device_t. o removes duplicate code and debug messages. o style(9) Pointed out by: imp [1] Notes: svn path=/head/; revision=204922
* fixes an attached-at-boot issue that bwn(4) using device_identifyWeongyo Jeong2010-03-032-61/+12
| | | | | | | | | | interface didn't be attached automatically at boot time so changes a approach to attach children based on leveraging some newbus niceties. Submitted by: nwhitehorn Notes: svn path=/head/; revision=204657
* supports SPROM rev8 informations properly which are used to supportWeongyo Jeong2010-02-163-8/+212
| | | | | | | low-power PHY of bwn(4) and LDO voltage adjustments. Notes: svn path=/head/; revision=203944
* Adds siba_bwn module which is used with bwn(4). Main purpose of thisWeongyo Jeong2010-01-318-157/+3153
| | | | | | | | module is to distinguish parts of Silicon Backplane and of Broadcom Wireless. Notes: svn path=/head/; revision=203319
* This was somehow copied to the wrong place :(. Remove the spare copy.Warner Losh2010-01-118-1613/+0
| | | | Notes: svn path=/head/; revision=202057
* Move this to the right location. Grump.Warner Losh2010-01-111-0/+0
| | | | Notes: svn path=/head/; revision=202056
* Merge from projects/mips to head by hand:Warner Losh2010-01-109-0/+1767
|\ | | | | | | | | | | | | | | Merge the siba bus device. This was moved from mips to dev because siba bus can be in other architectures, like ARM. Notes: svn path=/head/; revision=201978