From owner-freebsd-arm@freebsd.org Fri Sep 9 01:19:57 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0736DBD2673 for ; Fri, 9 Sep 2016 01:19:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDE73E7B for ; Fri, 9 Sep 2016 01:19:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-oi0-x232.google.com with SMTP id x125so51196029oia.3 for ; Thu, 08 Sep 2016 18:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tuYtmRgqRJjYnDi2Wdan4YhA5mY88PGY/st+X7htgAw=; b=f6eUuEfUgxLmTKt7+omFTrFbZPUeG5cgXbvvPSJs9gi+890RcSuSYdzeDDXTs7VaA5 LgUAsSv109oVtG801L6xStx/DDoSJ25BxAMWwvWELsr0kAidIzFs0mtsTfXN/20h7DXX OMRM2SsbtqlWCmfj+guE772WLKY1M7ZFtk7ZzwUjNhwjzXN6F6IzQpUXdFVxtYiNW8Zl ssF4TduiKciAxdo2hUPqJU42o0IpMlqYr2N1yn9yiZR5mqRN2YtaBpXKIqnXj8U3+bKu uQwLym9FhELYkthWx8kLaWQdyViuZLXoh32otcjVVnNDXajm8w7RiJYOCuTXdkThrpSN gewg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tuYtmRgqRJjYnDi2Wdan4YhA5mY88PGY/st+X7htgAw=; b=jTuRLotT1Uq9qj4ZXW/ldPpQheZ/9JOgT+nB5+7VHtce6YFVOTrRyx9nsB3Bc4TY9u ChwKRvHpYNJ6YSWuvdyQwuDQnFkMjIkrjellOtjUwNHzIZiOsOPGtakcC02p/OEswZqp SYM4mZTUZEeGTBQ+UpuYhv3XeedNEYhDJCdkHMckjmUF5zJ7C3CLAkN6lK4pX5NSSzeT WWYH+Joirs2+fwmRxn7w9Ipu6Ca2vi3tHZzXhm6+hXhlawM7rckUZEFiH9vkupTvYHZD Ndup9eu+iyhWRqm3sOZAYJmlWUq6k7cW58lldWINO5GESPFGnJVTJa8WYcR/08tMOIHg QNXA== X-Gm-Message-State: AE9vXwM+CYbI16eA1eYy+JceBrwZRFtbVL12tNDSyFDjtqiVSKbqMia4GBW/NriKGou34j1BqxQEgS99BuogNw== X-Received: by 10.157.41.221 with SMTP id g29mr1244850otd.57.1473383995944; Thu, 08 Sep 2016 18:19:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Thu, 8 Sep 2016 18:19:55 -0700 (PDT) In-Reply-To: References: <14e39088-681f-7771-110e-69d364d26afb@gmx.de> From: Adrian Chadd Date: Thu, 8 Sep 2016 18:19:55 -0700 Message-ID: Subject: Re: Bananapi Pro WiFi Adapter To: Russell Haley Cc: "C.Dornig" , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 01:19:57 -0000 Hi, So the bhnd/bcma is because of how the bus interconnect works between all the logical units on a chip. Ie, the chip doesn't pretend to be one big chip by hiding all of the AMBA interconnects inside the functional blocks - it actively isn't pretending. So, for the PCI(e) devices, when we want to speak to a different core we have to switch out the active core and switch the new core into the register window before we can access it. The ath, iwn, etc NICs don't do this - they have some bus glue that maps one big register window over the functional blocks. (eg atheros chips tend to have MAC/DMA at low registers, MAC DCU/QCU at 4xxx, RTC at 7xxx, PHY at 8xxx, per-chain stuff at 9xxx, axxx, bxxxx (chain0, chain1, chain2), etc. It's still all AMBA or something similar inside, it's just hidden from us by the host controller block. So before we can port brcmfmac we need: * bhnd so we can speak to the cores on the chip, control the power management units, clock units, offload CPUs (eg injecting firmware into the right bits), etc * cam/mmc so we can speak to SDIO attached devices via CAM (ie, we submit commands, get responses, get interrupts, etc) as the bus layer. I hope that helps, -adrian