All of lore.kernel.org
 help / color / mirror / Atom feed
* mmc_test.ko usage
@ 2015-10-12  5:55 Muni Sekhar
  2015-10-12  6:10 ` Sheetal
  0 siblings, 1 reply; 4+ messages in thread
From: Muni Sekhar @ 2015-10-12  5:55 UTC (permalink / raw)
  To: linux-mmc

Hi ,


I tried to use the MMC host test driver (mmc_test.ko) for testing SD
Host controller hardware. When I load the driver I noticed that
mmc_test_probe() not getting called.

Could anyone specify the exact usage of mmc_test.ko?


-- 
Thanks,
Sekhar

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

* Re: mmc_test.ko usage
  2015-10-12  5:55 mmc_test.ko usage Muni Sekhar
@ 2015-10-12  6:10 ` Sheetal
  2015-10-12  6:41   ` Muni Sekhar
  0 siblings, 1 reply; 4+ messages in thread
From: Sheetal @ 2015-10-12  6:10 UTC (permalink / raw)
  To: Muni Sekhar, linux-mmc


On Monday 12 October 2015 11:25 AM, Muni Sekhar wrote:
> Hi ,
>
>
> I tried to use the MMC host test driver (mmc_test.ko) for testing SD
> Host controller hardware. When I load the driver I noticed that
> mmc_test_probe() not getting called.
>
> Could anyone specify the exact usage of mmc_test.ko?
>
Hello Muni Sekhar,

I think the following might help you in using MMC_TEST.KO Module

0. insmod mmc_test.ko
1. unbind the mmc block driver
echo mmc0:b368 > /sys/bus/mmc/drivers/mmcblk/unbind
2. bind the mmc_test driver
echo mmc0:b368 > /sys/bus/mmc/drivers/mmc_test/bind
3. mount the debugfs if you don't mount for debugfs
mount -t debugfs none /sys/kernel/debug
4. After mount, you can see the "/sys/kernel/debug/mmc0/mmc0:b368/test"
5. echo "test number" > /sys/kernel/debug/mmc0/mmc0\:b368/test
you can see the "test number" using the "cat /sys/kernel/debug/mmc0/mmc0\:b368/testlist"

The above has been copied straigtly from thelink  <http://forum.kernelnewbies.org/read.php?12,1991,116405#msg-116405>


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

* Re: mmc_test.ko usage
  2015-10-12  6:10 ` Sheetal
@ 2015-10-12  6:41   ` Muni Sekhar
  2015-10-12  7:28     ` Sheetal
  0 siblings, 1 reply; 4+ messages in thread
From: Muni Sekhar @ 2015-10-12  6:41 UTC (permalink / raw)
  To: Sheetal; +Cc: linux-mmc

On Mon, Oct 12, 2015 at 11:40 AM, Sheetal <sheetal.tigadoli@gmail.com> wrote:
>
> On Monday 12 October 2015 11:25 AM, Muni Sekhar wrote:
>>
>> Hi ,
>>
>>
>> I tried to use the MMC host test driver (mmc_test.ko) for testing SD
>> Host controller hardware. When I load the driver I noticed that
>> mmc_test_probe() not getting called.
>>
>> Could anyone specify the exact usage of mmc_test.ko?
>>
> Hello Muni Sekhar,
>
> I think the following might help you in using MMC_TEST.KO Module
>
> 0. insmod mmc_test.ko
> 1. unbind the mmc block driver
> echo mmc0:b368 > /sys/bus/mmc/drivers/mmcblk/unbind
> 2. bind the mmc_test driver
> echo mmc0:b368 > /sys/bus/mmc/drivers/mmc_test/bind
> 3. mount the debugfs if you don't mount for debugfs
> mount -t debugfs none /sys/kernel/debug
> 4. After mount, you can see the "/sys/kernel/debug/mmc0/mmc0:b368/test"
> 5. echo "test number" > /sys/kernel/debug/mmc0/mmc0\:b368/test
> you can see the "test number" using the "cat
> /sys/kernel/debug/mmc0/mmc0\:b368/testlist"
>
> The above has been copied straigtly from thelink
> <http://forum.kernelnewbies.org/read.php?12,1991,116405#msg-116405>
>



Hello Sheetal,



Thanks for the quick reply. I followed the steps but nmcblk unbind
fails “bash: echo: write error: No such device”. Any idea about this
failure?



# echo mmc0:b368 > /sys/bus/mmc/drivers/mmcblk/unbind

bash: echo: write error: No such device




# ls -al /sys/bus/mmc/drivers/mmcblk

total 0

drwxr-xr-x 2 root root    0 Oct 12 11:49 .

drwxr-xr-x 4 root root    0 Oct 12 11:49 ..

--w------- 1 root root 4096 Oct 12 11:52 bind

--w------- 1 root root 4096 Oct 12 11:49 uevent

--w------- 1 root root 4096 Oct 12 11:52 unbind



--
Thanks,
Sekhar

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

* Re: mmc_test.ko usage
  2015-10-12  6:41   ` Muni Sekhar
@ 2015-10-12  7:28     ` Sheetal
  0 siblings, 0 replies; 4+ messages in thread
From: Sheetal @ 2015-10-12  7:28 UTC (permalink / raw)
  To: Muni Sekhar; +Cc: linux-mmc


On Monday 12 October 2015 12:11 PM, Muni Sekhar wrote:
> On Mon, Oct 12, 2015 at 11:40 AM, Sheetal <sheetal.tigadoli@gmail.com> wrote:
>> On Monday 12 October 2015 11:25 AM, Muni Sekhar wrote:
>>> Hi ,
>>>
>>>
>>> I tried to use the MMC host test driver (mmc_test.ko) for testing SD
>>> Host controller hardware. When I load the driver I noticed that
>>> mmc_test_probe() not getting called.
>>>
>>> Could anyone specify the exact usage of mmc_test.ko?
>>>
>> Hello Muni Sekhar,
>>
>> I think the following might help you in using MMC_TEST.KO Module
>>
>> 0. insmod mmc_test.ko
>> 1. unbind the mmc block driver
>> echo mmc0:b368 > /sys/bus/mmc/drivers/mmcblk/unbind
>> 2. bind the mmc_test driver
>> echo mmc0:b368 > /sys/bus/mmc/drivers/mmc_test/bind
>> 3. mount the debugfs if you don't mount for debugfs
>> mount -t debugfs none /sys/kernel/debug
>> 4. After mount, you can see the "/sys/kernel/debug/mmc0/mmc0:b368/test"
>> 5. echo "test number" > /sys/kernel/debug/mmc0/mmc0\:b368/test
>> you can see the "test number" using the "cat
>> /sys/kernel/debug/mmc0/mmc0\:b368/testlist"
>>
>> The above has been copied straigtly from thelink
>> <http://forum.kernelnewbies.org/read.php?12,1991,116405#msg-116405>
>>
>
>
> Hello Sheetal,
>
>
>
> Thanks for the quick reply. I followed the steps but nmcblk unbind
> fails “bash: echo: write error: No such device”. Any idea about this
> failure?
>
>
>
> # echo mmc0:b368 > /sys/bus/mmc/drivers/mmcblk/unbind
>
> bash: echo: write error: No such device
>
>
>
>
> # ls -al /sys/bus/mmc/drivers/mmcblk
>
> total 0
>
> drwxr-xr-x 2 root root    0 Oct 12 11:49 .
>
> drwxr-xr-x 4 root root    0 Oct 12 11:49 ..
>
> --w------- 1 root root 4096 Oct 12 11:52 bind
>
> --w------- 1 root root 4096 Oct 12 11:49 uevent
>
> --w------- 1 root root 4096 Oct 12 11:52 unbind
>
>
>
> --
> Thanks,
> Sekhar
Hello Muni Sekhar,

You have to find the device node that has been created, In the example 
it was "mmc0:b368"
and appropriately modify the echo statement and every other statement 
where it is referenced

Thanks & Regards

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

end of thread, other threads:[~2015-10-12  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12  5:55 mmc_test.ko usage Muni Sekhar
2015-10-12  6:10 ` Sheetal
2015-10-12  6:41   ` Muni Sekhar
2015-10-12  7:28     ` Sheetal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.