When you facing something similar compile error, make sure that you have been defined the CONFIG_MTD_DEVICE in your config header nt just the CONFIG_CMD_MTDPARTS.
My friend recently bought a Kudo Electronic switched pendulum clock from the ebay. After the receievment he had notified that the clock did not working. The problem was caused by the melted batteries. The acid and other chemicals had corroded the switching PCB, make it totally unrecoverable.
Read more...