
In message 00ef01c3ff80$3bf22e90$644ba8c0@alb.sub.de you wrote:
- This spatch removes the compiler warnings (integer made from pointer
without cast)
- 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