Date: Thu, 5 Nov 2015 22:24:33 +0100 From: Andreas Tobler <andreast@FreeBSD.org> To: Warner Losh <imp@bsdimp.com>, Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r290373 - head/sys/dev/ofw Message-ID: <563BC911.5060804@FreeBSD.org> In-Reply-To: <CANCZdfriYN=JbN8uEsCh-CBZ9V8F5mcL_KaRXQBJZkKv-Gt3SQ@mail.gmail.com> References: <201511042246.tA4MkUYU010551@repo.freebsd.org> <563BB466.8020801@freebsd.org> <CANCZdfriYN=JbN8uEsCh-CBZ9V8F5mcL_KaRXQBJZkKv-Gt3SQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > <nwhitehorn@freebsd.org <mailto:nwhitehorn@freebsd.org>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?563BC911.5060804>