This allows access to the NAND when the kernel is loaded through the USB boot mode.
The default formatting on the Dingoo A320 does not use a partition table. However, if a partition table is added when the Dingoo acts as a USB mass storage device, the China Chip firmware can use it.
The unit for dev->size is sectors, not bytes.
Tested on Dingoo A320: the FAT partition on the NAND is mounted successfully. Read-only for now. Not robust against bad FTL admin data yet: the driver won't crash, but it might return unnecessary I/O errors.
… byte in the oob. The eccpos array is only 64 bytes long, while 4K page NANDs need 72 bytes of ECC. This is a temporary measure until upstream has a solution.
Logging over serial port was slowing down the boot a lot. Those few people who have a serial port on their Dingoo are perfectly capable of building their own kernel with support for it. In fact, probably the only reason to add a serial port is to test your own kernels.
The documentation says it can save a few milliwatts. The resolution is good enough anyway, so saving some energy is more useful.
If we spin too long while waiting for an irq, we'll enable the interrupt and put the spinning thread to sleep and wake it up again from the irq handler. This reduces busy-looping time while keeping performance up.
…ver for the piezo
When the maximum CPU frequency changes, the frequency table is recomputed. This was done in the "target" handler, which is called after the "cpufreq_stats" module is notified, so the statistics would still reflect the old table. The fix was moving the table recomputation into the "verify" handler.