mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-01-19 15:40:08 +00:00
Since we don't have to worry about writing positionally-independent code, we can safely pass around globally defined structures and have more fun with pointers without falling into UB.
30 lines
582 B
C
30 lines
582 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Board files registration framework
|
|
* Copyright (c) 2024, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
|
|
*/
|
|
#ifndef BOARD_H_ /* Include guard */
|
|
#define BOARD_H_
|
|
|
|
#include <stddef.h>
|
|
|
|
struct board_ops {
|
|
int (*early_init)(void);
|
|
int (*drivers_init)(void);
|
|
int (*late_init)(void);
|
|
};
|
|
|
|
struct board_data {
|
|
const char *name;
|
|
struct board_ops ops;
|
|
unsigned int quirks;
|
|
};
|
|
|
|
extern void init_board_funcs(void *board);
|
|
|
|
extern int board_driver_setup(void);
|
|
extern int board_init(void);
|
|
extern int board_late_init(void);
|
|
|
|
#endif // BOARD_H_
|