[PATCH] spi/imx: set the inactive state of the clock according to the clock polarity
From: Knut Wohlrab knut.wohl...@de.bosch.com There are SPI devices which need a SPI clock with active low polarity and high inactive state. Add the setting of the inactive state ECSPIx_CONFIGREG:SCLK CTL according to the clock polarity ECSPIx_CONFIGREG:SCLK POL: DT without spi-cpol = 0 = clock active high polarity = inactive state low DT withspi-cpol = 1 = clock active low polarity = inactive state high Signed-off-by: Knut Wohlrab knut.wohl...@de.bosch.com --- Question: Are there real world examples for a need of an individual setting of clock polarity/inactive state? drivers/spi/spi-imx.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index e834ff8..d64655b 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -197,6 +197,7 @@ static unsigned int spi_imx_clkdiv_2(unsigned int fin, #define MX51_ECSPI_CONFIG_SCLKPOL(cs) (1 ((cs) + 4)) #define MX51_ECSPI_CONFIG_SBBCTRL(cs) (1 ((cs) + 8)) #define MX51_ECSPI_CONFIG_SSBPOL(cs) (1 ((cs) + 12)) +#define MX51_ECSPI_CONFIG_SCLKCTL(cs) (1 ((cs) + 20)) #define MX51_ECSPI_INT 0x10 #define MX51_ECSPI_INT_TEEN(1 0) @@ -287,9 +288,10 @@ static int __maybe_unused mx51_ecspi_config(struct spi_imx_data *spi_imx, if (config-mode SPI_CPHA) cfg |= MX51_ECSPI_CONFIG_SCLKPHA(config-cs); - if (config-mode SPI_CPOL) + if (config-mode SPI_CPOL) { cfg |= MX51_ECSPI_CONFIG_SCLKPOL(config-cs); - + cfg |= MX51_ECSPI_CONFIG_SCLKCTL(config-cs); + } if (config-mode SPI_CS_HIGH) cfg |= MX51_ECSPI_CONFIG_SSBPOL(config-cs); -- 1.7.0.4 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH] spi/imx: set the inactive state of the clock according to the clock polarity
Copy Uwe ... On Fri, Aug 31, 2012 at 10:55:11AM +0200, Dirk Behme wrote: From: Knut Wohlrab knut.wohl...@de.bosch.com There are SPI devices which need a SPI clock with active low polarity and high inactive state. Add the setting of the inactive state ECSPIx_CONFIGREG:SCLK CTL according to the clock polarity ECSPIx_CONFIGREG:SCLK POL: DT without spi-cpol = 0 = clock active high polarity = inactive state low DT withspi-cpol = 1 = clock active low polarity = inactive state high Signed-off-by: Knut Wohlrab knut.wohl...@de.bosch.com --- Question: Are there real world examples for a need of an individual setting of clock polarity/inactive state? I'm less concerned about that. We can always patch the driver when the real world example occurs? Regards, Shawn drivers/spi/spi-imx.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index e834ff8..d64655b 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -197,6 +197,7 @@ static unsigned int spi_imx_clkdiv_2(unsigned int fin, #define MX51_ECSPI_CONFIG_SCLKPOL(cs)(1 ((cs) + 4)) #define MX51_ECSPI_CONFIG_SBBCTRL(cs)(1 ((cs) + 8)) #define MX51_ECSPI_CONFIG_SSBPOL(cs) (1 ((cs) + 12)) +#define MX51_ECSPI_CONFIG_SCLKCTL(cs)(1 ((cs) + 20)) #define MX51_ECSPI_INT 0x10 #define MX51_ECSPI_INT_TEEN (1 0) @@ -287,9 +288,10 @@ static int __maybe_unused mx51_ecspi_config(struct spi_imx_data *spi_imx, if (config-mode SPI_CPHA) cfg |= MX51_ECSPI_CONFIG_SCLKPHA(config-cs); - if (config-mode SPI_CPOL) + if (config-mode SPI_CPOL) { cfg |= MX51_ECSPI_CONFIG_SCLKPOL(config-cs); - + cfg |= MX51_ECSPI_CONFIG_SCLKCTL(config-cs); + } if (config-mode SPI_CS_HIGH) cfg |= MX51_ECSPI_CONFIG_SSBPOL(config-cs); -- 1.7.0.4 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH v3 3/3] spi: spi-davinci: convert to DMA engine API
Hi Matt, On 8/30/2012 8:13 PM, Matt Porter wrote: On Thu, Aug 30, 2012 at 07:46:32PM +0530, Sekhar Nori wrote: Hi Matt, On 8/23/2012 6:39 AM, Matt Porter wrote: Removes use of the DaVinci EDMA private DMA API and replaces it with use of the DMA engine API. Signed-off-by: Matt Porter mpor...@ti.com I tried testing this patch on my OMAP-L138 EVM, but SPI fails to initialize after applying the patch. root@arago:~# dmesg | grep -i spi spi_davinci spi_davinci.1: request RX DMA channel failed Hi Sekhar, Most likely CONFIG_TI_EDMA is off as it defaults to off in the v3 series. Try enabling this and if it's the problem then this error path can be fixed to properly fallback to PIO only or fail to initialize as needed. Yes, this was the problem. Since the SPI driver now depends on CONFIG_TI_EDMA for basic operation may be select CONFIG_TI_EDMA in Kconfig if SPI is enabled? That should do until the fallback to PIO is implemented. With that fixed, I tested SPI on OMAP-L138 EVM and it works great. Tested a JFFS2 mount as well as some raw chardev read/write tests. Tested-by: Sekhar Nori nsek...@ti.com Thanks, Sekhar -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH v3 3/3] spi: spi-davinci: convert to DMA engine API
On 8/31/2012 10:01 PM, Vinod Koul wrote: On Fri, 2012-08-31 at 21:32 +0530, Sekhar Nori wrote: Hi Matt, On 8/30/2012 8:13 PM, Matt Porter wrote: On Thu, Aug 30, 2012 at 07:46:32PM +0530, Sekhar Nori wrote: Hi Matt, On 8/23/2012 6:39 AM, Matt Porter wrote: Removes use of the DaVinci EDMA private DMA API and replaces it with use of the DMA engine API. Signed-off-by: Matt Porter mpor...@ti.com I tried testing this patch on my OMAP-L138 EVM, but SPI fails to initialize after applying the patch. root@arago:~# dmesg | grep -i spi spi_davinci spi_davinci.1: request RX DMA channel failed Hi Sekhar, Most likely CONFIG_TI_EDMA is off as it defaults to off in the v3 series. Try enabling this and if it's the problem then this error path can be fixed to properly fallback to PIO only or fail to initialize as needed. Yes, this was the problem. Since the SPI driver now depends on CONFIG_TI_EDMA for basic operation may be select CONFIG_TI_EDMA in Kconfig if SPI is enabled? That should do until the fallback to PIO is implemented. Then this should be enabled for SPI. Care to send a patch By 'this' you mean the Kconfig select? Then there should be no need of a new patch for this. It can be part of this patch itself, no? Thanks, Sekhar -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH v3 3/3] spi: spi-davinci: convert to DMA engine API
On Fri, 2012-08-31 at 22:01 +0530, Sekhar Nori wrote: Yes, this was the problem. Since the SPI driver now depends on CONFIG_TI_EDMA for basic operation may be select CONFIG_TI_EDMA in Kconfig if SPI is enabled? That should do until the fallback to PIO is implemented. Then this should be enabled for SPI. Care to send a patch By 'this' you mean the Kconfig select? Then there should be no need of a new patch for this. It can be part of this patch itself, no? Either way is okay for me. -- ~Vinod Koul Intel Corp. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[SPAM] Hit Better Shots
Attached you will find how you can hit down on the golf ball and have the impact position of a Tour Player, allowing you to hit it longer and become a better and more consistent ball striker. Sincerely, Gary McCord **View the Attachment for Details** Click This Link to Stop Future Messages mailto:listservi...@gmx.com?subject=unsubscribe%3a%20spi-devel-gene...@lists.sourceforge.net -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[PATCH 4/4] ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
There's no need to have these in plat-omap any longer. Note that these could eventually be made local to mach-omap1 instead of being in mach. But to do that, at least various driver access using omap7xxx.h registers needs to be fixed first. Cc: spi-devel-general@lists.sourceforge.net Cc: Grant Likely grant.lik...@secretlab.ca Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap1/board-htcherald.c |4 ++-- arch/arm/mach-omap1/devices.c |2 +- arch/arm/mach-omap1/include/mach/hardware.h |6 +++--- arch/arm/mach-omap1/include/mach/omap1510.h |3 +-- arch/arm/mach-omap1/include/mach/omap16xx.h |3 +-- arch/arm/mach-omap1/include/mach/omap7xx.h |3 +-- drivers/spi/spi-omap-uwire.c|3 ++- 7 files changed, 11 insertions(+), 13 deletions(-) rename arch/arm/{plat-omap/include/plat/omap1510.h = mach-omap1/include/mach/omap1510.h} (97%) rename arch/arm/{plat-omap/include/plat/omap16xx.h = mach-omap1/include/mach/omap16xx.h} (99%) rename arch/arm/{plat-omap/include/plat/omap7xx.h = mach-omap1/include/mach/omap7xx.h} (98%) diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index bdb94fe..4fe4884 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -37,14 +37,14 @@ #include linux/spi/spi.h #include linux/spi/ads7846.h #include linux/omapfb.h +#include linux/platform_data/keypad-omap.h #include asm/mach-types.h #include asm/mach/arch.h -#include plat/omap7xx.h -#include linux/platform_data/keypad-omap.h #include plat/mmc.h +#include mach/omap7xx.h #include mach/irqs.h #include mach/usb.h diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 1feca35..05fdbd9 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -23,8 +23,8 @@ #include plat/mux.h #include plat/dma.h #include plat/mmc.h -#include plat/omap7xx.h +#include mach/omap7xx.h #include mach/camera.h #include mach/hardware.h diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h index bd3b95e..84248d2 100644 --- a/arch/arm/mach-omap1/include/mach/hardware.h +++ b/arch/arm/mach-omap1/include/mach/hardware.h @@ -311,8 +311,8 @@ static inline u32 omap_cs3_phys(void) * --- */ -#include plat/omap7xx.h -#include plat/omap1510.h -#include plat/omap16xx.h +#include omap7xx.h +#include omap1510.h +#include omap16xx.h #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ diff --git a/arch/arm/plat-omap/include/plat/omap1510.h b/arch/arm/mach-omap1/include/mach/omap1510.h similarity index 97% rename from arch/arm/plat-omap/include/plat/omap1510.h rename to arch/arm/mach-omap1/include/mach/omap1510.h index d240046..8fe05d6 100644 --- a/arch/arm/plat-omap/include/plat/omap1510.h +++ b/arch/arm/mach-omap1/include/mach/omap1510.h @@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap1510.h - * +/* * Hardware definitions for TI OMAP1510 processor. * * Cleanup for Linux-2.6 by Dirk Behme dirk.be...@de.bosch.com diff --git a/arch/arm/plat-omap/include/plat/omap16xx.h b/arch/arm/mach-omap1/include/mach/omap16xx.h similarity index 99% rename from arch/arm/plat-omap/include/plat/omap16xx.h rename to arch/arm/mach-omap1/include/mach/omap16xx.h index e69e1d8..cd1c724 100644 --- a/arch/arm/plat-omap/include/plat/omap16xx.h +++ b/arch/arm/mach-omap1/include/mach/omap16xx.h @@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap16xx.h - * +/* * Hardware definitions for TI OMAP1610/5912/1710 processors. * * Cleanup for Linux-2.6 by Dirk Behme dirk.be...@de.bosch.com diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/mach-omap1/include/mach/omap7xx.h similarity index 98% rename from arch/arm/plat-omap/include/plat/omap7xx.h rename to arch/arm/mach-omap1/include/mach/omap7xx.h index 48e4757..63da994 100644 --- a/arch/arm/plat-omap/include/plat/omap7xx.h +++ b/arch/arm/mach-omap1/include/mach/omap7xx.h @@ -1,5 +1,4 @@ -/* arch/arm/plat-omap/include/mach/omap7xx.h - * +/* * Hardware definitions for TI OMAP7XX processor. * * Cleanup for Linux-2.6 by Dirk Behme dirk.be...@de.bosch.com diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 9b0d716..a3996a1 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -53,7 +53,8 @@ #include asm/mach-types.h #include plat/mux.h -#include plat/omap7xx.h /* OMAP7XX_IO_CONF registers */ + +#include mach/omap7xx.h /* OMAP7XX_IO_CONF registers */ /* FIXME address is now a platform device resource, -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile