All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ssb: fix ssb clock rate according to broadcom source
@ 2011-06-21 18:31 Hauke Mehrtens
  2011-06-21 18:53 ` [PATCH v2] " Hauke Mehrtens
  0 siblings, 1 reply; 5+ messages in thread
From: Hauke Mehrtens @ 2011-06-21 18:31 UTC (permalink / raw)
  To: mb, linville; +Cc: linux-wireless, Hauke Mehrtens

This fix was done according to si_clock_rate function in broadcom siutils.c
---
 drivers/ssb/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index e568664..57b7b64 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1002,8 +1002,8 @@ u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m)
 	switch (plltype) {
 	case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */
 		if (m & SSB_CHIPCO_CLK_T6_MMASK)
-			return SSB_CHIPCO_CLK_T6_M0;
-		return SSB_CHIPCO_CLK_T6_M1;
+			return SSB_CHIPCO_CLK_T6_M1;
+		return SSB_CHIPCO_CLK_T6_M0;
 	case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */
 	case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */
 	case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */
-- 
1.7.4.1


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

* [PATCH v2] ssb: fix ssb clock rate according to broadcom source
  2011-06-21 18:31 [PATCH] ssb: fix ssb clock rate according to broadcom source Hauke Mehrtens
@ 2011-06-21 18:53 ` Hauke Mehrtens
  2011-06-21 21:36   ` Larry Finger
  0 siblings, 1 reply; 5+ messages in thread
From: Hauke Mehrtens @ 2011-06-21 18:53 UTC (permalink / raw)
  To: mb, linville; +Cc: linux-wireless, Hauke Mehrtens

This fix was done according to si_clock_rate function in broadcom siutils.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/ssb/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index e568664..57b7b64 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1002,8 +1002,8 @@ u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m)
 	switch (plltype) {
 	case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */
 		if (m & SSB_CHIPCO_CLK_T6_MMASK)
-			return SSB_CHIPCO_CLK_T6_M0;
-		return SSB_CHIPCO_CLK_T6_M1;
+			return SSB_CHIPCO_CLK_T6_M1;
+		return SSB_CHIPCO_CLK_T6_M0;
 	case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */
 	case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */
 	case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */
-- 
1.7.4.1


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

* Re: [PATCH v2] ssb: fix ssb clock rate according to broadcom source
  2011-06-21 18:53 ` [PATCH v2] " Hauke Mehrtens
@ 2011-06-21 21:36   ` Larry Finger
  2011-06-22  7:02     ` Michael Büsch
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2011-06-21 21:36 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: mb, linville, linux-wireless

On 06/21/2011 01:53 PM, Hauke Mehrtens wrote:
> This fix was done according to si_clock_rate function in broadcom siutils.c
>
> Signed-off-by: Hauke Mehrtens<hauke@hauke-m.de>
> ---
>   drivers/ssb/main.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
> index e568664..57b7b64 100644
> --- a/drivers/ssb/main.c
> +++ b/drivers/ssb/main.c
> @@ -1002,8 +1002,8 @@ u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m)
>   	switch (plltype) {
>   	case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */
>   		if (m&  SSB_CHIPCO_CLK_T6_MMASK)
> -			return SSB_CHIPCO_CLK_T6_M0;
> -		return SSB_CHIPCO_CLK_T6_M1;
> +			return SSB_CHIPCO_CLK_T6_M1;
> +		return SSB_CHIPCO_CLK_T6_M0;
>   	case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */
>   	case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */
>   	case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */

This patch sent me looking to find the public source for this routine. After 
finding it in the source section of Broadcom-wl, I noticed there is some 
additional code that is not implemented in the ssb version. Should this 
additional material be implemented, or is it not applicable?

Larry

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

* Re: [PATCH v2] ssb: fix ssb clock rate according to broadcom source
  2011-06-21 21:36   ` Larry Finger
@ 2011-06-22  7:02     ` Michael Büsch
  2011-06-22 22:06       ` Larry Finger
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Büsch @ 2011-06-22  7:02 UTC (permalink / raw)
  To: Larry Finger; +Cc: Hauke Mehrtens, mb, linville, linux-wireless

On Tue, 21 Jun 2011 16:36:38 -0500
Larry Finger <Larry.Finger@lwfinger.net> wrote:

> On 06/21/2011 01:53 PM, Hauke Mehrtens wrote:
> > This fix was done according to si_clock_rate function in broadcom siutils.c
> >
> > Signed-off-by: Hauke Mehrtens<hauke@hauke-m.de>
> > ---
> >   drivers/ssb/main.c |    4 ++--
> >   1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
> > index e568664..57b7b64 100644
> > --- a/drivers/ssb/main.c
> > +++ b/drivers/ssb/main.c
> > @@ -1002,8 +1002,8 @@ u32 ssb_calc_clock_rate(u32 plltype, u32 n, u32 m)
> >   	switch (plltype) {
> >   	case SSB_PLLTYPE_6: /* 100/200 or 120/240 only */
> >   		if (m&  SSB_CHIPCO_CLK_T6_MMASK)
> > -			return SSB_CHIPCO_CLK_T6_M0;
> > -		return SSB_CHIPCO_CLK_T6_M1;
> > +			return SSB_CHIPCO_CLK_T6_M1;
> > +		return SSB_CHIPCO_CLK_T6_M0;
> >   	case SSB_PLLTYPE_1: /* 48Mhz base, 3 dividers */
> >   	case SSB_PLLTYPE_3: /* 25Mhz, 2 dividers */
> >   	case SSB_PLLTYPE_4: /* 48Mhz, 4 dividers */
> 
> This patch sent me looking to find the public source for this routine. After 
> finding it in the source section of Broadcom-wl, I noticed there is some 
> additional code that is not implemented in the ssb version. Should this 
> additional material be implemented, or is it not applicable?

could you quote that function here? That would be way easier to get what were talking about.


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

* Re: [PATCH v2] ssb: fix ssb clock rate according to broadcom source
  2011-06-22  7:02     ` Michael Büsch
@ 2011-06-22 22:06       ` Larry Finger
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2011-06-22 22:06 UTC (permalink / raw)
  To: Michael Büsch; +Cc: Hauke Mehrtens, mb, linville, linux-wireless

On 06/22/2011 02:02 AM, Michael Büsch wrote:
> On Tue, 21 Jun 2011 16:36:38 -0500
> Larry Finger<Larry.Finger@lwfinger.net>  wrote:
>> This patch sent me looking to find the public source for this routine. After
>> finding it in the source section of Broadcom-wl, I noticed there is some
>> additional code that is not implemented in the ssb version. Should this
>> additional material be implemented, or is it not applicable?
>
> could you quote that function here? That would be way easier to get what were talking about.

The file in question is found from the Broadcom wl driver. When you untar it 
into directory "broadcom", the file is broadcom/src/shared/siutils.c.

My initial conclusion that the clock_rate routine from the above file and 
drivers/ssb/main.c were different was wrong. When I checked them again, they do 
exactly the same thing after this patch is applied. Sorry for the noise.

Larry

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

end of thread, other threads:[~2011-06-22 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 18:31 [PATCH] ssb: fix ssb clock rate according to broadcom source Hauke Mehrtens
2011-06-21 18:53 ` [PATCH v2] " Hauke Mehrtens
2011-06-21 21:36   ` Larry Finger
2011-06-22  7:02     ` Michael Büsch
2011-06-22 22:06       ` Larry Finger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.