github.com/f-secure-foundry/tamago@v0.0.0-20220307101044-d73fcdd7f11b/soc/imx6/debug.go (about) 1 // https://github.com/f-secure-foundry/tamago 2 // 3 // Copyright (c) F-Secure Corporation 4 // https://foundry.f-secure.com 5 // 6 // Use of this source code is governed by the license 7 // that can be found in the LICENSE file. 8 9 package imx6 10 11 import ( 12 "github.com/f-secure-foundry/tamago/internal/reg" 13 ) 14 15 const ( 16 IOMUXC_GPR_GPR10 = 0x020e4028 17 GPR10_DBG_CLK_EN = 1 18 GPR10_DBG_EN = 0 19 ) 20 21 // EnableDebug enables the ARM invasive and non-invasive debug functionality. 22 func EnableDebug() { 23 reg.Set(IOMUXC_GPR_GPR10, GPR10_DBG_CLK_EN) 24 reg.Set(IOMUXC_GPR_GPR10, GPR10_DBG_EN) 25 } 26 27 // DisableDebug disables the ARM invasive and non-invasive debug functionality. 28 func DisableDebug() { 29 reg.Clear(IOMUXC_GPR_GPR10, GPR10_DBG_CLK_EN) 30 reg.Clear(IOMUXC_GPR_GPR10, GPR10_DBG_EN) 31 }