Commit e9e352e9 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform

Pull chrome platform cleanups and improvements from Olof Johansson:
 - Use deferred probing on Chrome OS platforms for the i2c device
   registration.  This fixes a long-standing race of initialization of
   touchpad/screen on Chromebooks.
 - Added in platform device registration for pstore console on supported
   hardware
 - Misc smaller fixes (__initdata, module exit cleanup, etc)

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
  platform/chrome: unregister platform driver/device when module exit
  platform/chrome: Make i2c_adapter_names static
  platform/chrome: chromeos_laptop - fix incorrect placement of __initdata tag
  platform/chrome: chromeos_laptop - Use deferred probing
  platform/chrome: chromeos_laptop - Restructure device associations
  platform/chrome: Add pstore platform_device
parents b3a4bcaa 2b8454a7
......@@ -25,4 +25,18 @@ config CHROMEOS_LAPTOP
If you have a supported Chromebook, choose Y or M here.
The module will be called chromeos_laptop.
config CHROMEOS_PSTORE
tristate "Chrome OS pstore support"
---help---
This module instantiates the persistent storage on x86 ChromeOS
devices. It can be used to store away console logs and crash
information across reboots.
The range of memory used is 0xf00000-0x1000000, traditionally
the memory used to back VGA controller memory.
If you have a supported Chromebook, choose Y or M here.
The module will be called chromeos_pstore.
endif # CHROMEOS_PLATFORMS
obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o
obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o
This diff is collapsed.
/*
* chromeos_pstore.c - Driver to instantiate Chromebook ramoops device
*
* Copyright (C) 2013 Google, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2 of the License.
*/
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pstore_ram.h>
static struct dmi_system_id chromeos_pstore_dmi_table[] __initdata = {
{
/*
* Today all Chromebooks/boxes ship with GOOGLE as vendor and
* coreboot as bios vendor. No other systems with this
* combination are known to date.
*/
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
},
},
{
/*
* The first Samsung Chromebox and Chromebook Series 5 550 use
* coreboot but with Samsung as the system vendor.
*/
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
},
},
{
/* x86-alex, the first Samsung Chromebook. */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
},
},
{
/* x86-mario, the Cr-48 pilot device from Google. */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IEC"),
DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
},
},
{
/* x86-zgb, the first Acer Chromebook. */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ACER"),
DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
},
},
{ }
};
MODULE_DEVICE_TABLE(dmi, chromeos_pstore_dmi_table);
/*
* On x86 chromebooks/boxes, the firmware will keep the legacy VGA memory
* range untouched across reboots, so we use that to store our pstore
* contents for panic logs, etc.
*/
static struct ramoops_platform_data chromeos_ramoops_data = {
.mem_size = 0x100000,
.mem_address = 0xf00000,
.record_size = 0x20000,
.console_size = 0x20000,
.ftrace_size = 0x20000,
.dump_oops = 1,
};
static struct platform_device chromeos_ramoops = {
.name = "ramoops",
.dev = {
.platform_data = &chromeos_ramoops_data,
},
};
static int __init chromeos_pstore_init(void)
{
if (dmi_check_system(chromeos_pstore_dmi_table))
return platform_device_register(&chromeos_ramoops);
return -ENODEV;
}
static void __exit chromeos_pstore_exit(void)
{
platform_device_unregister(&chromeos_ramoops);
}
module_init(chromeos_pstore_init);
module_exit(chromeos_pstore_exit);
MODULE_DESCRIPTION("Chrome OS pstore module");
MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment