diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-01 22:35:54 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-15 19:44:36 +0200 |
commit | a029e32d7fd9dd323abfb0d11356a4468bcbce71 (patch) | |
tree | eeaf88aea31d638a9324f460b4b7dee885122b22 /arch/arm/boards/pcm038/pcm038.c | |
parent | cff397271278257991705e5c4ecf15c47bd61208 (diff) | |
download | barebox-a029e32d7fd9dd323abfb0d11356a4468bcbce71.tar.gz barebox-a029e32d7fd9dd323abfb0d11356a4468bcbce71.tar.xz |
ARM i.MX: rework bootsource setting
This moves the known i.MX bootsource settings to a single file
so that the code can be shared. Also we add a enum for the different
boot sources so that it can be used in C Code and not only on the shell.
The pcm038 board is changed to use it instead of digging in the registers
manually.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/pcm038/pcm038.c')
-rw-r--r-- | arch/arm/boards/pcm038/pcm038.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c index 58b1ec9ef4..ec4ffd7d10 100644 --- a/arch/arm/boards/pcm038/pcm038.c +++ b/arch/arm/boards/pcm038/pcm038.c @@ -39,6 +39,7 @@ #include <mach/devices-imx27.h> #include <mach/iim.h> #include <mfd/mc13xxx.h> +#include <mach/generic.h> #include "pll.h" @@ -302,11 +303,8 @@ static int pcm038_devices_init(void) */ imx27_add_fec(&fec_info); - switch ((GPCR & GPCR_BOOT_MASK) >> GPCR_BOOT_SHIFT) { - case GPCR_BOOT_8BIT_NAND_2k: - case GPCR_BOOT_16BIT_NAND_2k: - case GPCR_BOOT_16BIT_NAND_512: - case GPCR_BOOT_8BIT_NAND_512: + switch (imx_bootsource()) { + case bootsource_nand: devfs_add_partition("nand0", 0x00000, 0x80000, DEVFS_PARTITION_FIXED, "self_raw"); dev_add_bb_dev("self_raw", "self0"); |