X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=block%2Fpartitions%2Fcheck.c;h=b7c76e4da75f932ccbed59fe04a102774bf54a00;hb=6b278a8e82ff8b751d63b186477b642f27e922db;hp=2b7baa0614544c578e520fcf72e795218aeaf704;hpb=7dcb2b4f0aa4a265ded7c830e692fcdb65ca48da;p=firefly-linux-kernel-4.4.55.git diff --git a/block/partitions/check.c b/block/partitions/check.c index 2b7baa061454..b7c76e4da75f 100755 --- a/block/partitions/check.c +++ b/block/partitions/check.c @@ -19,8 +19,6 @@ #include #include "check.h" -#include "mtdpart.h" - #include "acorn.h" #include "amiga.h" #include "atari.h" @@ -35,6 +33,8 @@ #include "efi.h" #include "karma.h" #include "sysv68.h" +#include "rk.h" +#include "cmdline.h" int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/ @@ -66,6 +66,9 @@ static int (*check_part[])(struct parsed_partitions *) = { adfspart_check_ADFS, #endif +#ifdef CONFIG_CMDLINE_PARTITION + cmdline_partition, +#endif #ifdef CONFIG_EFI_PARTITION efi_partition, /* this must come before msdos */ #endif @@ -105,9 +108,8 @@ static int (*check_part[])(struct parsed_partitions *) = { #ifdef CONFIG_SYSV68_PARTITION sysv68_partition, #endif - -#if CONFIG_MMC_DW_ROCKCHIP - mtdpart_partition, +#ifdef CONFIG_RK_PARTITION + rkpart_partition, #endif NULL @@ -163,6 +165,13 @@ check_partition(struct gendisk *hd, struct block_device *bdev) sprintf(state->name, "p"); i = res = err = 0; + + /* Rockchip partition table ONLY used by eMMC disk */ + #ifdef CONFIG_RK_PARTITION + if ((179 == MAJOR(bdev->bd_dev) && (1 == hd->emmc_disk))) + i = sizeof(check_part) / sizeof(struct parsed_partitions *) - 2; + #endif + while (!res && check_part[i]) { memset(state->parts, 0, state->limit * sizeof(state->parts[0])); res = check_part[i++](state);