linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/6] drivers: bus: add a new driver for WEIM
Date: Fri, 24 May 2013 15:16:53 +0800	[thread overview]
Message-ID: <519F13E5.2040701@freescale.com> (raw)
In-Reply-To: <201305231509.57651.arnd@arndb.de>

? 2013?05?23? 21:09, Arnd Bergmann ??:
> OTOH, I agree that it would be nicer if the clk could remain turned
> off as long as no children are active. Can we do a clk_disable()
> after setting up the timings for the children and then expect those
> to actually start up the clk again when they need it?
>
> Or to take things further: would it make sense to represent WEIM
> itself as a clock driver and perform the settings for each child
> only when it sets up its own clk?
>
If the child's subsystem supports it, we can do it.

The mtd nand does support this feature, it has @select_chip() hook.
We can enable/disable the clock in the @select_chip().

But the mtd NOR does _not_ supports it.
Please read the /drivers/mtd/maps/physmap_of.c and 
/drivers/mtd/chips/cfi_cmd_set_xxx.c.
Of course, we can add the feature to NOR subsystem. But that's another 
issue.

So the weim should enable the clock all the time now.


> I guess it would also make sense to use of_platform_populate() instead
> of of_platform_device_create() when creating the children, so we actually
I tried the of_platform_populate(), but failed.

firstly, we should set the timing for the device _before_ we do the 
of_platform_populate().
and i rewrite the weim_parse_dt() to:
------------------------------------------------------------------------------------------
static void weim_parse_dt(struct platform_device *pdev)
{
     struct device_node *child;

     for_each_child_of_node(pdev->dev.of_node, child) {
         if (!child->name)
             continue;

         if (weim_timing_setup(pdev, child)) {
             dev_err(&pdev->dev, "%s set timing failed.\n",
                 child->full_name);
             continue;
         }

     }
     if (!of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev))
         dev_err(&pdev->dev, "%s device create failed.\n",
             child->full_name);
}
------------------------------------------------------------------------------------------

The system hang at :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

## Booting kernel from Legacy Image at 10800000 ...
    Image Name:   Linux
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    4259851 Bytes =  4.1 MB
    Load Address: 10008000
    Entry Point:  10008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
OK

Starting kernel ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==



thanks
Huang Shijie

  reply	other threads:[~2013-05-24  7:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23  8:16 [PATCH V2 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie
2013-05-23  8:16 ` [PATCH V2 1/6] drivers: bus: add a new driver for WEIM Huang Shijie
2013-05-23  8:46   ` Alexander Shiyan
2013-05-23  9:02     ` Huang Shijie
2013-05-23  9:23   ` Sascha Hauer
2013-05-23  9:35     ` Huang Shijie
2013-05-23  9:53       ` Arnd Bergmann
2013-05-23 11:55         ` Sascha Hauer
2013-05-23 13:09           ` Arnd Bergmann
2013-05-24  7:16             ` Huang Shijie [this message]
2013-05-24  7:19               ` Sascha Hauer
2013-05-23 10:19   ` Russell King - ARM Linux
2013-05-24  2:42     ` Huang Shijie
2013-05-23  8:16 ` [PATCH V2 2/6] ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM Huang Shijie
2013-05-23  8:16 ` [PATCH V2 3/6] ARM: dts: imx6qdl: add more information for WEIM Huang Shijie
2013-05-23  8:16 ` [PATCH V2 4/6] ARM: dts: imx6q: add pinctrl for WEIM NOR Huang Shijie
2013-05-23  9:14   ` Alexander Shiyan
2013-05-23  9:27     ` Huang Shijie
2013-05-23  9:39       ` Re[2]: " Alexander Shiyan
2013-05-23  9:52         ` Huang Shijie
2013-05-23  9:55           ` Re[2]: " Alexander Shiyan
2013-05-24  2:41             ` Huang Shijie
2013-05-23  8:16 ` [PATCH V2 5/6] ARM: dts: imx6dl: add a " Huang Shijie
2013-05-23  8:16 ` [PATCH V2 6/6] ARM: dts: imx6qdl: enable the " Huang Shijie

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=519F13E5.2040701@freescale.com \
    --to=b32955@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.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).