From: deepak.sikri@st.com (deepaksi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 6/7] ARM: SPEAr13xx: Add auxdata for Ethernet controller.
Date: Wed, 25 Jul 2012 10:03:16 +0530 [thread overview]
Message-ID: <500F770C.9000005@st.com> (raw)
In-Reply-To: <50068030.1050905@st.com>
Hi Arnd,
>>>
>> I don't think that the STMMAC_PLATFORM part is used by any other
>> platform in the mainline kernel, so we are definitely free to
>> rip out (parts of) the platform_data and replace them with DT
>> properties.
>> There is also no platform defining plat_stmmacenet_data
>> yet, which means that the code is completely untested at
>> the moment.
>>
>> Don't worry about any out-of-tree platforms, they can keep
>> their out of tree patches to add back the platform data if
>> they don't want to move to DT booting.
>>
>> Since all the data you are adding to spear1340.c is constant
>> anyway, I suppose that means this data is specific to
>> the spear1340 soc, not to a particular board or configuration.
>> I would suggest you add a preset like
>>
>> static const struct of_device_id stmmac_dt_ids[] = {
>> { .compatible = "st,spear600-gmac", .data =&spear600_data},
>> { .compatible = "st,spear1340-gmac", .data =&spear1340_data}
>> };
>>
>> that contains all the soc-specific data. You can probably make
>> that "const" and just kill off the platform_data path in the
>> driver.
>
I am sorry but bringing alive this discussion once again, as we have
some implementation
specific open points.
1. In case we go by the above proposal, it kind of solves a few things
for us, such as
- Through the DT blob it was difficult to plug in some of the platform
specific callbacks
which kind of did few things that driver needed before it could be
operational. In SPEAr
architecture we have a miscellaneous space which provides SOC specific
initializations used by devices which can be handled by these callbacks.
Now with the approach suggested, we have the flexibility to add on these
callbacks,
where DT is not sufficient and move further.
*But there are few catches/ query I have with me.*
1. Within the driver space now, even if it is a stmmac_platform.c file
we are kind of adding
a non driver related miscellaneous space (SoC specific) to do some
initializations.
Will that be fine to do all such initializations in driver ?
2. If yes, then it is kind of moving all the platform related
initializations into driver, and these
could be varying across machines, for example with SPEAr, 6xx /3xx/13xx
may all have
different callbacks; and then take it to next level when the stmmac
driver would be shared
across the platforms, and all initializations will plug into this file.
It sounds more of collaborating of all the ethernet driver information
which previously existed
across platforms into one area, and making the driver space untidy.
I would seek your opinion and suggestions on this.
Regards
Deepak
next prev parent reply other threads:[~2012-07-25 4:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 9:23 [PATCH V2 0/7] ARM: SPEAr13xx: Minor fixes and updation Vipul Kumar Samar
2012-07-13 9:23 ` [PATCH V2 1/7] ARM: SPEAr13xx: Fix Interrupt bindings Vipul Kumar Samar
2012-07-13 9:23 ` [PATCH V2 2/7] clk: SPEAr1340: Fix clk enable register for uart1 and i2c1 Vipul Kumar Samar
2012-07-13 9:23 ` [PATCH V2 3/7] clk: SPEAr13xx: Add localtimer (twd) clock support Vipul Kumar Samar
2012-07-13 9:23 ` [PATCH V2 4/7] Clk : SPEAr13xx: Register con_id for Ethernet phy clks Vipul Kumar Samar
2012-07-13 9:23 ` [PATCH V2 5/7] Clk: SPEAr1340: Update sys clock parent array Vipul Kumar Samar
2012-07-13 10:18 ` viresh kumar
2012-07-13 9:23 ` [PATCH V2 6/7] ARM: SPEAr13xx: Add auxdata for Ethernet controller Vipul Kumar Samar
2012-07-13 10:30 ` viresh kumar
2012-07-13 14:22 ` Arnd Bergmann
2012-07-17 10:25 ` deepaksi
2012-07-17 10:41 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-17 10:00 ` deepaksi
2012-07-17 16:53 ` Arnd Bergmann
2012-07-18 9:21 ` deepaksi
2012-07-25 4:33 ` deepaksi [this message]
2012-07-25 6:31 ` Arnd Bergmann
2012-07-25 7:34 ` Shiraz Hashim
2012-07-25 17:10 ` Arnd Bergmann
2012-07-26 4:51 ` Shiraz Hashim
2012-07-26 21:44 ` Arnd Bergmann
2012-07-14 11:41 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-13 9:23 ` [PATCH V2 7/7] net: stmmac: Overwrite platform data if passed from auxdata Vipul Kumar Samar
2012-07-13 10:17 ` viresh kumar
2012-07-13 10:33 ` vipul kumar samar
2012-07-13 10:48 ` viresh kumar
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=500F770C.9000005@st.com \
--to=deepak.sikri@st.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 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.