All of lore.kernel.org
 help / color / mirror / Atom feed
From: chaotian.jing <chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	James Liao <jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	srv_heupstream
	<srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Hongzhou Yang
	<hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	bin.zhang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Chris Ball <chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"Joe.C" <yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Eddie Huang <eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
Date: Wed, 8 Apr 2015 14:39:19 +0800	[thread overview]
Message-ID: <1428475159.15142.3.camel@mhfsdcap03> (raw)
In-Reply-To: <CABuKBe+MFHJO8GXRg5KYs2t+j6U4Ynv_hCeW0YQCrS_eZ-fuLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Dear Matthias,

Thanks for your review!
Please help to check my comment.
On Tue, 2015-04-07 at 16:01 +0200, Matthias Brugger wrote:
> 2015-03-17 4:13 GMT+01:00 Chaotian Jing <chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>:
> > Add Mediatek MMC driver code
> >
> > Signed-off-by: Chaotian Jing <chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > ---
> >  drivers/mmc/host/Kconfig  |    8 +
> >  drivers/mmc/host/Makefile |    1 +
> >  drivers/mmc/host/mtk-sd.c | 1412 +++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 1421 insertions(+)
> >  create mode 100644 drivers/mmc/host/mtk-sd.c
> >
> > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> > index 61ac63a..8b64377 100644
> > --- a/drivers/mmc/host/Kconfig
> > +++ b/drivers/mmc/host/Kconfig
> > @@ -768,3 +768,11 @@ config MMC_TOSHIBA_PCI
> >         tristate "Toshiba Type A SD/MMC Card Interface Driver"
> >         depends on PCI
> >         help
> > +
> > +config MMC_MTK
> > +       tristate "MediaTek SD/MMC Card Interface support"
> > +       help
> > +         This selects the MediaTek(R) Secure digital and Multimedia card Interface.
> > +         If you have a machine with a integrated SD/MMC card reader, say Y or M here.
> > +         This is needed if support for any SD/SDIO/MMC devices is required.
> > +         If unsure, say N.
> > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> > index 6a7cfe0..161b3e4 100644
> > --- a/drivers/mmc/host/Makefile
> > +++ b/drivers/mmc/host/Makefile
> > @@ -20,6 +20,7 @@ obj-$(CONFIG_MMC_SDHCI_F_SDH30)       += sdhci_f_sdh30.o
> >  obj-$(CONFIG_MMC_SDHCI_SPEAR)  += sdhci-spear.o
> >  obj-$(CONFIG_MMC_WBSD)         += wbsd.o
> >  obj-$(CONFIG_MMC_AU1X)         += au1xmmc.o
> > +obj-$(CONFIG_MMC_MTK)           += mtk-sd.o
> >  obj-$(CONFIG_MMC_OMAP)         += omap.o
> >  obj-$(CONFIG_MMC_OMAP_HS)      += omap_hsmmc.o
> >  obj-$(CONFIG_MMC_ATMELMCI)     += atmel-mci.o
> > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> > new file mode 100644
> > index 0000000..86c999b
> > --- /dev/null
> > +++ b/drivers/mmc/host/mtk-sd.c
> > @@ -0,0 +1,1412 @@
> > +/*
> > + * Copyright (c) 2014-2015 MediaTek Inc.
> > + * Author: Chaotian.Jing <chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/delay.h>
> > +#include <linux/dma-mapping.h>
> > +#include <linux/ioport.h>
> > +#include <linux/irq.h>
> > +#include <linux/of_address.h>
> > +#include <linux/of_irq.h>
> > +#include <linux/of_gpio.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/regulator/consumer.h>
> > +#include <linux/spinlock.h>
> > +
> > +#include <linux/mmc/card.h>
> > +#include <linux/mmc/core.h>
> > +#include <linux/mmc/host.h>
> > +#include <linux/mmc/mmc.h>
> > +#include <linux/mmc/sd.h>
> > +#include <linux/mmc/sdio.h>
> > +
> > +#define MAX_GPD_NUM         (1 + 1)    /* one null gpd */
> > +#define MAX_BD_NUM          1024
> > +#define MAX_BD_PER_GPD      MAX_BD_NUM
> 
> This looks strange.
> Why don't you define MAX_GPD_NUM as two?
> Why do you define MAX_BD_PER_GPD when it is the same as MAX_BD_NUM?
> 
In fact, the second GPD is useless now, I will remove the define of
MAX_GPD_NUM and MAX_BD_PER_GPD.

> Cheers,
> Matthias
> 

WARNING: multiple messages have this Message-ID (diff)
From: chaotian.jing@mediatek.com (chaotian.jing)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
Date: Wed, 8 Apr 2015 14:39:19 +0800	[thread overview]
Message-ID: <1428475159.15142.3.camel@mhfsdcap03> (raw)
In-Reply-To: <CABuKBe+MFHJO8GXRg5KYs2t+j6U4Ynv_hCeW0YQCrS_eZ-fuLA@mail.gmail.com>

Dear Matthias,

Thanks for your review!
Please help to check my comment.
On Tue, 2015-04-07 at 16:01 +0200, Matthias Brugger wrote:
> 2015-03-17 4:13 GMT+01:00 Chaotian Jing <chaotian.jing@mediatek.com>:
> > Add Mediatek MMC driver code
> >
> > Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
> > ---
> >  drivers/mmc/host/Kconfig  |    8 +
> >  drivers/mmc/host/Makefile |    1 +
> >  drivers/mmc/host/mtk-sd.c | 1412 +++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 1421 insertions(+)
> >  create mode 100644 drivers/mmc/host/mtk-sd.c
> >
> > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> > index 61ac63a..8b64377 100644
> > --- a/drivers/mmc/host/Kconfig
> > +++ b/drivers/mmc/host/Kconfig
> > @@ -768,3 +768,11 @@ config MMC_TOSHIBA_PCI
> >         tristate "Toshiba Type A SD/MMC Card Interface Driver"
> >         depends on PCI
> >         help
> > +
> > +config MMC_MTK
> > +       tristate "MediaTek SD/MMC Card Interface support"
> > +       help
> > +         This selects the MediaTek(R) Secure digital and Multimedia card Interface.
> > +         If you have a machine with a integrated SD/MMC card reader, say Y or M here.
> > +         This is needed if support for any SD/SDIO/MMC devices is required.
> > +         If unsure, say N.
> > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> > index 6a7cfe0..161b3e4 100644
> > --- a/drivers/mmc/host/Makefile
> > +++ b/drivers/mmc/host/Makefile
> > @@ -20,6 +20,7 @@ obj-$(CONFIG_MMC_SDHCI_F_SDH30)       += sdhci_f_sdh30.o
> >  obj-$(CONFIG_MMC_SDHCI_SPEAR)  += sdhci-spear.o
> >  obj-$(CONFIG_MMC_WBSD)         += wbsd.o
> >  obj-$(CONFIG_MMC_AU1X)         += au1xmmc.o
> > +obj-$(CONFIG_MMC_MTK)           += mtk-sd.o
> >  obj-$(CONFIG_MMC_OMAP)         += omap.o
> >  obj-$(CONFIG_MMC_OMAP_HS)      += omap_hsmmc.o
> >  obj-$(CONFIG_MMC_ATMELMCI)     += atmel-mci.o
> > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> > new file mode 100644
> > index 0000000..86c999b
> > --- /dev/null
> > +++ b/drivers/mmc/host/mtk-sd.c
> > @@ -0,0 +1,1412 @@
> > +/*
> > + * Copyright (c) 2014-2015 MediaTek Inc.
> > + * Author: Chaotian.Jing <chaotian.jing@mediatek.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/delay.h>
> > +#include <linux/dma-mapping.h>
> > +#include <linux/ioport.h>
> > +#include <linux/irq.h>
> > +#include <linux/of_address.h>
> > +#include <linux/of_irq.h>
> > +#include <linux/of_gpio.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/regulator/consumer.h>
> > +#include <linux/spinlock.h>
> > +
> > +#include <linux/mmc/card.h>
> > +#include <linux/mmc/core.h>
> > +#include <linux/mmc/host.h>
> > +#include <linux/mmc/mmc.h>
> > +#include <linux/mmc/sd.h>
> > +#include <linux/mmc/sdio.h>
> > +
> > +#define MAX_GPD_NUM         (1 + 1)    /* one null gpd */
> > +#define MAX_BD_NUM          1024
> > +#define MAX_BD_PER_GPD      MAX_BD_NUM
> 
> This looks strange.
> Why don't you define MAX_GPD_NUM as two?
> Why do you define MAX_BD_PER_GPD when it is the same as MAX_BD_NUM?
> 
In fact, the second GPD is useless now, I will remove the define of
MAX_GPD_NUM and MAX_BD_PER_GPD.

> Cheers,
> Matthias
> 

  parent reply	other threads:[~2015-04-08  6:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  3:13 [PATCH v2 0/5] Add Mediatek MMC driver Chaotian Jing
2015-03-17  3:13 ` Chaotian Jing
     [not found] ` <1426562035-16709-1-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-03-17  3:13   ` [PATCH v2 1/5] mmc: dt-bindings: add Mediatek MMC bindings Chaotian Jing
2015-03-17  3:13     ` Chaotian Jing
2015-04-20  8:31     ` Sascha Hauer
2015-04-20  8:31       ` Sascha Hauer
2015-03-17  3:13   ` [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver Chaotian Jing
2015-03-17  3:13     ` Chaotian Jing
     [not found]     ` <1426562035-16709-3-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-03-31 12:23       ` Ulf Hansson
2015-03-31 12:23         ` Ulf Hansson
2015-03-31 12:23         ` Ulf Hansson
     [not found]         ` <CAPDyKFoUg1snXeOwCiKPF_daxAAfcWE0nUbRAj23Z=k9z5FCyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-03  7:22           ` 答复: " Chaotian Jing (井朝天)
2015-04-03  7:22             ` Chaotian Jing (井朝天)
2015-04-03  7:22             ` Chaotian Jing (井朝天)
2015-04-08 10:38             ` Ulf Hansson
2015-04-08 10:38               ` Ulf Hansson
     [not found]               ` <CAPDyKFrM94E8xXN_q0OqciOHC8WBC+fTOroSnnm+HDTOmWg6Gw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-10  3:17                 ` chaotian.jing
2015-04-10  3:17                   ` chaotian.jing
2015-04-17  9:12         ` Sascha Hauer
2015-04-17  9:12           ` Sascha Hauer
2015-04-17  9:12           ` Sascha Hauer
2015-04-17  9:37           ` Ulf Hansson
2015-04-17  9:37             ` Ulf Hansson
2015-04-17  9:37             ` Ulf Hansson
2015-04-07 14:01     ` Matthias Brugger
2015-04-07 14:01       ` Matthias Brugger
2015-04-07 14:01       ` Matthias Brugger
     [not found]       ` <CABuKBe+MFHJO8GXRg5KYs2t+j6U4Ynv_hCeW0YQCrS_eZ-fuLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-08  6:39         ` chaotian.jing [this message]
2015-04-08  6:39           ` chaotian.jing
2015-04-17 13:45     ` Sascha Hauer
2015-04-17 13:45       ` Sascha Hauer
     [not found]       ` <20150417134547.GN4946-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-04-19  3:22         ` chaotian.jing
2015-04-19  3:22           ` chaotian.jing
2015-03-17  3:13   ` [PATCH v2 3/5] mmc: mediatek: Add PM support for " Chaotian Jing
2015-03-17  3:13     ` Chaotian Jing
2015-03-31 14:46     ` Ulf Hansson
2015-03-31 14:46       ` Ulf Hansson
2015-03-31 14:46       ` Ulf Hansson
2015-04-03  8:27       ` 答复: " Chaotian Jing (井朝天)
2015-04-03  8:27         ` Chaotian Jing (井朝天)
2015-04-03  8:27         ` Chaotian Jing (井朝天)
2015-04-20  6:49     ` Sascha Hauer
2015-04-20  6:49       ` Sascha Hauer
2015-04-20  6:52     ` Sascha Hauer
2015-04-20  6:52       ` Sascha Hauer
2015-03-17  3:13   ` [PATCH v2 4/5] arm64: mediatek: Add Mediatek MMC support in defconfig Chaotian Jing
2015-03-17  3:13     ` Chaotian Jing
2015-03-17  3:13   ` [PATCH v2 5/5] arm64: dts: mediatek: Add MT8173 MMC dts Chaotian Jing
2015-03-17  3:13     ` Chaotian Jing

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=1428475159.15142.3.camel@mhfsdcap03 \
    --to=chaotian.jing-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bin.zhang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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.