Message ID | 1507882137-27841-17-git-send-email-tien.fong.chee@intel.com |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | Add FPGA, SDRAM, SPL loadfs U-boot & booting to console | expand |
On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote: > From: Tien Fong Chee <tien.fong.chee@intel.com> > > Clock frequency info is required in U-boot. We know this patch is for U-Boot, don't need to state it in the commit message. Also, it's "U-Boot", not "U-boot". > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> > --- > arch/arm/mach-socfpga/board.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c > index 965f9dc..9a96f52 100644 > --- a/arch/arm/mach-socfpga/board.c > +++ b/arch/arm/mach-socfpga/board.c > @@ -8,7 +8,10 @@ > > #include <common.h> > #include <errno.h> > +#include <fdtdec.h> > #include <asm/arch/reset_manager.h> > +#include <asm/arch/clock_manager.h> > +#include <asm/arch/misc.h> Is misc.h needed? > #include <asm/io.h> > > #include <usb.h> > @@ -26,6 +29,11 @@ int board_init(void) > /* Address of boot parameters for ATAG (if ATAG is used) */ > gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; > > +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) > + /* configuring the clock based on handoff */ > + cm_basic_init(gd->fdt_blob); > +#endif > + Is is the right place this? The usual call is in the SPL. Dinh
On Jum, 2017-10-20 at 09:29 -0500, Dinh Nguyen wrote: > > On 10/13/2017 03:08 AM, tien.fong.chee@intel.com wrote: > > > > From: Tien Fong Chee <tien.fong.chee@intel.com> > > > > Clock frequency info is required in U-boot. > We know this patch is for U-Boot, don't need to state it in the > commit > message. Also, it's "U-Boot", not "U-boot". > Both SPL and U-Boot need to know the clock freq info. SPL already has one, and this patch is for creating the clock freq info for U-Boot. > > > > > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> > > --- > > arch/arm/mach-socfpga/board.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach- > > socfpga/board.c > > index 965f9dc..9a96f52 100644 > > --- a/arch/arm/mach-socfpga/board.c > > +++ b/arch/arm/mach-socfpga/board.c > > @@ -8,7 +8,10 @@ > > > > #include <common.h> > > #include <errno.h> > > +#include <fdtdec.h> > > #include <asm/arch/reset_manager.h> > > +#include <asm/arch/clock_manager.h> > > +#include <asm/arch/misc.h> > Is misc.h needed? > I believe can remove mish.h . I will verify again. > > > > #include <asm/io.h> > > > > #include <usb.h> > > @@ -26,6 +29,11 @@ int board_init(void) > > /* Address of boot parameters for ATAG (if ATAG is used) > > */ > > gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; > > > > +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) > > + /* configuring the clock based on handoff */ > > + cm_basic_init(gd->fdt_blob); > > +#endif > > + > Is is the right place this? The usual call is in the SPL. > SPL has one. This is for U-Boot. Clock freq info which is stored in SPL memory will gone after moving to U-Boot. > Dinh
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 965f9dc..9a96f52 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -8,7 +8,10 @@ #include <common.h> #include <errno.h> +#include <fdtdec.h> #include <asm/arch/reset_manager.h> +#include <asm/arch/clock_manager.h> +#include <asm/arch/misc.h> #include <asm/io.h> #include <usb.h> @@ -26,6 +29,11 @@ int board_init(void) /* Address of boot parameters for ATAG (if ATAG is used) */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) + /* configuring the clock based on handoff */ + cm_basic_init(gd->fdt_blob); +#endif + return 0; }