Path: blob/master/arch/powerpc/include/asm/dcr-generic.h
15117 views
/*1* (c) Copyright 2006 Benjamin Herrenschmidt, IBM Corp.2* <[email protected]>3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See12* the GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License15* along with this program; if not, write to the Free Software16* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA17*/1819#ifndef _ASM_POWERPC_DCR_GENERIC_H20#define _ASM_POWERPC_DCR_GENERIC_H21#ifdef __KERNEL__22#ifndef __ASSEMBLY__2324enum host_type_t {DCR_HOST_MMIO, DCR_HOST_NATIVE, DCR_HOST_INVALID};2526typedef struct {27enum host_type_t type;28union {29dcr_host_mmio_t mmio;30dcr_host_native_t native;31} host;32} dcr_host_t;3334extern bool dcr_map_ok_generic(dcr_host_t host);3536extern dcr_host_t dcr_map_generic(struct device_node *dev, unsigned int dcr_n,37unsigned int dcr_c);38extern void dcr_unmap_generic(dcr_host_t host, unsigned int dcr_c);3940extern u32 dcr_read_generic(dcr_host_t host, unsigned int dcr_n);4142extern void dcr_write_generic(dcr_host_t host, unsigned int dcr_n, u32 value);4344#endif /* __ASSEMBLY__ */45#endif /* __KERNEL__ */46#endif /* _ASM_POWERPC_DCR_GENERIC_H */4748495051