socfpga_rstmgr.c (271431) | socfpga_rstmgr.c (297793) |
---|---|
1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 20 unchanged lines hidden (view full) --- 29 */ 30 31/* 32 * SOCFPGA Reset Manager. 33 * Chapter 3, Cyclone V Device Handbook (CV-5V2 2014.07.22) 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) 7 * ("CTSRD"), as part of the DARPA CRASH research programme. 8 * --- 20 unchanged lines hidden (view full) --- 29 */ 30 31/* 32 * SOCFPGA Reset Manager. 33 * Chapter 3, Cyclone V Device Handbook (CV-5V2 2014.07.22) 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/arm/altera/socfpga/socfpga_rstmgr.c 271431 2014-09-11 18:12:28Z br $"); | 37__FBSDID("$FreeBSD: head/sys/arm/altera/socfpga/socfpga_rstmgr.c 297793 2016-04-10 23:07:00Z pfg $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/bus.h> 42#include <sys/kernel.h> 43#include <sys/module.h> 44#include <sys/malloc.h> 45#include <sys/rman.h> --- 94 unchanged lines hidden (view full) --- 140 remap = REMAP_LWHPS2FPGA; 141 break; 142 case RSTMGR_SYSCTL_HPS2FPGA: 143 bit = BRGMODRST_HPS2FPGA; 144 remap = REMAP_HPS2FPGA; 145 break; 146 default: 147 return (1); | 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/bus.h> 42#include <sys/kernel.h> 43#include <sys/module.h> 44#include <sys/malloc.h> 45#include <sys/rman.h> --- 94 unchanged lines hidden (view full) --- 140 remap = REMAP_LWHPS2FPGA; 141 break; 142 case RSTMGR_SYSCTL_HPS2FPGA: 143 bit = BRGMODRST_HPS2FPGA; 144 remap = REMAP_HPS2FPGA; 145 break; 146 default: 147 return (1); |
148 }; | 148 } |
149 150 reg = READ4(sc, RSTMGR_BRGMODRST); 151 enable = reg & bit ? 0 : 1; 152 153 err = sysctl_handle_int(oidp, &enable, 0, req); 154 if (err || !req->newptr) 155 return (err); 156 --- 103 unchanged lines hidden --- | 149 150 reg = READ4(sc, RSTMGR_BRGMODRST); 151 enable = reg & bit ? 0 : 1; 152 153 err = sysctl_handle_int(oidp, &enable, 0, req); 154 if (err || !req->newptr) 155 return (err); 156 --- 103 unchanged lines hidden --- |