]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
SMC1 uses external CLK4 instead of BRG on spc1920
authorMarkus Klotzbuecher <mk@creamnet.de>
Tue, 9 Jan 2007 13:57:11 +0000 (14:57 +0100)
committerMarkus Klotzbuecher <mk@pollux.denx.de>
Tue, 9 Jan 2007 13:57:11 +0000 (14:57 +0100)
cpu/mpc8xx/serial.c
include/configs/spc1920.h

index 8ae584f2e1dd4ddcba111a548da0f78fa6869b14..c8caa793d218a690135572104de43e45ea6ce8e4 100644 (file)
@@ -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 ();
index f8909b1d1d487eda48a411223365f3028fce42ad..a836d82992329e929fec5cf7b2b75ac6cddf5f40 100644 (file)
@@ -44,7 +44,7 @@
 #define CONFIG_BAUDRATE                19200
 
 /* use PLD CLK4 instead of brg */
-#undef CFG_SPC1920_SMC1_CLK4
+#define CFG_SPC1920_SMC1_CLK4
 
 #define CONFIG_8xx_OSCLK               10000000 /* 10 MHz oscillator on EXTCLK  */
 #define CONFIG_8xx_CPUCLK_DEFAULT      50000000