Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:47797 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932694Ab1CRVxA convert rfc822-to-8bit (ORCPT ); Fri, 18 Mar 2011 17:53:00 -0400 Received: by qwk3 with SMTP id 3so3122827qwk.19 for ; Fri, 18 Mar 2011 14:52:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1300478510.15393.45.camel@dev.znau.edu.ua> References: <1300449773-11255-1-git-send-email-zajec5@gmail.com> <1300453433.13499.18.camel@dev.znau.edu.ua> <1300463392.13499.110.camel@dev.znau.edu.ua> <1300471917.14872.28.camel@dev.znau.edu.ua> <1300478510.15393.45.camel@dev.znau.edu.ua> Date: Fri, 18 Mar 2011 22:52:59 +0100 Message-ID: Subject: Re: [RFC][PATCH] ssb: separate common scanning functions From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= To: George Kashperko Cc: linux-wireless@vger.kernel.org, "John W. Linville" , =?UTF-8?Q?Michael_B=C3=BCsch?= , b43-dev@lists.infradead.org, Larry Finger Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: 2011/3/18 George Kashperko : >  - read pci revision id/vendor id (pci_read_config_word), if required > to decide if second window is sliding or sprom (actually rev_id should > be sufficient for that) read offset 0x0000 from bar0 offset to get > chipid register value Could you say something about WIN1 and WIN2? What are they for, can we use them somehow separately? What do you mean by second window being SPROM? We read sprom without any special window magic: sprom[i] = ioread16(bus->mmio + bus->sprom_offset + (i * 2)); My understanding is limited to that: If we want to use device with CORE_ADDR and WRAP_ADDR we have to write CORE_ADDR to BAR0_WIN and WRAP_ADDR to BAR0_WIN2. Then we can use readl/writel. -- Rafał