Re: 1bd3e8ba6966 - main - ofw_iicbus: Add method for manual setting of basic OFW parameters.

From: Michal Meloun <meloun.michal_at_gmail.com>
Date: Mon, 21 Feb 2022 07:02:53 UTC

On 20.02.2022 20:14, Ravi Pokala wrote:
> -----Original Message-----
> From: <owner-src-committers@freebsd.org> on behalf of Michal Meloun <mmel@FreeBSD.org>
> Date: 2022-02-20, Sunday at 03:39
> To: <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org>
> Subject: git: 1bd3e8ba6966 - main - ofw_iicbus: Add method for manual setting of basic OFW parameters.
> 
>      The branch main has been updated by mmel:
> 
>      URL: https://cgit.FreeBSD.org/src/commit/?id=1bd3e8ba696633ccd7525030d951b58ade167814
> 
>      commit 1bd3e8ba696633ccd7525030d951b58ade167814
>      Author:     Michal Meloun <mmel@FreeBSD.org>
>      AuthorDate: 2022-02-20 09:45:14 +0000
>      Commit:     Michal Meloun <mmel@FreeBSD.org>
>      CommitDate: 2022-02-20 11:25:58 +0000
> 
>          ofw_iicbus: Add method for manual setting of basic OFW parameters.
> 
>          Some IIC multifunction devices may have multiple I2C addresses per chip, but
>          only the primary address is listed in the DT (e.g. MAX776200). In this case,
>          the sub-devices for the secondary addresses must be created manually with
>          fixed OFW parameters (node, name, compatibility string, IIC address).
>          Add a bus method to the ofw_iicbus interface that does this.
> 
> Hi Michal,
> 
> This change seems to have broken the arm/ZEDBOARD kernel build:
> 
> ================================================================
> [threepio:~/freebsd/src/clean-main] rpokala% less _.arm.ZEDBOARD
> ...
>>>> stage 3.1: building everything
> --------------------------------------------------------------
> /usr/home/rpokala/freebsd/src/clean-main/sys/dev/fdc/fdc.c:1890:6: warning: variable 'unit' set but not used [-Wunused-but-set-variable]
>          int     unit;
>                  ^
> 1 warning generated.
> /usr/home/rpokala/freebsd/src/clean-main/sys/dev/iicbus/ofw_iicbus.c:45:10: fatal error: 'ofw_iicbus_if.h' file not found
> #include "ofw_iicbus_if.h"
>           ^~~~~~~~~~~~~~~~~
> 1 error generated.
> --- ofw_iicbus.o ---
> *** [ofw_iicbus.o] Error code 1
> 
> make[8]: stopped in /usr/home/rpokala/freebsd/src/clean-main/sys/modules/i2c/iicbus
> ================================================================
> 
> Thanks,
> 
> Ravi (rpokala@)


Hi Ravi,
Unfortunately I cannot reproduce this problem, the ZEDBOARD kernel (and 
all other arm kernels) compiles fine for me. Did you use any special 
option when compiling? Isn't there a previous error in your log for 
ZEDBOARD kernel?

Michal