diff options
author | Markus Klotzbuecher <mk@creamnet.de> | 2007-01-09 14:57:11 +0100 |
---|---|---|
committer | Markus Klotzbuecher <mk@pollux.denx.de> | 2007-01-09 14:57:11 +0100 |
commit | 8139567b60d678584b05f0718a681f2047c5e14f (patch) | |
tree | 5303d9b0cd6ad35857602388852399f344394645 /cpu/mpc8xx/serial.c | |
parent | d8d9de1a02fbd880b613d607143d1f57342affc7 (diff) | |
download | u-boot-imx-8139567b60d678584b05f0718a681f2047c5e14f.zip u-boot-imx-8139567b60d678584b05f0718a681f2047c5e14f.tar.gz u-boot-imx-8139567b60d678584b05f0718a681f2047c5e14f.tar.bz2 |
SMC1 uses external CLK4 instead of BRG on spc1920
Diffstat (limited to 'cpu/mpc8xx/serial.c')
-rw-r--r-- | cpu/mpc8xx/serial.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpu/mpc8xx/serial.c b/cpu/mpc8xx/serial.c index 8ae584f..c8caa79 100644 --- a/cpu/mpc8xx/serial.c +++ b/cpu/mpc8xx/serial.c @@ -227,8 +227,17 @@ static int smc_init (void) sp->smc_smcm = 0; sp->smc_smce = 0xff; -#ifdef CFG_SPC1920_SMC1_CLK4 /* clock source is PLD */ - *((volatile uchar *) CFG_SPC1920_PLD_BASE+6) = 0xff; +#ifdef CFG_SPC1920_SMC1_CLK4 + /* clock source is PLD */ + + /* set freq to 19200 Baud */ + *((volatile uchar *) CFG_SPC1920_PLD_BASE+6) = 0x3; + /* configure clk4 as input */ + im->im_ioport.iop_pdpar |= 0x800; + im->im_ioport.iop_pddir &= ~0x800; + + cp->cp_simode = 0x0000; + cp->cp_simode |= 0x7000; #else /* Set up the baud rate generator */ smc_setbrg (); |