dm thin metadata: fix __udivdi3 undefined on 32-bit
[linux/fpc-iii.git] / drivers / staging / board / board.h
blob42ed125132201327eec54521c68a5d4ecdda7bcf
1 #ifndef __BOARD_H__
2 #define __BOARD_H__
4 #include <linux/init.h>
5 #include <linux/of.h>
7 struct board_staging_clk {
8 const char *clk;
9 const char *con_id;
10 const char *dev_id;
13 struct board_staging_dev {
14 /* Platform Device */
15 struct platform_device *pdev;
16 /* Clocks (optional) */
17 const struct board_staging_clk *clocks;
18 unsigned int nclocks;
19 /* Generic PM Domain (optional) */
20 const char *domain;
23 struct resource;
25 bool board_staging_dt_node_available(const struct resource *resource,
26 unsigned int num_resources);
27 int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
28 void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
29 int board_staging_register_clock(const struct board_staging_clk *bsc);
30 int board_staging_register_device(const struct board_staging_dev *dev);
31 void board_staging_register_devices(const struct board_staging_dev *devs,
32 unsigned int ndevs);
34 #define board_staging(str, fn) \
35 static int __init runtime_board_check(void) \
36 { \
37 if (of_machine_is_compatible(str)) \
38 fn(); \
40 return 0; \
41 } \
43 device_initcall(runtime_board_check)
45 #endif /* __BOARD_H__ */