board.h (1225B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __BOARD_H__ 3#define __BOARD_H__ 4 5#include <linux/init.h> 6#include <linux/of.h> 7 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 24struct resource; 25 26bool board_staging_dt_node_available(const struct resource *resource, 27 unsigned int num_resources); 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); 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); 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 \ 44device_initcall(runtime_board_check) 45 46#endif /* __BOARD_H__ */