Try resetting your iPhone by pressing both the Home button and the Power button together for 30 seconds. When it asks you if you want to slide to turn it off, ignore this message and KEEP holding. Finally, the screen will go off and your iPhone will be re-setting. Wait for a couple of minutes and turn it on the usual way. If it still asks you for the passcode, the only way to get back into the iPhone is to plug it into the original computer with the original itunes and press "restore".
Here is a fix for the "iPad/iPhone stuck on Apple Logo" 1. Hold down the power (top) and home (bottom) buttons at the same time for about 10 seconds. 2. Do the same thing while the phone is being powered 3. Do a restore through iTunes. If your computer is not picking up the phone, try doing step 1 while it is plugged into the computer with iTunes open