devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Pisati <p.pisati-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-dt <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: omap_wdt: node present in device-tree but kmod is not autoloaded
Date: Tue, 25 Aug 2015 16:06:07 +0200	[thread overview]
Message-ID: <20150825140607.GA23311@luxor.wired.org> (raw)

The question is two-folded, hence the crossposting.

I have a kernel that runs perfectly on my beaglebone black, except for one thing
- the kmod for the watchdog is not autoloaded upon boot albeit the device-tree
node is present:

ubuntu@beaglebone:~$ dmesg | grep wdt
ubuntu@beaglebone:~$ ll /dev/watch* 
ls: cannot access /dev/watch*: No such file or directory
ubuntu@beaglebone:~$ ls -la /proc/device-tree/ocp/wdt\@44e35000/
total 0
drwxr-xr-x  2 root root  0 Aug 25 13:43 .
drwxr-xr-x 54 root root  0 Aug 25 13:43 ..
-r--r--r--  1 root root 13 Aug 25 13:43 compatible
-r--r--r--  1 root root  4 Aug 25 13:43 interrupts
-r--r--r--  1 root root  4 Aug 25 13:43 name
-r--r--r--  1 root root  8 Aug 25 13:43 reg
-r--r--r--  1 root root 10 Aug 25 13:43 ti,hwmods
ubuntu@beaglebone:~$ cat /proc/device-tree/ocp/wdt\@44e35000/compatible 
ti,omap3-wdt
ubuntu@beaglebone:~$ ls -la /sys/bus/platform/devices/ocp/*wdt*
total 0
drwxr-xr-x  3 root root    0 Aug 25 13:49 ./
drwxr-xr-x 33 root root    0 Aug 25 13:49 ../
-rw-r--r--  1 root root 4096 Aug 25 13:49 driver_override
-r--r--r--  1 root root 4096 Aug 25 13:49 modalias
lrwxrwxrwx  1 root root    0 Aug 25 13:49 of_node ->
../../../../firmware/devicetree/base/ocp/wdt@44e35000/
drwxr-xr-x  2 root root    0 Aug 25 13:49 power/
lrwxrwxrwx  1 root root    0 Aug 25 13:49 subsystem -> ../../../../bus/platform/
-rw-r--r--  1 root root 4096 Aug 25 13:49 uevent

and if i manually load the module:

ubuntu@beaglebone:~$ sudo modprobe omap_wdt
ubuntu@beaglebone:~$ dmesg | grep wdt
[  388.104283] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
ubuntu@beaglebone:~$ ls -la /dev/watchdog*
crw------- 1 root root  10, 130 Aug 25 13:46 /dev/watchdog
crw------- 1 root root 251,   0 Aug 25 13:46 /dev/watchdog0
ubuntu@beaglebone:~$ ls -la /sys/bus/platform/devices/ocp/*wdt*                                                             
total 0
drwxr-xr-x  3 root root    0 Aug 25 13:53 .
drwxr-xr-x 33 root root    0 Aug 25 13:49 ..
lrwxrwxrwx  1 root root    0 Aug 25 13:53 driver ->
../../../../bus/platform/drivers/omap_wdt
-rw-r--r--  1 root root 4096 Aug 25 13:49 driver_override
-r--r--r--  1 root root 4096 Aug 25 13:49 modalias
lrwxrwxrwx  1 root root    0 Aug 25 13:49 of_node ->
../../../../firmware/devicetree/base/ocp/wdt@44e35000
drwxr-xr-x  2 root root    0 Aug 25 13:49 power
lrwxrwxrwx  1 root root    0 Aug 25 13:49 subsystem -> ../../../../bus/platform
-rw-r--r--  1 root root 4096 Aug 25 13:49 uevent

and then the device works as expected.

So here are my questions:

1) My understanding was that, once a device node was present in the device-tree
and there was a compatible driver available, it would have been autoloaded, so why it's
not happening here?

2) And more importantly, how do i debug these situations?
Building a kernel with the driver built-in, and comparing the two dmesgs, didn't
show any noticeable difference either.

Any idea?
-- 
bye,
p.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2015-08-25 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150825140607.GA23311@luxor.wired.org \
    --to=p.pisati-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).