summaryrefslogtreecommitdiff
path: root/board/sacsng/sacsng.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2002-11-11 02:11:37 +0000
committerwdenk <wdenk>2002-11-11 02:11:37 +0000
commiteb9401e3ebfa6a1550522be28895af461137f797 (patch)
tree54bfb93d9c8335071da38eaf6244625ba486515d /board/sacsng/sacsng.c
parent7f6c2cbc2bc0721c41bb776242c0b18ec70328e4 (diff)
downloadu-boot-imx-eb9401e3ebfa6a1550522be28895af461137f797.zip
u-boot-imx-eb9401e3ebfa6a1550522be28895af461137f797.tar.gz
u-boot-imx-eb9401e3ebfa6a1550522be28895af461137f797.tar.bz2
* Patch by Andreas Oberritter, 09 Nov 2002:
Change behaviour of NetLoop(): return -1 for errors, filesize otherwise; return code 0 is valid an means no file loaded - in this case the environment still gets updated! * Patches by Jon Diekema, 9 Nov 2002: - improve ADC/DAC clocking on the SACSng board to align the failing edges of LRCLK and SCLK - sbc8260 configuration tweaks - add status LED support for 82xx systems - wire sspi/sspo commands into command handler; improved error handlering - add timestamp support and alternate memory test to the SACSng configuration
Diffstat (limited to 'board/sacsng/sacsng.c')
-rw-r--r--board/sacsng/sacsng.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/board/sacsng/sacsng.c b/board/sacsng/sacsng.c
index 0f0f0e6..19dbb97 100644
--- a/board/sacsng/sacsng.c
+++ b/board/sacsng/sacsng.c
@@ -26,7 +26,6 @@
#include <common.h>
#include <ioports.h>
#include <mpc8260.h>
-/*NO// #include <memtest.h> */
#include <i2c.h>
#include <spi.h>
@@ -486,9 +485,25 @@ int misc_init_r(void)
}
}
+ /*
+ * Stop the clocks and wait for at least 1 LRCLK period
+ * to make sure the clocking has really stopped.
+ */
+ Daq_Stop_Clocks();
+ udelay((1000000 / sample_rate) * NUM_LRCLKS_TO_STABILIZE);
+
+ /*
+ * Initialize the clocks with the new rates
+ */
Daq_Init_Clocks(sample_rate, sample_64x);
sample_rate = Daq_Get_SampleRate();
+
+ /*
+ * Start the clocks and wait for at least 1 LRCLK period
+ * to make sure the clocking has become stable.
+ */
Daq_Start_Clocks(sample_rate);
+ udelay((1000000 / sample_rate) * NUM_LRCLKS_TO_STABILIZE);
sprintf(str_buf, "%d", sample_rate);
setenv("DaqSampleRate", str_buf);
@@ -792,10 +807,12 @@ void spi_dac_chipsel(int cs)
* chip selects: it calls the appropriate function to control the SPI
* chip selects.
*/
-spi_chipsel_type spi_chipsel[2] = {
+spi_chipsel_type spi_chipsel[] = {
spi_adc_chipsel,
spi_dac_chipsel
};
+int spi_chipsel_cnt = sizeof(spi_chipsel) / sizeof(spi_chipsel[0]);
+
#endif /* CFG_CMD_SPI */
#endif /* CONFIG_MISC_INIT_R */