On Mon, Jul 29, 2013 at 05:57:22PM +0200, Enric Balletbo Serra wrote: > Hi Tom, [snip] > As example, I just pushed[1] in my personal git an implementation of > am33xx_spl_board_init for IGEP COM AQUILA AM335x based on your > patches. As you can see this function is very similar to the function > implemented in your patch. I wonder if it's possible implement a more > generic form in order to avoid repeating code in board files. Maybe > something like this : > > For am335x_evm : > > am33xx_spl_board_init { > /* Get MPU max frequency */ > mpu_pll = am335x_get_efuse_mpu_max_freq() > if (board_is_bone() || board_is_bone_lt()) > tps65217_set_mpu_voltagel(mpu_pll) /* not sure if this can be generic > */ > else > tp65910_set_mpu_voltagel(mpu_pll) > > /* Set MPU Frequency to what we detected now that voltages are set */ > mpu_pll_config_val(mpu_pll); > } > > For IGEP COM AQUILA: > > am33xx_spl_board_init { > /* Get MPU max frequency */ > mpu_pll = am335x_get_efuse_mpu_max_freq() > > /* Set PMIC MPU voltage */ > tp65910_set_mpu_voltagel(mpu_pll) > > /* Set MPU Frequency to what we detected now that voltages are set */ > mpu_pll_config_val(mpu_pll); > } > > [1] > https://github.com/eballetbo/u-boot/commit/2f5b68bd9b6978d7571c846d7ce8d183ead571b1
OK, I've done some consolidation, but the per-board part is still a few calls since as I noted in my other reply, tps65910 is not a am335x-specific chip. Heiko, can you take a quick look at how the siemens boards would use this? Are they also using the tps65910 or something else? I'm not opposed to throwing a am335x_tps65910_set_max_mpu() or so in sys_info.c or something and marking it weak just in case another way of using the 65910 ends up existing, but I don't want to throw it into drivers/power/pmic/pmic_tps65910.c. Thanks! -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot