linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Jamie Iles <jamie@jamieiles.com>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
	chuanxiao.dong@intel.com
Subject: Re: [RFC PATCH 4/9] nand/denali: split the generic driver and PCI layer
Date: Thu, 12 May 2011 11:08:30 +0300	[thread overview]
Message-ID: <1305187710.2713.61.camel@localhost> (raw)
In-Reply-To: <1304692143-22432-5-git-send-email-jamie@jamieiles.com>

On Fri, 2011-05-06 at 15:28 +0100, Jamie Iles wrote:
> The Denali controller can also be found in SoC devices attached to a
> simple bus.  Move the PCI specific parts into denali_pci so that we can
> add a denali_mmio that uses the same driver but for a platform_device
> instead of a PCI based device.
> 
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  drivers/mtd/nand/Kconfig      |   11 +++-
>  drivers/mtd/nand/Makefile     |    1 +
>  drivers/mtd/nand/denali.c     |  153 +++++------------------------------------
>  drivers/mtd/nand/denali.h     |    4 +
>  drivers/mtd/nand/denali_pci.c |  145 ++++++++++++++++++++++++++++++++++++++
>  5 files changed, 178 insertions(+), 136 deletions(-)
>  create mode 100644 drivers/mtd/nand/denali_pci.c
> 
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index edec457..d629b68 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -66,8 +66,15 @@ config MTD_NAND_AUTCPU12
>  	  access the SmartMediaCard.
>  
>  config MTD_NAND_DENALI
> -       depends on PCI
> +        tristate "Support Denali NAND controller"
> +        help
> +	  Enable support for the Denali NAND controller.  This should be
> +	  combined with either the PCI or platform drivers to provide device
> +	  registration.
> +
> +config MTD_NAND_DENALI_PCI
>          tristate "Support Denali NAND controller on Intel Moorestown"
> +	depends on PCI && MTD_NAND_DENALI
>          help
>            Enable the driver for NAND flash on Intel Moorestown, using the
>            Denali NAND controller core.
> @@ -75,7 +82,7 @@ config MTD_NAND_DENALI
>  config MTD_NAND_DENALI_SCRATCH_REG_ADDR
>          hex "Denali NAND size scratch register address"
>          default "0xFF108018"
> -        depends on MTD_NAND_DENALI
> +        depends on MTD_NAND_DENALI_PCI
>          help

I do not know for sure, but I bet there is a way to avoid adding another
config option. In general - the Linux kernel is overloaded with config
options and we try to avoid adding new ones.

Can this be done the following way? - you check if there is a PCI bus,
if no - try mmio. If yes, try to discover the device in PCI.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2011-05-12  8:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 14:28 [RFC PATCH 0/9] Support for MMIO based Denali NAND controller Jamie Iles
2011-05-06 14:28 ` [RFC PATCH 1/9] nand/denali: convert to generic DMA API Jamie Iles
2011-05-12  8:05   ` Artem Bityutskiy
2011-05-06 14:28 ` [RFC PATCH 2/9] nand/denali: remove nearly-duplicated register definitions Jamie Iles
2011-05-12  8:05   ` Artem Bityutskiy
2011-05-06 14:28 ` [RFC PATCH 3/9] nand/denali: detect the number of banks Jamie Iles
2011-05-12  8:05   ` Artem Bityutskiy
2011-05-06 14:28 ` [RFC PATCH 4/9] nand/denali: split the generic driver and PCI layer Jamie Iles
2011-05-12  8:08   ` Artem Bityutskiy [this message]
2011-05-12  8:15     ` David Woodhouse
2011-05-12  8:31       ` Jamie Iles
2011-05-06 14:28 ` [RFC PATCH 5/9] nand/denali: convert to dev_() printk helpers Jamie Iles
2011-05-12  8:10   ` Artem Bityutskiy
2011-05-06 14:29 ` [RFC PATCH 6/9] nand/denali: add an mmio driver Jamie Iles
2011-05-06 14:29 ` [RFC PATCH 7/9] nand/denali: annotate pci init/exit functions with correct section Jamie Iles
2011-05-06 14:29 ` [RFC PATCH 8/9] nand/denali: allow the number of ECC bits to be set by pdata Jamie Iles
2011-05-06 14:29 ` [RFC PATCH 9/9] nand/denali: support MTD partitioning Jamie Iles
2011-05-06 14:33   ` Artem Bityutskiy
     [not found]     ` <BANLkTi=9u5bH3eoCasxMhO05Qvh0cJxyqQ@mail.gmail.com>
     [not found]       ` <1304707397.7222.100.camel@localhost>
2011-05-06 19:33         ` Jamie Iles

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=1305187710.2713.61.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=chuanxiao.dong@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=jamie@jamieiles.com \
    --cc=linux-mtd@lists.infradead.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 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).