[U-Boot-Users] Patch: MPC8220 vco frequency update

- replaced vco to cvco and svco - added CFG_SPEED in speed.c
Regards, TsiChung Liew
Signed-off by: TsiChung LiewTsi-Chung.Liew@freescale.com
diff -rupN u-boot-all.git/common/cmd_bdinfo.c u-boot-all-8220- cfgspeed/common/cmd_bdinfo.c --- u-boot-all.git/common/cmd_bdinfo.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/common/cmd_bdinfo.c 2007-05-10 17:07:48.000000000 -0500 @@ -87,7 +87,8 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl print_str ("inpfreq", strmhz(buf, bd->bi_inpfreq)); print_str ("flbfreq", strmhz(buf, bd->bi_flbfreq)); print_str ("pcifreq", strmhz(buf, bd->bi_pcifreq)); - print_str ("vcofreq", strmhz(buf, bd->bi_vcofreq)); + print_str("cvcofreq", strmhz(buf, bd->bi_cvcofreq)); + print_str("svcofreq", strmhz(buf, bd->bi_svcofreq)); print_str ("pevfreq", strmhz(buf, bd->bi_pevfreq)); #endif
diff -rupN u-boot-all.git/common/cmd_bootm.c u-boot-all-8220- cfgspeed/common/cmd_bootm.c --- u-boot-all.git/common/cmd_bootm.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/common/cmd_bootm.c 2007-05-10 17:07:58.000000000 -0500 @@ -606,7 +606,8 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int fl kbd->bi_pcifreq /= 1000000L; kbd->bi_pevfreq /= 1000000L; kbd->bi_flbfreq /= 1000000L; - kbd->bi_vcofreq /= 1000000L; + kbd->bi_cvcofreq /= 1000000L; + kbd->bi_svcofreq /= 1000000L; #endif #if defined(CONFIG_CPM2) kbd->bi_cpmfreq /= 1000000L; diff -rupN u-boot-all.git/common/cmd_fdt.c u-boot-all-8220- cfgspeed/common/cmd_fdt.c --- u-boot-all.git/common/cmd_fdt.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/common/cmd_fdt.c 2007-05-10 17:08:04.000000000 -0500 @@ -702,7 +702,8 @@ static const struct { BDM(pcifreq), BDM(pevfreq), BDM(flbfreq), - BDM(vcofreq), + BDM(cvcofreq), + BDM(svcofreq), #endif BDM(bootflags), BDM(ip_addr), diff -rupN u-boot-all.git/common/ft_build.c u-boot-all-8220- cfgspeed/common/ft_build.c --- u-boot-all.git/common/ft_build.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/common/ft_build.c 2007-05-10 17:08:15.000000000 -0500 @@ -429,7 +429,8 @@ static const struct { BDM(pcifreq), BDM(pevfreq), BDM(flbfreq), - BDM(vcofreq), + BDM(cvcofreq), + BDM(svcofreq), #endif BDM(bootflags), BDM(ip_addr), diff -rupN u-boot-all.git/cpu/mpc8220/speed.c u-boot-all-8220- cfgspeed/cpu/mpc8220/speed.c --- u-boot-all.git/cpu/mpc8220/speed.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/cpu/mpc8220/speed.c 2007-05-10 17:06:24.000000000 -0500 @@ -27,6 +27,8 @@
DECLARE_GLOBAL_DATA_PTR;
+#if !defined(CFG_SPEED) + typedef struct pllmultiplier { u8 hid1; int multi; @@ -35,10 +37,6 @@ typedef struct pllmultiplier {
/* ------------------------------------------------------------------------- */
-/* - * - */ - int get_clocks (void) { pllcfg_t bus2core[] = { @@ -97,7 +95,10 @@ int get_clocks (void) for (i = 0; i < size; i++) if (hid1 == bus2core[i].hid1) { gd->cpu_clk = (bus2core[i].multi * gd->bus_clk) >> 1; - gd->vco_clk = CFG_MPC8220_SYSPLL_VCO_MULTIPLIER * (gd->pci_clk * bus2core[i].vco_div)/2; + gd->cvco_clk = + CFG_MPC8220_SYSPLL_VCO_MULTIPLIER * (gd->pci_clk * + bus2core[i]. + vco_div) / 2; break; }
@@ -106,13 +107,22 @@ int get_clocks (void)
return (0); } +#endif /* !defined(CFG_SPEED) */
int prt_mpc8220_clks (void) { - printf (" Bus %ld MHz, CPU %ld MHz, PCI %ld MHz, VCO %ld MHz\n", - gd->bus_clk / 1000000, gd->cpu_clk / 1000000, - gd->pci_clk / 1000000, gd->vco_clk / 1000000); - +#ifdef CFG_SPEED + printf(" CPU %ld MHz, BUS %ld MHz, PCI %ld MHz, FBUS %ld Mhz\n", + gd->cpu_clk / 1000000, gd->bus_clk / 1000000, + gd->pci_clk / 1000000, gd->flb_clk / 1000000); + printf(" SVCO %ld MHz, CVCO %ld MHz\n", + gd->svco_clk / 1000000, gd->cvco_clk / 1000000); +#else + printf(" CPU %ld MHz, BUS %ld MHz, PCI %ld MHz, FBUS %ld Mhz\n", + gd->cpu_clk / 1000000, gd->bus_clk / 1000000, + gd->pci_clk / 1000000, gd->flb_clk / 1000000); + printf(" CVCO %ld MHz\n", gd->cvco_clk / 1000000); +#endif /* CFG_SPEED */ return (0); }
diff -rupN u-boot-all.git/include/asm-ppc/global_data.h u-boot-all-8220- cfgspeed/include/asm-ppc/global_data.h --- u-boot-all.git/include/asm-ppc/global_data.h 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/include/asm-ppc/global_data.h 2007-05-10 17:10:53.000000000 -0500 @@ -84,7 +84,8 @@ typedef struct global_data { unsigned long bExtUart; unsigned long inp_clk; unsigned long pci_clk; - unsigned long vco_clk; + unsigned long cvco_clk; + unsigned long svco_clk; unsigned long pev_clk; unsigned long flb_clk; #endif diff -rupN u-boot-all.git/include/asm-ppc/u-boot.h u-boot-all-8220- cfgspeed/include/asm-ppc/u-boot.h --- u-boot-all.git/include/asm-ppc/u-boot.h 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/include/asm-ppc/u-boot.h 2007-05-10 17:10:59.000000000 -0500 @@ -60,7 +60,8 @@ typedef struct bd_info { unsigned long bi_pcifreq; /* PCI Freq, in MHz */ unsigned long bi_pevfreq; /* PEV Freq, in MHz */ unsigned long bi_flbfreq; /* Flexbus Freq, in MHz */ - unsigned long bi_vcofreq; /* VCO Freq, in MHz */ + unsigned long bi_cvcofreq; /* Core VCO Freq, in MHz */ + unsigned long bi_svcofreq; /* System VCO Freq, in Mhz */ #endif unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */ unsigned long bi_ip_addr; /* IP Address */ diff -rupN u-boot-all.git/lib_ppc/board.c u-boot-all-8220- cfgspeed/lib_ppc/board.c --- u-boot-all.git/lib_ppc/board.c 2007-04-03 19:18:56.000000000 -0500 +++ u-boot-all-8220-cfgspeed/lib_ppc/board.c 2007-05-10 17:14:06.000000000 -0500 @@ -528,7 +528,8 @@ void board_init_f (ulong bootflag) bd->bi_mbar_base = CFG_MBAR; /* base of internal registers */ bd->bi_inpfreq = gd->inp_clk; bd->bi_pcifreq = gd->pci_clk; - bd->bi_vcofreq = gd->vco_clk; + bd->bi_cvcofreq = gd->cvco_clk; + bd->bi_svcofreq = gd->svco_clk; bd->bi_pevfreq = gd->pev_clk; bd->bi_flbfreq = gd->flb_clk;
@@ -539,7 +540,7 @@ void board_init_f (ulong bootflag) *sram++ = gd->bus_clk; *sram++ = gd->inp_clk; *sram++ = gd->cpu_clk; - *sram++ = gd->vco_clk; + *sram++ = gd->cvco_clk; *sram++ = gd->flb_clk; *sram++ = 0xb8c3ba11; /* boot signature */ }
participants (1)
-
TsiChung Liew