From owner-svn-src-all@freebsd.org Thu Nov 5 21:24:43 2015 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 C87DEA27847; Thu, 5 Nov 2015 21:24:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.breitband.ch (smtp.breitband.ch [157.161.12.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8611DCD; Thu, 5 Nov 2015 21:24:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id 954B7D791E; Thu, 5 Nov 2015 22:24:33 +0100 (CET) Subject: Re: svn commit: r290373 - head/sys/dev/ofw To: Warner Losh , Nathan Whitehorn References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Andreas Tobler Message-ID: <563BC911.5060804@FreeBSD.org> Date: Thu, 5 Nov 2015 22:24:33 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 05 Nov 2015 21:24:43 -0000 Hi Nathan, Warner, first, I had the feeling that I have to provide a fast solution which makes PowerMacs usable again. I am aware that the committed version doesn't win a prize. Also, I didn't know that we have AIM & FDT, Nathan which one? On 05.11.15 21:26, Warner Losh wrote: > I'd suggested that this be driven off a global quirk like > > u_int fdt_quirks; > #define FDT_QUIRK_8BIT_IIC_ADDR 1 > ... In openfirm.h? > if (fdt_quirks & FDT_QUIRK_8BIT_IIC_ADDR) > dinfo->opd_dinfo.addr = paddr; > else > dinfo->opd_dinfo.addr = paddr << 1; > > And the platform code, whatever that means, would set it when it "knows" > this is the case. If I get that right, I'd have to set the fdt_quirk in each I2C parent, like kiic.c and smu.c? > On Thu, Nov 5, 2015 at 12:56 PM, Nathan Whitehorn > > wrote: > > I'm not sure this is the best way to do this: we have AIM systems > that use FDT, for example. Can we make it a quirk in the host-bus > driver? Or do a run-time check to see if the root node has MacRISC > in its compatible property? The 'compatible property' approach would be limited/isolated to one file (ofw_iicbus.c) in comparison to the quirk approach where I'd have to adapt at least (known now) four files. I can go either way, just my thoughts. Andreas