From 81b867aa4451e745b9706b00e53793df6b52f42a Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Wed, 4 Sep 2013 17:03:45 +0800 Subject: SPL: P1022DS: switch to new multibus/multiadapter support - Added section "u_boot_list" in arch/powerpc/cpu/mpc85xx/u-boot-spl.lds - Use the function i2c_init_all instead of i2c_init Signed-off-by: Ying Zhang diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds index 85ec74b..bc13267 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds @@ -44,6 +44,11 @@ SECTIONS } _edata = .; + . = ALIGN(4); + .u_boot_list : { + KEEP(*(SORT(.u_boot_list*))); + } + . = .; __start___ex_table = .; __ex_table : { *(__ex_table) } diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index b9dbf81..7f151e3 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -102,7 +102,11 @@ void board_init_r(gd_t *gd, ulong dest_addr) env_relocate(); #endif - i2c_init(CONFIG_SYS_FSL_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#ifdef CONFIG_SYS_I2C + i2c_init_all(); +#else + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif gd->ram_size = initdram(0); #ifdef CONFIG_SPL_NAND_BOOT -- cgit v0.10.2 From f62b123813ea604d16ed6115fe2fa552b23d9102 Mon Sep 17 00:00:00 2001 From: Tang Yuantian Date: Fri, 6 Sep 2013 10:45:40 +0800 Subject: powerpc/mpc85xx: Fix the I2C bus speed error on p1022 The source clock frequency of I2C bus on p1022 is the platform(CCB) clock, not CCB/2. The wrong source clock frequency leads to wrong I2C bus speed setting. so, fixed it. Signed-off-by: Tang Yuantian diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index 07690f9..4b8d928 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -399,7 +399,8 @@ int get_clocks (void) * AN2919. */ #if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \ - defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555) + defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555) || \ + defined(CONFIG_P1022) gd->arch.i2c1_clk = sys_info.freq_systembus; #elif defined(CONFIG_MPC8544) /* -- cgit v0.10.2