[U-Boot-Users] [PATCH] at45-split (1/3) (resubmit due to bad CHANGELOG info in first version)

Ulf Samuelsson ulf at atmel.com
Fri Feb 2 01:39:47 CET 2007


The at45.c dataflash driver is currently duplicated in
* board/at91rm9200dk
* board/cmc_pu2

This patch splits the at45 dataflash driver into a 
* cpu-dependent   part located in cpu/arm920t/at91rm9200
* cpu-independent part located in drivers/at45.c

making AT45 Dataflash available to all boards with an
appropriate SPI driver.

All new AT91 boards use this driver, so if/when patches
for these boards are accepted into mainline, having
a common driver will reduce the size of the U-boot source 
and make the board support more maintainable.

The "drivers/at45.c" is compiled for all boards
but contain a configuration test:
around the code, so if this is not set, the at45
driver will not add code to the system.

The current at45.c contains both the cpu specific
spi access routines and a higher layer 
dataflash access routine which calls the lower layer
spi routines to read/write dataflash.

To make the at45 independent on the CPU, the
spi layer has been removed from the driver
and placed in the cpu/arm920t/at91rm9200/spi.c.
CPU specific "includes" are moved inside the 

Makefile changes

at45.o has been removed from the Makefiles in
* "board/at91rm9200dk"
* "board/cmc_pu2"

at45.o has been added to the "drivers" Makefile.
spi.o has been added to "cpu/arm920t/at91rm9200/Makefile"

Author: Ulf Samuelsson <ulf at atmel.com>
Date:   Thu Feb  1 21:18:53 CET 2007

    Make at45 driver available to all boards.
    Move SPI low level part to cpu/arm920t/at91rm9200

No new configuration options
        Attached in plaintext
        Consists of three parts.
        1.      Split and move
        2.      Removal of at45.c from board/at91rm9200dk
        3.      Removal of at45.c from board/cmc_pu2

Patch generated by 
        diff -purN \
        u-boot-2007-02-01-0rig \
        u-boot-2007-02-01 > \
from the parent directory
Tested on PPC and ARM

Best Regards
Ulf Samuelsson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-2007-02-01-at45_split.1_3.patch
Type: text/x-patch
Size: 27785 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070202/805ed18a/attachment.bin 

More information about the U-Boot mailing list