mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
powerpc: Add device-tree model to the hardware description
Add the model of the machine we're on to the hardware description, which is printed at boot and in case of an oops. eg: Hardware name: IBM,8247-22L Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220930082709.55830-4-mpe@ellerman.id.au
This commit is contained in:
parent
48b7019b6a
commit
5412297079
|
|
@ -715,6 +715,23 @@ static void __init tm_init(void)
|
|||
static void tm_init(void) { }
|
||||
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
||||
|
||||
static int __init
|
||||
early_init_dt_scan_model(unsigned long node, const char *uname,
|
||||
int depth, void *data)
|
||||
{
|
||||
const char *prop;
|
||||
|
||||
if (depth != 0)
|
||||
return 0;
|
||||
|
||||
prop = of_get_flat_dt_prop(node, "model", NULL);
|
||||
if (prop)
|
||||
seq_buf_printf(&ppc_hw_desc, "%s ", prop);
|
||||
|
||||
/* break now */
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
static void __init save_fscr_to_task(void)
|
||||
{
|
||||
|
|
@ -743,6 +760,8 @@ void __init early_init_devtree(void *params)
|
|||
if (!early_init_dt_verify(params))
|
||||
panic("BUG: Failed verifying flat device tree, bad version?");
|
||||
|
||||
of_scan_flat_dt(early_init_dt_scan_model, NULL);
|
||||
|
||||
#ifdef CONFIG_PPC_RTAS
|
||||
/* Some machines might need RTAS info for debugging, grab it now. */
|
||||
of_scan_flat_dt(early_init_dt_scan_rtas, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user