diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-03-26 13:38:49 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 15:03:08 +0800 |
commit | 8c1bbc981820071a19ddde66633c35287952bfda (patch) | |
tree | d930832c801b87533e764d69a3fa46a583a7befd /board/freescale | |
parent | 681e44167e6fa66170afb5bb4dfdca53d87592af (diff) | |
download | u-boot-imx-8c1bbc981820071a19ddde66633c35287952bfda.zip u-boot-imx-8c1bbc981820071a19ddde66633c35287952bfda.tar.gz u-boot-imx-8c1bbc981820071a19ddde66633c35287952bfda.tar.bz2 |
MLK-10774-38 imx: fix ecspi code
This commit 155fa9af95ac5be857a7327e7a968a296e60d4c8
"spi: mxc: fix sf probe when using mxc_spi"
introduces "board_spi_cs_gpio" function to discard gpio in
CONFIG_SF_DEFAULT_CS for spi flash.
Follow this rule to make imx boards work fine.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'board/freescale')
4 files changed, 20 insertions, 0 deletions
diff --git a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c index ca8919c..db0de6e 100644 --- a/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c +++ b/board/freescale/mx6sx_17x17_arm2/mx6sx_17x17_arm2.c @@ -484,6 +484,11 @@ void setup_spinor(void) ARRAY_SIZE(ecspi4_pads)); gpio_direction_output(IMX_GPIO_NR(6, 10), 0); } + +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(6, 10)) : -1; +} #endif #ifdef CONFIG_SYS_USE_EIMNOR diff --git a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c index 1db32a3..7236d57 100644 --- a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c +++ b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c @@ -507,6 +507,11 @@ void setup_spinor(void) ARRAY_SIZE(ecspi4_pads)); gpio_direction_output(IMX_GPIO_NR(6, 10), 0); } + +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(6, 10)) : -1; +} #endif #ifdef CONFIG_SYS_USE_EIMNOR diff --git a/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c b/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c index efef8f7..b8086ff 100644 --- a/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c +++ b/board/freescale/mx7d_12x12_lpddr3_arm2/mx7d_12x12_lpddr3_arm2.c @@ -535,6 +535,11 @@ void setup_spinor(void) ARRAY_SIZE(ecspi1_pads)); gpio_direction_output(IMX_GPIO_NR(4, 19), 0); } + +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 19)) : -1; +} #endif int board_early_init_f(void) diff --git a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c index b7766a2..b3b4152 100644 --- a/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c +++ b/board/freescale/mx7d_19x19_ddr3_arm2/mx7d_19x19_ddr3_arm2.c @@ -540,6 +540,11 @@ void setup_spinor(void) ARRAY_SIZE(ecspi1_pads)); gpio_direction_output(IMX_GPIO_NR(4, 19), 0); } + +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 19)) : -1; +} #endif int board_early_init_f(void) |