Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65722d53 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mtd: msm_qpic_nand: Adjustment of reg offsets from the devicetree"

parents 1e116b1f cf8f09cf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ Required properties:
- interrupts : should specify QPIC/BAM interrupt numbers.
- interrupt-names : should specify relevant names to each interrupts property
  defined.
- qcom,reg-adjustment-offset : Specify the base adjustment offset value for the
  version registers

MTD flash partition layout for NAND devices -

@@ -37,6 +39,8 @@ Examples:
		      <0xf9ac4000 0x8000>;
		reg-names = "nand_phys",
			    "bam_phys";
		qcom,reg-adjustment-offset = <0x4000>;

		interrupts = <0 279 0>;
		interrupt-names = "bam_irq";

+2 −0
Original line number Diff line number Diff line
@@ -646,6 +646,8 @@
		      <0x07984000 0x1a000>;
		reg-names = "nand_phys",
			    "bam_phys";
		qcom,reg-adjustment-offset = <0x4000>;

		interrupts = <0 132 0>;
		interrupt-names = "bam_irq";

+2 −0
Original line number Diff line number Diff line
@@ -595,6 +595,8 @@
		      <0x07984000 0x1a000>;
		reg-names = "nand_phys",
			    "bam_phys";
		qcom,reg-adjustment-offset = <0>;

		interrupts = <0 247 0>;
		interrupt-names = "bam_irq";

+2 −0
Original line number Diff line number Diff line
@@ -632,6 +632,8 @@
			<0x07984000 0x1a000>;
		reg-names = "nand_phys",
			"bam_phys";
		qcom,reg-adjustment-offset = <0x4000>;

		interrupts = <0 247 0>;
		interrupt-names = "bam_irq";

+14 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3363,6 +3363,7 @@ static int msm_nand_probe(struct platform_device *pdev)
	struct resource *res;
	int i, err, nr_parts;
	struct device *dev;
	u32 adjustment_offset;
	/*
	 * The partition information can also be passed from kernel command
	 * line. Also, the MTD core layer supports adding the whole device as
@@ -3382,6 +3383,18 @@ static int msm_nand_probe(struct platform_device *pdev)
		goto out;
	}
	info->nand_phys = res->start;

	err = of_property_read_u32(pdev->dev.of_node,
				   "qcom,reg-adjustment-offset",
				   &adjustment_offset);
	if (err) {
		pr_err("adjustment_offset not found, err = %d\n", err);
		WARN_ON(1);
		return err;
	}

	info->nand_phys_adjusted = info->nand_phys + adjustment_offset;

	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"bam_phys");
	if (!res || !res->start) {
Loading