Re: [PATCH v6 01/16] spi/spi-atmel: fix probing failure after xfer-speed_hz set

2013-05-07 Thread Nicolas Ferre
On 07/05/2013 03:11, Yang, Wenyou :
 Hi, Mark
 
 From: Mark Brown [mailto:broo...@kernel.org]
 Sent: 2013年5月6日 18:31
 To: Ferre, Nicolas
 Cc: grant.lik...@secretlab.ca; Grant Likely; Richard Genoud; Yang, Wenyou;
 Joachim Eastwood; linux-arm-ker...@lists.infradead.org;
 plagn...@jcrosoft.com; Lin, JM; spi-devel-general@lists.sourceforge.net;
 linux-ker...@vger.kernel.org
 Subject: Re: [PATCH v6 01/16] spi/spi-atmel: fix probing failure after
 xfer-speed_hz set

 On Thu, May 02, 2013 at 12:34:55PM +0200, Nicolas Ferre wrote:

 Can you tell us if this SPI patch will be merged upstream using one of
 your paths?

 I have no idea what patch this is but if it's not in my tree -next it's 
 unlikely to be
 merged.
 This is dropped patch, no need to be merged.
 
 We tested Atmel spi in your tree-next , but it doesn't work, the reason is 
 the Joachim Eastwood's patch is not included.
 https://patchwork.kernel.org/patch/2165301/
 which Joachim said that Grant said he applied.

Hi Wenyou,

Sorry for not having communicating with you after Mark told me the story
about this patch: Mark merged Grant's material in his SPI tree (with is
the official one nowadays). You can see that by browsing linux-next:

 Merge remote-tracking branch 'spi/fix/grant' into spi-linus

Joachim's patch is well included in it. We still have to monitor
inclusion of it in Linus' tree...

Mark, sorry for the noise.

Bye,
-- 
Nicolas Ferre

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v6 01/16] spi/spi-atmel: fix probing failure after xfer-speed_hz set

2013-05-02 Thread Nicolas Ferre
On 02/05/2013 10:12, Richard Genoud :
 2013/5/2 Yang, Wenyou wenyou.y...@atmel.com:
 Hi, Joachim,

 -Original Message-
 From: Joachim Eastwood [mailto:manab...@gmail.com]
 Sent: 2013年3月7日 20:31
 To: Yang, Wenyou
 Cc: linux-arm-ker...@lists.infradead.org; grant.lik...@secretlab.ca; Ferre,
 Nicolas; plagn...@jcrosoft.com; richard.gen...@gmail.com; Lin, JM;
 spi-devel-general@lists.sourceforge.net; linux-ker...@vger.kernel.org
 Subject: Re: [PATCH v6 01/16] spi/spi-atmel: fix probing failure after
 xfer-speed_hz set

 On 7 March 2013 04:26, Wenyou Yang wenyou.y...@atmel.com wrote:
 commit: 059b8ffeee5b427949872bb6ed5db5ae0788054e
 cause the atmel spi probing failure.

 Signed-off-by: Wenyou Yang wenyou.y...@atmel.com
 Cc: spi-devel-general@lists.sourceforge.net
 Cc: linux-ker...@vger.kernel.org
 ---
   drivers/spi/spi-atmel.c |6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)

 diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
 index 656d137..1eca815 100644
 --- a/drivers/spi/spi-atmel.c
 +++ b/drivers/spi/spi-atmel.c
 @@ -846,9 +846,9 @@ static int atmel_spi_transfer(struct spi_device *spi,
 struct spi_message *msg)
  }
  }

 -   /* FIXME implement these protocol options!! */
 -   if (xfer-speed_hz) {
 -   dev_dbg(spi-dev, no protocol options
 yet\n);
 +   if (xfer-speed_hz  spi-max_speed_hz) {
 +   dev_dbg(spi-dev,
 +   speed in transfer less than bus
 speed\n);
  return -ENOPROTOOPT;
  }

 I sent a similar patch to spi-devl a while ago, which Grant said he applied.
 https://patchwork.kernel.org/patch/2165301/

 Can't find the patch in any upstream git tree so I guess Grant hasn't
 pushed it yet.
 This patch hasn't still applied in any upstream git tree, so Atmel spi 
 master doesn't work.
 Could you help do some ping it?

 it's in linux-next:
 3d3522604a5557e80fdcab61c54bd04eaf15b525
 merged from spi-current/spi/merge

Thanks Richard, yes I can find it here:
http://git.secretlab.ca/?p=linux.git;a=commit;h=3d3522604a5557e80fdcab61c54bd04eaf15b525

Grant, Mark,

Can you tell us if this SPI patch will be merged upstream using one of 
your paths?

Best regards,
-- 
Nicolas Ferre

--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v7 00/14] spi/spi-atmel: add dmaengine support for atmel spi controller and to test the device tree support

2013-03-22 Thread Nicolas Ferre
On 03/21/2013 10:32 AM, Nicolas Ferre :
 On 03/19/2013 08:41 AM, Wenyou Yang :
 Hi All, 

 This set of patches is to add dmaengine support for atmel spi and to test 
 device tree support.

 The work is based on Nicolas and Richard's work.

 Because the dma engine device tree support isn't available now, to 
 at91sam9x5ek and at91sam9n12ek
 with dma support, it doesn't work on the dmaengine mode, only on PIO mode so 
 far.

 It has been tested as below:
  1./tested on v3.9-rc3, by using mtd utils, mount, umount and cp 
 commands.
  2./tested on spi/next git tree after changing master-num_chipselect 
 which fixed in v3.9-rc1.
  3./tested by using Documentation/spi/spidev_test.c on /dev/spidev.
  4./tested on on at91sam9x5ek, at91sam9m10g45ek, at91sam9263ek and 
 at91sam9g20ek boards.

 It is based on v3.9-rc3 + Joachim Eastwood's spi/atmel: fix speed_hz check 
 in atmel_spi_transfer().

 Changelog:
 v7:
  1./ remove patch: fix probing failure after xfer-speed_hz set.
  2./ remove patch: add pinctrl support for atmel spi.
 
 
 It it makes sense, you can add my:
 
 Acked-by: Nicolas Ferre nicolas.fe...@atmel.com
 
 on patches that I did not acknowledged yet.
 
 Grant,
 
 Can we move forward with this patch series so that we can build on solid
 bases for future developments on atmel SPI.

Moreover, if it can ease the process, I can take patches 11, 12, 13 and
14 with at91-dt branch and submit that to arm-soc.

Tell me if you feel it is better...

Bye,


 v6:
  1./ remove: fix master-num_chipselect wrongly set patch which isn't a 
 issue in v3.9-rc1.
  2./ fix probing failure after xfer-speed_hz set.

 v5:
  1./ add pinctrl patches.
  2./ detect capabilities by reading spi version register to replace 
 multiple compatiles.
  3./ change the cs-gpios property of spi node.
  4./ rebase on v3.8.

 v4:
  1./ Take Joe Perches's adivce, rewrite atmel_spi_is_v2(struct atmel_spi 
 *as) 
  and atmel_spi_use_dma(struct atmel_spi *as),
   and remove atmel_spi_use_pdc(struct atmel_spi *as).
  2./ Rebase on v3.8-rc3.

 V3:
  1./ Rebase on v3.8-rc2.
  2./ Remove some Jean-Christophe's patches which has been applied on 
 v3.8-rc2.
  3./ Remove spi property cs-gpios from the SoC dtsi files to the board 
 dts files
  to avoid some useless pin conflicts.

 v2: 
  1./ Remove the patch :PATCH]mtd: m25p80: change the m25p80_read to 
 reading page to page
   which purpose to fix the BUG: when run flashcp /bin/busybox 
 /dev/mtdX in the at91sam9g25ek
   with DMA mode, it arises a OOPS. Now fix it in this patch:
  [PATHC] spi/atmel_spi: add dmaengine support changing to fix the 
 [BUG].
  2./ Remove two patches:
  which purpose to read dts property to select SPI IP version and DMA 
 mode
  Now they will be gat from device tree different compatile.
  3./ Fix DMA: when enable both spi0 AND spi1, the spi0 doesn't work BUG.
  4./ Rebase v3.7-rc8.

 Best Regards,
 Wenyou Yang.


 Nicolas Ferre (5):
   spi/spi-atmel: add physical base address
   spi/spi-atmel: call unmapping on transfers buffers
   spi/spi-atmel: status information passed through controller data
   spi/spi-atmel: add flag to controller data for lock operations
   spi/spi-atmel: add dmaengine support

 Richard Genoud (6):
   spi/spi-atmel: fix spi-atmel driver to adapt to slave_config changes
   spi/spi-atmel: correct 16 bits transfers using PIO
   spi/spi-atmel: correct 16 bits transfers with DMA
   ARM: at91: add clocks for spi dt entries
   ARM: dts: add spi nodes for atmel SoC
   ARM: dts: add spi nodes for the atmel boards

 Wenyou Yang (3):
   spi/spi-atmel: detect the capabilities of SPI core by reading the
 VERSION register.
   spi/spi-atmel: add support transfer on CS1,2,3, not only on CS0
   ARM: dts: add pinctrl property for spi node for atmel SoC

  arch/arm/boot/dts/at91sam9260.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9263.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9263ek.dts |   10 +
  arch/arm/boot/dts/at91sam9g20ek_common.dtsi |   10 +
  arch/arm/boot/dts/at91sam9g45.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9m10g45ek.dts  |   10 +
  arch/arm/boot/dts/at91sam9n12.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9n12ek.dts |   10 +
  arch/arm/boot/dts/at91sam9x5.dtsi   |   40 ++
  arch/arm/boot/dts/at91sam9x5ek.dtsi |   10 +
  arch/arm/mach-at91/at91sam9260.c|2 +
  arch/arm/mach-at91/at91sam9g45.c|2 +
  arch/arm/mach-at91/at91sam9n12.c|2 +
  arch/arm/mach-at91/at91sam9x5.c |2 +
  drivers/spi/spi-atmel.c |  753 
 ---
  15 files changed, 945 insertions(+), 66 deletions(-)

 
 


-- 
Nicolas Ferre

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download

Re: [PATCH v7 00/14] spi/spi-atmel: add dmaengine support for atmel spi controller and to test the device tree support

2013-03-21 Thread Nicolas Ferre
On 03/19/2013 08:41 AM, Wenyou Yang :
 Hi All, 
 
 This set of patches is to add dmaengine support for atmel spi and to test 
 device tree support.
 
 The work is based on Nicolas and Richard's work.
 
 Because the dma engine device tree support isn't available now, to 
 at91sam9x5ek and at91sam9n12ek
 with dma support, it doesn't work on the dmaengine mode, only on PIO mode so 
 far.
 
 It has been tested as below:
  1./tested on v3.9-rc3, by using mtd utils, mount, umount and cp 
 commands.
  2./tested on spi/next git tree after changing master-num_chipselect which 
 fixed in v3.9-rc1.
  3./tested by using Documentation/spi/spidev_test.c on /dev/spidev.
  4./tested on on at91sam9x5ek, at91sam9m10g45ek, at91sam9263ek and 
 at91sam9g20ek boards.
 
 It is based on v3.9-rc3 + Joachim Eastwood's spi/atmel: fix speed_hz check in 
 atmel_spi_transfer().
 
 Changelog:
 v7:
  1./ remove patch: fix probing failure after xfer-speed_hz set.
  2./ remove patch: add pinctrl support for atmel spi.


It it makes sense, you can add my:

Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

on patches that I did not acknowledged yet.

Grant,

Can we move forward with this patch series so that we can build on solid
bases for future developments on atmel SPI.

Thanks, best regards.

 v6:
  1./ remove: fix master-num_chipselect wrongly set patch which isn't a 
 issue in v3.9-rc1.
  2./ fix probing failure after xfer-speed_hz set.
 
 v5:
  1./ add pinctrl patches.
  2./ detect capabilities by reading spi version register to replace 
 multiple compatiles.
  3./ change the cs-gpios property of spi node.
  4./ rebase on v3.8.
 
 v4:
  1./ Take Joe Perches's adivce, rewrite atmel_spi_is_v2(struct atmel_spi 
 *as) 
  and atmel_spi_use_dma(struct atmel_spi *as),
and remove atmel_spi_use_pdc(struct atmel_spi *as).
  2./ Rebase on v3.8-rc3.
 
 V3:
  1./ Rebase on v3.8-rc2.
  2./ Remove some Jean-Christophe's patches which has been applied on 
 v3.8-rc2.
  3./ Remove spi property cs-gpios from the SoC dtsi files to the board 
 dts files
  to avoid some useless pin conflicts.
 
 v2: 
  1./ Remove the patch :PATCH]mtd: m25p80: change the m25p80_read to 
 reading page to page
which purpose to fix the BUG: when run flashcp /bin/busybox 
 /dev/mtdX in the at91sam9g25ek
with DMA mode, it arises a OOPS. Now fix it in this patch:
   [PATHC] spi/atmel_spi: add dmaengine support changing to fix the 
 [BUG].
  2./ Remove two patches:
   which purpose to read dts property to select SPI IP version and DMA 
 mode
   Now they will be gat from device tree different compatile.
  3./ Fix DMA: when enable both spi0 AND spi1, the spi0 doesn't work BUG.
  4./ Rebase v3.7-rc8.
 
 Best Regards,
 Wenyou Yang.
 
 
 Nicolas Ferre (5):
   spi/spi-atmel: add physical base address
   spi/spi-atmel: call unmapping on transfers buffers
   spi/spi-atmel: status information passed through controller data
   spi/spi-atmel: add flag to controller data for lock operations
   spi/spi-atmel: add dmaengine support
 
 Richard Genoud (6):
   spi/spi-atmel: fix spi-atmel driver to adapt to slave_config changes
   spi/spi-atmel: correct 16 bits transfers using PIO
   spi/spi-atmel: correct 16 bits transfers with DMA
   ARM: at91: add clocks for spi dt entries
   ARM: dts: add spi nodes for atmel SoC
   ARM: dts: add spi nodes for the atmel boards
 
 Wenyou Yang (3):
   spi/spi-atmel: detect the capabilities of SPI core by reading the
 VERSION register.
   spi/spi-atmel: add support transfer on CS1,2,3, not only on CS0
   ARM: dts: add pinctrl property for spi node for atmel SoC
 
  arch/arm/boot/dts/at91sam9260.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9263.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9263ek.dts |   10 +
  arch/arm/boot/dts/at91sam9g20ek_common.dtsi |   10 +
  arch/arm/boot/dts/at91sam9g45.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9m10g45ek.dts  |   10 +
  arch/arm/boot/dts/at91sam9n12.dtsi  |   40 ++
  arch/arm/boot/dts/at91sam9n12ek.dts |   10 +
  arch/arm/boot/dts/at91sam9x5.dtsi   |   40 ++
  arch/arm/boot/dts/at91sam9x5ek.dtsi |   10 +
  arch/arm/mach-at91/at91sam9260.c|2 +
  arch/arm/mach-at91/at91sam9g45.c|2 +
  arch/arm/mach-at91/at91sam9n12.c|2 +
  arch/arm/mach-at91/at91sam9x5.c |2 +
  drivers/spi/spi-atmel.c |  753 
 ---
  15 files changed, 945 insertions(+), 66 deletions(-)
 


-- 
Nicolas Ferre

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
spi-devel-general mailing list
spi-devel-general

Re: [PATCH] spi/atmel: fix speed_hz check in atmel_spi_transfer()

2013-02-19 Thread Nicolas Ferre
On 02/19/2013 10:44 PM, Joachim Eastwood :
 atmel_spi_transfer() would check speed_hz and fail if
 the speed was changed in the transfer. After commit
 spi: make sure all transfer has proper speed set
 this would happen on all transfers.
 
 Change speed_hz check to only fail if a lower speed
 than max is requested.
 
 Signed-off-by: Joachim Eastwood manab...@gmail.com

Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

Thanks for spotting this Joachim.

Bye,

 ---
 Hi Grant,
 
 Fix for spi-atmel as per your suggestion; check if
 speed_hz is less than bus max speed.
 
 regards
 Joachim Eastwood
 
  drivers/spi/spi-atmel.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
 index 656d137..80f5867 100644
 --- a/drivers/spi/spi-atmel.c
 +++ b/drivers/spi/spi-atmel.c
 @@ -847,8 +847,8 @@ static int atmel_spi_transfer(struct spi_device *spi, 
 struct spi_message *msg)
   }
  
   /* FIXME implement these protocol options!! */
 - if (xfer-speed_hz) {
 - dev_dbg(spi-dev, no protocol options yet\n);
 + if (xfer-speed_hz  spi-max_speed_hz) {
 + dev_dbg(spi-dev, can't change speed in transfer\n);
   return -ENOPROTOOPT;
   }
  
 


-- 
Nicolas Ferre

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 14/19] spi/atmel: remove incorrect __exit_p()

2013-01-28 Thread Nicolas Ferre
On 01/25/2013 11:44 PM, Arnd Bergmann :
 Since we no longer allow building without hotplug, the
 atmel_spi_remove function is always present and we should
 not use __exit_p() to refer to it.
 
 Without this patch, building at91_dt_defconfig results in:
 
 drivers/spi/spi-atmel.c:1006:12: warning: 'atmel_spi_remove' defined but not 
 used [-Wunused-function]
 
 Signed-off-by: Arnd Bergmann a...@arndb.de
 Cc: Nicolas Ferre nicolas.fe...@atmel.com

Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

 Cc: Grant Likely grant.lik...@secretlab.ca
 Cc: spi-devel-general@lists.sourceforge.net
 ---
  drivers/spi/spi-atmel.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
 index ab34497..656d137 100644
 --- a/drivers/spi/spi-atmel.c
 +++ b/drivers/spi/spi-atmel.c
 @@ -1088,7 +1088,7 @@ static struct platform_driver atmel_spi_driver = {
   .suspend= atmel_spi_suspend,
   .resume = atmel_spi_resume,
   .probe  = atmel_spi_probe,
 - .remove = __exit_p(atmel_spi_remove),
 + .remove = atmel_spi_remove,
  };
  module_platform_driver(atmel_spi_driver);
  
 


-- 
Nicolas Ferre

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/1] spi/atmel: add DT support

2012-11-23 Thread Nicolas Ferre
On 11/23/2012 01:44 PM, Jean-Christophe PLAGNIOL-VILLARD :
 the atmel_spi use only gpio for chip select
 
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

Seems simple and nice:

Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

 Cc: spi-devel-general@lists.sourceforge.net
 Cc: Grant Likely grant.lik...@secretlab.ca
 ---
 Hi Grant,
 
   can we have this for 3.8
   This patch is presetnt on the ML sing Feb 2012 and was depinding on
   the cs-gpio dt that you just apply
 
 Best Regards,
 J.
  .../devicetree/bindings/spi/spi_atmel.txt  |   26 
 
  drivers/spi/spi-atmel.c|   17 -
  2 files changed, 42 insertions(+), 1 deletion(-)
  create mode 100644 Documentation/devicetree/bindings/spi/spi_atmel.txt
 
 diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt 
 b/Documentation/devicetree/bindings/spi/spi_atmel.txt
 new file mode 100644
 index 000..07e04cd
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt
 @@ -0,0 +1,26 @@
 +Atmel SPI device
 +
 +Required properties:
 +- compatible : should be atmel,at91rm9200-spi.
 +- reg: Address and length of the register set for the device
 +- interrupts: Should contain spi interrupt
 +- cs-gpios: chipselects
 +
 +Example:
 +
 +spi1: spi@fffcc000 {
 + compatible = atmel,at91rm9200-spi;
 + reg = 0xfffcc000 0x4000;
 + interrupts = 13 4 5;
 + #address-cells = 1;
 + #size-cells = 0;
 + cs-gpios = pioB 3 0;
 + status = okay;
 +
 + mmc-slot@0 {
 + compatible = mmc-spi-slot;
 + reg = 0;
 + gpios = pioC 4 0;/* CD */
 + spi-max-frequency = 2500;
 + };
 +};
 diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
 index 61fb0ec..1615222 100644
 --- a/drivers/spi/spi-atmel.c
 +++ b/drivers/spi/spi-atmel.c
 @@ -20,6 +20,7 @@
  #include linux/spi/spi.h
  #include linux/slab.h
  #include linux/platform_data/atmel.h
 +#include linux/of.h
  
  #include asm/io.h
  #include asm/gpio.h
 @@ -768,6 +769,10 @@ static int atmel_spi_setup(struct spi_device *spi)
  
   /* chipselect must have been muxed as GPIO (e.g. in board setup) */
   npcs_pin = (unsigned int)spi-controller_data;
 +
 + if (gpio_is_valid(spi-cs_gpio))
 + npcs_pin = spi-cs_gpio;
 +
   asd = spi-controller_state;
   if (!asd) {
   asd = kzalloc(sizeof(struct atmel_spi_device), GFP_KERNEL);
 @@ -937,8 +942,9 @@ static int __devinit atmel_spi_probe(struct 
 platform_device *pdev)
   /* the spi-mode bits understood by this driver: */
   master-mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
  
 + master-dev.of_node = pdev-dev.of_node;
   master-bus_num = pdev-id;
 - master-num_chipselect = 4;
 + master-num_chipselect = master-dev.of_node ? 0 : 4;
   master-setup = atmel_spi_setup;
   master-transfer = atmel_spi_transfer;
   master-cleanup = atmel_spi_cleanup;
 @@ -1064,11 +1070,20 @@ static int atmel_spi_resume(struct platform_device 
 *pdev)
  #define  atmel_spi_resumeNULL
  #endif
  
 +#if defined(CONFIG_OF)
 +static const struct of_device_id atmel_spi_dt_ids[] = {
 + { .compatible = atmel,at91rm9200-spi },
 + { /* sentinel */ }
 +};
 +
 +MODULE_DEVICE_TABLE(of, atmel_spi_dt_ids);
 +#endif
  
  static struct platform_driver atmel_spi_driver = {
   .driver = {
   .name   = atmel_spi,
   .owner  = THIS_MODULE,
 + .of_match_table = of_match_ptr(atmel_spi_dt_ids),
   },
   .suspend= atmel_spi_suspend,
   .resume = atmel_spi_resume,
 


-- 
Nicolas Ferre

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH v5] atmel/spi: fix missing probe

2011-11-04 Thread Nicolas Ferre
On 11/03/2011 07:16 PM, Jean-Christophe PLAGNIOL-VILLARD :
 Commit 940ab889 drivercore: Add helper macro for platform_driver boilerplate
 converted this driver to use module_platform_driver, but due to the use
 of platform_driver_probe(), this resulted in the call to atmel_spi_probe being
 lost. Place the call to this function into the driver structure.
 
 fix section missmatch
 
 atmel_spi_probe is marked __init where it's supposed to be __devinit
 atmel_spi_remove is marked __exit where it's supposed to be __devexit
 
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
 Cc: Greg Kroah-Hartman gre...@suse.de
 Cc: Grant Likely grant.lik...@secretlab.ca
 Cc: Russell King - ARM Linux li...@arm.linux.org.uk

Acked-by: Nicolas Ferre nicolas.fe...@atmel.com

J. can you please queue it in:

git://github.com/at91linux/linux-at91.git   at91-fixes

We may also need to rebase the material already there (one patch) on a
newer linus' kernel...

Thanks, bye,

 ---
 V5:
 
   do it in in patch
 
 Best Regards,
 J.
  drivers/spi/spi-atmel.c |5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
 index 79665e2..16d6a83 100644
 --- a/drivers/spi/spi-atmel.c
 +++ b/drivers/spi/spi-atmel.c
 @@ -907,7 +907,7 @@ static void atmel_spi_cleanup(struct spi_device *spi)
  
  /*-*/
  
 -static int __init atmel_spi_probe(struct platform_device *pdev)
 +static int __devinit atmel_spi_probe(struct platform_device *pdev)
  {
   struct resource *regs;
   int irq;
 @@ -1003,7 +1003,7 @@ out_free:
   return ret;
  }
  
 -static int __exit atmel_spi_remove(struct platform_device *pdev)
 +static int __devexit atmel_spi_remove(struct platform_device *pdev)
  {
   struct spi_master   *master = platform_get_drvdata(pdev);
   struct atmel_spi*as = spi_master_get_devdata(master);
 @@ -1072,6 +1072,7 @@ static struct platform_driver atmel_spi_driver = {
   },
   .suspend= atmel_spi_suspend,
   .resume = atmel_spi_resume,
 + .probe  = atmel_spi_probe,
   .remove = __exit_p(atmel_spi_remove),
  };
  module_platform_driver(atmel_spi_driver);


-- 
Nicolas Ferre

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general