b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ssb: define boardflags
  2011-07-23  9:10 ` [PATCH 1/2] ssb: define boardflags Rafał Miłecki
@ 2011-07-23  8:37   ` Michael Büsch
  2011-07-23  8:49     ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Büsch @ 2011-07-23  8:37 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev

On Sat, 23 Jul 2011 11:10:11 +0200
Rafa? Mi?ecki <zajec5@gmail.com> wrote:

> They are SPROM specific, so all should be defined in ssb code.

Oh, well. I'm not sure.
Most of these currently are defined in b43 code, because they are b43-specific
and _not_ ssb specific. If we decide to define them in ssb, they need to be
removed from b43, at least.

> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
>  include/linux/ssb/ssb_regs.h |   40 ++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 40 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
> index efbf459..9894120 100644
> --- a/include/linux/ssb/ssb_regs.h
> +++ b/include/linux/ssb/ssb_regs.h
> @@ -462,6 +462,46 @@
>  #define SSB_SPROM8_OFDM5GLPO		0x014A	/* 5.2GHz OFDM power offset */
>  #define SSB_SPROM8_OFDM5GHPO		0x014E	/* 5.8GHz OFDM power offset */
>  
> +/* Values for boardflags_lo read from SPROM */
> +#define SSB_BFL_BTCOEXIST		0x0001	/* implements Bluetooth coexistance */
> +#define SSB_BFL_PACTRL			0x0002	/* GPIO 9 controlling the PA */
> +#define SSB_BFL_AIRLINEMODE		0x0004	/* implements GPIO 13 radio disable indication */
> +#define SSB_BFL_RSSI			0x0008	/* software calculates nrssi slope. */
> +#define SSB_BFL_ENETSPI			0x0010	/* has ephy roboswitch spi */
> +#define SSB_BFL_XTAL_NOSLOW		0x0020	/* no slow clock available */
> +#define SSB_BFL_CCKHIPWR		0x0040	/* can do high power CCK transmission */
> +#define SSB_BFL_ENETADM			0x0080	/* has ADMtek switch */
> +#define SSB_BFL_ENETVLAN		0x0100	/* can do vlan */
> +#define SSB_BFL_AFTERBURNER		0x0200	/* supports Afterburner mode */
> +#define SSB_BFL_NOPCI			0x0400	/* board leaves PCI floating */
> +#define SSB_BFL_FEM			0x0800	/* supports the Front End Module */
> +#define SSB_BFL_EXTLNA			0x1000	/* has an external LNA */
> +#define SSB_BFL_HGPA			0x2000	/* had high gain PA */
> +#define SSB_BFL_BTCMOD			0x4000	/* BFL_BTCOEXIST is given in alternate GPIOs */
> +#define SSB_BFL_ALTIQ			0x8000	/* alternate I/Q settings */
> +
> +/* Values for boardflags_hi read from SPROM */
> +#define SSB_BFH_NOPA			0x0001	/* has no PA */
> +#define SSB_BFH_RSSIINV			0x0002	/* RSSI uses positive slope (not TSSI) */
> +#define SSB_BFH_PAREF			0x0004	/* uses the PARef LDO */
> +#define SSB_BFH_3TSWITCH		0x0008	/* uses a triple throw switch shared with bluetooth */
> +#define SSB_BFH_PHASESHIFT		0x0010	/* can support phase shifter */
> +#define SSB_BFH_BUCKBOOST		0x0020	/* has buck/booster */
> +#define SSB_BFH_FEM_BT			0x0040	/* has FEM and switch to share antenna with bluetooth */
> +
> +/* Values for boardflags2_lo read from SPROM */
> +#define SSB_BFL2_RXBB_INT_REG_DIS	0x0001	/* external RX BB regulator present */
> +#define SSB_BFL2_APLL_WAR		0x0002	/* alternative A-band PLL settings implemented */
> +#define SSB_BFL2_TXPWRCTRL_EN 		0x0004	/* permits enabling TX Power Control */
> +#define SSB_BFL2_2X4_DIV		0x0008	/* 2x4 diversity switch */
> +#define SSB_BFL2_5G_PWRGAIN		0x0010	/* supports 5G band power gain */
> +#define SSB_BFL2_PCIEWAR_OVR		0x0020	/* overrides ASPM and Clkreq settings */
> +#define SSB_BFL2_CAESERS_BRD		0x0040	/* is Caesers board (unused) */
> +#define SSB_BFL2_BTC3WIRE		0x0080	/* used 3-wire bluetooth coexist */
> +#define SSB_BFL2_SKWRKFEM_BRD		0x0100	/* 4321mcm93 uses Skyworks FEM */
> +#define SSB_BFL2_SPUR_WAR		0x0200	/* has a workaround for clock-harmonic spurs */
> +#define SSB_BFL2_GPLL_WAR		0x0400	/* altenative G-band PLL settings implemented */
> +
>  /* Values for SSB_SPROM1_BINF_CCODE */
>  enum {
>  	SSB_SPROM1CCODE_WORLD = 0,



-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ssb: define boardflags
  2011-07-23  8:37   ` Michael Büsch
@ 2011-07-23  8:49     ` Rafał Miłecki
  2011-07-23  8:54       ` Michael Büsch
  0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2011-07-23  8:49 UTC (permalink / raw)
  To: Michael Büsch; +Cc: linux-wireless, John W. Linville, b43-dev

W dniu 23 lipca 2011 10:37 u?ytkownik Michael B?sch <m@bues.ch> napisa?:
> On Sat, 23 Jul 2011 11:10:11 +0200
> Rafa? Mi?ecki <zajec5@gmail.com> wrote:
>
>> They are SPROM specific, so all should be defined in ssb code.
>
> Oh, well. I'm not sure.
> Most of these currently are defined in b43 code, because they are b43-specific
> and _not_ ssb specific. If we decide to define them in ssb, they need to be
> removed from b43, at least.

Well, SPROM is board specific (not 80211 core specific), so I believe
the same applies to boardflags, doesn't it? Boardflags are read from
SPROM, so it makes sense for me.

I planned to remove them from b43 and b43legacy and driver_pci. Just
wanted to provide minimal version for now, as John may want to take it
still for 3.1.

-- 
Rafa?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ssb: define boardflags
  2011-07-23  8:49     ` Rafał Miłecki
@ 2011-07-23  8:54       ` Michael Büsch
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Büsch @ 2011-07-23  8:54 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev

On Sat, 23 Jul 2011 10:49:55 +0200
Rafa? Mi?ecki <zajec5@gmail.com> wrote:

> W dniu 23 lipca 2011 10:37 u?ytkownik Michael B?sch <m@bues.ch> napisa?:
> > On Sat, 23 Jul 2011 11:10:11 +0200
> > Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> >
> >> They are SPROM specific, so all should be defined in ssb code.
> >
> > Oh, well. I'm not sure.
> > Most of these currently are defined in b43 code, because they are b43-specific
> > and _not_ ssb specific. If we decide to define them in ssb, they need to be
> > removed from b43, at least.
> 
> Well, SPROM is board specific (not 80211 core specific), so I believe
> the same applies to boardflags, doesn't it? Boardflags are read from
> SPROM, so it makes sense for me.

No. Most of these flags are specific to the whole device (the board).
Most flags are invalid or have another meaning for b44, for instance.

-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/2] ssb: start cleaning boardflags
@ 2011-07-23  9:10 Rafał Miłecki
  2011-07-23  9:10 ` [PATCH 1/2] ssb: define boardflags Rafał Miłecki
  2011-07-23  9:10 ` [PATCH 2/2] bcma: use boardflags define from ssb code Rafał Miłecki
  0 siblings, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2011-07-23  9:10 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Boardflags are board (SPROM to say exactly) specific, so should be
defined in ssb code. It does not make sense to redefine them over
and over in every driver.

This is the real fix for:
linux-next-20110722/drivers/bcma/driver_pci.c:175: error: 'SSB_PCICORE_BFL_NOPCI' undeclared (first use in this function)

Ideally that patches should replace
[PATCH] bcma: fix 'SSB_PCICORE_BFL_NOPCI' undeclared build breakage

Rafa? Mi?ecki (2):
  ssb: define boardflags
  bcma: use boardflags define from ssb code

 drivers/bcma/driver_pci.c    |    2 +-
 include/linux/ssb/ssb_regs.h |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletions(-)

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ssb: define boardflags
  2011-07-23  9:10 [PATCH 0/2] ssb: start cleaning boardflags Rafał Miłecki
@ 2011-07-23  9:10 ` Rafał Miłecki
  2011-07-23  8:37   ` Michael Büsch
  2011-07-23  9:10 ` [PATCH 2/2] bcma: use boardflags define from ssb code Rafał Miłecki
  1 sibling, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2011-07-23  9:10 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

They are SPROM specific, so all should be defined in ssb code.

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 include/linux/ssb/ssb_regs.h |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index efbf459..9894120 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -462,6 +462,46 @@
 #define SSB_SPROM8_OFDM5GLPO		0x014A	/* 5.2GHz OFDM power offset */
 #define SSB_SPROM8_OFDM5GHPO		0x014E	/* 5.8GHz OFDM power offset */
 
+/* Values for boardflags_lo read from SPROM */
+#define SSB_BFL_BTCOEXIST		0x0001	/* implements Bluetooth coexistance */
+#define SSB_BFL_PACTRL			0x0002	/* GPIO 9 controlling the PA */
+#define SSB_BFL_AIRLINEMODE		0x0004	/* implements GPIO 13 radio disable indication */
+#define SSB_BFL_RSSI			0x0008	/* software calculates nrssi slope. */
+#define SSB_BFL_ENETSPI			0x0010	/* has ephy roboswitch spi */
+#define SSB_BFL_XTAL_NOSLOW		0x0020	/* no slow clock available */
+#define SSB_BFL_CCKHIPWR		0x0040	/* can do high power CCK transmission */
+#define SSB_BFL_ENETADM			0x0080	/* has ADMtek switch */
+#define SSB_BFL_ENETVLAN		0x0100	/* can do vlan */
+#define SSB_BFL_AFTERBURNER		0x0200	/* supports Afterburner mode */
+#define SSB_BFL_NOPCI			0x0400	/* board leaves PCI floating */
+#define SSB_BFL_FEM			0x0800	/* supports the Front End Module */
+#define SSB_BFL_EXTLNA			0x1000	/* has an external LNA */
+#define SSB_BFL_HGPA			0x2000	/* had high gain PA */
+#define SSB_BFL_BTCMOD			0x4000	/* BFL_BTCOEXIST is given in alternate GPIOs */
+#define SSB_BFL_ALTIQ			0x8000	/* alternate I/Q settings */
+
+/* Values for boardflags_hi read from SPROM */
+#define SSB_BFH_NOPA			0x0001	/* has no PA */
+#define SSB_BFH_RSSIINV			0x0002	/* RSSI uses positive slope (not TSSI) */
+#define SSB_BFH_PAREF			0x0004	/* uses the PARef LDO */
+#define SSB_BFH_3TSWITCH		0x0008	/* uses a triple throw switch shared with bluetooth */
+#define SSB_BFH_PHASESHIFT		0x0010	/* can support phase shifter */
+#define SSB_BFH_BUCKBOOST		0x0020	/* has buck/booster */
+#define SSB_BFH_FEM_BT			0x0040	/* has FEM and switch to share antenna with bluetooth */
+
+/* Values for boardflags2_lo read from SPROM */
+#define SSB_BFL2_RXBB_INT_REG_DIS	0x0001	/* external RX BB regulator present */
+#define SSB_BFL2_APLL_WAR		0x0002	/* alternative A-band PLL settings implemented */
+#define SSB_BFL2_TXPWRCTRL_EN 		0x0004	/* permits enabling TX Power Control */
+#define SSB_BFL2_2X4_DIV		0x0008	/* 2x4 diversity switch */
+#define SSB_BFL2_5G_PWRGAIN		0x0010	/* supports 5G band power gain */
+#define SSB_BFL2_PCIEWAR_OVR		0x0020	/* overrides ASPM and Clkreq settings */
+#define SSB_BFL2_CAESERS_BRD		0x0040	/* is Caesers board (unused) */
+#define SSB_BFL2_BTC3WIRE		0x0080	/* used 3-wire bluetooth coexist */
+#define SSB_BFL2_SKWRKFEM_BRD		0x0100	/* 4321mcm93 uses Skyworks FEM */
+#define SSB_BFL2_SPUR_WAR		0x0200	/* has a workaround for clock-harmonic spurs */
+#define SSB_BFL2_GPLL_WAR		0x0400	/* altenative G-band PLL settings implemented */
+
 /* Values for SSB_SPROM1_BINF_CCODE */
 enum {
 	SSB_SPROM1CCODE_WORLD = 0,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] bcma: use boardflags define from ssb code
  2011-07-23  9:10 [PATCH 0/2] ssb: start cleaning boardflags Rafał Miłecki
  2011-07-23  9:10 ` [PATCH 1/2] ssb: define boardflags Rafał Miłecki
@ 2011-07-23  9:10 ` Rafał Miłecki
  1 sibling, 0 replies; 6+ messages in thread
From: Rafał Miłecki @ 2011-07-23  9:10 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki


Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/bcma/driver_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index dc6f34a..bdf933b 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -172,7 +172,7 @@ static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
 	    chipid_top != 0x5300)
 		return false;
 
-	if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
+	if (bus->sprom.boardflags_lo & SSB_BFL_NOPCI)
 		return false;
 
 #if 0
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-23  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23  9:10 [PATCH 0/2] ssb: start cleaning boardflags Rafał Miłecki
2011-07-23  9:10 ` [PATCH 1/2] ssb: define boardflags Rafał Miłecki
2011-07-23  8:37   ` Michael Büsch
2011-07-23  8:49     ` Rafał Miłecki
2011-07-23  8:54       ` Michael Büsch
2011-07-23  9:10 ` [PATCH 2/2] bcma: use boardflags define from ssb code Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).