Search Linux Wireless

Re: SSB AI support code ([RFC4/11] SSB core control and state device ops)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ð ÐÑÐ, 09/02/2011 Ð 22:55 +0100, RafaÅ MiÅecki ÐÐÑÐÑ:
> W dniu 9 lutego 2011 22:03 uÅytkownik George Kashperko
> <george@xxxxxxxxxxx> napisaÅ:
> >
> > Ð ÐÑÐ, 09/02/2011 Ð 21:35 +0100, RafaÅ MiÅecki ÐÐÑÐÑ:
> >> 2011/2/9 George Kashperko <george@xxxxxxxxxxx>:
> >> > From: George Kashperko <george@xxxxxxxxxxx>
> >> >
> >> > Introduce handlers for SB core control and state flags' management. SB-style
> >> > buses provide access to these flags at two high octets of TMSLOW and TMSHIGH
> >> > registers whereas AI-ones implement these flags in two low octets of IOCTRL
> >> > and IOSTAT registers.
> >> > Signed-off-by: George Kashperko <george@xxxxxxxxxxx>
> >> > ---
> >> >  drivers/ssb/main.c      |   36 ++++++++++++++++++++++++++++++++++++
> >> >  include/linux/ssb/ssb.h |   14 +++++++++++++-
> >> >  2 files changed, 49 insertions(+), 1 deletion(-)
> >> > --- linux-next-20110203.orig/drivers/ssb/main.c 2011-02-07 16:58:50.000000000 +0200
> >> > +++ linux-next-20110203/drivers/ssb/main.c      2011-02-07 17:07:11.000000000 +0200
> >> > @@ -1350,6 +1350,40 @@ static u32 ssb_admatch_size_sb(struct ss
> >> >        return size;
> >> >  }
> >> >
> >> > +static void ssb_core_ctl_flags_sb(struct ssb_device *dev, u32 mask,
> >> > +                                 u32 val, u32 *res)
> >> > +{
> >> > +       u32 tmp;
> >> > +
> >> > +       if (mask || val) {
> >> > +               tmp = (ssb_read32(dev, SSB_TMSLOW) & ~mask) | val;
> >> > +               ssb_write32(dev, SSB_TMSLOW, tmp);
> >> > +       }
> >>
> >> Are you going to use that function for just reading SSB_TMSLOW? Why
> >> won't you use separated function then? Do you need separated function
> >> for sth so simple as "ssb_read32(dev, SSB_TMSLOW);" at all?
> > Will answer your question with another question ;)
> > What would you personally prefer (press "1" or "2" :p)?
> > 1)
> > if (sb_bus)
> >        ssb_write32(dev, (ssb_read32(dev, SSB_TMSLOW) & ~(mask << 16)) | (flags << 16));
> > else
> >        ssb_write32(dev, (ssb_read32(dev, SSB_AI_IOCTL) & ~mask) | flags));
> > 2)
> > ssb_core_ctl_flags(dev, mask, flags, NULL);
> 
> I aksed about reading, you gave me examples of writing. I want to
> avoid such a non-readable disasters:
> u32 tmp;
> ssb_core_ctl_flags(dev, 0, 0, &tmp);
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux