From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?q?Markus_Klotzb=FCcher?= Date: Wed, 31 May 2006 10:43:13 +0200 Subject: [U-Boot-Users] USB OHCI drivers unification References: <20060530140405.GB21734@enneenne.com> <20060530141700.8F726353450@atlas.denx.de> <20060530145421.GU21995@enneenne.com> Message-ID: <8764jmfuu6.fsf@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Rodolfo, Rodolfo Giometti writes: > may I know what you have already done on this topic? Sure. I basically took the same approach as you suggested in your previous mail, but have split the the lowlevel functions into board and cpu dependant handling. I think this makes sense as boards for example can use the same cpu ohci controller but may require specific board dependant power settings. Either can be chosen by defining CFG_USB_OHCI_BOARD_INIT and CFG_USB_OHCI_CPU_INIT respectively. I also discovered that the actions taken in case of failure sometimes differ from those to stop the controller, so I added the fail functions. So I ended up with these hooks: usb_cpu_init usb_cpu_stop usb_cpu_fail usb_board_init usb_board_stop usb_board_fail I have currently adapted the monahans, the at91rm9200, and the s3c24x0 cpus to use the generic driver. Please note that I used the cpu/arm920t/at91rm9200/usb_ohci.[hc] driver as a starting point for the generic driver. We are currently starting a new USB testing branch for testing these and other USB related changes, which should be available in the git repo soon. > Please take a look at my patch to enable USB OHCI support on AU1x00 > CPUs; in fact the problem was about virtual and physical addresses on > MIPS platforms. For ARM platforms you may define as void the functions > "virt_to_phys()" and phys_to_virt() but for MIPS are essential. Your patch looks fine, but would you mind resubmitting it against the USB testing branch using the generic driver (drivers/usb_ohci.c) ? Thank you! Regards Markus Klotzb?cher