0001
0002 #ifndef __BOARD_H__
0003 #define __BOARD_H__
0004
0005 #include <linux/init.h>
0006 #include <linux/of.h>
0007
0008 struct board_staging_clk {
0009 const char *clk;
0010 const char *con_id;
0011 const char *dev_id;
0012 };
0013
0014 struct board_staging_dev {
0015
0016 struct platform_device *pdev;
0017
0018 const struct board_staging_clk *clocks;
0019 unsigned int nclocks;
0020
0021 const char *domain;
0022 };
0023
0024 struct resource;
0025
0026 bool board_staging_dt_node_available(const struct resource *resource,
0027 unsigned int num_resources);
0028 int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
0029 void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
0030 int board_staging_register_clock(const struct board_staging_clk *bsc);
0031 int board_staging_register_device(const struct board_staging_dev *dev);
0032 void board_staging_register_devices(const struct board_staging_dev *devs,
0033 unsigned int ndevs);
0034
0035 #define board_staging(str, fn) \
0036 static int __init runtime_board_check(void) \
0037 { \
0038 if (of_machine_is_compatible(str)) \
0039 fn(); \
0040 \
0041 return 0; \
0042 } \
0043 \
0044 device_initcall(runtime_board_check)
0045
0046 #endif