[U-Boot-Users] Patch generalizing USB and IDE drivers for MPC5200
Pierre AUBERT
p.aubert at staubli.com
Tue Mar 2 09:26:01 CET 2004
Hi everybody,
Here's my suggestions :
- for the USB drivers, the constants CONFIG_USB_CDMFDC5xxx and
CONFIG_USB_GPSCFG5xxx
must be defined in the board configuration file
- for the IDE driver, the reset routine is board specific, then the good
place for it is the board directory.
The attached patch fixes this points for the Lite5200 board. (Reinhard:
it includes your fixes for compiler warnings
in usb_ohci.c).
CHANGELOG:
* Patch by Pierre AUBERT, 02 Mar 2004
cleanups on IDE and USB drivers for MPC5200
Wolfgang Denk wrote:
>In message <00ef01c3ff80$3bf22e90$644ba8c0 at alb.sub.de> you wrote:
>
>
>>1. This spatch removes the compiler warnings (integer made from pointer
>>without cast)
>>
>>2. it generalizes the Clock Divider Values and the Port Config for USB
>>
>>if CONFIG_USB_CDMFDC5xxx and CONFIG_USB_GPSCFG5xxx are NOT defined, nothing
>>changes.
>>
>>
>
>Please provide a CHANGELOG entry and a description of these #define's
>for the README.
>
>
>
>>@@ -1532,10 +1532,19 @@ int usb_lowlevel_init(void)
>> {
>>
>> /* Set the USB Clock */
>>+#if defined (CONFIG_USB_CDMFDC5xxx)
>>+ *(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CDMFDC5xxx;
>>+#else
>> *(vu_long *)MPC5XXX_CDM_48_FDC = 0x0001bbbb;
>>- *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00800000;
>>+#endif
>>+ /* remove all USB bits first before ORing in ours */
>>+ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
>> /* Activate USB port */
>>+#if defined (CONFIG_USB_GPSCFG5xxx)
>>+ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_GPSCFG5xxx;
>>+#else
>> *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= 0x00001000;
>>+#endif
>>
>>
>
>If you think it is likely that these nubers may need adjustment for
>other boards, then we should #defined them for ALL boards in the
>config file and get rid of the "#if defined()" mess here.
>
>Your patch adds no code tat actually uses these constants, so basicly
>all we do is create dead code.
>
>That's why I reject the patch as is. Please feel free to address the
>3 issues listed above and resubmit.
>
>Best regards,
>
>Wolfgang Denk
>
>
>
Best regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-ide-usb-mpc5200.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040302/8f7536a1/attachment.txt
More information about the U-Boot
mailing list