From owner-freebsd-current@FreeBSD.ORG Fri Mar 12 23:13:46 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67010106564A for ; Fri, 12 Mar 2010 23:13:46 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.221.194]) by mx1.freebsd.org (Postfix) with ESMTP id 129978FC1A for ; Fri, 12 Mar 2010 23:13:45 +0000 (UTC) Received: by qyk32 with SMTP id 32so1728535qyk.28 for ; Fri, 12 Mar 2010 15:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=sp2oeSp1l0suvnVT91OC9Ak/JSRwwsLM8aFPo0MZ93I=; b=onBN/FVZamPtvsFHSNtXW86NULE11glPwyn8CkI1+nNvvaaIu7YXDRIZFDA9oSWJMc kjxlVnv9TgjN2c0CWyqj8ZLMBXJSpRqBtyb6pvYE+VEuGHPIdi9WRIHXQjJZ5p7GoJeG kZyqRCAe1jUzIj69Q5aPfk/59hh0wdjRTu78U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=mg4bTD4Eac3NfePlYZb6bzFGM4yhJr9uYIIzwffr9JcFAjsdwzWiBPU0xKMWTWowUr ZPQr0PTiQjhYPQE1QPd6mlRVwiOEdm8DisI6b7ptiGdVP8AqpwUTiESHkdDoBIXbibOy 3KRikMxrZGapKLMevqvs2ZCZQs2nuWt7BTlAA= Received: by 10.220.124.105 with SMTP id t41mr1955vcr.178.1268435603178; Fri, 12 Mar 2010 15:13:23 -0800 (PST) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id 24sm13479166vws.7.2010.03.12.15.13.20 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Mar 2010 15:13:21 -0800 (PST) Received: by weongyo (sSMTP sendmail emulation); Fri, 12 Mar 2010 15:13:34 -0800 From: Weongyo Jeong Date: Fri, 12 Mar 2010 15:13:34 -0800 To: Alexandr Rybalko Message-ID: <20100312231333.GZ1295@weongyo> Mail-Followup-To: Alexandr Rybalko , Alex RAY , current@freebsd.org References: <20091223035331.GA1293@weongyo> <4b31cb29.9413f30a.5f4a.ffff8382@mx.google.com> <20100226005115.GP14937@weongyo> <20100227011535.ed3f2486.ray@ddteam.net> <20100228095259.GB3536@weongyo> <20100301103240.3a4aac8a.ray@dlink.ua> <20100303082833.GB22865@weongyo> <20100303111014.6564ea1e.ray@dlink.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100303111014.6564ea1e.ray@dlink.ua> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: Alex RAY , current@freebsd.org Subject: Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2010 23:13:46 -0000 On Wed, Mar 03, 2010 at 11:10:14AM +0200, Alexandr Rybalko wrote: > On Wed, 3 Mar 2010 00:28:33 -0800 > Weongyo Jeong wrote: > > >> On Mon, Mar 01, 2010 at 10:32:40AM +0200, Alexandr Rybalko wrote: > >> > On Sun, 28 Feb 2010 01:52:59 -0800 > >> > Weongyo Jeong wrote: > >> > > >> > Can You test your driver without siba_switchcore, I see the device > >> > have mapping for all cores on SSB? > >> > >> I see what you mean. siba_core.c which depends on PCI code would be > >> compiled when it builds on SENTRY5. So it looks currently it needs a > >> patch to compile siba bus code without PCI code. I'll try to make a > >> patch. > > I now trying to make bus independent interface, not done yet. > When finish, I send to You for review and maybe test. It's my pleasure to test your patch. > > >> > >> > > ssb0: mem 0xf4000000-0xf4003fff > >> > Think thre is 4 cores. > >> > When SSB on nexus, we don`t need core switching, maybe on PCI too. > >> > >> I think this is a difference between siba(4) and siba_bwn currently and > >> it's one of TODOs we should solve to merge two codes. > >> > >> AFAIK approach to access each cores isn't same; it looks siba(4) creates > >> devices for each cores so it'd not need to switch cores. But siba_bwn > >> doesn't do it like siba(4) so it needs to switch cores because all are > >> handled on one device. > > Look into this line: > ssb0: mem 0xf4000000-0xf4003fff > There we see, device have 0x4000 memory window. Each core required 0x1000. > Your code to call required core move PCI window to appropriate 0x1000 block > (if core - second, move to 0xf4001000). > Maybe we can map full window, and then access to required core without > core switching. I thought that your opinion was right and if mem is 0xf4000000-0xf4003fff (16 Kb) I thought the device has 4 cores. However it looks this was wrong according to the below document: http://voodoowarez.com/bcm5365p.pdf Please see Section 3: PCI Core, PCI Bus (Page 34) that it indicates that 16Kb, maybe 8 Kb in the old devices is core register region. "Accesses to the lower half of the core register region are translated into system backplane accesses using the PCIBAR0Window register" "Accesses to offsets 0x1000 to 0x17FF of this region initiate a direct access to the external SPROM" If we just access memory using offset + core and bus_space_read_x interfaces it would actually not access core register region. So without solving this problem it looks it could not remove coreswitch routines. regards, Weongyo Jeong