soc.h (ead5d1f4d877e92c051e1a1ade623d0d30e71619) | soc.h (33def8498fdde180023444b08e12b72a9efed41d) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2020 Western Digital Corporation or its affiliates. 4 * Copyright (C) 2020 Google, Inc 5 */ 6 7#ifndef _ASM_RISCV_SOC_H 8#define _ASM_RISCV_SOC_H 9 10#include <linux/of.h> 11#include <linux/linkage.h> 12#include <linux/types.h> 13 14#define SOC_EARLY_INIT_DECLARE(name, compat, fn) \ 15 static const struct of_device_id __soc_early_init__##name \ | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2020 Western Digital Corporation or its affiliates. 4 * Copyright (C) 2020 Google, Inc 5 */ 6 7#ifndef _ASM_RISCV_SOC_H 8#define _ASM_RISCV_SOC_H 9 10#include <linux/of.h> 11#include <linux/linkage.h> 12#include <linux/types.h> 13 14#define SOC_EARLY_INIT_DECLARE(name, compat, fn) \ 15 static const struct of_device_id __soc_early_init__##name \ |
16 __used __section(__soc_early_init_table) \ | 16 __used __section("__soc_early_init_table") \ |
17 = { .compatible = compat, .data = fn } 18 19void soc_early_init(void); 20 21extern unsigned long __soc_early_init_table_start; 22extern unsigned long __soc_early_init_table_end; 23 24/* --- 16 unchanged lines hidden (view full) --- 41 \ 42 static __init __used \ 43 void *__soc_builtin_dtb_f__##name(void) \ 44 { \ 45 return (void *)&__dtb_##name##_begin; \ 46 } \ 47 \ 48 static const struct soc_builtin_dtb __soc_builtin_dtb__##name \ | 17 = { .compatible = compat, .data = fn } 18 19void soc_early_init(void); 20 21extern unsigned long __soc_early_init_table_start; 22extern unsigned long __soc_early_init_table_end; 23 24/* --- 16 unchanged lines hidden (view full) --- 41 \ 42 static __init __used \ 43 void *__soc_builtin_dtb_f__##name(void) \ 44 { \ 45 return (void *)&__dtb_##name##_begin; \ 46 } \ 47 \ 48 static const struct soc_builtin_dtb __soc_builtin_dtb__##name \ |
49 __used __section(__soc_builtin_dtb_table) = \ | 49 __used __section("__soc_builtin_dtb_table") = \ |
50 { \ 51 .vendor_id = vendor, \ 52 .arch_id = arch, \ 53 .imp_id = impl, \ 54 .dtb_func = __soc_builtin_dtb_f__##name, \ 55 } 56 57extern unsigned long __soc_builtin_dtb_table_start; 58extern unsigned long __soc_builtin_dtb_table_end; 59 60void *soc_lookup_builtin_dtb(void); 61 62#endif | 50 { \ 51 .vendor_id = vendor, \ 52 .arch_id = arch, \ 53 .imp_id = impl, \ 54 .dtb_func = __soc_builtin_dtb_f__##name, \ 55 } 56 57extern unsigned long __soc_builtin_dtb_table_start; 58extern unsigned long __soc_builtin_dtb_table_end; 59 60void *soc_lookup_builtin_dtb(void); 61 62#endif |