Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334222 > unrolled thread

[PATCH 0/3] platform/chrome: upstream changes

Started byEnric Balletbo i Serra <enric.balletbo@collabora.com>
First post2016-02-15 09:00 +0100
Last post2016-02-15 10:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] platform/chrome: upstream changes Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-02-15 09:00 +0100
    [PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2016-02-15 09:00 +0100
      [PATCH] platform/chrome: pstore: fix platform_no_drv_owner.cocci  warnings kbuild test robot <lkp@intel.com> - 2016-02-15 10:10 +0100
      Re: [PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer  using acpi kbuild test robot <lkp@intel.com> - 2016-02-15 10:10 +0100

#1334222 — [PATCH 0/3] platform/chrome: upstream changes

FromEnric Balletbo i Serra <enric.balletbo@collabora.com>
Date2016-02-15 09:00 +0100
Subject[PATCH 0/3] platform/chrome: upstream changes
Message-ID<r2meC-6nO-3@gated-at.bofh.it>
Dear all,

Please take in consideration to include these patches that upstream some
changes already found in chromeos kernel. The three patches came from the
chromeos tree and were tested in current mainline.

The first patch simply adds the touch device for Leon Chromebook, the
second and the third are related to chrome pstore driver.

Thanks,

Aaron Durbin (1):
  platform/chrome: pstore: probe for ramoops buffer using acpi

Gene Chen (1):
  platform/chrome: chromeos_laptop: Add Leon Touch

Olof Johansson (1):
  platform/chrome: pstore: Move to larger record size.

 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++
 drivers/platform/chrome/chromeos_pstore.c | 56 +++++++++++++++++++++++++++++--
 2 files changed, 69 insertions(+), 2 deletions(-)

-- 
2.1.0

[toc] | [next] | [standalone]


#1334223 — [PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi

FromEnric Balletbo i Serra <enric.balletbo@collabora.com>
Date2016-02-15 09:00 +0100
Subject[PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi
Message-ID<r2meD-6nO-13@gated-at.bofh.it>
In reply to#1334222
From: Aaron Durbin <adurbin@chromium.org>

In order to handle the firmware placing the ramoops buffer
in a different location than the kernel is configured to look
probe for an ACPI device specified by GOOG9999 acpi id. If
no device is found or the first memory resource is not defined
properly fall back to the configured base and length.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Filipe Brandenburger <filbranden@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
---
 drivers/platform/chrome/chromeos_pstore.c | 54 ++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/chromeos_pstore.c b/drivers/platform/chrome/chromeos_pstore.c
index 3474920..e5a5a18 100644
--- a/drivers/platform/chrome/chromeos_pstore.c
+++ b/drivers/platform/chrome/chromeos_pstore.c
@@ -8,6 +8,7 @@
  *  the Free Software Foundation, version 2 of the License.
  */
 
+#include <linux/acpi.h>
 #include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -71,9 +72,60 @@ static struct platform_device chromeos_ramoops = {
 	},
 };
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id cros_ramoops_acpi_match[] = {
+	{ "GOOG9999", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, cros_ramoops_acpi_match);
+
+static struct platform_driver chromeos_ramoops_acpi = {
+	.driver		= {
+		.name	= "chromeos_pstore",
+		.owner	= THIS_MODULE,
+		.acpi_match_table = ACPI_PTR(cros_ramoops_acpi_match),
+	},
+};
+
+static int __init chromeos_probe_acpi(struct platform_device *pdev)
+{
+	struct resource *res;
+	resource_size_t len;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res)
+		return -ENOMEM;
+
+	len = resource_size(res);
+	if (!res->start || !len)
+		return -ENOMEM;
+
+	pr_info("chromeos ramoops using acpi device.\n");
+
+	chromeos_ramoops_data.mem_size = len;
+	chromeos_ramoops_data.mem_address = res->start;
+
+	return 0;
+}
+
+static bool __init chromeos_check_acpi(void)
+{
+	if (!platform_driver_probe(&chromeos_ramoops_acpi, chromeos_probe_acpi))
+		return true;
+	return false;
+}
+#else
+static inline bool chromeos_check_acpi(void) { return false; }
+#endif
+
 static int __init chromeos_pstore_init(void)
 {
-	if (dmi_check_system(chromeos_pstore_dmi_table))
+	bool acpi_dev_found;
+
+	/* First check ACPI for non-hardcoded values from firmware. */
+	acpi_dev_found = chromeos_check_acpi();
+
+	if (acpi_dev_found || dmi_check_system(chromeos_pstore_dmi_table))
 		return platform_device_register(&chromeos_ramoops);
 
 	return -ENODEV;
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1334297 — [PATCH] platform/chrome: pstore: fix platform_no_drv_owner.cocci warnings

Fromkbuild test robot <lkp@intel.com>
Date2016-02-15 10:10 +0100
Subject[PATCH] platform/chrome: pstore: fix platform_no_drv_owner.cocci warnings
Message-ID<r2nkm-7he-11@gated-at.bofh.it>
In reply to#1334223
drivers/platform/chrome/chromeos_pstore.c:85:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 chromeos_pstore.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/platform/chrome/chromeos_pstore.c
+++ b/drivers/platform/chrome/chromeos_pstore.c
@@ -82,7 +82,6 @@ MODULE_DEVICE_TABLE(acpi, cros_ramoops_a
 static struct platform_driver chromeos_ramoops_acpi = {
 	.driver		= {
 		.name	= "chromeos_pstore",
-		.owner	= THIS_MODULE,
 		.acpi_match_table = ACPI_PTR(cros_ramoops_acpi_match),
 	},
 };

[toc] | [prev] | [next] | [standalone]


#1334301 — Re: [PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi

Fromkbuild test robot <lkp@intel.com>
Date2016-02-15 10:10 +0100
SubjectRe: [PATCH 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi
Message-ID<r2nkm-7he-13@gated-at.bofh.it>
In reply to#1334223
Hi Aaron,

[auto build test WARNING on v4.5-rc4]
[also build test WARNING on next-20160215]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Enric-Balletbo-i-Serra/platform-chrome-upstream-changes/20160215-160219


coccinelle warnings: (new ones prefixed by >>)

>> drivers/platform/chrome/chromeos_pstore.c:85:3-8: No need to set .owner here. The core will do it.

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web