summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2010-07-09 04:08:42 +0800
committerJason Liu <r64343@freescale.com>2010-07-09 04:16:43 +0800
commit7b6e0c9628830c8013da8ca64f4e292653774399 (patch)
tree9ca1e4eb7bb41866c893be4fe0a1e6cbc8455e91 /board/freescale
parentd6141b1640edd06e59e431baf1ab87b0894f22f3 (diff)
downloadu-boot-imx-7b6e0c9628830c8013da8ca64f4e292653774399.zip
u-boot-imx-7b6e0c9628830c8013da8ca64f4e292653774399.tar.gz
u-boot-imx-7b6e0c9628830c8013da8ca64f4e292653774399.tar.bz2
ENGR00124984 MX53:Add spi_get_cfg function support
Add spi_get_cfg function due to the function has been made platform specific and moved out of spi driver. This also fix the build break for mx53 uboot Signed-off-by:Jason Liu <r64343@freescale.com>
Diffstat (limited to 'board/freescale')
-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;