bna: remove oper_state_cbfn from struct bna_rxf
[linux/fpc-iii.git] / drivers / platform / chrome / chromeos_pstore.c
blob34749200e4ab5504d5f9fc64e84d1f46867ef322
1 /*
2 * chromeos_pstore.c - Driver to instantiate Chromebook ramoops device
4 * Copyright (C) 2013 Google, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, version 2 of the License.
9 */
11 #include <linux/dmi.h>
12 #include <linux/module.h>
13 #include <linux/platform_device.h>
14 #include <linux/pstore_ram.h>
16 static struct dmi_system_id chromeos_pstore_dmi_table[] __initdata = {
19 * Today all Chromebooks/boxes ship with Google_* as version and
20 * coreboot as bios vendor. No other systems with this
21 * combination are known to date.
23 .matches = {
24 DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
25 DMI_MATCH(DMI_BIOS_VERSION, "Google_"),
29 /* x86-alex, the first Samsung Chromebook. */
30 .matches = {
31 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
32 DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
36 /* x86-mario, the Cr-48 pilot device from Google. */
37 .matches = {
38 DMI_MATCH(DMI_SYS_VENDOR, "IEC"),
39 DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
43 /* x86-zgb, the first Acer Chromebook. */
44 .matches = {
45 DMI_MATCH(DMI_SYS_VENDOR, "ACER"),
46 DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
49 { }
51 MODULE_DEVICE_TABLE(dmi, chromeos_pstore_dmi_table);
54 * On x86 chromebooks/boxes, the firmware will keep the legacy VGA memory
55 * range untouched across reboots, so we use that to store our pstore
56 * contents for panic logs, etc.
58 static struct ramoops_platform_data chromeos_ramoops_data = {
59 .mem_size = 0x100000,
60 .mem_address = 0xf00000,
61 .record_size = 0x20000,
62 .console_size = 0x20000,
63 .ftrace_size = 0x20000,
64 .dump_oops = 1,
67 static struct platform_device chromeos_ramoops = {
68 .name = "ramoops",
69 .dev = {
70 .platform_data = &chromeos_ramoops_data,
74 static int __init chromeos_pstore_init(void)
76 if (dmi_check_system(chromeos_pstore_dmi_table))
77 return platform_device_register(&chromeos_ramoops);
79 return -ENODEV;
82 static void __exit chromeos_pstore_exit(void)
84 platform_device_unregister(&chromeos_ramoops);
87 module_init(chromeos_pstore_init);
88 module_exit(chromeos_pstore_exit);
90 MODULE_DESCRIPTION("Chrome OS pstore module");
91 MODULE_LICENSE("GPL");