From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnaud.patard@rtp-net.org (Arnaud Patard (Rtp)) Date: Tue, 14 Dec 2010 17:26:22 +0100 Subject: ulpi_check_integrity returning error In-Reply-To: (Fabio Estevam's message of "Tue, 14 Dec 2010 14:16:32 -0200") References: <4D076E49.3020805@compulab.co.il> <87d3p4e6r1.fsf@lechat.rtp-net.org> Message-ID: <877hfce2xd.fsf@lechat.rtp-net.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Fabio Estevam writes: > On Tue, Dec 14, 2010 at 1:03 PM, Arnaud Patard > wrote: > ... >>> I am curious to know if any of this boards can work in host mode OTG >>> with current mainline kernel. >> >> I guess you need to configure portsc register into ulpi mode in the >> .init function of the mxc_usbh_platform_data otherwise, you won't be >> able to reach the ulpi. > > Yes, I am configuring the portsc register into ULPI mode: > > .portsc = MXC_EHCI_MODE_ULPI, > > Code does reach ulpi read/write functions in arch/arm/plat-mxc/ulpi.c, > but always return 0 in the reads. Please, read again what I said. I'm not talking of .portsc but of .init. To reach the ulpi, the portsc register should be set to ulpi mode _before_ calling otg_init() in ehci_mxc_drv_probe() but the code is using .portsc/setting portsc in ehci_mxc_setup() which is afaik _after_ ehci_mxc_drv_probe(). Arnaud