summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx53_evk/mx53_evk.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/board/freescale/mx53_evk/mx53_evk.c b/board/freescale/mx53_evk/mx53_evk.c
index 86ab2a1..7418ab7 100644
--- a/board/freescale/mx53_evk/mx53_evk.c
+++ b/board/freescale/mx53_evk/mx53_evk.c
@@ -477,6 +477,36 @@ int identify_board_id(void)
#endif
#endif
+#ifdef CONFIG_IMX_ECSPI
+s32 spi_get_cfg(struct imx_spi_dev_t *dev)
+{
+ switch (dev->slave.cs) {
+ case 0:
+ /* pmic */
+ dev->base = CSPI1_BASE_ADDR;
+ dev->freq = 2500000;
+ dev->ss_pol = IMX_SPI_ACTIVE_HIGH;
+ dev->ss = 0;
+ dev->fifo_sz = 64 * 4;
+ dev->us_delay = 0;
+ break;
+ case 1:
+ /* spi_nor */
+ dev->base = CSPI1_BASE_ADDR;
+ dev->freq = 2500000;
+ dev->ss_pol = IMX_SPI_ACTIVE_LOW;
+ dev->ss = 1;
+ dev->fifo_sz = 64 * 4;
+ dev->us_delay = 0;
+ break;
+ default:
+ printf("Invalid Bus ID! \n");
+ break;
+ }
+
+ return 0;
+}
+
void spi_io_init(struct imx_spi_dev_t *dev)
{
switch (dev->base) {
@@ -529,6 +559,8 @@ void spi_io_init(struct imx_spi_dev_t *dev)
}
}
+#endif
+
static void setup_fec(void)
{
volatile unsigned int reg;