github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/soc/nxp/imx6ul/debug.go (about)

     1  // NXP i.MX6UL ARM debug signals
     2  // https://github.com/usbarmory/tamago
     3  //
     4  // Copyright (c) WithSecure Corporation
     5  // https://foundry.withsecure.com
     6  //
     7  // Use of this source code is governed by the license
     8  // that can be found in the LICENSE file.
     9  
    10  package imx6ul
    11  
    12  import (
    13  	"github.com/usbarmory/tamago/internal/reg"
    14  )
    15  
    16  const (
    17  	IOMUXC_GPR_GPR10 = 0x020e4028
    18  	GPR10_DBG_CLK_EN = 1
    19  	GPR10_DBG_EN     = 0
    20  )
    21  
    22  // Debug controls ARM invasive and non-invasive debug functionalities.
    23  func Debug(enable bool) {
    24  	reg.SetTo(IOMUXC_GPR_GPR10, GPR10_DBG_CLK_EN, enable)
    25  	reg.SetTo(IOMUXC_GPR_GPR10, GPR10_DBG_EN, enable)
    26  }