From owner-svn-src-all@freebsd.org Mon Jan 22 09:02:42 2018 Return-Path: Delivered-To: svn-src-all@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 A174CEB4654; Mon, 22 Jan 2018 09:02:42 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 6680672B8A; Mon, 22 Jan 2018 09:02:42 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id D41B927378; Mon, 22 Jan 2018 09:02:39 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w0M92OFj086941 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Jan 2018 09:02:24 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w0M92Ota086940; Mon, 22 Jan 2018 09:02:24 GMT (envelope-from phk) To: Emmanuel Vadot cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules In-reply-to: <20180122094629.f292f9f239174f0865b046ea@bidouilliste.com> From: "Poul-Henning Kamp" References: <201801220710.w0M7AUm9091853@repo.freebsd.org> <20180122094629.f292f9f239174f0865b046ea@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86938.1516611744.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Jan 2018 09:02:24 +0000 Message-ID: <86939.1516611744@critter.freebsd.dk> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 09:02:42 -0000 -------- In message <20180122094629.f292f9f239174f0865b046ea@bidouilliste.com>, Emm= anuel Vadot writes: >> + * Copyright (C) 2013-2015 Daisuke Aoyama > > Was is based on some file ? > Also someone will probably complain about SDPX tag here :) Yes, I grabbed the blurp from a nearby file and forgot to edit it, it's fixed now. >> + if (unit !=3D BCM_PWM_CLKSRC) { >> + device_printf(sc->sc_dev, >> + "Unsupported unit 0x%x", unit); >> + return (0); >> + } > > Uhg, this is ... ugly ... Yes, very much so. > The proper way will be to introduce a real clock manager exposing a >clock domain and clocks using the extres/clk framework. Yes, Somebody[tm] should really do that[1], just like Somebody[tm] should write drivers for all sorts of other stuff on all sorts of platforms. Eventually Somebody[tm] may even get around to that, but in the meantime people who play with FreeBSD on Rpi's can at least get the PWM output to work. Poul-Henning [1] Are you tired of Nice & Accurate[tm] chip documentation which leaves no room for creativity and exploration? Do you love to extrapolate and second-guess chip-designers mental process from random snippets of incompetently written code ? If so, you may find welcome relief trying to write a device driver for the "BCM283x - Documentation - Scmockumentation!" family of devices! -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= .