Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Joshua Henderson <joshua.henderson@microchip.com>
0004  * Copyright (C) 2015 Microchip Technology Inc.  All rights reserved.
0005  */
0006 #ifndef _ASM_MACH_PIC32_H
0007 #define _ASM_MACH_PIC32_H
0008 
0009 #include <linux/io.h>
0010 
0011 /*
0012  * PIC32 register offsets for SET/CLR/INV where supported.
0013  */
0014 #define PIC32_CLR(_reg)     ((_reg) + 0x04)
0015 #define PIC32_SET(_reg)     ((_reg) + 0x08)
0016 #define PIC32_INV(_reg)     ((_reg) + 0x0C)
0017 
0018 /*
0019  * PIC32 Base Register Offsets
0020  */
0021 #define PIC32_BASE_CONFIG   0x1f800000
0022 #define PIC32_BASE_OSC      0x1f801200
0023 #define PIC32_BASE_RESET    0x1f801240
0024 #define PIC32_BASE_PPS      0x1f801400
0025 #define PIC32_BASE_UART     0x1f822000
0026 #define PIC32_BASE_PORT     0x1f860000
0027 #define PIC32_BASE_DEVCFG2  0x1fc4ff44
0028 
0029 /*
0030  * Register unlock sequence required for some register access.
0031  */
0032 void pic32_syskey_unlock_debug(const char *fn, const ulong ln);
0033 #define pic32_syskey_unlock()   \
0034     pic32_syskey_unlock_debug(__func__, __LINE__)
0035 
0036 #endif /* _ASM_MACH_PIC32_H */