at v6.19 33 lines 1.1 kB view raw
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * (c) Copyright 2006 Benjamin Herrenschmidt, IBM Corp. 4 * <benh@kernel.crashing.org> 5 */ 6 7#ifndef _ASM_POWERPC_DCR_H 8#define _ASM_POWERPC_DCR_H 9#ifdef __KERNEL__ 10#ifndef __ASSEMBLER__ 11#ifdef CONFIG_PPC_DCR 12 13#include <asm/dcr-native.h> 14 15typedef dcr_host_native_t dcr_host_t; 16#define DCR_MAP_OK(host) dcr_map_ok_native(host) 17#define dcr_map(dev, dcr_n, dcr_c) dcr_map_native(dev, dcr_n, dcr_c) 18#define dcr_unmap(host, dcr_c) dcr_unmap_native(host, dcr_c) 19#define dcr_read(host, dcr_n) dcr_read_native(host, dcr_n) 20#define dcr_write(host, dcr_n, value) dcr_write_native(host, dcr_n, value) 21 22/* 23 * additional helpers to read the DCR * base from the device-tree 24 */ 25struct device_node; 26extern unsigned int dcr_resource_start(const struct device_node *np, 27 unsigned int index); 28extern unsigned int dcr_resource_len(const struct device_node *np, 29 unsigned int index); 30#endif /* CONFIG_PPC_DCR */ 31#endif /* __ASSEMBLER__ */ 32#endif /* __KERNEL__ */ 33#endif /* _ASM_POWERPC_DCR_H */