Heres how I managed to fix my iphone 4.
My problem was the same. Phone would restart again and again from apple logo. It wouldnt move further.
I tried restarting in DFU mode, tried to update and restore. But phone would keep restarting from apple logo mode..
I doubted it might be some battery problem or some hardware problem. So I opened the phone, I came to know that the one who opened the phone b4 me dint put the screws in connector of battery. So it was loose. So I manage to tighten it and tried to update and restore.
Bingo, that was the issue. The connector was loose so it just wouldnt move further. Now phone is installing the software.
Problem solved.