
Hi Simon,
On Sun, Aug 27, 2017 at 6:39 AM, Simon Glass sjg@chromium.org wrote:
Hi Bin,
On 26 August 2017 at 07:56, Bin Meng bmeng.cn@gmail.com wrote:
Hi Simon,
On Sat, Aug 26, 2017 at 9:39 PM, Simon Glass sjg@chromium.org wrote:
On 15 August 2017 at 23:42, Bin Meng bmeng.cn@gmail.com wrote:
Add FSP related configuration for Braswell.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/x86/cpu/braswell/Makefile | 2 +- arch/x86/cpu/braswell/fsp_configs.c | 158 ++++++++++++++ .../include/asm/arch-braswell/fsp/fsp_configs.h | 89 ++++++++ arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h | 172 +++++++++++++++ arch/x86/include/asm/arch-braswell/gpio.h | 234 +++++++++++++++++++++ 5 files changed, 654 insertions(+), 1 deletion(-) create mode 100644 arch/x86/cpu/braswell/fsp_configs.c create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_configs.h create mode 100644 arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h create mode 100644 arch/x86/include/asm/arch-braswell/gpio.h
Reviewed-by: Simon Glass sjg@chromium.org
Can this use drivers instead of manual device-tree access?
Which part?
Well you have intel,braswell-fsp for example. You could create a driver with the two compatible strings and have it read the platdata from the DT in the ofdata_to_platdata() method.
I thought this before. We discussed the possibility of adding a new FSP uclass long time ago. When I added the Braswell support, I wanted to have a try since Braswell's FSP is v1.1 spec complaint and if we have a uclass for FSP we can put the common stuff in the uclass driver. But in the end I did not do it because:
1. FSP's initialization sequence is just a one time initialization and we don't do anything after the initialization completes. 2. Making a uclass for FSP means we have to delay fsp_init() to after initf_dm().But after fsp_init(), we will return to board_init_f() again and do the initialization for the second time. So all previous platdata of FSP that is set up by DM gets lost during this process. 3. There are some other architecture-dependent stuff in the arch_fsp_init() that is not suitable to be put in a FSP driver.
Regards, Bin