How to support both 16MB and 8MB partition table

Alessandro Rubini rubini at ar.linux.it
Tue Apr 6 04:31:06 EDT 2004


> I had to support the partition table for 16MB and 8MB AMD Flash chip
> in same kernel.  can we do it , if yes please let me know how can ?

Just have two static tables. Probe the flash for the bigger size
and check what the probe found. You can find an example in
ftp://gnudd.com/pub/tattile/kernel/patch-2.4.19-rmk4-ds2-mck1-tat2 .

This is the important code from that patch (this is 4M or 8M):

+               parts = tat_partitions4;
+               nb_parts = NB_OF(tat_partitions4);
+               if (mymtd->size == 8<<20) {
+                       parts = tat_partitions8;
+                       nb_parts = NB_OF(tat_partitions8);
+               }

/alessandro



More information about the linux-mtd mailing list