All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/3] platform/chrome: upstream changes
@ 2016-02-16  7:25 Enric Balletbo i Serra
  2016-02-16  7:25 ` [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch Enric Balletbo i Serra
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Enric Balletbo i Serra @ 2016-02-16  7:25 UTC (permalink / raw)
  To: linux-kernel, Olof Johansson
  Cc: Gene Chen, Benson Leung, Aaron Durbin, Filipe Brandenburger,
	Ben Zhang, Olof Johansson, Gustavo Padovan

Dear all,

Please take in consideration to include these patches that upstreams 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,
Enric

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

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 | 55 +++++++++++++++++++++++++++++--
 2 files changed, 68 insertions(+), 2 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch
  2016-02-16  7:25 [PATCHv2 0/3] platform/chrome: upstream changes Enric Balletbo i Serra
@ 2016-02-16  7:25 ` Enric Balletbo i Serra
  2016-03-06 20:03   ` Olof Johansson
  2016-02-16  7:25 ` [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi Enric Balletbo i Serra
  2016-02-16  7:25 ` [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size Enric Balletbo i Serra
  2 siblings, 1 reply; 7+ messages in thread
From: Enric Balletbo i Serra @ 2016-02-16  7:25 UTC (permalink / raw)
  To: linux-kernel, Olof Johansson
  Cc: Gene Chen, Benson Leung, Aaron Durbin, Filipe Brandenburger,
	Ben Zhang, Olof Johansson, Gustavo Padovan

From: Gene Chen <gene.chen@intel.com>

Add support for Leon touch devices, which is the same as
slippy/falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via
the i2c-designware-pci driver.

Based on the following patch:
https://chromium-review.googlesource.com/#/c/168351/

Signed-off-by: Gene Chen <gene.chen@intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 2b441e9..f5aa0a3 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -494,6 +494,13 @@ static struct chromeos_laptop cr48 = {
 	},
 };
 
+static struct chromeos_laptop leon = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 #define _CBDD(board_) \
 	.callback = chromeos_laptop_dmi_matched, \
 	.driver_data = (void *)&board_
@@ -581,6 +588,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		},
 		_CBDD(cr48),
 	},
+	{
+		.ident = "Leon",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Leon"),
+		},
+		_CBDD(leon),
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(dmi, chromeos_laptop_dmi_table);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi
  2016-02-16  7:25 [PATCHv2 0/3] platform/chrome: upstream changes Enric Balletbo i Serra
  2016-02-16  7:25 ` [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch Enric Balletbo i Serra
@ 2016-02-16  7:25 ` Enric Balletbo i Serra
  2016-03-06 20:04   ` Olof Johansson
  2016-02-16  7:25 ` [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size Enric Balletbo i Serra
  2 siblings, 1 reply; 7+ messages in thread
From: Enric Balletbo i Serra @ 2016-02-16  7:25 UTC (permalink / raw)
  To: linux-kernel, Olof Johansson
  Cc: Gene Chen, Benson Leung, Aaron Durbin, Filipe Brandenburger,
	Ben Zhang, Olof Johansson, Gustavo Padovan

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 | 53 ++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/chromeos_pstore.c b/drivers/platform/chrome/chromeos_pstore.c
index 3474920..ca00192 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,59 @@ 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",
+		.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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size.
  2016-02-16  7:25 [PATCHv2 0/3] platform/chrome: upstream changes Enric Balletbo i Serra
  2016-02-16  7:25 ` [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch Enric Balletbo i Serra
  2016-02-16  7:25 ` [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi Enric Balletbo i Serra
@ 2016-02-16  7:25 ` Enric Balletbo i Serra
  2016-03-06 20:04   ` Olof Johansson
  2 siblings, 1 reply; 7+ messages in thread
From: Enric Balletbo i Serra @ 2016-02-16  7:25 UTC (permalink / raw)
  To: linux-kernel, Olof Johansson
  Cc: Gene Chen, Benson Leung, Aaron Durbin, Filipe Brandenburger,
	Ben Zhang, Olof Johansson, Gustavo Padovan

From: Olof Johansson <olofj@chromium.org>

Accidentally specified a smaller record size, bring it back
to the same size as we had when we used the config file.

Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
---
 drivers/platform/chrome/chromeos_pstore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/chromeos_pstore.c b/drivers/platform/chrome/chromeos_pstore.c
index ca00192..308a853 100644
--- a/drivers/platform/chrome/chromeos_pstore.c
+++ b/drivers/platform/chrome/chromeos_pstore.c
@@ -59,7 +59,7 @@ MODULE_DEVICE_TABLE(dmi, chromeos_pstore_dmi_table);
 static struct ramoops_platform_data chromeos_ramoops_data = {
 	.mem_size	= 0x100000,
 	.mem_address	= 0xf00000,
-	.record_size	= 0x20000,
+	.record_size	= 0x40000,
 	.console_size	= 0x20000,
 	.ftrace_size	= 0x20000,
 	.dump_oops	= 1,
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch
  2016-02-16  7:25 ` [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch Enric Balletbo i Serra
@ 2016-03-06 20:03   ` Olof Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2016-03-06 20:03 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Gene Chen, Benson Leung, Aaron Durbin,
	Filipe Brandenburger, Ben Zhang, Olof Johansson, Gustavo Padovan

On Tue, Feb 16, 2016 at 08:25:14AM +0100, Enric Balletbo i Serra wrote:
> From: Gene Chen <gene.chen@intel.com>
> 
> Add support for Leon touch devices, which is the same as
> slippy/falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via
> the i2c-designware-pci driver.
> 
> Based on the following patch:
> https://chromium-review.googlesource.com/#/c/168351/
> 
> Signed-off-by: Gene Chen <gene.chen@intel.com>
> Reviewed-by: Benson Leung <bleung@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

Applied, thanks.


-Olof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi
  2016-02-16  7:25 ` [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi Enric Balletbo i Serra
@ 2016-03-06 20:04   ` Olof Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2016-03-06 20:04 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Gene Chen, Benson Leung, Aaron Durbin,
	Filipe Brandenburger, Ben Zhang, Olof Johansson, Gustavo Padovan

On Tue, Feb 16, 2016 at 08:25:15AM +0100, Enric Balletbo i Serra wrote:
> 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>

Applied, thanks.

-Olof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size.
  2016-02-16  7:25 ` [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size Enric Balletbo i Serra
@ 2016-03-06 20:04   ` Olof Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2016-03-06 20:04 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, Gene Chen, Benson Leung, Aaron Durbin,
	Filipe Brandenburger, Ben Zhang, Olof Johansson, Gustavo Padovan

On Tue, Feb 16, 2016 at 08:25:16AM +0100, Enric Balletbo i Serra wrote:
> From: Olof Johansson <olofj@chromium.org>
> 
> Accidentally specified a smaller record size, bring it back
> to the same size as we had when we used the config file.
> 
> Signed-off-by: Olof Johansson <olofj@chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Reviewed-by: Sameer Nanda <snanda@chromium.org>

Applied, thanks.


-Olof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-06 22:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16  7:25 [PATCHv2 0/3] platform/chrome: upstream changes Enric Balletbo i Serra
2016-02-16  7:25 ` [PATCHv2 1/3] platform/chrome: chromeos_laptop: Add Leon Touch Enric Balletbo i Serra
2016-03-06 20:03   ` Olof Johansson
2016-02-16  7:25 ` [PATCHv2 2/3] platform/chrome: pstore: probe for ramoops buffer using acpi Enric Balletbo i Serra
2016-03-06 20:04   ` Olof Johansson
2016-02-16  7:25 ` [PATCHv2 3/3] platform/chrome: pstore: Move to larger record size Enric Balletbo i Serra
2016-03-06 20:04   ` Olof Johansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.