if you have jailbroken your iphone then do the following:
• How to Repair Endless Boot without SSH
• Connect iphone with USB and run DiskAid
• Copy the following "mobilewatchdog.bundle" from /System/Library/SystemConfiguration/ to your desktop
• Delete the above bundle from your iPhone using the "Delete from Device" button
• Reboot and wait for springboard.
• Quickly install OpenSSH from cydia (you have 10mins before auto restart)
• Reboot again after copying back the mobilewatchdog.bundle to the iPhone using DiskAid
• Login back using SSH and change the permissions on the following
• chmod 755 /System/Library/SystemConfiguration/moilewatchdog.bundle
• chmod 755 /System/Library/SystemConfiguration/moilewatchdog.bundle/mobilewatchdog
• chmod 644 /System/Library/SystemConfiguration/moilewatchdog.bundle/info.plist
• Reboot
You need of course to download DiskAid 1st