powerpc: mpc85xx: Move set_liodns, setup_portals to common boot seq
PATCH 1/1 powerpc: mpc85xx: Move set_liodns, setup_portals to common boot seq
Users migrating Freescale's PowerPC SoC U-Boot code to their custom board, often overlook the need to execute set_liodns() and setup_portals() being called by platform files.
So Move set_liodns() and setup_portals() to common u-boot boot sequence
--- arch/powerpc/cpu/mpc85xx/cpu_init.c | 7 +++++++ board/freescale/b4860qds/b4860qds.c | 5 ----- board/freescale/corenet_ds/corenet_ds.c | 6 ------ board/freescale/p2041rdb/p2041rdb.c | 3 --- board/freescale/t102xqds/t102xqds.c | 5 ----- board/freescale/t102xrdb/t102xrdb.c | 5 ----- board/freescale/t1040qds/t1040qds.c | 5 ----- board/freescale/t104xrdb/t104xrdb.c | 6 ------ board/freescale/t208xqds/t208xqds.c | 6 ------ board/freescale/t208xrdb/t208xrdb.c | 6 ------ board/freescale/t4qds/t4240emu.c | 6 ------ board/freescale/t4qds/t4240qds.c | 6 ------ board/freescale/t4rdb/t4240rdb.c | 6 ------ 13 files changed, 7 insertions(+), 65 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu_init.c +7 -0
@@ -23,6 +23,8 @@#include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_srio.h> +#include <asm/fsl_portals.h> +#include <asm/fsl_liodn.h> #include <fsl_usb.h> #include <hwconfig.h> #include <linux/compiler.h>
@@ -788,6 +790,11 @@ int cpu_init_r(void) spin_table_compat =1 ;#endif +set_liodns (); +#ifdef CONFIG_SYS_DPAA_QBMAN +setup_portals (); +#endif +l2cache_init ();#if defined(CONFIG_RAMBOOT_PBL )disable_cpc_sram ();
board/freescale/b4860qds/b4860qds.c +0 -5
@@ -16,7 +16,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include <hwconfig.h>
@@ -1023,10 +1022,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif /* * Adjust core voltage according to voltage ID * This function changes I2C mux to channel 2.
board/freescale/corenet_ds/corenet_ds.c +0 -6
@@ -14,7 +14,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h>
@@ -125,11 +124,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G ,/* perms, wimge */ 0, flash_esel, BOOKE_PAGESZ_256M, 1); /* ts, esel, tsize, iprot */ -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -return 0 ; }
board/freescale/p2041rdb/p2041rdb.c +0 -3
@@ -14,7 +14,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h>
@@ -140,8 +139,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -setup_portals ();board_config_lanes_mux ();return 0 ;
board/freescale/t102xqds/t102xqds.c +0 -5
@@ -15,7 +15,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include <hwconfig.h>
@@ -280,10 +279,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1);#endif -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT );board_mux_lane_to_slot ();board_retimer_ds125df111_init ();
board/freescale/t102xrdb/t102xrdb.c +0 -5
@@ -14,7 +14,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include "t102xrdb.h"
@@ -151,10 +150,6 @@ int board_early_init_r(void) 0, flash_esel, BOOKE_PAGESZ_256M, 1);#endif -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif #ifdef CONFIG_T1024RDB board_mux_lane ();#endif
board/freescale/t1040qds/t1040qds.c +0 -5
@@ -15,7 +15,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include <hwconfig.h>
@@ -153,10 +152,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1);#endif -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT );return 0 ;
board/freescale/t104xrdb/t104xrdb.c +0 -6
@@ -16,7 +16,6 @@#include <asm/fsl_fdt.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include "../common/sleep.h"
@@ -84,11 +83,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1);#endif -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -return 0 ; }
board/freescale/t208xqds/t208xqds.c +0 -6
@@ -14,7 +14,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h>
@@ -356,11 +355,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -/* Disable remote I2C connection to qixis fpga */ QIXIS_WRITE (brdcfg[5 ],QIXIS_READ (brdcfg[5 ]) & ~BRDCFG5_IRE );
board/freescale/t208xrdb/t208xrdb.c +0 -6
@@ -14,7 +14,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h> #include "t208xrdb.h"
@@ -81,11 +80,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -/* * Adjust core voltage according to voltage ID * This function changes I2C mux to channel 2.
board/freescale/t4qds/t4240emu.c +0 -6
@@ -15,7 +15,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -56,11 +55,6 @@ int board_early_init_r(void)MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -return 0 ; }
board/freescale/t4qds/t4240qds.c +0 -6
@@ -15,7 +15,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h>
@@ -552,11 +551,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -/* Disable remote I2C connection to qixis fpga */ QIXIS_WRITE (brdcfg[5 ],QIXIS_READ (brdcfg[5 ]) & ~BRDCFG5_IRE );
board/freescale/t4rdb/t4240rdb.c +0 -6
@@ -15,7 +15,6 @@#include <asm/immap_85xx.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> -#include <asm/fsl_portals.h> #include <asm/fsl_liodn.h> #include <fm_eth.h>
@@ -75,11 +74,6 @@ int board_early_init_r(void)MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , 0, flash_esel, BOOKE_PAGESZ_256M, 1); -set_liodns (); -#ifdef CONFIG_SYS_DPAA_QBMAN -setup_portals (); -#endif -return 0 ; }
Signature · 1 line
1.9.1
PATCH 1/1 powerpc: mpc85xx: Move set_liodns, setup_portals to common boot seq
Quoted 8 lines · Prabhakar Kushwaha
Users migrating Freescale's PowerPC SoC U-Boot code to their custom board, often overlook the need to execute
set_liodns()andsetup_portals()being called by platform files.So Move
set_liodns()andsetup_portals()to common u-boot boot sequenceSigned-off-by Prabhakar Kushwaha <[email protected]>
Quoted 15 lines
--- arch/powerpc/cpu/mpc85xx/cpu_init.c | 7 +++++++ board/freescale/b4860qds/b4860qds.c | 5 ----- board/freescale/corenet_ds/corenet_ds.c | 6 ------ board/freescale/p2041rdb/p2041rdb.c | 3 --- board/freescale/t102xqds/t102xqds.c | 5 ----- board/freescale/t102xrdb/t102xrdb.c | 5 ----- board/freescale/t1040qds/t1040qds.c | 5 ----- board/freescale/t104xrdb/t104xrdb.c | 6 ------ board/freescale/t208xqds/t208xqds.c | 6 ------ board/freescale/t208xrdb/t208xrdb.c | 6 ------ board/freescale/t4qds/t4240emu.c | 6 ------ board/freescale/t4qds/t4240qds.c | 6 ------ board/freescale/t4rdb/t4240rdb.c | 6 ------ 13 files changed, 7 insertions(+), 65 deletions(-)
Prabhakar,
This change is not good. You presume set_liodns() is available for all 85xx. Putting the call into cpu_init.c caused compiling error for non-corenet SoCs.
Please update and make sure you run buildman on powerpc.
York