From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070Ab3BDF3H (ORCPT ); Mon, 4 Feb 2013 00:29:07 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:55346 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714Ab3BDF3F (ORCPT ); Mon, 4 Feb 2013 00:29:05 -0500 Message-ID: <510F470E.5040205@ti.com> Date: Mon, 4 Feb 2013 10:58:46 +0530 From: Sekhar Nori User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Sekhar Nori CC: Prabhakar Lad , , , , , Heiko Schocher , Subject: Re: [PATCH v2 6/6] ARM: davinci: da850: configure system configuration chip(CFGCHIP3) for emac References: <1359380879-26306-1-git-send-email-prabhakar.lad@ti.com> <1359380879-26306-7-git-send-email-prabhakar.lad@ti.com> <510E5BCF.9080006@ti.com> In-Reply-To: <510E5BCF.9080006@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/2013 6:15 PM, Sekhar Nori wrote: > On 1/28/2013 7:17 PM, Prabhakar Lad wrote: >> From: Lad, Prabhakar > There are couple of issues with this implementation. > > 1) da8xx_config_emac() is specific to DA850 EVM, but masquerades as > generic for da8xx. Looks like you need two functions, one for soc > specific configuration and one board specific. > 2) da8xx_config_emac() goes through all the time, whether the > particular board has emac module or not. Shouldn't > da8xx_config_emac() check if emac is actually enabled in the passed > dtb and only the do the configuration? > 3) The function assumes mii is used always, you can use the rmii_en dt > property to check if rmii/mii is enabled and configure the soc/board > accordingly. > 4) If the same function can work both for da850 and da830, then it can > be implemented outside of CONFIG_ARCH_DAVINCI_DA850. Another thing I forgot to mention: 5) This patch replicates a lot of code form board-da850-evm.c. This needs to be avoided. May be create function to configure emac in da850.c. This can then be called in board-da850-evm.c as well as in the dt case. Thanks, Sekhar