public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: vipulkumar.samar@st•com (vipul kumar samar)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2 7/7] net: stmmac: Overwrite platform data if passed from auxdata
Date: Fri, 13 Jul 2012 16:03:40 +0530	[thread overview]
Message-ID: <4FFFF984.5070905@st.com> (raw)
In-Reply-To: <CAOh2x=nn_Z6KkzW0cCtBDJnsNhAKLfEbkC0pJNK+OY9X0-XYjw@mail.gmail.com>

On 7/13/2012 3:47 PM, viresh kumar wrote:
> On Fri, Jul 13, 2012 at 10:23 AM, Vipul Kumar Samar
> <vipulkumar.samar@st•com>  wrote:
>> Platform data can be passed through either device tree or
>> auxdata_lookup. Device tree still donot have any means to provide
>> facility for passing platform callbacks to the driver.
>>
>> If any platform data is available through auxdata_lookup then overwrite
>> the platform data passed through device tree.
>>
>> Signed-off-by: Vipul Kumar Samar<vipulkumar.samar@st•com>
>
> This one is part of wrong patchset, remove it from this one, when you send a
> pull request to Arnd/Olof.
>
> Send it to net dev list separately. Keep giuseppe and stefan Roese in CC.
>
>> ---
>>   .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |    5 +++--
>>   1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> index 680d2b8..4651579 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> @@ -114,10 +114,11 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
>>                          pr_err("%s: main dt probe failed", __func__);
>>                          goto out_unmap;
>>                  }
>> -       } else {
>> -               plat_dat = pdev->dev.platform_data;
>>          }
>>
>> +       if (pdev->dev.platform_data)
>> +               plat_dat = pdev->dev.platform_data;
>> +
>
> Even this looks wrong. You can't simply override plat_dat like this.
> Better to add properties to stmmac driver, that you can pass via DT.
>
> That's what Stefan also mentioned in his original patch:
>
> static int __devinit stmmac_probe_config_dt(struct platform_device *pdev,
> 					    struct plat_stmmacenet_data *plat,
> 					    const char **mac)
> {
> 	/*
> 	 * Currently only the properties needed on SPEAr600
> 	 * are provided. All other properties should be added
> 	 * once needed on other platforms.
> 	 */
>

Correct me if i am wrong, We cant pass function pointer from device 
tree. For that we need to pass platdata it from auxdata_lookup.

In case of stmmac, phy is configure through init function passed in 
platform data. Any other way to pass function pointer in device tree??

Regards
Vipul Samar

  reply	other threads:[~2012-07-13 10: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
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 [this message]
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=4FFFF984.5070905@st.com \
    --to=vipulkumar.samar@st$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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