linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prabhakar Lad <prabhakar.csengg@gmail.com>
To: Sekhar Nori <nsekhar@ti.com>
Cc: DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	devicetree-discuss@lists.ozlabs.org,
	LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Heiko Schocher <hs@denx.de>
Subject: Re: [PATCH v3 6/6] ARM: davinci: da850: configure system configuration chip(CFGCHIP3) for emac
Date: Thu, 8 Aug 2013 16:09:50 +0530	[thread overview]
Message-ID: <CA+V-a8vHxB0Yy46LLEtVM7-VfPwC=UNux_cpQE=Xmon6Uvxbsg@mail.gmail.com> (raw)
In-Reply-To: <5203C1D1.8020707@ti.com>

On Thu, Aug 8, 2013 at 9:35 PM, Sekhar Nori <nsekhar@ti.com> wrote:
> On Thursday 08 August 2013 04:02 PM, Prabhakar Lad wrote:
>> Hi Sekhar,
>>
>> Sorry for the  delayed response I was on leave and now back again up
>> and running.
>>
>> On Wed, Jul 31, 2013 at 11:17 AM, Sekhar Nori <nsekhar@ti.com> wrote:
>>> On Sunday 23 June 2013 08:30 PM, Prabhakar Lad wrote:
>>>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>>>
>>>> This patch makes a common function for to configure emac and calls
>>>> it appropriately in DT and non DT boot mode. The system configuration
>>>> chip CFGCHIP3, controls the emac module. This patch appropriately
>>>> configures this register for emac and sets DA850_MII_MDIO_CLKEN_PIN
>>>> GPIO pin appropriately.
>>>>
>> [Snip]
>>
>>>> +     if (rmii_enabled)
>>>> +             val |= BIT(8);
>>>> +     else
>>>> +             val &= ~BIT(8);
>>>> +
>>>> +     /* configure the CFGCHIP3 register for RMII or MII */
>>>> +     writel(val, cfg_chip3_base);
>>>> +
>>>> +     ret = davinci_cfg_reg(DA850_GPIO2_6);
>>>> +     if (ret)
>>>> +             pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
>>>> +
>>>> +     ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
>>>> +     if (ret) {
>>>> +             pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN);
>>>> +             return;
>>>> +     }
>>>
>>> You cannot do this in SoC specific code. All boards wont use a GPIO to
>>> choose between MII/RMII. You need to do this in a EVM specific manner.
>>> This just means you retain the GPIO part of code in board-da850-evm.c
>>
>> OK
>>
>>> and for the DT case use a board specific GPIO node. See a similar
>>> example in arch/arm/boot/dts/ste-nomadik-s8815.dts and how the code uses
>> Alrite something similar to usb-s8815 node.
>>
>>> it in arch/arm/mach-nomadik/cpu-8815.c.
>>>
>> But I don't see any code to access this node in this file, can
>> you point me to right direction ?
>
> Look at cpu8815_eth_init() function in this file.
>
Thanks, I was looking at some earlier version of code here [1],
where this was missing.

[1] https://github.com/AndrewDB/rk3066-kernel/blob/master/arch/arm/mach-nomadik/cpu-8815.c

Regards,
--Prabhakar Lad

  reply	other threads:[~2013-08-08 10:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23 15:00 [PATCH v3 0/6] ARM: davinci: da850: add ethernet driver DT support Prabhakar Lad
2013-06-23 15:00 ` [PATCH v3 1/6] ARM: davinci: da8xx: fix clock lookup for mdio device Prabhakar Lad
2013-08-14 12:04   ` Sekhar Nori
2013-06-23 15:00 ` [PATCH v3 2/6] ARM: davinci: da850: add DT node " Prabhakar Lad
2013-06-23 15:00 ` [PATCH v3 3/6] ARM: davinci: da850: add OF_DEV_AUXDATA entry for mdio Prabhakar Lad
2013-06-23 15:00 ` [PATCH v3 4/6] ARM: davinci: da850: add DT node for eth0 Prabhakar Lad
2013-06-23 15:00 ` [PATCH v3 5/6] ARM: davinci: da850: add OF_DEV_AUXDATA entry " Prabhakar Lad
2013-06-23 15:00 ` [PATCH v3 6/6] ARM: davinci: da850: configure system configuration chip(CFGCHIP3) for emac Prabhakar Lad
2013-07-31  5:47   ` Sekhar Nori
2013-08-08 10:32     ` Prabhakar Lad
2013-08-08 16:05       ` Sekhar Nori
2013-08-08 10:39         ` Prabhakar Lad [this message]
2013-07-11 17:12 ` [PATCH v3 0/6] ARM: davinci: da850: add ethernet driver DT support Prabhakar Lad
2013-07-12  6:51   ` Sekhar Nori

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='CA+V-a8vHxB0Yy46LLEtVM7-VfPwC=UNux_cpQE=Xmon6Uvxbsg@mail.gmail.com' \
    --to=prabhakar.csengg@gmail.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=hs@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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).