From 691211c8bbf3ff861443963554eac8063b01d650 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 24 Jun 2014 08:33:14 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- arch/arm/boards/gk802/board.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'arch/arm/boards/gk802/board.c') diff --git a/arch/arm/boards/gk802/board.c b/arch/arm/boards/gk802/board.c index facb92384f..9dd22533fc 100644 --- a/arch/arm/boards/gk802/board.c +++ b/arch/arm/boards/gk802/board.c @@ -69,19 +69,8 @@ static int gk802_env_init(void) devfs_add_partition(bootsource_name, 0x00000, SZ_512K, DEVFS_PARTITION_FIXED, barebox_name); devfs_add_partition(bootsource_name, SZ_512K, SZ_512K, DEVFS_PARTITION_FIXED, default_environment_name); - return 0; -} -late_initcall(gk802_env_init); - -static int gk802_console_init(void) -{ - if (!of_machine_is_compatible("zealz,imx6q-gk802")) - return 0; - barebox_set_hostname("gk802"); - imx6_init_lowlevel(); - return 0; } -postcore_initcall(gk802_console_init); +late_initcall(gk802_env_init); -- cgit v1.2.3