diff options
author | Wolfgang Denk <wd@denx.de> | 2011-11-16 20:06:21 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-11-16 20:06:21 +0100 |
commit | c7801ee43b6263246e782000b71753caac5fe9c6 (patch) | |
tree | 1954eb9d5d051934839b70929f04603071335e18 /board/freescale/common/ngpixis.c | |
parent | 4055a6684781790ca29c8e25b858d55af173e145 (diff) | |
parent | 4589728e214958a4e6e011a081a68d360c49d7a5 (diff) | |
download | u-boot-imx-c7801ee43b6263246e782000b71753caac5fe9c6.zip u-boot-imx-c7801ee43b6263246e782000b71753caac5fe9c6.tar.gz u-boot-imx-c7801ee43b6263246e782000b71753caac5fe9c6.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
* 'master' of git://git.denx.de/u-boot-mpc85xx:
powerpc/85xx: Fix builds of P1020/P2020RDB-PC_36BIT_NAND
arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc8xxx/ddr/options.c: Fix GCC 4.6 build warning
drivers/qe/uec.c: Fix GCC 4.6 build warning
drivers/usb/host/ehci-fsl.c: Fix GCC 4.6 build warning
drivers/net/fm/fm.c: Fix GCC 4.6 build warning
board/sbc8560/sbc8560.c: Fix GCC 4.6 build warning
board/sbc8548/sbc8548.c: Fix GCC 4.6 build warning
board/freescale/mpc8569mds/mpc8569mds.c: Fix GCC 4.6 build warning
board/freescale/mpc8568mds/mpc8568mds.c: Fix GCC 4.6 build warning
board/freescale/mpc8548cds/mpc8548cds.c: Fix GCC 4.6 build warning
board/freescale/common/pixis.c: Fix GCC 4.6 build warning
board/freescale/common/cds_pci_ft.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc8xxx/fsl_lbc.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc85xx/tlb.c: Fix GCC 4.6 build warning
arch/powerpc/cpu/mpc85xx/cpu_init.c: Fix GCC 4.6 build warning
phylib: Enable AR8021 phy support
powerpc/85xx: Set max alloc length to 10MB on P1022DS
powerpc/mpc85xx: Set SYSCLK to the required frequency
powerpc/85xx: Fix NAND SPL support
powerpc/85xx: Fix MPC8572DS NAND build
fsl_ifc: Fixed a bug in the erratum handling code for IFC_A003399
powerpc/85xx: Add support for Book-E MMU Arch v2.0
powerpc/85xx: Make inclusion of USB device fixup conditional
powerpc/85xx: Fix warning for USB device-fixup
powerpc/85xx: resize the boot page TLB before relocating CCSR
powerpc/85xx: verify the current address of CCSR before relocating it
powerpc/85xx: add some missing sync instructions in the CCSR relocation code
powerpc/85xx: fix some comments in the CCSR relocation code
powerpc/85xx: fix definition of MAS register macros
powerpc/mpc8548cds: Fix network initialization
powerpc/mpc8548: Add workaround for erratum NMG_eTSEC129
powerpc/QorIQ: fix network frame manager TBI PHY address settings
Diffstat (limited to 'board/freescale/common/ngpixis.c')
-rw-r--r-- | board/freescale/common/ngpixis.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c index 765f035..276ae3c 100644 --- a/board/freescale/common/ngpixis.c +++ b/board/freescale/common/ngpixis.c @@ -156,9 +156,29 @@ static void pixis_dump_regs(void) } #endif +void pixis_sysclk_set(unsigned long sysclk) +{ + unsigned long freq_word; + u8 sclk0, sclk1, sclk2; + + freq_word = ics307_sysclk_calculator(sysclk); + sclk2 = freq_word & 0xff; + sclk1 = (freq_word >> 8) & 0xff; + sclk0 = (freq_word >> 16) & 0xff; + + /* set SYSCLK enable bit */ + PIXIS_WRITE(vcfgen0, 0x01); + + /* SYSCLK to required frequency */ + PIXIS_WRITE(sclk[0], sclk0); + PIXIS_WRITE(sclk[1], sclk1); + PIXIS_WRITE(sclk[2], sclk2); +} + int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int i; + unsigned long sysclk; char *p_altbank = NULL; #ifdef DEBUG char *p_dump = NULL; @@ -182,6 +202,12 @@ int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) continue; } #endif + if (strcmp(argv[i], "sysclk") == 0) { + sysclk = simple_strtoul(argv[i + 1], NULL, 0); + i += 1; + pixis_sysclk_set(sysclk); + continue; + } unknown_param = argv[i]; } @@ -219,4 +245,5 @@ U_BOOT_CMD( #ifdef DEBUG "pixis_reset dump - display the PIXIS registers\n" #endif + "pixis_reset sysclk <SYSCLK_freq> - reset with SYSCLK frequency(KHz)\n" ); |