blob: 3ecf7a4c9cc0a9ab738e23d98f0baef6c8cece29 [file] [log] [blame]
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2018 Synaptics Incorporated */
#ifndef Galois_memmap_h
#define Galois_memmap_h (){}
#include "ctypes.h"
#pragma pack(1)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DOCC_H_BITOPS_
#define _DOCC_H_BITOPS_ (){}
#define _bSETMASK_(b) ((b)<32 ? (1<<((b)&31)) : 0)
#define _NSETMASK_(msb,lsb) (_bSETMASK_((msb)+1)-_bSETMASK_(lsb))
#define _bCLRMASK_(b) (~_bSETMASK_(b))
#define _NCLRMASK_(msb,lsb) (~_NSETMASK_(msb,lsb))
#define _BFGET_(r,msb,lsb) (_NSETMASK_((msb)-(lsb),0)&((r)>>(lsb)))
#define _BFSET_(r,msb,lsb,v) do{ (r)&=_NCLRMASK_(msb,lsb); (r)|=_NSETMASK_(msb,lsb)&((v)<<(lsb)); }while(0)
#endif
#ifndef h_MEMMAP
#define h_MEMMAP (){}
#define MEMMAP_AVIO_REG_BASE 0xF7400000
#define MEMMAP_AVIO_REG_SIZE 0x200000
#define MEMMAP_AVIO_REG_DEC_BIT 0x15
#define MEMMAP_BCM_REG_BASE 0xF7930000
#define MEMMAP_BCM_REG_SIZE 0x10000
#define MEMMAP_BCM_REG_DEC_BIT 0x10
#define MEMMAP_AVIO_RESR0_BASE 0xF7BB0000
#define MEMMAP_AVIO_RESR0_SIZE 0x10000
#define MEMMAP_AVIO_RESR0_DEC_BIT 0x10
#define MEMMAP_AVIO_RESR1_BASE 0xF7C80000
#define MEMMAP_AVIO_RESR1_SIZE 0x20000
#define MEMMAP_AVIO_RESR1_DEC_BIT 0x11
#define MEMMAP_AVIO_SEMAPHORE_REG_BASE 0xF7EC0000
#define MEMMAP_AVIO_SEMAPHORE_REG_SIZE 0x10000
#define MEMMAP_AVIO_SEMAPHORE_DEC_BIT 0x10
#endif
#ifdef __cplusplus
}
#endif
#pragma pack()
#endif