[U-Boot-Users] [PATCH] at45-split (1/3)

------------------------------------------------------------- DESCRIPTION
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: #ifdef CONFIG_HAS_DATAFLASH ... #endif 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 CONFIG_HAS_DATAFLASH test
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"
------------------------------------------------------------- CHANGELOG: Author: Ulf Samuelsson ulf@atmel.com Date: Thu Feb 1 21:18:53 CET 2007
Initial support for MPC8641 HPCN board.
------------------------------------------------------------- No new configuration options ------------------------------------------------------------- Patch: 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 > \ u-boot-2007-02-01-at45_split.1_3.patch from the parent directory ------------------------------------------------------------- Tested on PPC and ARM
Best Regards Ulf Samuelsson
participants (1)
-
Ulf Samuelsson