Commit Graph

25 Commits

Author SHA1 Message Date
Adrian Chadd
af8366c448 [siba] use consistent naming. 2016-05-19 04:11:49 +00:00
Adrian Chadd
a2872fec7e [siba] implement PMU behaviour for chips with a separate PMU module.
* 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)
2016-05-19 04:11:00 +00:00
Adrian Chadd
d2dca326c4 [siba] handle the PMU resource setup/init for 0x4322 series chips.
Tested (with other changes):

* BCM4322 11abgn device, chip id 0x4322.
2016-05-19 04:03:41 +00:00
Adrian Chadd
b02b864ef6 [siba] fix up some comments and debug output. 2016-05-19 04:02:13 +00:00
Adrian Chadd
27acc00c5b [siba] add DMA debugging section, for changes later on to DMA addressing. 2016-05-19 04:01:33 +00:00
Adrian Chadd
ad5ba0d73e [siba] fix up debugging.
* 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
2016-05-16 20:22:52 +00:00
Adrian Chadd
3c4efeae16 [siba] make the debug code somewhat useful again.
It's still not configurable by a kernel option; that'll come next.

Sponsored by:	Palm Springs
2016-05-16 19:39:05 +00:00
Adrian Chadd
7deb99d785 [siba] add more MCS tx power offset decoding.
This is required by the bwn(4) N-PHY support.

Obtained from:	Linux ssb (definitions)
2016-05-12 16:14:16 +00:00
Adrian Chadd
98950ba039 [siba] add TX power index entry parsing.
This is required by the bwn(4) N-PHY support.

Obtained from:	Linux ssb (definitions)
2016-05-12 16:01:33 +00:00
Adrian Chadd
a0f943c116 [siba] add extra methods for chipcommon access and PLL configuration.
This is needed by the PHY-N bwn(4) support.

Obtained from:	Linux b43 (definitions)
2016-05-12 15:18:36 +00:00
Adrian Chadd
e426860f64 [siba] add r4 and r8 sprom formats for core_pwr_info.
The upcoming bwn(4) N-PHY support requires this (among other things that
are (hopefully) upcoming.)

Obtained from:	Linux ssb (definitions)
2016-05-11 06:27:46 +00:00
Adrian Chadd
c39790cd22 [siba] add 2GHz/5GHz FEM parameter fetching and accessor methods.
This is used by the bwn(4) PHY-N code that I'm working on.
2016-05-09 06:30:00 +00:00
Pedro F. Giffuni
057b4402bf sys/dev: extend use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
2016-04-26 15:03:15 +00:00
Christian Brueffer
73aa8b9a75 Remove some unused variables.
Found with:	Clang Static Analyzer
MFC after:	2 weeks
2014-05-16 21:19:17 +00:00
Gleb Smirnoff
c3322cb91c Include necessary headers that now are available due to pollution
via if_var.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-28 07:29:16 +00:00
Gavin Atkinson
1748d1e513 Correct capitalization of "Hz" in user-visible text (manpages, printf(),
etc).

MFC after:	3 days
2012-02-28 13:19:34 +00:00
Hans Petter Selasky
3b12bdb58f Rename device_delete_all_children() into device_delete_children().
Suggested by:	jhb @ and marius @
MFC after:	1 week
2011-11-22 21:56:55 +00:00
Hans Petter Selasky
11bcf702f4 Move the device_delete_all_children() function from usb_util.c
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
2011-11-19 10:11:50 +00:00
John Baldwin
3b0a4aef96 Do a sweep of the tree replacing calls to pci_find_extcap() with calls to
pci_find_cap() instead.
2011-03-23 13:10:15 +00:00
Andrew Thompson
5bbc70dde9 Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
non-debug cases.
2010-03-11 08:03:56 +00:00
Weongyo Jeong
8833bb3072 fixes a compile error if INVARIANTS is disabled.
Pointy hat to:	me
Submitted by:	Michael Butler <imb at protected-networks dot net>
2010-03-11 01:35:38 +00:00
Weongyo Jeong
b9b64aa5b2 o uses bus accessor macros to read values from ivar so no more values
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]
2010-03-09 19:58:00 +00:00
Weongyo Jeong
37fb01d6c1 fixes an attached-at-boot issue that bwn(4) using device_identify
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
2010-03-03 20:06:09 +00:00
Weongyo Jeong
5c984ceaf9 supports SPROM rev8 informations properly which are used to support
low-power PHY of bwn(4) and LDO voltage adjustments.
2010-02-16 01:22:33 +00:00
Weongyo Jeong
1155ca9677 Adds siba_bwn module which is used with bwn(4). Main purpose of this
module is to distinguish parts of Silicon Backplane and of Broadcom
Wireless.
2010-01-31 21:18:22 +00:00