The problem was in arch/arm/boot/dts/omap3-n900.dts
Erroneous line was:
cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */
I changed it to:
cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
Now the system boots fine. I've already prepared and send the
patch to mailing list and dts maintainers.
Well, after fixing n900 card detect gpio polarity in dts, the system
started to boot fine with the cover closed. I'll prepare the patch
for kernel.
Thanks, we had a few fallouts of device trees specifying the
wrong polarity and now that we started to respect the
polarity in the device tree we've had problems with that.
If it causes an issue in widely deployed systems (as in:
products come from manufacturer with erroneous device
tree in the flash) then we need to add quirks to handle that
so in that case I would like details on exactly the device
tree used and how it looks.
Yours,
Linus Walleij