18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * init.c:  Initialize internal variables used by the PROM
48c2ecf20Sopenharmony_ci *          library functions.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <linux/kernel.h>
108c2ecf20Sopenharmony_ci#include <linux/init.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <asm/openprom.h>
138c2ecf20Sopenharmony_ci#include <asm/oplib.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct linux_romvec *romvec;
168c2ecf20Sopenharmony_cienum prom_major_version prom_vers;
178c2ecf20Sopenharmony_ciunsigned int prom_rev, prom_prev;
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/* The root node of the prom device tree. */
208c2ecf20Sopenharmony_ciint prom_root_node;
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/* Pointer to the device tree operations structure. */
238c2ecf20Sopenharmony_cistruct linux_nodeops *prom_nodeops;
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci/* You must call prom_init() before you attempt to use any of the
268c2ecf20Sopenharmony_ci * routines in the prom library.
278c2ecf20Sopenharmony_ci * It gets passed the pointer to the PROM vector.
288c2ecf20Sopenharmony_ci */
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_civoid __init prom_init(struct linux_romvec *rp)
318c2ecf20Sopenharmony_ci{
328c2ecf20Sopenharmony_ci	romvec = rp;
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci	/* Initialization successful. */
358c2ecf20Sopenharmony_ci	return;
368c2ecf20Sopenharmony_ci}
37