public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Purna Chandra Mandal <purna.mandal@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] drivers: mtd: add Microchip PIC32 internal non-CFI flash driver.
Date: Wed, 16 Mar 2016 16:37:23 +0530	[thread overview]
Message-ID: <56E93E6B.3040300@microchip.com> (raw)
In-Reply-To: <CAD6G_RQJZ_E+FUEnu7vtmMsttZ=MGhPgQV-nR3dZvs+2o3HRVg@mail.gmail.com>

On 03/15/2016 05:35 PM, Jagan Teki wrote:

> On 14 March 2016 at 19:37, Purna Chandra Mandal
> <purna.mandal@microchip.com> wrote:
>> Jagan.
>>
>> On 03/14/2016 07:16 PM, Jagan Teki wrote:
>>
>>> On Monday 14 March 2016 07:00 PM, Purna Chandra Mandal wrote:
>>>> On 03/14/2016 06:13 PM, Daniel Schwierzeck wrote:
>>>>> 2016-03-10 14:12 GMT+01:00 Purna Chandra Mandal <purna.mandal@microchip.com>:
>>>>>> PIC32 embedded flash banks are memory mapped, directly read by CPU,
>>>>>> and programming (erase followed by write) operation on them are
>>>>>> handled by on-chip NVM controller.
>>>>>> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
>>>>>> ---
>>>>>>   drivers/mtd/Kconfig       |   6 +
>>>>>>   drivers/mtd/Makefile      |   1 +
>>>>>>   drivers/mtd/pic32_flash.c | 377 ++++++++++++++++++++++++++++++++++++++++++++++
>>> BTW: this driver need to be write in mtd driver mode, see for existing
>>> drivers and let me know for any help.
>> Will take up this activity [of supporting MTD] later on. For the time-being we are
>> not using mtd on embedded flash, mainly using for environment and bootcode which
>> are at well-known offset, size defined in include/configs/<board.h>.
> I understand your concern, but It look very hard to maintain the new
> drivers with non-dm model.

If issue is only non-dm model I can add DM support with exception that it will not
implement MTD functionality.

> My suggestions are better to add this on existing mtd(cfi or
> something) I guess ie "not possible"  or move this driver to your soc
> or board code for time being till mtd uclass addition or write a fresh
> mtd dm driver.

PIC32 flash devices are non CFI/JEDEC compliant so no way we can separate one flash
chip from other. Even though flash devices are parallel erase and program on these
flash chips are performed through NVM controller (serial interface). So we can't
directly port the functionality on CFI driver.

I like the idea of adding this driver under arch/soc/ or board/. But that is where it was
initially added, but based on review comment it is moved to drivers/mtd/.

Please suggest me a way!

> thanks!

  reply	other threads:[~2016-03-16 11:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 13:12 [U-Boot] [PATCH] drivers: mtd: add Microchip PIC32 internal non-CFI flash driver Purna Chandra Mandal
2016-03-10 13:41 ` Jagan Teki
2016-03-11  8:41   ` Purna Chandra Mandal
2016-03-14 12:43 ` Daniel Schwierzeck
2016-03-14 13:30   ` Purna Chandra Mandal
2016-03-14 13:46     ` Jagan Teki
2016-03-14 14:07       ` Purna Chandra Mandal
2016-03-15 12:05         ` Jagan Teki
2016-03-16 11:07           ` Purna Chandra Mandal [this message]
2016-03-16 14:25             ` Jagan Teki

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=56E93E6B.3040300@microchip.com \
    --to=purna.mandal@microchip.com \
    --cc=u-boot@lists.denx.de \
    /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