[U-Boot-Users] Patch generalizing USB driver for MPC5200
Wolfgang Denk
wd at denx.de
Mon Mar 1 13:07:27 CET 2004
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
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Q: How many DEC repairman does it take to fix a flat ?
A: Five; four to hold the car up and one to swap tires.
More information about the U-Boot
mailing list