From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] FDT driver initialization function declaration
Date: Tue, 10 Jul 2012 15:49:09 +0200 [thread overview]
Message-ID: <4FFC32D5.8000705@monstr.eu> (raw)
In-Reply-To: <CAPnjgZ0pJjUrU9kPE9WcP5hATCT+GQ1iOLvSDa0yX9qC0F+y5g@mail.gmail.com>
On 07/10/2012 03:18 PM, Simon Glass wrote:
> Hi Michal,
>
> On Tue, Jul 10, 2012 at 12:23 PM, Michal Simek <monstr at monstr.eu <mailto:monstr@monstr.eu>> wrote:
>
> Hi Simon, Wolfgang and others,
>
> just want to open new topic about FDT driver initialization function
> declaration.
>
> There are some drivers which can be simple move to fdt initialization.
> I have in my mind ethernet drivers and then systemace (I have ported it).
>
> Ethernet drivers use include/netdev.h file where all initialization
> functions are declared.
>
> For example:
>
> diff --git a/include/netdev.h b/include/netdev.h
> index 4724717..96e62ee 100644
> --- a/include/netdev.h
> +++ b/include/netdev.h
> @@ -105,6 +105,10 @@ int xilinx_emaclite_initialize(bd___t *bis, unsigned long base_addr,
> int xilinx_ll_temac_eth_init(bd_t *bis, unsigned long base_addr, int flags,
> unsigned long ctrl_addr);
>
> +#ifdef CONFIG_OF_CONTROL
> +int xilinx_emaclite_init(bd_t *bis);
> +#endif
>
>
> I don't think you need the #ifdef here.
Probably not but why not to protect it.
>
> +
> /*
> * As long as the Xilinx xps_ll_temac ethernet driver has not its own interface
> * exported by a public hader file, we need a global definition at this point.
>
>
> But where is the right place for systemace FDT initialization?
> include/fdtdec.h?
>
>
> or create new header and include it to fdtdec.h?
>
>
> Yes, but don't include it in fdtdec.h. Why do you need to?
I am not saying that I want to do, just saying that there should be one file which
cover all of these. Or of course if new device model will be used this will
be probably solved there.
>
>
> In this case it makes sense to add all FDT driven configuration to one header file
> to see what drivers can be used. Even for network drivers.
> Also listing all required parameters can be capture there.
>
> What do you think?
>
>
> That's the idea of the list of compatible strings in fdtdec.c / h.
>
> I would suggest for now, just doing ad-hoc init using a special function call,
or whatever else makes things easy. Yes fdt can potential clean all that stuff up,
but not without the device model. I think once we have the device model we can revisit
this (and I look forward to it). For now, just think of fdt as a way of enabling a driver,
or specifying the number of ports the driver controls, rather than a way of deciding which
driver inits get called.
Going to delay this FDT stuff till I get some more information about new device-model.
Thanks for your comments,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
next prev parent reply other threads:[~2012-07-10 13:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 10:23 [U-Boot] FDT driver initialization function declaration Michal Simek
2012-07-10 11:54 ` Wolfgang Denk
2012-07-10 12:24 ` Michal Simek
2012-07-10 13:00 ` Marek Vasut
2012-07-10 13:35 ` Michal Simek
2012-07-10 13:03 ` Wolfgang Denk
2012-07-10 13:12 ` Marek Vasut
2012-07-10 13:42 ` Michal Simek
2012-07-10 15:08 ` Marek Vasut
2012-07-11 6:16 ` Michal Simek
2012-07-11 9:52 ` Michal Simek
2012-07-12 7:10 ` [U-Boot] [U-Boot-DM] " Pavel Herrmann
2012-07-12 8:22 ` Michal Simek
2012-07-13 10:39 ` Tomas Hlavacek
2012-07-13 10:53 ` Marek Vasut
2012-07-10 13:47 ` [U-Boot] " Michal Simek
2012-07-10 15:11 ` Marek Vasut
2012-07-11 6:11 ` Michal Simek
2012-07-13 10:32 ` Marek Vasut
2012-07-10 13:05 ` Marek Vasut
2012-07-10 13:12 ` Simon Glass
2012-07-10 15:06 ` [U-Boot] [U-Boot-DM] " Marek Vasut
2012-07-10 13:46 ` [U-Boot] " Wolfgang Denk
2012-07-10 13:18 ` Simon Glass
2012-07-10 13:49 ` Michal Simek [this message]
2012-07-14 6:49 ` Simon Glass
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=4FFC32D5.8000705@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/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