Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
Hi simon, >+ Albert, Tom who might know about this > >Hi Akshay, > >On Wed, Mar 6, 2013 at 7:36 AM, Akshay Saraswat wrote: >> Hi Simon, >> >>>Hi Akshay, >>> >>>On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat wrote: This patch subtracts a part of clock init from spl and executes it after relocation. spl_clock_init executes in spl and system_clock_init executes after relocation in u-boot. This is done to gain some space by removing initially not necessary code. Signed-off-by: Akshay Saraswat --- >>> >>>Looks good - just one question below. >>> Changes since v1: - Rebased on ToT. board/samsung/smdk5250/Makefile | 3 +- board/samsung/smdk5250/clock_init.c | 429 + board/samsung/smdk5250/clock_init.h | 2 + board/samsung/smdk5250/lowlevel_init.S | 4 +- board/samsung/smdk5250/setup.h | 1 + board/samsung/smdk5250/smdk5250.c | 4 + board/samsung/smdk5250/spl_clock_init.c | 469 7 files changed, 482 insertions(+), 430 deletions(-) create mode 100644 board/samsung/smdk5250/spl_clock_init.c diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile index 47c6a5a..3ceb7e2 100644 --- a/board/samsung/smdk5250/Makefile +++ b/board/samsung/smdk5250/Makefile @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o SOBJS := lowlevel_init.o -COBJS := clock_init.o +COBJS := spl_clock_init.o >>> >>>Shouldn't this only be included in the SPL build? >> >> I tried to do that but, since other files are using some of the data >> defined in this file, we need it in u-boot as well. Please tell me if >> it's required I'll make another file for common data. > >Are you saying that U-Boot proper is using the same data as SPL? I'm >not sure, but I believe that we should not access SPL data from >U-Boot, since they should be setting up separate things. Can you >please be more specific about what is being shared? > Sorry, misunderstood the compiler errors. Actually data is not shared in spl and u-boot, but in the Makefile if I keep all the spl related files in "ifdef CONFIG_SPL_BUILD" lowlevel_init.s is not able to find tzpc, dmc and clock init function definitions. And if I keep lowlevel init as well in "ifdef CONFIG_SPL_BUILD", start.o is not able to find function definitions in lowlevel_init.s. In the next version of this patch-set, I'll fix it. > >> >>> COBJS += dmc_common.o dmc_init_ddr3.o COBJS += tzpc_init.o COBJS += smdk5250_spl.o ifndef CONFIG_SPL_BUILD +COBJS += clock_init.o COBJS += smdk5250.o endif >>>... > >Regards, >Simon > Regards, Akshay Saraswat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
+ Albert, Tom who might know about this Hi Akshay, On Wed, Mar 6, 2013 at 7:36 AM, Akshay Saraswat wrote: > Hi Simon, > >>Hi Akshay, >> >>On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat wrote: >>> This patch subtracts a part of clock init from spl >>> and executes it after relocation. spl_clock_init >>> executes in spl and system_clock_init executes after >>> relocation in u-boot. This is done to gain some space by >>> removing initially not necessary code. >>> >>> Signed-off-by: Akshay Saraswat >>> --- >> >>Looks good - just one question below. >> >>> Changes since v1: >>> - Rebased on ToT. >>> >>> board/samsung/smdk5250/Makefile | 3 +- >>> board/samsung/smdk5250/clock_init.c | 429 + >>> board/samsung/smdk5250/clock_init.h | 2 + >>> board/samsung/smdk5250/lowlevel_init.S | 4 +- >>> board/samsung/smdk5250/setup.h | 1 + >>> board/samsung/smdk5250/smdk5250.c | 4 + >>> board/samsung/smdk5250/spl_clock_init.c | 469 >>> >>> 7 files changed, 482 insertions(+), 430 deletions(-) >>> create mode 100644 board/samsung/smdk5250/spl_clock_init.c >>> >>> diff --git a/board/samsung/smdk5250/Makefile >>> b/board/samsung/smdk5250/Makefile >>> index 47c6a5a..3ceb7e2 100644 >>> --- a/board/samsung/smdk5250/Makefile >>> +++ b/board/samsung/smdk5250/Makefile >>> @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o >>> >>> SOBJS := lowlevel_init.o >>> >>> -COBJS := clock_init.o >>> +COBJS := spl_clock_init.o >> >>Shouldn't this only be included in the SPL build? > > I tried to do that but, since other files are using some of the data > defined in this file, we need it in u-boot as well. Please tell me if > it's required I'll make another file for common data. Are you saying that U-Boot proper is using the same data as SPL? I'm not sure, but I believe that we should not access SPL data from U-Boot, since they should be setting up separate things. Can you please be more specific about what is being shared? > >> >>> COBJS += dmc_common.o dmc_init_ddr3.o >>> COBJS += tzpc_init.o >>> COBJS += smdk5250_spl.o >>> >>> ifndef CONFIG_SPL_BUILD >>> +COBJS += clock_init.o >>> COBJS += smdk5250.o >>> endif >>> >>... >> >>Regards, >>Simon >> > > Thanks & Regards, > Akshay Saraswat Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
Hi Simon, >Hi Akshay, > >On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat wrote: >> This patch subtracts a part of clock init from spl >> and executes it after relocation. spl_clock_init >> executes in spl and system_clock_init executes after >> relocation in u-boot. This is done to gain some space by >> removing initially not necessary code. >> >> Signed-off-by: Akshay Saraswat >> --- > >Looks good - just one question below. > >> Changes since v1: >> - Rebased on ToT. >> >> board/samsung/smdk5250/Makefile | 3 +- >> board/samsung/smdk5250/clock_init.c | 429 + >> board/samsung/smdk5250/clock_init.h | 2 + >> board/samsung/smdk5250/lowlevel_init.S | 4 +- >> board/samsung/smdk5250/setup.h | 1 + >> board/samsung/smdk5250/smdk5250.c | 4 + >> board/samsung/smdk5250/spl_clock_init.c | 469 >> >> 7 files changed, 482 insertions(+), 430 deletions(-) >> create mode 100644 board/samsung/smdk5250/spl_clock_init.c >> >> diff --git a/board/samsung/smdk5250/Makefile >> b/board/samsung/smdk5250/Makefile >> index 47c6a5a..3ceb7e2 100644 >> --- a/board/samsung/smdk5250/Makefile >> +++ b/board/samsung/smdk5250/Makefile >> @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o >> >> SOBJS := lowlevel_init.o >> >> -COBJS := clock_init.o >> +COBJS := spl_clock_init.o > >Shouldn't this only be included in the SPL build? I tried to do that but, since other files are using some of the data defined in this file, we need it in u-boot as well. Please tell me if it's required I'll make another file for common data. > >> COBJS += dmc_common.o dmc_init_ddr3.o >> COBJS += tzpc_init.o >> COBJS += smdk5250_spl.o >> >> ifndef CONFIG_SPL_BUILD >> +COBJS += clock_init.o >> COBJS += smdk5250.o >> endif >> >... > >Regards, >Simon > Thanks & Regards, Akshay Saraswat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
Hi Simon, >Hi Akshay, > >On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat wrote: >> This patch subtracts a part of clock init from spl >> and executes it after relocation. spl_clock_init >> executes in spl and system_clock_init executes after >> relocation in u-boot. This is done to gain some space by >> removing initially not necessary code. >> >> Signed-off-by: Akshay Saraswat >> --- > >Looks good - just one question below. > >> Changes since v1: >> - Rebased on ToT. >> >> board/samsung/smdk5250/Makefile | 3 +- >> board/samsung/smdk5250/clock_init.c | 429 + >> board/samsung/smdk5250/clock_init.h | 2 + >> board/samsung/smdk5250/lowlevel_init.S | 4 +- >> board/samsung/smdk5250/setup.h | 1 + >> board/samsung/smdk5250/smdk5250.c | 4 + >> board/samsung/smdk5250/spl_clock_init.c | 469 >> >> 7 files changed, 482 insertions(+), 430 deletions(-) >> create mode 100644 board/samsung/smdk5250/spl_clock_init.c >> >> diff --git a/board/samsung/smdk5250/Makefile >> b/board/samsung/smdk5250/Makefile >> index 47c6a5a..3ceb7e2 100644 >> --- a/board/samsung/smdk5250/Makefile >> +++ b/board/samsung/smdk5250/Makefile >> @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o >> >> SOBJS := lowlevel_init.o >> >> -COBJS := clock_init.o >> +COBJS := spl_clock_init.o > >Shouldn't this only be included in the SPL build? I tried to do that but, since other files are using some of the data defined in this file, we need it in u-boot as well. Please tell me if it's required I'll make another file for common data. > >> COBJS += dmc_common.o dmc_init_ddr3.o >> COBJS += tzpc_init.o >> COBJS += smdk5250_spl.o >> >> ifndef CONFIG_SPL_BUILD >> +COBJS += clock_init.o >> COBJS += smdk5250.o >> endif >> >... > >Regards, >Simon > Thanks & Regards, Akshay Saraswat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
Hi Akshay, On Tue, Mar 5, 2013 at 2:53 AM, Akshay Saraswat wrote: > This patch subtracts a part of clock init from spl > and executes it after relocation. spl_clock_init > executes in spl and system_clock_init executes after > relocation in u-boot. This is done to gain some space by > removing initially not necessary code. > > Signed-off-by: Akshay Saraswat > --- Looks good - just one question below. > Changes since v1: > - Rebased on ToT. > > board/samsung/smdk5250/Makefile | 3 +- > board/samsung/smdk5250/clock_init.c | 429 + > board/samsung/smdk5250/clock_init.h | 2 + > board/samsung/smdk5250/lowlevel_init.S | 4 +- > board/samsung/smdk5250/setup.h | 1 + > board/samsung/smdk5250/smdk5250.c | 4 + > board/samsung/smdk5250/spl_clock_init.c | 469 > > 7 files changed, 482 insertions(+), 430 deletions(-) > create mode 100644 board/samsung/smdk5250/spl_clock_init.c > > diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile > index 47c6a5a..3ceb7e2 100644 > --- a/board/samsung/smdk5250/Makefile > +++ b/board/samsung/smdk5250/Makefile > @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o > > SOBJS := lowlevel_init.o > > -COBJS := clock_init.o > +COBJS := spl_clock_init.o Shouldn't this only be included in the SPL build? > COBJS += dmc_common.o dmc_init_ddr3.o > COBJS += tzpc_init.o > COBJS += smdk5250_spl.o > > ifndef CONFIG_SPL_BUILD > +COBJS += clock_init.o > COBJS += smdk5250.o > endif > ... Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
Hi Akshay On Tue, Mar 5, 2013 at 4:23 PM, Akshay Saraswat wrote: > This patch subtracts a part of clock init from spl > and executes it after relocation. spl_clock_init > executes in spl and system_clock_init executes after > relocation in u-boot. This is done to gain some space by > removing initially not necessary code. > > Signed-off-by: Akshay Saraswat > --- > Now board boots fine with this patch applied. Tested-by: Alim Akhtar > Changes since v1: > - Rebased on ToT. > > board/samsung/smdk5250/Makefile | 3 +- > board/samsung/smdk5250/clock_init.c | 429 > + > board/samsung/smdk5250/clock_init.h | 2 + > board/samsung/smdk5250/lowlevel_init.S | 4 +- > board/samsung/smdk5250/setup.h | 1 + > board/samsung/smdk5250/smdk5250.c | 4 + > board/samsung/smdk5250/spl_clock_init.c | 469 > > 7 files changed, 482 insertions(+), 430 deletions(-) > create mode 100644 board/samsung/smdk5250/spl_clock_init.c > > diff --git a/board/samsung/smdk5250/Makefile > b/board/samsung/smdk5250/Makefile > index 47c6a5a..3ceb7e2 100644 > --- a/board/samsung/smdk5250/Makefile > +++ b/board/samsung/smdk5250/Makefile > @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o > > SOBJS := lowlevel_init.o > > -COBJS := clock_init.o > +COBJS := spl_clock_init.o > COBJS += dmc_common.o dmc_init_ddr3.o > COBJS += tzpc_init.o > COBJS += smdk5250_spl.o > > ifndef CONFIG_SPL_BUILD > +COBJS += clock_init.o > COBJS += smdk5250.o > endif > > diff --git a/board/samsung/smdk5250/clock_init.c > b/board/samsung/smdk5250/clock_init.c > index 30cbdcf..fe3cd8a 100644 > --- a/board/samsung/smdk5250/clock_init.c > +++ b/board/samsung/smdk5250/clock_init.c > @@ -34,109 +34,6 @@ > > DECLARE_GLOBAL_DATA_PTR; > > -struct arm_clk_ratios arm_clk_ratios[] = { > - { > - .arm_freq_mhz = 600, > - > - .apll_mdiv = 0xc8, > - .apll_pdiv = 0x4, > - .apll_sdiv = 0x1, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x1, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x2, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x1, > - .arm_ratio = 0x0, > - }, { > - .arm_freq_mhz = 800, > - > - .apll_mdiv = 0x64, > - .apll_pdiv = 0x3, > - .apll_sdiv = 0x0, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x1, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x3, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x2, > - .arm_ratio = 0x0, > - }, { > - .arm_freq_mhz = 1000, > - > - .apll_mdiv = 0x7d, > - .apll_pdiv = 0x3, > - .apll_sdiv = 0x0, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x1, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x4, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x2, > - .arm_ratio = 0x0, > - }, { > - .arm_freq_mhz = 1200, > - > - .apll_mdiv = 0x96, > - .apll_pdiv = 0x3, > - .apll_sdiv = 0x0, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x3, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x5, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x3, > - .arm_ratio = 0x0, > - }, { > - .arm_freq_mhz = 1400, > - > - .apll_mdiv = 0xaf, > - .apll_pdiv = 0x3, > - .apll_sdiv = 0x0, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x3, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x6, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x3, > - .arm_ratio = 0x0, > - }, { > - .arm_freq_mhz = 1700, > - > - .apll_mdiv = 0x1a9, > - .apll_pdiv = 0x6, > - .apll_sdiv = 0x0, > - > - .arm2_ratio = 0x0, > - .apll_ratio = 0x3, > - .pclk_dbg_ratio = 0x1, > - .atb_ratio = 0x6, > - .periph_ratio = 0x7, > - .acp_ratio = 0x7, > - .cpud_ratio = 0x3, > - .arm_ratio = 0x0, > - } > -}; > - > -struct spl_clock_div spl_clock_div = { > - .mpll_mdiv = 0xc8, > - .mpll_pdiv = 0x3, > - .mpll_sdiv = 0x0, > - .bpll_mdiv = 0x64, > - .bpll_pdiv = 0x3, > - .bpll_sdiv = 0x0, > -}; > - > struct non_spl
[U-Boot] [PATCH 2/2 v2] Exynos5: spl: Reduce clock init in spl
This patch subtracts a part of clock init from spl and executes it after relocation. spl_clock_init executes in spl and system_clock_init executes after relocation in u-boot. This is done to gain some space by removing initially not necessary code. Signed-off-by: Akshay Saraswat --- Changes since v1: - Rebased on ToT. board/samsung/smdk5250/Makefile | 3 +- board/samsung/smdk5250/clock_init.c | 429 + board/samsung/smdk5250/clock_init.h | 2 + board/samsung/smdk5250/lowlevel_init.S | 4 +- board/samsung/smdk5250/setup.h | 1 + board/samsung/smdk5250/smdk5250.c | 4 + board/samsung/smdk5250/spl_clock_init.c | 469 7 files changed, 482 insertions(+), 430 deletions(-) create mode 100644 board/samsung/smdk5250/spl_clock_init.c diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile index 47c6a5a..3ceb7e2 100644 --- a/board/samsung/smdk5250/Makefile +++ b/board/samsung/smdk5250/Makefile @@ -26,12 +26,13 @@ LIB = $(obj)lib$(BOARD).o SOBJS := lowlevel_init.o -COBJS := clock_init.o +COBJS := spl_clock_init.o COBJS += dmc_common.o dmc_init_ddr3.o COBJS += tzpc_init.o COBJS += smdk5250_spl.o ifndef CONFIG_SPL_BUILD +COBJS += clock_init.o COBJS += smdk5250.o endif diff --git a/board/samsung/smdk5250/clock_init.c b/board/samsung/smdk5250/clock_init.c index 30cbdcf..fe3cd8a 100644 --- a/board/samsung/smdk5250/clock_init.c +++ b/board/samsung/smdk5250/clock_init.c @@ -34,109 +34,6 @@ DECLARE_GLOBAL_DATA_PTR; -struct arm_clk_ratios arm_clk_ratios[] = { - { - .arm_freq_mhz = 600, - - .apll_mdiv = 0xc8, - .apll_pdiv = 0x4, - .apll_sdiv = 0x1, - - .arm2_ratio = 0x0, - .apll_ratio = 0x1, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x2, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x1, - .arm_ratio = 0x0, - }, { - .arm_freq_mhz = 800, - - .apll_mdiv = 0x64, - .apll_pdiv = 0x3, - .apll_sdiv = 0x0, - - .arm2_ratio = 0x0, - .apll_ratio = 0x1, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x3, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x2, - .arm_ratio = 0x0, - }, { - .arm_freq_mhz = 1000, - - .apll_mdiv = 0x7d, - .apll_pdiv = 0x3, - .apll_sdiv = 0x0, - - .arm2_ratio = 0x0, - .apll_ratio = 0x1, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x4, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x2, - .arm_ratio = 0x0, - }, { - .arm_freq_mhz = 1200, - - .apll_mdiv = 0x96, - .apll_pdiv = 0x3, - .apll_sdiv = 0x0, - - .arm2_ratio = 0x0, - .apll_ratio = 0x3, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x5, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x3, - .arm_ratio = 0x0, - }, { - .arm_freq_mhz = 1400, - - .apll_mdiv = 0xaf, - .apll_pdiv = 0x3, - .apll_sdiv = 0x0, - - .arm2_ratio = 0x0, - .apll_ratio = 0x3, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x6, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x3, - .arm_ratio = 0x0, - }, { - .arm_freq_mhz = 1700, - - .apll_mdiv = 0x1a9, - .apll_pdiv = 0x6, - .apll_sdiv = 0x0, - - .arm2_ratio = 0x0, - .apll_ratio = 0x3, - .pclk_dbg_ratio = 0x1, - .atb_ratio = 0x6, - .periph_ratio = 0x7, - .acp_ratio = 0x7, - .cpud_ratio = 0x3, - .arm_ratio = 0x0, - } -}; - -struct spl_clock_div spl_clock_div = { - .mpll_mdiv = 0xc8, - .mpll_pdiv = 0x3, - .mpll_sdiv = 0x0, - .bpll_mdiv = 0x64, - .bpll_pdiv = 0x3, - .bpll_sdiv = 0x0, -}; - struct non_spl_clock_div non_spl_clock_div = { .cpll_mdiv = 0xde, .cpll_pdiv = 0x4, @@ -152,255 +49,20 @@ struct non_spl_clock_div non_spl_clock_div = { .vpll_sdiv = 0x2, }; -struct mem_timings mem_timings = { - .pclk_cdrex_ratio = 0x5, - .timing_ref = 0x00bb, - .timing_row = 0x8c36650e, - .timing_data = 0x3630580b, - .timing_powe