All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] AT91 NAND om AT91SAM9260EK
Date: Fri, 9 Feb 2007 16:45:20 +0100	[thread overview]
Message-ID: <20070209164520.68b3980c@dhcp-252-105.norway.atmel.com> (raw)
In-Reply-To: <45CBA247.209@atmel.com>

On Thu, 08 Feb 2007 23:20:55 +0100
Ulf Samuelsson <ulf@atmel.com> wrote:

> Here is it again, was not sent as a tarball, but as an attachement.
> This was a patchset of three patches, the remaining
> two patches just removes
> "board/at91rm9200dk/at45.c"     and
> "board/cmc_pu2/at45.c"
> They are not used any longer.

Thanks. When I replied last time, I thought for some reason that this
was a new driver even though I knew perfectly well it isn't. Anyway, I
guess it makes the review process slightly different...

I think the best way forward is probably to first get rid of the
duplication by moving everything as-is into drivers. That way, there's
only a single driver to clean up, not two.

I suggest we try to create a patch series doing the following:
  1. Eliminate any differences between the two at45.c drivers
  2. Consolidate the two drivers into drivers/at45.c
  3. Do a codingstyle cleanup of drivers/at45.c
  4. Split out the SPI part into a separate driver
  5. Make everything portable. This includes getting rid of all the
     AT91FOO prefixing.
  <insert additional cleanup steps here>

Wolfgang, does this sound like a good plan to you?

Step #1 is easy:

$ diff -up board/cmc_pu2/at45.c board/at91rm9200dk/at45.c
--- board/cmc_pu2/at45.c        2006-08-30 21:53:30.000000000 +0200
+++ board/at91rm9200dk/at45.c   2006-08-30 21:53:30.000000000 +0200
@@ -593,7 +593,7 @@ int AT91F_DataFlashRead(
                if (AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY) != DATAFLASH_OK)
                        return -1;

-               if (AT91F_DataFlashContinuousRead (pDataFlash, addr, buffer, SizeToRead) != DATAFLASH_OK)
+               if (AT91F_DataFlashContinuousRead (pDataFlash, addr, (uchar *)buffer, SizeToRead) != DATAFLASH_OK)
                        return -1;

                size -= SizeToRead;

We'll just have to decide whether or not to keep the cast. buffer is a
char * anyway, so I don't think it makes any difference at all.

Step #2 will probably generate an oversize patch unless we do it as a
git patch, which will basically just boil down to a rename and a
deletion (where the deletion will be the biggest part, but still under
40KB I hope.)

Step #3 is where the fun begins...

I have a prototype board with DataFlash for ATSTK1000, so I can start
testing on AVR32 around step #5. Before that, I'd appreciate some help
testing the individual patches (I can do build testing on ARM though.)

> I do  think that it is better to submit the AT91SAM9 patches
> first and  only then create a common driver.

If the AT91SAM9 patches include another at45.c driver, I disagree.
Better consolidate first and add new stuff on top of that. But the
driver should be usable for new boards after step #2, so you probably
don't have to wait very long before you can start submitting the SAM
stuff.

Btw, Wolfgang: I'd really appreciate if you could pull the avr32 update
from last november (which I rebased and resent last week):

	git://www.atmel.no/~hskinnemoen/u-boot/avr32.git for-wolfgang

It will be a lot easier to support avr32 with a single, unified at45
driver if those changes are in mainline. They simplify much of the
portmux- clock- and I/O management code, thus making it easier to see
what it takes to make the at45 and spi drivers portable across ARM and
AVR32.

Besides, you were the one who specifically asked me to add relocation
support, which is what the update is really all about...

Haavard

  reply	other threads:[~2007-02-09 15:45 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c88e466f0702050752t16c18251gcddf40a7ec95469@mail.gmail.com>
2007-02-07 23:17 ` [U-Boot-Users] AT91 NAND om AT91SAM9260EK Ulf Samuelsson
2007-02-08  6:06   ` Stefan Roese
2007-02-08  8:34     ` Michel Benoit
2007-02-08 19:25       ` Ulf Samuelsson
2007-02-08 20:58         ` Haavard Skinnemoen
2007-02-08 22:20           ` Ulf Samuelsson
2007-02-09 15:45             ` Haavard Skinnemoen [this message]
2007-02-09 19:11               ` Ulf Samuelsson
2007-02-09 19:54                 ` Haavard Skinnemoen
2007-02-09 19:39               ` Wolfgang Denk
2007-02-09 22:18                 ` Ulf Samuelsson
2007-02-09 22:58                   ` Haavard Skinnemoen
2007-02-09 23:20                     ` Ulf Samuelsson
2007-02-09 23:42                       ` Haavard Skinnemoen
2007-02-10  0:10                         ` Ulf Samuelsson
2007-02-10  1:18                       ` Wolfgang Denk
2007-02-10  9:05                         ` Ulf Samuelsson
2007-02-10  7:23                     ` Stefan Roese
2007-02-10  1:15                   ` Wolfgang Denk
2007-02-10  7:32                     ` Stefan Roese
2007-02-10  9:29                     ` Ulf Samuelsson
2007-02-10  1:53       ` Ken Watson
     [not found] <mailman.5069.1170973304.16820.u-boot-users@lists.sourceforge.net>
2007-02-08 22:57 ` Ivan Kuten
     [not found] <mailman.12584.1171099992.16820.u-boot-users@lists.sourceforge.net>
2007-02-10 20:31 ` Ivan Kuten
2007-02-11 16:43   ` Ulf Samuelsson
2007-02-11 18:04     ` Haavard Skinnemoen
2007-02-11 19:42       ` Ulf Samuelsson
2007-02-11 20:23         ` Haavard Skinnemoen
2007-02-11 20:29           ` Ulf Samuelsson
2007-02-11 20:54             ` Haavard Skinnemoen
2007-02-11 21:10           ` Wolfgang Denk
2007-02-11 21:39             ` Ulf Samuelsson
2007-02-11 23:45               ` Wolfgang Denk
2007-02-12  0:26                 ` Ulf Samuelsson
2007-02-12 15:18                   ` Haavard Skinnemoen
2007-02-12 18:40                     ` Ulf Samuelsson
2007-02-12 19:36                       ` Stefan Roese
2007-02-12 19:37                       ` Haavard Skinnemoen
2007-02-12 20:05                         ` Ulf Samuelsson
2007-02-11 21:54       ` Ulf Samuelsson
2007-02-11 11:49 Michel Benoit
2007-02-11 16:20 ` Ulf Samuelsson

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=20070209164520.68b3980c@dhcp-252-105.norway.atmel.com \
    --to=hskinnemoen@atmel.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 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.