License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / drivers / staging / board / board.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
382063d9
MD
2#ifndef __BOARD_H__
3#define __BOARD_H__
72ee8626 4
382063d9
MD
5#include <linux/init.h>
6#include <linux/of.h>
7
225d68d8
GU
8struct board_staging_clk {
9 const char *clk;
10 const char *con_id;
11 const char *dev_id;
12};
13
14struct board_staging_dev {
15 /* Platform Device */
16 struct platform_device *pdev;
17 /* Clocks (optional) */
18 const struct board_staging_clk *clocks;
19 unsigned int nclocks;
20 /* Generic PM Domain (optional) */
21 const char *domain;
22};
23
72ee8626
GU
24struct resource;
25
382063d9
MD
26bool board_staging_dt_node_available(const struct resource *resource,
27 unsigned int num_resources);
72ee8626
GU
28int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
29void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
225d68d8
GU
30int board_staging_register_clock(const struct board_staging_clk *bsc);
31int board_staging_register_device(const struct board_staging_dev *dev);
32void board_staging_register_devices(const struct board_staging_dev *devs,
33 unsigned int ndevs);
382063d9
MD
34
35#define board_staging(str, fn) \
36static int __init runtime_board_check(void) \
37{ \
38 if (of_machine_is_compatible(str)) \
39 fn(); \
40 \
41 return 0; \
42} \
43 \
b0c750f7 44device_initcall(runtime_board_check)
382063d9
MD
45
46#endif /* __BOARD_H__ */