diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2015-01-15 18:32:33 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-16 08:11:42 +0100 |
commit | 9130bd229c07b10ec0c0b0954abff4f96bcee686 (patch) | |
tree | 64e87253acf95d5ce49d9a6e8dd30067e3c96685 /arch | |
parent | 9b847df7a1da3c048b91ccd2f0e53620299d0a3f (diff) | |
download | barebox-9130bd229c07b10ec0c0b0954abff4f96bcee686.tar.gz barebox-9130bd229c07b10ec0c0b0954abff4f96bcee686.tar.xz |
i.MX6: phytec: Separate SoM specific code
Separate SoM(designator PFLA02) specific and base board(designator
PBAB0x) code into two distinct functions. PHYTEC default environment
for PHYFLEX references peripherals that may or may not be used on
custom baseboards used with SoMs. Move the code appending it into a
separate function that would have effect only for boards explicitly
claiming compatibility with PHYTEC baseboards.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boards/phytec-phyflex-imx6/board.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c index 1551460393..7ac79283a9 100644 --- a/arch/arm/boards/phytec-phyflex-imx6/board.c +++ b/arch/arm/boards/phytec-phyflex-imx6/board.c @@ -87,8 +87,19 @@ static int phytec_pfla02_init(void) break; } + return 0; +} +device_initcall(phytec_pfla02_init); + +static int phytec_pbab0x_init(void) +{ + if (!of_machine_is_compatible("phytec,imx6x-pbab01") && + !of_machine_is_compatible("phytec,imx6dl-pbab05") && + !of_machine_is_compatible("phytec,imx6q-pbab02")) + return 0; + defaultenv_append_directory(defaultenv_phyflex_imx6); return 0; } -device_initcall(phytec_pfla02_init); +device_initcall(phytec_pbab0x_init); |