]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Xilinx: ARM: Device Config Driver: Fixed the jtag not working issue
authorvidhum <vidhum@xilinx.com>
Mon, 18 Jul 2011 10:55:22 +0000 (16:25 +0530)
committerJohn Linn <john.linn@xilinx.com>
Mon, 18 Jul 2011 15:07:22 +0000 (09:07 -0600)
The driver was preventing any debug tools like XMD from attaching
to the JTAG chain. This fixes that problem.

Signed-off-by: Vidhumouli H <vidhum@xilinx.com>
drivers/char/xilinx_devcfg.c

index 9e357fb2c99712a4256c15163273fe6c9a271308..25e3a5d969913880ed95287064b7eb680195c929 100755 (executable)
@@ -1301,6 +1301,8 @@ static int __devinit xdevcfg_drv_probe(struct platform_device *pdev)
        struct xdevcfg_drvdata *drvdata;
        dev_t devt;
        int retval;
+       u32 ctrlreg;
+
 
        regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!regs_res) {
@@ -1383,11 +1385,13 @@ static int __devinit xdevcfg_drv_probe(struct platform_device *pdev)
         *  - Set the throughput rate for maximum speed
         *  - Se the CPU in user mode
         */
+       ctrlreg = xdevcfg_readreg(drvdata->base_address + XDCFG_CTRL_OFFSET);
        xdevcfg_writereg(drvdata->base_address + XDCFG_CTRL_OFFSET,
                                (XDCFG_CTRL_PCFG_PROG_B_MASK |
                                XDCFG_CTRL_PCAP_PR_MASK |
                                XDCFG_CTRL_PCAP_MODE_MASK |
-                               XDCFG_CTRL_USER_MODE_MASK));
+                               XDCFG_CTRL_USER_MODE_MASK |
+                               ctrlreg));
 
 
        cdev_init(&drvdata->cdev, &xdevcfg_fops);