Re: [PATCH 08/11] b43: implement writing to MMIO shared memory

2010-02-27 Thread Michael Buesch
On Saturday 27 February 2010 12:09:30 Rafał Miłecki wrote:
> 2010/2/9 Michael Buesch :
> > On Tuesday 09 February 2010 21:04:40 Rafał Miłecki wrote:
> >> Signed-off-by: Rafał Miłecki 
> >> ---
> >>  drivers/net/wireless/b43/phy_common.c |   11 +++
> >>  drivers/net/wireless/b43/phy_common.h |    2 ++
> >>  2 files changed, 13 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/b43/phy_common.c 
> >> b/drivers/net/wireless/b43/phy_common.c
> >> index 8f7d7ef..0b0f9df 100644
> >> --- a/drivers/net/wireless/b43/phy_common.c
> >> +++ b/drivers/net/wireless/b43/phy_common.c
> >> @@ -466,3 +466,14 @@ struct b43_c32 b43_cordic(int theta)
> >>
> >>       return ret;
> >>  }
> >> +
> >> +/* http://bcm-v4.sipsolutions.net/802.11/PHY/BmacWriteShm */
> >> +void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value)
> >> +{
> >> +     b43_write32(dev, B43_MMIO_SHM_CONTROL, 0x0001 | (offset >> 2));
> >> +     b43_read32(dev, B43_MMIO_SHM_CONTROL);
> >> +     if (offset & 2)
> >> +             b43_write16(dev, 0x165, value);
> >> +     else
> >> +             b43_write16(dev, B43_MMIO_SHM_DATA, value);
> >> +}
> >
> > I'd like to put a bg questionmark on this.
> > We already have SHM access. Your function does exactly the same, except 
> > that it
> > accesses the bullshit register h165.
> 
> Yeah, that 0x165 is really crappy. Let's hope it really should be
> 0x166 (B43_MMIO_SHM_DATA_UNALIGNED).
> 
> Do you think we should add dummy-read to b43_shm_control_word as
> BmacWriteShm does? Currently we do not perform that.

That doesn't hurt.
It probably won't help much either, as the whole driver depends on implicit 
write posting.
But I don't care whether you add it or not.

-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH 08/11] b43: implement writing to MMIO shared memory

2010-02-27 Thread Rafał Miłecki
2010/2/9 Michael Buesch :
> On Tuesday 09 February 2010 21:04:40 Rafał Miłecki wrote:
>> Signed-off-by: Rafał Miłecki 
>> ---
>>  drivers/net/wireless/b43/phy_common.c |   11 +++
>>  drivers/net/wireless/b43/phy_common.h |    2 ++
>>  2 files changed, 13 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/phy_common.c 
>> b/drivers/net/wireless/b43/phy_common.c
>> index 8f7d7ef..0b0f9df 100644
>> --- a/drivers/net/wireless/b43/phy_common.c
>> +++ b/drivers/net/wireless/b43/phy_common.c
>> @@ -466,3 +466,14 @@ struct b43_c32 b43_cordic(int theta)
>>
>>       return ret;
>>  }
>> +
>> +/* http://bcm-v4.sipsolutions.net/802.11/PHY/BmacWriteShm */
>> +void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value)
>> +{
>> +     b43_write32(dev, B43_MMIO_SHM_CONTROL, 0x0001 | (offset >> 2));
>> +     b43_read32(dev, B43_MMIO_SHM_CONTROL);
>> +     if (offset & 2)
>> +             b43_write16(dev, 0x165, value);
>> +     else
>> +             b43_write16(dev, B43_MMIO_SHM_DATA, value);
>> +}
>
> I'd like to put a bg questionmark on this.
> We already have SHM access. Your function does exactly the same, except that 
> it
> accesses the bullshit register h165.

Yeah, that 0x165 is really crappy. Let's hope it really should be
0x166 (B43_MMIO_SHM_DATA_UNALIGNED).

Do you think we should add dummy-read to b43_shm_control_word as
BmacWriteShm does? Currently we do not perform that.

-- 
Rafał
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH 08/11] b43: implement writing to MMIO shared memory

2010-02-09 Thread Michael Buesch
On Tuesday 09 February 2010 21:04:40 Rafał Miłecki wrote:
> Signed-off-by: Rafał Miłecki 
> ---
>  drivers/net/wireless/b43/phy_common.c |   11 +++
>  drivers/net/wireless/b43/phy_common.h |2 ++
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/b43/phy_common.c 
> b/drivers/net/wireless/b43/phy_common.c
> index 8f7d7ef..0b0f9df 100644
> --- a/drivers/net/wireless/b43/phy_common.c
> +++ b/drivers/net/wireless/b43/phy_common.c
> @@ -466,3 +466,14 @@ struct b43_c32 b43_cordic(int theta)
>  
>   return ret;
>  }
> +
> +/* http://bcm-v4.sipsolutions.net/802.11/PHY/BmacWriteShm */
> +void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value)
> +{
> + b43_write32(dev, B43_MMIO_SHM_CONTROL, 0x0001 | (offset >> 2));
> + b43_read32(dev, B43_MMIO_SHM_CONTROL);
> + if (offset & 2)
> + b43_write16(dev, 0x165, value);
> + else
> + b43_write16(dev, B43_MMIO_SHM_DATA, value);
> +}

I'd like to put a bg questionmark on this.
We already have SHM access. Your function does exactly the same, except that it
accesses the bullshit register h165.

-- 
Greetings, Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


[PATCH 08/11] b43: implement writing to MMIO shared memory

2010-02-09 Thread Rafał Miłecki
Signed-off-by: Rafał Miłecki 
---
 drivers/net/wireless/b43/phy_common.c |   11 +++
 drivers/net/wireless/b43/phy_common.h |2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_common.c 
b/drivers/net/wireless/b43/phy_common.c
index 8f7d7ef..0b0f9df 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -466,3 +466,14 @@ struct b43_c32 b43_cordic(int theta)
 
return ret;
 }
+
+/* http://bcm-v4.sipsolutions.net/802.11/PHY/BmacWriteShm */
+void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value)
+{
+   b43_write32(dev, B43_MMIO_SHM_CONTROL, 0x0001 | (offset >> 2));
+   b43_read32(dev, B43_MMIO_SHM_CONTROL);
+   if (offset & 2)
+   b43_write16(dev, 0x165, value);
+   else
+   b43_write16(dev, B43_MMIO_SHM_DATA, value);
+}
diff --git a/drivers/net/wireless/b43/phy_common.h 
b/drivers/net/wireless/b43/phy_common.h
index bd480b4..484d4d7 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -429,4 +429,6 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, 
bool on);
 
 struct b43_c32 b43_cordic(int theta);
 
+void b43_bmac_write_shm(struct b43_wldev *dev, u32 offset, u16 value);
+
 #endif /* LINUX_B43_PHY_COMMON_H_ */
-- 
1.6.4.2

___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev