diff options
author | Lucas Stach <dev@lynxeye.de> | 2014-06-24 08:33:14 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-01 08:41:44 +0200 |
commit | 691211c8bbf3ff861443963554eac8063b01d650 (patch) | |
tree | 105dc20c1a7762bf73855102be3245e9fae2aa70 /arch/arm/boards/freescale-mx6-sabresd | |
parent | 14552dddce4b6c623cca01f55025d1fa039080b0 (diff) | |
download | barebox-691211c8bbf3ff861443963554eac8063b01d650.tar.gz barebox-691211c8bbf3ff861443963554eac8063b01d650.tar.xz |
arm: imx6: move imx6_init_lowlevel to single initcall
Instead of repeating the same lowlevel init for every board
move it to it's own initcall.
Avoids code bloat and shaves off almost 1.5kB of uncompressed
barebox size for a default imx_v7_defconfig build.
For boards wherethe hostname setup was done in the postcore
initcall we move this to a device initcall to get it out of
the way.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/freescale-mx6-sabresd')
-rw-r--r-- | arch/arm/boards/freescale-mx6-sabresd/board.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arm/boards/freescale-mx6-sabresd/board.c b/arch/arm/boards/freescale-mx6-sabresd/board.c index 4e4ce7a015..53aada7bba 100644 --- a/arch/arm/boards/freescale-mx6-sabresd/board.c +++ b/arch/arm/boards/freescale-mx6-sabresd/board.c @@ -69,6 +69,7 @@ static int sabresd_devices_init(void) return 0; armlinux_set_architecture(3980); + barebox_set_hostname("sabresd"); return 0; } @@ -89,16 +90,3 @@ static int sabresd_coredevices_init(void) * gpios are available. */ coredevice_initcall(sabresd_coredevices_init); - -static int sabresd_postcore_init(void) -{ - if (!of_machine_is_compatible("fsl,imx6q-sabresd")) - return 0; - - imx6_init_lowlevel(); - - barebox_set_hostname("sabresd"); - - return 0; -} -postcore_initcall(sabresd_postcore_init); |