From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Yanbo Li <yanbol@qti.qualcomm.com>
Cc: dreamfly281@gmail.com, linux-wireless@vger.kernel.org,
michal.kazior@tieto.com, ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: Add the target register access and memory dump debugfs interface
Date: Mon, 24 Nov 2014 15:50:07 +0200 [thread overview]
Message-ID: <871tos7lo0.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1416656922-6645-1-git-send-email-yanbol@qti.qualcomm.com> (Yanbo Li's message of "Sat, 22 Nov 2014 19:48:42 +0800")
Yanbo Li <yanbol@qti.qualcomm.com> writes:
> The debugfs interface reg_addr®_val used to read and write the target
> register.
> The interface mmem_val used to dump the targer memory and also can be
> used to assign value to target memory
>
> The basic usage explain as below:
>
> Register read/write:
> reg_addr (the register address) (read&write)
> reg_value (the register value, output is ASCII) (read&write)
>
> Read operation:
> 1. Write the reg address to reg_addr
> IE: echo 0x100000 > reg_addr
> 2. Read the value from reg_value
> IE: cat reg_value
> Write operation:
> 1. Write the reg address to reg_addr IE: echo 0x100000 > reg_addr
> 2. Write the value to the reg_value IE: echo 0x2400 > reg_value
>
> Target memory dump:
> mem_value (the target memory, access with the length and start address
> (read&write)
> Read operation:
>
> 1: Read 4K(bs*count)) from address 0x400000(bs*skip)
> dd if=mem_value bs=4 count=1024 skip=1048576 | xxd -g1
>
> 2: Read 0x50000(bs*count) from address 0x400000(bs*skip)
> dd if=mem_value bs=4 count=81920 skip=1048576 | xxd -g1
>
> Write operation:
>
> 1: Write the 0x01020304 to address 0x400400(bs*seek)
> echo 0x01020304 | xxd -r | dd of=mem_value bs=4 seek=1048832
>
> 2: Read the memory and then write back after edit
> dd if=mem_value bs=4 count=1024 skip=1048576 > tmp.bin
> edit the tmp.bin
> dd if=tmp.bin of=mem_value bs=4 count=4 seek=1048576
>
> It suggests assign the 4 align number to bs, IE, 4, 8, 16 ....
> Cause the target memory width is 32bit
>
> Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com>
The commit log is quite hard to read due to formatting, but I can clean
that up.
> + spin_lock_bh(&ar->data_lock);
> + reg_addr = ar->debug.reg_addr;
> + spin_unlock_bh(&ar->data_lock);
[...]
> + spin_lock_bh(&ar->data_lock);
> + ar->debug.reg_addr = reg_addr;
> + spin_unlock_bh(&ar->data_lock);
[...]
> + spin_lock_bh(&ar->data_lock);
> + reg_addr = ar->debug.reg_addr;
> + spin_unlock_bh(&ar->data_lock);
[...]
> + spin_lock_bh(&ar->data_lock);
> + reg_addr = ar->debug.reg_addr;
> + spin_unlock_bh(&ar->data_lock);
I admit that I'm far from a locking expert, but does that make any
difference in the functionality?
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-11-24 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 11:48 [PATCH] ath10k: Add the target register access and memory dump debugfs interface Yanbo Li
2014-11-24 13:50 ` Kalle Valo [this message]
2014-11-24 14:03 ` Michal Kazior
2014-11-24 15:31 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tos7lo0.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=dreamfly281@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=yanbol@qti.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox