arch/arm/boot/dts/rk3288-veyron.dtsi | 12 +++++++++--- block/partitions/efi.c | 33 +++++++++++++++++++++++---------- block/partitions/efi.h | 3 ++- drivers/gpio/gpio-rockchip.c | 3 --- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi index e406c8c7c..b092823ed 100644 --- a/arch/arm/boot/dts/rk3288-veyron.dtsi +++ b/arch/arm/boot/dts/rk3288-veyron.dtsi @@ -171,9 +171,7 @@ &gpu_crit { }; &hdmi { - pinctrl-names = "default", "unwedge"; - pinctrl-0 = <&hdmi_ddc>; - pinctrl-1 = <&hdmi_ddc_unwedge>; + ddc-i2c-bus = <&i2c5>; status = "okay"; }; @@ -344,6 +342,14 @@ &i2c4 { i2c-scl-rising-time-ns = <300>; /* 225ns measured */ }; +&i2c5 { + status = "okay"; + + clock-frequency = <100000>; + i2c-scl-falling-time-ns = <300>; + i2c-scl-rising-time-ns = <1000>; +}; + &io_domains { status = "okay"; diff --git a/block/partitions/efi.c b/block/partitions/efi.c index 5e9be13a5..8e8cec912 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c @@ -328,23 +328,33 @@ static gpt_header *alloc_read_gpt_header(struct parsed_partitions *state, * @lba: logical block address of the GPT header to test * @gpt: GPT header ptr, filled on return. * @ptes: PTEs ptr, filled on return. + * @ignored is filled on return with 1 if this is an IGNOREME GPT, + * 0 otherwise. May be NULL. * * Description: returns 1 if valid, 0 on error. * If valid, returns pointers to newly allocated GPT header and PTEs. */ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, - gpt_header **gpt, gpt_entry **ptes) + gpt_header **gpt, gpt_entry **ptes, int *ignored) { u32 crc, origcrc; u64 lastlba, pt_size; + if (ignored) + *ignored = 0; if (!ptes) return 0; if (!(*gpt = alloc_read_gpt_header(state, lba))) return 0; /* Check the GUID Partition Table signature */ - if (le64_to_cpu((*gpt)->signature) != GPT_HEADER_SIGNATURE) { + if (le64_to_cpu((*gpt)->signature) == GPT_HEADER_SIGNATURE_IGNORED) { + pr_debug("GUID Partition Table at LBA %llu marked IGNOREME\n", + lba); + if (ignored) + *ignored = 1; + goto fail; + } else if (le64_to_cpu((*gpt)->signature) != GPT_HEADER_SIGNATURE) { pr_debug("GUID Partition Table Header signature is wrong:" "%lld != %lld\n", (unsigned long long)le64_to_cpu((*gpt)->signature), @@ -581,7 +591,7 @@ compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba) static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, gpt_entry **ptes) { - int good_pgpt = 0, good_agpt = 0, good_pmbr = 0; + int good_pgpt = 0, good_agpt = 0, good_pmbr = 0, pgpt_ignored = 0; gpt_header *pgpt = NULL, *agpt = NULL; gpt_entry *pptes = NULL, *aptes = NULL; legacy_mbr *legacymbr; @@ -613,13 +623,14 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, } good_pgpt = is_gpt_valid(state, GPT_PRIMARY_PARTITION_TABLE_LBA, - &pgpt, &pptes); + &pgpt, &pptes, &pgpt_ignored); if (good_pgpt) good_agpt = is_gpt_valid(state, le64_to_cpu(pgpt->alternate_lba), - &agpt, &aptes); - if (!good_agpt && force_gpt) - good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes); + &agpt, &aptes, NULL); + + if (!good_agpt && (force_gpt || pgpt_ignored)) + good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes, NULL); if (!good_agpt && force_gpt && fops->alternative_gpt_sector) { sector_t agpt_sector; @@ -628,14 +639,15 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, err = fops->alternative_gpt_sector(disk, &agpt_sector); if (!err) good_agpt = is_gpt_valid(state, agpt_sector, - &agpt, &aptes); + &agpt, &aptes, NULL); } /* The obviously unsuccessful case */ if (!good_pgpt && !good_agpt) goto fail; - compare_gpts(pgpt, agpt, lastlba); + if (!pgpt_ignored) + compare_gpts(pgpt, agpt, lastlba); /* The good cases */ if (good_pgpt) { @@ -652,7 +664,8 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, *ptes = aptes; kfree(pgpt); kfree(pptes); - pr_warn("Primary GPT is invalid, using alternate GPT.\n"); + pr_warn("Primary GPT is %s, using alternate GPT.\n", + pgpt_ignored ? "being ignored" : "invalid"); return 1; } diff --git a/block/partitions/efi.h b/block/partitions/efi.h index 84b9f36b9..09726227e 100644 --- a/block/partitions/efi.h +++ b/block/partitions/efi.h @@ -26,7 +26,8 @@ #define GPT_MBR_PROTECTIVE 1 #define GPT_MBR_HYBRID 2 -#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL +#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL /* 'EFI PART' */ +#define GPT_HEADER_SIGNATURE_IGNORED 0x454d45524f4e4749ULL /* 'IGNOREME' */ #define GPT_HEADER_REVISION_V1 0x00010000 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1 diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 200e43a6f..c34e81e9e 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -335,13 +335,10 @@ static void rockchip_irq_demux(struct irq_desc *desc) unsigned long pending; unsigned int irq; - dev_dbg(bank->dev, "got irq for bank %s\n", bank->name); - chained_irq_enter(chip, desc); pending = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status); for_each_set_bit(irq, &pending, 32) { - dev_dbg(bank->dev, "handling irq %d\n", irq); /* * Triggering IRQ on both rising and falling edge