linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Patch IMX audmux debugfs.
@ 2010-11-09 23:11 Bill Pringlemeir
  2010-11-10 11:19 ` Sergei Shtylyov
  2010-11-10 15:26 ` Sascha Hauer
  0 siblings, 2 replies; 16+ messages in thread
From: Bill Pringlemeir @ 2010-11-09 23:11 UTC (permalink / raw)
  To: linux-arm-kernel


$ mount -t debugfs debugfs /sys/kernel/debug
$ cd /sys/kernel/debug/audmux
$ cat *
[crashes when accessing ssi7]

The index is one based, but the register map is zero based.  So the
ssi1 is actually sending info for ssi2.  Also, the ssi7 touches
non-existent data and can cause an exception (only registers sets 1-6
exist).

Alternatively, the MX31_AUDMUX_PORT6_SSI_PINS_6 and
MX27_AUDMUX_PPCR3_SSI_PINS_3 constants could be used for the loop
termination, but maybe that means conditionalization (and there are no
MX25 constants).

diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index f9e7cdb..0547145 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -66,7 +66,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
 {
        ssize_t ret;
        char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
-       int port = (int)file->private_data;
+       int port = ((int)file->private_data) - 1;
        u32 pdcr, ptcr;
 
        if (!buf)
@@ -150,7 +150,7 @@ static void audmux_debugfs_init(void)
                return;
        }
 
-       for (i = 1; i < 8; i++) {
+       for (i = 1; i < 7; i++) {
                snprintf(buf, sizeof(buf), "ssi%d", i);
                if (!debugfs_create_file(buf, 0444, audmux_debugfs_root,
                                         (void *)i, &audmux_debugfs_fops))

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-11-30 21:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 23:11 Patch IMX audmux debugfs Bill Pringlemeir
2010-11-10 11:19 ` Sergei Shtylyov
2010-11-10 15:26 ` Sascha Hauer
2010-11-11 16:38   ` Bill Pringlemeir
2010-11-12  7:17     ` Sascha Hauer
2010-11-12 11:49       ` Mark Brown
2010-11-14 20:15         ` Bill Pringlemeir
     [not found]         ` <87oc9rk6fe.fsf@sympatico.ca>
2010-11-15 15:09           ` [Patch v3] Fix audmuxv2 debugfs indexing. [was: Patch IMX audmux debugfs.] Bill Pringlemeir
2010-11-15 15:30             ` Mark Brown
2010-11-15 15:53               ` [Patch v3] Fix audmuxv2 debugfs indexing Bill Pringlemeir
     [not found]               ` <87oc9qeg75.fsf@sympatico.ca>
2010-11-15 16:10                 ` Bill Pringlemeir
2010-11-15 16:26                   ` Mark Brown
2010-11-15 18:17                     ` Bill Pringlemeir
     [not found]                     ` <8762vy4fki.fsf@sympatico.ca>
2010-11-19 15:47                       ` Bill Pringlemeir
     [not found]                       ` <87r5ehuxh5.fsf@sympatico.ca>
2010-11-30 21:07                         ` Bill Pringlemeir
     [not found]           ` <87zktavd2f.fsf_-_@sympatico.ca>
2010-11-15 15:24             ` Bill Pringlemeir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).