From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 7 Feb 2017 13:23:48 -0500 Subject: [U-Boot] [PATCH v2 2/6] am33xx: board: Refactor USB initialization into separate function In-Reply-To: <20170207031737.2680-3-alex.g@adaptrum.com> References: <20170203234220.28589-1-alex.g@adaptrum.com> <20170207031737.2680-3-alex.g@adaptrum.com> Message-ID: <20170207182348.GH26129@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Feb 06, 2017 at 07:17:33PM -0800, Alexandru Gagniuc wrote: > The declaration of otg*_plat and otg*_board_data is guarded by > CONFIG_USB_MUSB_*, but their use in arch_misc_init is not. The > ifdef flow goes something like: > > if (CONFIG_USB_MUSB_* && other_conditions) > declare usb_data > if (other_conditions) > use usb_data > > Thus when CONFIG_USB_MUSB_* is not declared, we try to use the > data structures, but these structures aren't defined. > > To fix this, move the USB initialization code into the same #ifdef > which guards the declaration of the data structures. Since the DM_USB > vs legacy cases are completely different, use two versions of > arch_misc_init(), for readability. > > Signed-off-by: Alexandru Gagniuc Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: