Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/arm/boot/dts/imx6ul-wirenboard61.dts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@

cs-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;

dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
dma-names = "rx", "tx";

status = "disabled";
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/configs/imx6_wirenboard_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CONFIG_HAVE_ARM_ARCH_TIMER=y
CONFIG_ARM_PSCI=y
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_AEABI=y
CONFIG_HIGHMEM=y
CONFIG_CMA=y
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
CONFIG_KEXEC=y
Expand Down Expand Up @@ -431,6 +430,7 @@ CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_ESDHC_IMX=y
CONFIG_MMC_SPI=m
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
Expand Down
15 changes: 13 additions & 2 deletions drivers/spi/spi-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,12 +1307,23 @@ static int spi_imx_remove(struct platform_device *pdev)
{
struct spi_master *master = platform_get_drvdata(pdev);
struct spi_imx_data *spi_imx = spi_master_get_devdata(master);
int ret;

spi_bitbang_stop(&spi_imx->bitbang);

ret = clk_enable(spi_imx->clk_per);
if (ret)
return ret;

ret = clk_enable(spi_imx->clk_ipg);
if (ret) {
clk_disable(spi_imx->clk_per);
return ret;
}

writel(0, spi_imx->base + MXC_CSPICTRL);
clk_unprepare(spi_imx->clk_ipg);
clk_unprepare(spi_imx->clk_per);
clk_disable_unprepare(spi_imx->clk_ipg);
clk_disable_unprepare(spi_imx->clk_per);
spi_imx_sdma_exit(spi_imx);
spi_master_put(master);

Expand Down