From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seungwon Jeon Subject: RE: mmc: dw_mmc: Add the function call for board-specific initialization. Date: Fri, 08 Jul 2011 16:25:39 +0900 Message-ID: <000a01cc3d40$3cc02b50$b64081f0$%jun@samsung.com> References: <1309763279-29862-1-git-send-email-tgih.jun@samsung.com> <003301cc3a25$9fd61470$df823d50$%jun@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7BIT Return-path: Received: from mailout4.samsung.com ([203.254.224.34]:55341 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985Ab1GHHZk (ORCPT ); Fri, 8 Jul 2011 03:25:40 -0400 Received: from epcpsbgm1.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LO000IAI79SB7M0@mailout4.samsung.com> for linux-mmc@vger.kernel.org; Fri, 08 Jul 2011 16:25:39 +0900 (KST) Received: from DOTGIHJUN01 (12-23-121-83.csky.net [12.23.121.83]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LO000N627AR03@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Fri, 08 Jul 2011 16:25:39 +0900 (KST) In-reply-to: <003301cc3a25$9fd61470$df823d50$%jun@samsung.com> Content-language: ko Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: 'Kyungmin Park' Cc: linux-mmc@vger.kernel.org, 'Chris Ball' , 'Will Newton' , 'Jaehoon Chung' , 'James Hogan' Hi Kyungmin Park I'd appreciate if you give me a opinion about my writing. If init call is not used, a checking routine is also not needed. How do you think? Best regards, Seungwon Jeon. Seungwon Jeon wrote: > Hi, > > -----Original Message----- > > From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc- > > owner@vger.kernel.org] On Behalf Of Kyungmin Park > > Sent: Monday, July 04, 2011 4:50 PM > > To: Seungwon Jeon > > Cc: linux-mmc@vger.kernel.org; Chris Ball; Will Newton; Jaehoon Chung; > > James Hogan > > Subject: Re: mmc: dw_mmc: Add the function call for board-specific > > initialization. > > > > Hi, > > > > Yes it's defined and checked, but not used. > > Can you describe the reason why init call is required? > > and If required, what's the meaning? > > > I think some "board specific" init-routine may be needed, e.g. external > IRQ for card detection. > But there is no call for this in dw_mmc.c currently. > If init function is just checked registration of definition and real call > is performed outside, > we don't need to call this function explicitly. > > Thank you for comment > > Best regards, > Seungwon. > > > > Thank you, > > Kyungmin Park > > > > On Mon, Jul 4, 2011 at 4:07 PM, Seungwon Jeon > wrote: > > > Need to call init() function of dw_mci_board. > > > It seems to be omitted to call this function. > > > > > > Signed-off-by: Seungwon Jeon > > > --- > > > drivers/mmc/host/dw_mmc.c | 11 +++++++++++ > > > 1 files changed, 11 insertions(+), 0 deletions(-) > > > > > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > > > index a524416..688d58a 100644 > > > --- a/drivers/mmc/host/dw_mmc.c > > > +++ b/drivers/mmc/host/dw_mmc.c > > > @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct > > work_struct *work) > > > } > > > } > > > > > > +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id) > > > +{ > > > + struct dw_mci_slot *slot = dev_id; > > > + > > > + queue_work(dw_mci_card_workqueue, &slot->host->card_work); > > > + > > > + return IRQ_HANDLED; > > > +} > > > + > > > static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int > id) > > > { > > > struct mmc_host *mmc; > > > @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci > > *host, unsigned int id) > > > } else > > > regulator_enable(host->vmmc); > > > > > > + host->pdata->init(id, dw_mci_detect_interrupt, host); > > > + > > > if (dw_mci_get_cd(mmc)) > > > set_bit(DW_MMC_CARD_PRESENT, &slot->flags); > > > else > > > -- > > > 1.7.0.4 > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" > in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html