* Problem using S3C2416's HSSPI @ 2012-10-01 17:32 José Miguel Gonçalves 2012-10-01 19:18 ` Heiko Stübner 0 siblings, 1 reply; 6+ messages in thread From: José Miguel Gonçalves @ 2012-10-01 17:32 UTC (permalink / raw) To: linux-samsung-soc; +Cc: Heiko Stübner, Kukjin Kim Hi, I'm trying to use the HSSPI controller on a S3C2416 based board but I'm having some problems. I've added "&s3c64xx_device_spi0" to my array of platform devices and added a call to s3c64xx_spi0_set_platdata(NULL, 0, 1) before platform_add_devices(). When the kernel starts I see the following error: s3c64xx-spi s3c6410-spi.0: Unable to acquire clock 'spi' s3c64xx-spi: probe of s3c6410-spi.0 failed with error -2 So I reckon I'm still missing some kind of initialization. Can someone help me on this? Best regards, José Gonçalves ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem using S3C2416's HSSPI 2012-10-01 17:32 Problem using S3C2416's HSSPI José Miguel Gonçalves @ 2012-10-01 19:18 ` Heiko Stübner 2012-10-01 19:40 ` Sylwester Nawrocki 2012-10-01 20:01 ` José Miguel Gonçalves 0 siblings, 2 replies; 6+ messages in thread From: Heiko Stübner @ 2012-10-01 19:18 UTC (permalink / raw) To: José Miguel Gonçalves; +Cc: linux-samsung-soc, Kukjin Kim Hi José, Am Montag, 1. Oktober 2012, 19:32:15 schrieb José Miguel Gonçalves: > I'm trying to use the HSSPI controller on a S3C2416 based board but I'm > having some problems. > > I've added "&s3c64xx_device_spi0" to my array of platform devices and added > a call to s3c64xx_spi0_set_platdata(NULL, 0, 1) before > platform_add_devices(). When the kernel starts I see the following error: > > s3c64xx-spi s3c6410-spi.0: Unable to acquire clock 'spi' > s3c64xx-spi: probe of s3c6410-spi.0 failed with error -2 what kernel version do you use? I.e. the clock support for the s3c64xx-spi on s3c2443 and s3c2416 was added through [1] in march - so it's not this old. Heiko [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/089086.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem using S3C2416's HSSPI 2012-10-01 19:18 ` Heiko Stübner @ 2012-10-01 19:40 ` Sylwester Nawrocki 2012-10-01 23:47 ` Heiko Stübner 2012-10-01 20:01 ` José Miguel Gonçalves 1 sibling, 1 reply; 6+ messages in thread From: Sylwester Nawrocki @ 2012-10-01 19:40 UTC (permalink / raw) To: Heiko Stübner Cc: José Miguel Gonçalves, linux-samsung-soc, Kukjin Kim Hi, On 10/01/2012 09:18 PM, Heiko Stübner wrote: > Hi José, > > Am Montag, 1. Oktober 2012, 19:32:15 schrieb José Miguel Gonçalves: >> I'm trying to use the HSSPI controller on a S3C2416 based board but I'm >> having some problems. >> >> I've added "&s3c64xx_device_spi0" to my array of platform devices and added >> a call to s3c64xx_spi0_set_platdata(NULL, 0, 1) before >> platform_add_devices(). When the kernel starts I see the following error: >> >> s3c64xx-spi s3c6410-spi.0: Unable to acquire clock 'spi' >> s3c64xx-spi: probe of s3c6410-spi.0 failed with error -2 > > what kernel version do you use? > > I.e. the clock support for the s3c64xx-spi on s3c2443 and s3c2416 was added > through [1] in march - so it's not this old. In this commit commit a5238e360b715e9a1bb39d7d3537f78cc9e9e286 Author: Thomas Abraham <thomas.abraham@linaro.org> Date: Fri Jul 13 07:15:14 2012 +0900 spi: s3c64xx: move controller information into driver data Platform data is used to specify controller hardware specific information such as the tx/rx fifo level mask and bit offset of rx fifo level. Such information is not suitable to be supplied from device tree. Instead, it can be moved into the driver data and removed from platform data. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Jaswinder Singh <jaswinder.singh@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> All "s3c64xx-spi.0" devname fields that you added were replaced with "s3c24xx-spi.0". I wonder if that's not the reason clk_get(..., "spi"); fails in the spi-s3c64xx driver used on mach-s3c24xx. But it of course depends on the kernel version, we need to first clarify that. diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c b/arch/arm/mach-s3c24xx/common-s3c2443.c index aeeb2be..aeb4a24 100644 --- a/arch/arm/mach-s3c24xx/common-s3c2443.c +++ b/arch/arm/mach-s3c24xx/common-s3c2443.c @@ -559,7 +559,7 @@ static struct clk hsmmc1_clk = { static struct clk hsspi_clk = { .name = "spi", - .devname = "s3c64xx-spi.0", + .devname = "s3c2443-spi.0", .parent = &clk_p, .enable = s3c2443_clkcon_enable_p, .ctrlbit = S3C2443_PCLKCON_HSSPI, @@ -633,7 +633,7 @@ static struct clk_lookup s3c2443_clk_lookup[] = { CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk), CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &hsmmc1_clk), - CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &hsspi_clk), + CLKDEV_INIT("s3c2443-spi.0", "spi_busclk0", &hsspi_clk), }; > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/089086.html -- Regards, Sylwester ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problem using S3C2416's HSSPI 2012-10-01 19:40 ` Sylwester Nawrocki @ 2012-10-01 23:47 ` Heiko Stübner 2012-10-02 8:08 ` Sylwester Nawrocki 0 siblings, 1 reply; 6+ messages in thread From: Heiko Stübner @ 2012-10-01 23:47 UTC (permalink / raw) To: Sylwester Nawrocki Cc: José Miguel Gonçalves, linux-samsung-soc, Kukjin Kim Am Montag, 1. Oktober 2012, 21:40:35 schrieb Sylwester Nawrocki: > On 10/01/2012 09:18 PM, Heiko Stübner wrote: > > Hi José, > > > > Am Montag, 1. Oktober 2012, 19:32:15 schrieb José Miguel Gonçalves: > >> I'm trying to use the HSSPI controller on a S3C2416 based board but I'm > >> having some problems. > >> > >> I've added "&s3c64xx_device_spi0" to my array of platform devices and > >> added a call to s3c64xx_spi0_set_platdata(NULL, 0, 1) before > >> platform_add_devices(). When the kernel starts I see the following > >> error: > >> > >> s3c64xx-spi s3c6410-spi.0: Unable to acquire clock 'spi' > >> s3c64xx-spi: probe of s3c6410-spi.0 failed with error -2 > > > > what kernel version do you use? > > > > I.e. the clock support for the s3c64xx-spi on s3c2443 and s3c2416 was > > added through [1] in march - so it's not this old. > > In this commit > > commit a5238e360b715e9a1bb39d7d3537f78cc9e9e286 > Author: Thomas Abraham <thomas.abraham@linaro.org> > Date: Fri Jul 13 07:15:14 2012 +0900 > > spi: s3c64xx: move controller information into driver data > > Platform data is used to specify controller hardware specific > information such as the tx/rx fifo level mask and bit offset of rx fifo > level. Such information is not suitable to be supplied from device tree. > Instead, it can be moved into the driver data and removed from platform > data. > > Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> > Acked-by: Jaswinder Singh <jaswinder.singh@linaro.org> > Acked-by: Grant Likely <grant.likely@secretlab.ca> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> > > All "s3c64xx-spi.0" devname fields that you added were replaced with > "s3c24xx-spi.0". I wonder if that's not the reason clk_get(..., "spi"); > fails in the spi-s3c64xx driver used on mach-s3c24xx. But it of course > depends on the kernel version, we need to first clarify that. > > diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c > b/arch/arm/mach-s3c24xx/common-s3c2443.c index aeeb2be..aeb4a24 100644 > --- a/arch/arm/mach-s3c24xx/common-s3c2443.c > +++ b/arch/arm/mach-s3c24xx/common-s3c2443.c > @@ -559,7 +559,7 @@ static struct clk hsmmc1_clk = { > > static struct clk hsspi_clk = { > .name = "spi", > - .devname = "s3c64xx-spi.0", > + .devname = "s3c2443-spi.0", > .parent = &clk_p, > .enable = s3c2443_clkcon_enable_p, > .ctrlbit = S3C2443_PCLKCON_HSSPI, > @@ -633,7 +633,7 @@ static struct clk_lookup s3c2443_clk_lookup[] = { > CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), > CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk), > CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &hsmmc1_clk), > - CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &hsspi_clk), > + CLKDEV_INIT("s3c2443-spi.0", "spi_busclk0", &hsspi_clk), > }; ahaa ... that's the cause. As far as I was able to determine, in the patchset only the clocks were renamed and the different device names introduced. The spi devices did not get a function to set the name, like for the rtc, adc and nand. The devices are named s3c6410-spi by default, so it seems only the s3c64xx machines should have a working spi currently. I'm working on a patch to fix this for all Samsung arches. Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem using S3C2416's HSSPI 2012-10-01 23:47 ` Heiko Stübner @ 2012-10-02 8:08 ` Sylwester Nawrocki 0 siblings, 0 replies; 6+ messages in thread From: Sylwester Nawrocki @ 2012-10-02 8:08 UTC (permalink / raw) To: Heiko Stübner Cc: Sylwester Nawrocki, José Miguel Gonçalves, linux-samsung-soc, Kukjin Kim On 10/02/2012 01:47 AM, Heiko Stübner wrote: >> diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c >> b/arch/arm/mach-s3c24xx/common-s3c2443.c index aeeb2be..aeb4a24 100644 >> --- a/arch/arm/mach-s3c24xx/common-s3c2443.c >> +++ b/arch/arm/mach-s3c24xx/common-s3c2443.c >> @@ -559,7 +559,7 @@ static struct clk hsmmc1_clk = { >> >> static struct clk hsspi_clk = { >> .name = "spi", >> - .devname = "s3c64xx-spi.0", >> + .devname = "s3c2443-spi.0", >> .parent = &clk_p, >> .enable = s3c2443_clkcon_enable_p, >> .ctrlbit = S3C2443_PCLKCON_HSSPI, >> @@ -633,7 +633,7 @@ static struct clk_lookup s3c2443_clk_lookup[] = { >> CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), >> CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk), >> CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &hsmmc1_clk), >> - CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &hsspi_clk), >> + CLKDEV_INIT("s3c2443-spi.0", "spi_busclk0", &hsspi_clk), >> }; > > ahaa ... that's the cause. As far as I was able to determine, in the patchset > only the clocks were renamed and the different device names introduced. > > The spi devices did not get a function to set the name, like for the rtc, adc > and nand. The devices are named s3c6410-spi by default, so it seems only the > s3c64xx machines should have a working spi currently. That reminds me that I have some patches that set the SPI device names and I have been using those for non-dt exynos platform. Yes, it looks like we need a generic function for all Samsung machines that would override SPI device names on all except mach-s3c64xx. > I'm working on a patch to fix this for all Samsung arches. OK. I have something like this too. Anyway it seems SPI is now broken on all non-dt machines except s3c64xx in kernel 3.6. Perhaps these patches should be also sent now to stable@vger.kernel.org. Regards, Sylwester -- Sylwester Nawrocki Samsung Poland R&D Center ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem using S3C2416's HSSPI 2012-10-01 19:18 ` Heiko Stübner 2012-10-01 19:40 ` Sylwester Nawrocki @ 2012-10-01 20:01 ` José Miguel Gonçalves 1 sibling, 0 replies; 6+ messages in thread From: José Miguel Gonçalves @ 2012-10-01 20:01 UTC (permalink / raw) To: Heiko Stübner; +Cc: linux-samsung-soc, Kukjin Kim, sylvester.nawrocki On 10/01/2012 08:18 PM, Heiko Stübner wrote: > Hi José, > > Am Montag, 1. Oktober 2012, 19:32:15 schrieb José Miguel Gonçalves: >> I'm trying to use the HSSPI controller on a S3C2416 based board but I'm >> having some problems. >> >> I've added "&s3c64xx_device_spi0" to my array of platform devices and added >> a call to s3c64xx_spi0_set_platdata(NULL, 0, 1) before >> platform_add_devices(). When the kernel starts I see the following error: >> >> s3c64xx-spi s3c6410-spi.0: Unable to acquire clock 'spi' >> s3c64xx-spi: probe of s3c6410-spi.0 failed with error -2 > what kernel version do you use? > I'm now using kernel 3.6. José Gonçalves ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-02 8:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-10-01 17:32 Problem using S3C2416's HSSPI José Miguel Gonçalves 2012-10-01 19:18 ` Heiko Stübner 2012-10-01 19:40 ` Sylwester Nawrocki 2012-10-01 23:47 ` Heiko Stübner 2012-10-02 8:08 ` Sylwester Nawrocki 2012-10-01 20:01 ` José Miguel Gonçalves
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.