File: board.h

package info (click to toggle)
linux 6.1.137-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,408 kB
  • sloc: ansic: 23,468,339; asm: 266,595; sh: 110,522; makefile: 49,887; python: 36,990; perl: 36,834; cpp: 6,056; yacc: 4,908; lex: 2,725; awk: 1,440; ruby: 25; sed: 5
file content (46 lines) | stat: -rw-r--r-- 1,225 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __BOARD_H__
#define __BOARD_H__

#include <linux/init.h>
#include <linux/of.h>

struct board_staging_clk {
	const char *clk;
	const char *con_id;
	const char *dev_id;
};

struct board_staging_dev {
	/* Platform Device */
	struct platform_device *pdev;
	/* Clocks (optional) */
	const struct board_staging_clk *clocks;
	unsigned int nclocks;
	/* Generic PM Domain (optional) */
	const char *domain;
};

struct resource;

bool board_staging_dt_node_available(const struct resource *resource,
				     unsigned int num_resources);
int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
int board_staging_register_clock(const struct board_staging_clk *bsc);
int board_staging_register_device(const struct board_staging_dev *dev);
void board_staging_register_devices(const struct board_staging_dev *devs,
				    unsigned int ndevs);

#define board_staging(str, fn)			\
static int __init runtime_board_check(void)	\
{						\
	if (of_machine_is_compatible(str))	\
		fn();				\
						\
	return 0;				\
}						\
						\
device_initcall(runtime_board_check)

#endif /* __BOARD_H__ */