Messages in this thread | | | Date | Fri, 24 Mar 2017 12:28:59 +0000 | From | Mark Rutland <> | Subject | Re: [PATCH 5/5] firmware: google memconsole: Add ARM/ARM64 support |
| |
On Thu, Mar 23, 2017 at 10:04:29PM +0100, Thierry Escande wrote: > This patch expands the Google firmware memory console driver to also > work on certain tree based platforms running coreboot, such as ARM/ARM64 > Chromebooks. This patch now adds another path to find the coreboot table > through the device tree. In order to find that, a second level > bootloader must have installed the 'coreboot' compatible device tree > node that describes its base address and size.
What exactly is the "memory console"? Is it a log that coreboot writes into?
[...]
> +static const struct of_device_id coreboot_of_match[] = { > + { .compatible = "coreboot" }, > + {}, > +}; > + > +static struct platform_driver coreboot_table_of_driver = { > + .probe = coreboot_table_of_probe, > + .remove = coreboot_table_of_remove, > + .driver = { > + .name = "coreboot_table_of", > + .of_match_table = coreboot_of_match, > + }, > +}; > + > +static int __init platform_coreboot_table_of_init(void) > +{ > + struct platform_device *pdev; > + struct device_node *of_node; > + > + /* Limit device creation to the presence of /firmware/coreboot node */ > + of_node = of_find_node_by_path("/firmware/coreboot"); > + if (!of_node) > + return -ENODEV; > +
I don't beleive that you need this module init function. Please use the usual DT probing infrastrucutre instead, e.g. add:
MODULE_DEVICE_TABLE(of, coreboot_of_match); module_platform_driver(coreboot_table_of_driver);
Thanks, Mark.
| |