From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754118AbbIIS13 (ORCPT ); Wed, 9 Sep 2015 14:27:29 -0400 Received: from gabe.freedesktop.org ([131.252.210.177]:43689 "EHLO gabe.freedesktop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbbIIS11 (ORCPT ); Wed, 9 Sep 2015 14:27:27 -0400 From: Eric Anholt To: Alexander Stein , linux-rpi-kernel@lists.infradead.org Cc: kernel@martin.sperl.org, Stephen Warren , Lee Jones , Russell King , Mark Brown , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/6] bcm2835: auxiliar device support for spi In-Reply-To: <2757852.TDqE8OEVr2@ws-stein> References: <1441359711-2800-1-git-send-email-kernel@martin.sperl.org> <87h9n4weg8.fsf@eliezer.anholt.net> <2757852.TDqE8OEVr2@ws-stein> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 09 Sep 2015 11:27:24 -0700 Message-ID: <878u8fcusz.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Alexander Stein writes: > Hi, > On Tuesday 08 September 2015 18:48:07, Eric Anholt wrote: >> I finally had a chance to sit down and look at what the hardware's doing >> with the enable bit (also, I've read a whole lot more of the hardware >> now, so I'm a lot faster at answering questions like this). The enable >> bits are a clock gate off of the VPU clock. > > Are any hardware documents about such things available (in public)? Nope, I just went through the HDL to see how things were routed. >> I knocked together the enable bits as a clock gate driver, since I'd >> just written very similar code for the audio domain clock driver (and I >> assume you are grumpy about how much time you've spent on this one >> stupid register). It's up at >> https://github.com/anholt/linux/tree/bcm2835-clock-aux and I can submit >> it if you like the result. I've compile tested it only, but I'm hoping >> you could just drop your aux SPI driver on top of it and have things >> work. > > IMHO line 45 (https://github.com/anholt/linux/commit/facb4ba917a1b9f6c2ee0cea7d529acf55f584dd#diff-1b6f753c132811b3f6d70f5b31866950R45) should be like this >> onecell->clks = kzalloc(sizeof(*onecell->clks) * BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); > or you will only allocate a single struct clk*. Thanks, that was a bug in my other clock driver, too! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJV8HoMAAoJELXWKTbR/J7o2xEP/3R/27Yktr7ibuVDVEo/GE7z 5Zio4/u9EX9yE4FTj6g3UrroTAFHvKzxNZjd8EbgCnTYfuIuYA+Aa0+S/pEUWKf7 8WXNvL4LIbuHB2XfdGf//Gf4LD3he+/0YFMlnVAqK3A/jAMUDn4ptbZqloNgwnK1 YmgTN34dzWpS/D4TH1ScOJlJNaZc9ta9C8fX0T2AiOYCj0BsLiv9Rb37aR6/ZP8C BHfk7zr1jmr/0NTY9d6locWS+xk/BxEbBMnhDCIthYZ6n8/Cjb+91vtntNRDIQJA 4ndBQ0j6p99HlROA37Y1a8Qp8GAiW7Xjrcyu8YQo6nq9w0LpUtPJjPuUIjAUMPNX 4a1mES+QrumvPjt9FQ+HmAa6+7ucep3crsvDBro+JzGfINU3GwNF4b++tP1VcwuU UDqrUfcxpdBCn9YeHYowycHMNOJtAM/r1THcK6e/KJFL7haMIJvDWOmFK9HQP4c9 M457lQwpbpUy1/ncbV7j3gF2tSAizTnGval8sStcSJztjRnn7wwEIbC/Lcy4KpBI B3gmy/wF9eabmxmevw4DQ8V9k04nAB8ykrThFhDSLcYyZUOWx4R6wi8i7tW05a4v 2tlVZrnz3XxjGAbVk4CiDvY+qMWmRaEW2lOb1Q/UuQUMB4gzvWyUaMaYr8g/Vh1O hzNIyMd6Sx+1KDMWTci0 =CBKP -----END PGP SIGNATURE----- --=-=-=--