Iphone 5 stuck on boot logo
My iphone 5 is stuck on apple boot logo.While restoring my iphone 5 in recovery mode when the itunes says preparing iphone and then phone boots up normally and itune says "Waiting for iPhone" my phone get stuck on the boot logo and doesnt get connected. After waiting for a while an error pops up with code 4005. i think the phone is not booting up in normal mode.
iPhone 5, iOS 8.1.1