Using μClinux, we have one of two flash devices installed, a 1 GB flash or a 2 GB flash.
The only way I can think of solving this is to somehow get the device ID, which is down the in-the-device driver code. For me that is in:
drivers/mtd/devices/m2...