[PATCH v2] spi: mt7621: Move SPI driver out of staging

2019-03-25 Thread Stefan Roese
This patch moves the MT7621 SPI driver, which is used on some Ralink /
MediaTek MT76xx MIPS SoC's, out of the staging directory. No changes to
the source code are done in this patch.

This driver version was tested successfully on an MT7688 based platform
with an SPI NOR on CS0 and an SPI NAND on CS1 without any issues (so
far).

This patch also documents the devicetree bindings for the MT7621 SPI
device driver.

Signed-off-by: Stefan Roese 
Cc: Rob Herring 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
Cc: Armando Miraglia 
---
v2:
- Add COMPILE_TEST in Kconfig entry
- Header comment style changed to C++ style
- Removed mt7621_spi_reset() as its name was misleading. Its content
  is now inlined in mt7621_spi_set_cs() and the superfluous call from
  mt7621_spi_probe() is removed
- Set SPI_CONTROLLER_HALF_DUPLEX in flags
- Use clk_disable_unprepare() instead of clk_disable()
- Use devm_spi_register_controller() instead of spi_register_master()
  (spi_unregister_master() removed)
- General move to xxx_controller() API from the deprecated xxx_master()
  API
- Minor cosmetic coding style changes (add empty lines, fix comment
  style)

 .../devicetree/bindings/spi/spi-mt7621.txt|  26 ++
 drivers/spi/Kconfig   |   6 +
 drivers/spi/Makefile  |   1 +
 drivers/spi/spi-mt7621.c  | 421 +
 drivers/staging/Kconfig   |   2 -
 drivers/staging/Makefile  |   1 -
 drivers/staging/mt7621-spi/Kconfig|   6 -
 drivers/staging/mt7621-spi/Makefile   |   1 -
 drivers/staging/mt7621-spi/TODO   |   5 -
 drivers/staging/mt7621-spi/spi-mt7621.c   | 422 --
 10 files changed, 454 insertions(+), 437 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-mt7621.txt
 create mode 100644 drivers/spi/spi-mt7621.c
 delete mode 100644 drivers/staging/mt7621-spi/Kconfig
 delete mode 100644 drivers/staging/mt7621-spi/Makefile
 delete mode 100644 drivers/staging/mt7621-spi/TODO
 delete mode 100644 drivers/staging/mt7621-spi/spi-mt7621.c

diff --git a/Documentation/devicetree/bindings/spi/spi-mt7621.txt 
b/Documentation/devicetree/bindings/spi/spi-mt7621.txt
new file mode 100644
index ..d5baec0fa56e
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-mt7621.txt
@@ -0,0 +1,26 @@
+Binding for MTK SPI controller (MT7621 MIPS)
+
+Required properties:
+- compatible: Should be one of the following:
+  - "ralink,mt7621-spi": for mt7621/mt7628/mt7688 platforms
+- #address-cells: should be 1.
+- #size-cells: should be 0.
+- reg: Address and length of the register set for the device
+- resets: phandle to the reset controller asserting this device in
+  reset
+  See ../reset/reset.txt for details.
+
+Optional properties:
+- cs-gpios: see spi-bus.txt.
+
+Example:
+
+- SoC Specific Portion:
+spi0: spi@b00 {
+   compatible = "ralink,mt7621-spi";
+   reg = <0xb00 0x100>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   resets = < 18>;
+   reset-names = "spi";
+};
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index f761655e2a36..8ce4f7df0ef2 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -426,6 +426,12 @@ config SPI_MT65XX
  say Y or M here.If you are not sure, say N.
  SPI drivers for Mediatek MT65XX and MT81XX series ARM SoCs.
 
+config SPI_MT7621
+   tristate "MediaTek MT7621 SPI Controller"
+   depends on RALINK || COMPILE_TEST
+   help
+ This selects a driver for the MediaTek MT7621 SPI Controller.
+
 config SPI_NPCM_PSPI
tristate "Nuvoton NPCM PSPI Controller"
depends on ARCH_NPCM || COMPILE_TEST
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index d8fc03c9faa2..369f29a8a6af 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -60,6 +60,7 @@ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
 obj-$(CONFIG_SPI_MPC52xx_PSC)  += spi-mpc52xx-psc.o
 obj-$(CONFIG_SPI_MPC52xx)  += spi-mpc52xx.o
 obj-$(CONFIG_SPI_MT65XX)+= spi-mt65xx.o
+obj-$(CONFIG_SPI_MT7621)   += spi-mt7621.o
 obj-$(CONFIG_SPI_MXIC) += spi-mxic.o
 obj-$(CONFIG_SPI_MXS)  += spi-mxs.o
 obj-$(CONFIG_SPI_NPCM_PSPI)+= spi-npcm-pspi.o
diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
new file mode 100644
index ..ae836114ee3d
--- /dev/null
+++ b/drivers/spi/spi-mt7621.c
@@ -0,0 +1,421 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// spi-mt7621.c -- MediaTek MT7621 SPI controller driver
+//
+// Copyright (C) 2011 Sergiy 
+// Copyright (C) 2011-2013 Gabor Juhos 
+// Copyright (C) 2014-2015 Felix Fietkau 
+//
+// Some parts are based on spi-orion.c:
+//   Author: Shadi Ammouri 
+//   Copyrig

Re: [PATCH] spi: mt7621: Move SPI driver out of staging

2019-03-22 Thread Stefan Roese

On 21.03.19 15:25, Mark Brown wrote:

On Thu, Mar 14, 2019 at 12:52:12PM +0100, Stefan Roese wrote:

This looks pretty good, a few trivial issues below but nothing major I
think.


+config SPI_MT7621
+   tristate "MediaTek MT7621 SPI Controller"
+   depends on RALINK
+   help
+ This selects a driver for the MediaTek MT7621 SPI Controller.
+


I'm not seeing any build time dependency on this, please add an ||
COMPILE_TEST to help with build testing.


Okay, will add in v2.
 

@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
+ *


Please make the entire comment a C++ one to


Will change in v2.
 

+ * Some parts are based on spi-orion.c:
+ *   Author: Shadi Ammouri 
+ *   Copyright (C) 2007-2008 Marvell Ltd.


That driver dates from 2008 AFAICT, and had some changes after then?


The spi-orion driver? I didn't check. That's what in the header of
this driver since quite some time. And I didn't want to change any
copyright notices.

BTW: spi-orion still has the same copyright message.
 

+static void mt7621_spi_set_cs(struct spi_device *spi, int enable)
+{
+   struct mt7621_spi *rs = spidev_to_mt7621_spi(spi);
+   int cs = spi->chip_select;
+   u32 polar = 0;
+
+   mt7621_spi_reset(rs);
+   if (enable)
+   polar = BIT(cs);
+   mt7621_spi_write(rs, MT7621_SPI_POLAR, polar);
+}


Will doing a reset mess up the rate configuration and stuff that's done
in _prepare(), or is _reset() perhaps not an entirely accurate name?


You are correct. The function name is not really matching its
implementation. Will change in v2.
 

+   list_for_each_entry(t, >transfers, transfer_list)
+   if (t->speed_hz < speed)
+   speed = t->speed_hz;


This should be in the core if it's needed, it's going to be the same for
all drivers.


I'm not sure here, other drivers might set the speed individually for
each "spi_transfer" entry. In this driver its set only once: before
beginning to transfer all entries. So should I really move this into
the core and set all speed_hz values to the minimum one of the list?
 

+   master->setup = mt7621_spi_setup;
+   master->transfer_one_message = mt7621_spi_transfer_one_message;
+   master->bits_per_word_mask = SPI_BPW_MASK(8);
+   master->dev.of_node = pdev->dev.of_node;
+   master->num_chipselect = 2;


The driver should set SPI_CONTROLLER_HALF_DUPLEX in flags.


Will update in v2.
 

+   clk_disable(rs->clk);


This needs to be clk_disable_unprepare() to ensure the clock is
unprepared as well as disabled.


Okay, will change in v2.
 

+   spi_unregister_master(master);


Just use devm_spi_register_controller()?  The _master() name is legacy
and devm_ would make life easier.


Yes, will change in v2.

Thanks for the review.

Thanks,
Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-14 Thread Stefan Roese

On 14.03.19 14:14, Matthias Brugger wrote:



On 14/03/2019 12:37, Armando Miraglia wrote:

Absolutely!


Please don't top post :)



Cheers,
A.

On Thu, Mar 14, 2019 at 12:36 PM Stefan Roese  wrote:

[...]


Would it be possible for you to wait a bit with this minor cleanup?
As I'm preparing a patch to move this driver out of staging right
now. You can definitely follow-up with your cleanup, once this move
is done. Otherwise the move might be delayed even more.



Hm but shouldn't style issues be a criteria for not accepting a move out of
staging?


I would agree, if those style issues where non trivial. In the end we
are talking about one non-optimal identation now.


I think so. You could add Armandos patch in your series or rebase your
series against Greg's tree, once he took the clean-up. Normally Greg is
incredibly fast :)


I should have included the history here to make this more clean. I've
started pulling this driver out of staging a few weeks ago:

https://patchwork.kernel.org/patch/10790537/
...

Here you find Greg's comment, that the style patches should be merged
first before the move out of staging. This is what I worked on after
this first patch series:

https://patchwork.kernel.org/patch/10792455/
...

Now these 9 style issue patches from me have been merged and I would
like to proceed with the driver move.

Thanks,
Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] spi: mt7621: Move SPI driver out of staging

2019-03-14 Thread Stefan Roese
This patch moves the MT7621 SPI driver, which is used on some Ralink /
MediaTek MT76xx MIPS SoC's, out of the staging directory. No changes to
the source code are done in this patch.

This driver version was tested successfully on an MT7688 based platform
with an SPI NOR on CS0 and an SPI NAND on CS1 without any issues (so
far).

This patch also documents the devicetree bindings for the MT7621 SPI
device driver.

Signed-off-by: Stefan Roese 
Cc: Rob Herring 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
Cc: Armando Miraglia 
---
 .../devicetree/bindings/spi/spi-mt7621.txt|  26 ++
 drivers/spi/Kconfig   |   6 +
 drivers/spi/Makefile  |   1 +
 drivers/spi/spi-mt7621.c  | 422 ++
 drivers/staging/Kconfig   |   2 -
 drivers/staging/Makefile  |   1 -
 drivers/staging/mt7621-spi/Kconfig|   6 -
 drivers/staging/mt7621-spi/Makefile   |   1 -
 drivers/staging/mt7621-spi/TODO   |   5 -
 drivers/staging/mt7621-spi/spi-mt7621.c   | 422 --
 10 files changed, 455 insertions(+), 437 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-mt7621.txt
 create mode 100644 drivers/spi/spi-mt7621.c
 delete mode 100644 drivers/staging/mt7621-spi/Kconfig
 delete mode 100644 drivers/staging/mt7621-spi/Makefile
 delete mode 100644 drivers/staging/mt7621-spi/TODO
 delete mode 100644 drivers/staging/mt7621-spi/spi-mt7621.c

diff --git a/Documentation/devicetree/bindings/spi/spi-mt7621.txt 
b/Documentation/devicetree/bindings/spi/spi-mt7621.txt
new file mode 100644
index ..d5baec0fa56e
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-mt7621.txt
@@ -0,0 +1,26 @@
+Binding for MTK SPI controller (MT7621 MIPS)
+
+Required properties:
+- compatible: Should be one of the following:
+  - "ralink,mt7621-spi": for mt7621/mt7628/mt7688 platforms
+- #address-cells: should be 1.
+- #size-cells: should be 0.
+- reg: Address and length of the register set for the device
+- resets: phandle to the reset controller asserting this device in
+  reset
+  See ../reset/reset.txt for details.
+
+Optional properties:
+- cs-gpios: see spi-bus.txt.
+
+Example:
+
+- SoC Specific Portion:
+spi0: spi@b00 {
+   compatible = "ralink,mt7621-spi";
+   reg = <0xb00 0x100>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   resets = < 18>;
+   reset-names = "spi";
+};
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index f761655e2a36..202952f9da56 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -426,6 +426,12 @@ config SPI_MT65XX
  say Y or M here.If you are not sure, say N.
  SPI drivers for Mediatek MT65XX and MT81XX series ARM SoCs.
 
+config SPI_MT7621
+   tristate "MediaTek MT7621 SPI Controller"
+   depends on RALINK
+   help
+ This selects a driver for the MediaTek MT7621 SPI Controller.
+
 config SPI_NPCM_PSPI
tristate "Nuvoton NPCM PSPI Controller"
depends on ARCH_NPCM || COMPILE_TEST
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index d8fc03c9faa2..369f29a8a6af 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -60,6 +60,7 @@ obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
 obj-$(CONFIG_SPI_MPC52xx_PSC)  += spi-mpc52xx-psc.o
 obj-$(CONFIG_SPI_MPC52xx)  += spi-mpc52xx.o
 obj-$(CONFIG_SPI_MT65XX)+= spi-mt65xx.o
+obj-$(CONFIG_SPI_MT7621)   += spi-mt7621.o
 obj-$(CONFIG_SPI_MXIC) += spi-mxic.o
 obj-$(CONFIG_SPI_MXS)  += spi-mxs.o
 obj-$(CONFIG_SPI_NPCM_PSPI)+= spi-npcm-pspi.o
diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
new file mode 100644
index ..b509f9fe3346
--- /dev/null
+++ b/drivers/spi/spi-mt7621.c
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
+ *
+ * Copyright (C) 2011 Sergiy 
+ * Copyright (C) 2011-2013 Gabor Juhos 
+ * Copyright (C) 2014-2015 Felix Fietkau 
+ *
+ * Some parts are based on spi-orion.c:
+ *   Author: Shadi Ammouri 
+ *   Copyright (C) 2007-2008 Marvell Ltd.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DRIVER_NAME"spi-mt7621"
+
+/* in usec */
+#define RALINK_SPI_WAIT_MAX_LOOP 2000
+
+/* SPISTAT register bit field */
+#define SPISTAT_BUSY   BIT(0)
+
+#define MT7621_SPI_TRANS   0x00
+#define SPITRANS_BUSY  BIT(16)
+
+#define MT7621_SPI_OPCODE  0x04
+#define MT7621_SPI_DATA0   0x08
+#define MT7621_SPI_DATA4   0x18
+#define SPI_CTL_TX_RX_CNT_MASK 0xff
+#define SPI_CTL_START  BIT(8)
+
+#define MT7621_SPI_MASTER  0x28
+#define MASTER_MORE_

Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-14 Thread Stefan Roese

Hi Armando,

On 14.03.19 12:13, Armando Miraglia wrote:

My answers are in-line below. BTW bare with me as this is my attempt to get my
feet wet in how to contribute to the linux kernel for my own pleasure and
interest :)

On Wed, Mar 13, 2019 at 03:34:54PM +0300, Dan Carpenter wrote:

On Wed, Mar 13, 2019 at 01:24:04PM +0100, Armando Miraglia wrote:

Running Lindent on the mt7621-spi.c file in drivers/staging I noticed that the
file contained style issues. This change attempts to address such style
problems.



Don't run lindent.  I think checkpatch.pl has a --fix option that might
be better, but once the code is merged then our standard become much
higher for follow up patches.


Signed-off-by: Armando Miraglia 
---
NOTE: resend this patch to include all mainteners listed by get_mantainers.pl.
  drivers/staging/mt7621-spi/spi-mt7621.c | 27 +
  1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index b509f9fe3346..03d53845f8c5 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -52,14 +52,14 @@
  #define MT7621_LSB_FIRST  BIT(3)
  
  struct mt7621_spi {

-   struct spi_master   *master;
-   void __iomem*base;
-   unsigned intsys_freq;
-   unsigned intspeed;
-   struct clk  *clk;
-   int pending_write;
-
-   struct mt7621_spi_ops   *ops;
+   struct spi_master *master;
+   void __iomem *base;
+   unsigned int sys_freq;
+   unsigned int speed;
+   struct clk *clk;
+   int pending_write;
+
+   struct mt7621_spi_ops *ops;


The original is fine.  I don't encourage people to do fancy indenting
with their local variable declarations inside functions but for a struct
the declarations aren't going to change a lot so people can get fancy
if they want.


Is there an explicit intent to deprecate Lindent in favor of checkpatch.pl
--fix? If one would like to contribute to fixing the tooling for linting which
of the two would be the right target for such an effort?


The problem with a local is if you need to add a new variable then you
have to re-indent a bunch of unrelated lines or have one out of
alignment line.  Most people know this intuitively so they don't get
fancy.


  };
  
  static inline struct mt7621_spi *spidev_to_mt7621_spi(struct spi_device *spi)

@@ -303,7 +303,7 @@ static int mt7621_spi_setup(struct spi_device *spi)
struct mt7621_spi *rs = spidev_to_mt7621_spi(spi);
  
  	if ((spi->max_speed_hz == 0) ||

-   (spi->max_speed_hz > (rs->sys_freq / 2)))
+   (spi->max_speed_hz > (rs->sys_freq / 2)))


Yeah.  Lindent is correct here.


Funny enough, this is something I adjusted manually :)


spi->max_speed_hz = (rs->sys_freq / 2);
  
  	if (spi->max_speed_hz < (rs->sys_freq / 4097)) {

@@ -316,9 +316,10 @@ static int mt7621_spi_setup(struct spi_device *spi)
  }
  
  static const struct of_device_id mt7621_spi_match[] = {

-   { .compatible = "ralink,mt7621-spi" },
+   {.compatible = "ralink,mt7621-spi"},


The original was better.


{},
  };
+
  MODULE_DEVICE_TABLE(of, mt7621_spi_match);


No need for a blank.  These are closely related.


Ack.

  
  static int mt7621_spi_probe(struct platform_device *pdev)

@@ -408,9 +409,9 @@ MODULE_ALIAS("platform:" DRIVER_NAME);
  
  static struct platform_driver mt7621_spi_driver = {

.driver = {
-   .name = DRIVER_NAME,
-   .of_match_table = mt7621_spi_match,
-   },
+  .name = DRIVER_NAME,
+  .of_match_table = mt7621_spi_match,
+  },


The new indenting is very wrong.


Ack. In fact, I was thinking this could be one target to fix the logic in
Lindent to do this appropriately.

I have a process question here: to post a change for the only accepted change I
have in this patch should I send out a new patch?


Would it be possible for you to wait a bit with this minor cleanup?
As I'm preparing a patch to move this driver out of staging right
now. You can definitely follow-up with your cleanup, once this move
is done. Otherwise the move might be delayed even more.

Thanks,
Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] spi: mediatek: Attempt to address style issues in spi-mt7621.c

2019-03-13 Thread Stefan Roese

On 13.03.19 17:46, Matthias Brugger wrote:



On 13/03/2019 17:34, Chuanhong Guo wrote:

Hi!
On Wed, Mar 13, 2019 at 8:28 PM Matthias Brugger  wrote:




On 13/03/2019 13:24, Armando Miraglia wrote:
[...]
Apart from fixing styling issues it would be usefull to see if we can add
support for mt7621 to drivers/spi/spi-mt65xx.c

It's impossible. They are completely different IPs.


Thanks for the info. Do you know the status of the rest of the drivers in 
staging?


Just to inform you. We are using this SPI driver from staging
in one of our customer projects and I will try to move this
driver out of staging into drivers/spi very shortly.

Thanks,
Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/9 v3] staging: spi: mt7621: Switch to SPDX identifier

2019-02-04 Thread Stefan Roese

On 04.02.19 09:53, Mark Brown wrote:

On Mon, Feb 04, 2019 at 09:34:56AM +1100, NeilBrown wrote:


  It is extremely common in the kernel for a file to start
// SPDX-License-Identifier.



  and to have that immediately followed by a comment lile:



  /*
   * .
   * 


Yes, there was a lot of automated conversion AFAICT (and a lot of
confusion with all this stuff only being documented in random mailing
list posts for a long time).


  This patch makes this file match much of the rest of the kernel.  Why
  do you want something different?


Like I said because it makes the comments look more like someone
actually meant to add a C++ comment - it's what the rest of the
subsystem is doing too.


If nobody objects, I will do this change to C++ comments in the header
with the move out of staging into drivers/spi.

Thanks,
Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 8/9 v3] staging: spi: mt7621: Use macros instead of hardcoded values

2019-02-01 Thread Stefan Roese
This patch uses macros instead of hardcoded values for the SPI_MASTER
register access in mt7621_spi_reset() and mt7621_spi_prepare().

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 89586a895320..d6385220b796 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -37,6 +37,12 @@
 #define SPI_CTL_START  BIT(8)
 
 #define MT7621_SPI_MASTER  0x28
+#define MASTER_MORE_BUFMODEBIT(2)
+#define MASTER_FULL_DUPLEX BIT(10)
+#define MASTER_RS_CLK_SEL  GENMASK(27, 16)
+#define MASTER_RS_CLK_SEL_SHIFT16
+#define MASTER_RS_SLAVE_SELGENMASK(31, 29)
+
 #define MT7621_SPI_MOREBUF 0x2c
 #define MT7621_SPI_POLAR   0x38
 #define MT7621_SPI_SPACE   0x3c
@@ -77,9 +83,13 @@ static void mt7621_spi_reset(struct mt7621_spi *rs)
 {
u32 master = mt7621_spi_read(rs, MT7621_SPI_MASTER);
 
-   master |= 7 << 29;
-   master |= 1 << 2;
-   master &= ~(1 << 10);
+   /*
+* Select SPI device 7, enable "more buffer mode" and disable
+* full-duplex (only half-duplex really works on this chip
+* reliably)
+*/
+   master |= MASTER_RS_SLAVE_SEL | MASTER_MORE_BUFMODE;
+   master &= ~MASTER_FULL_DUPLEX;
 
mt7621_spi_write(rs, MT7621_SPI_MASTER, master);
rs->pending_write = 0;
@@ -115,8 +125,8 @@ static int mt7621_spi_prepare(struct spi_device *spi, 
unsigned int speed)
rate = 2;
 
reg = mt7621_spi_read(rs, MT7621_SPI_MASTER);
-   reg &= ~(0xfff << 16);
-   reg |= (rate - 2) << 16;
+   reg &= ~MASTER_RS_CLK_SEL;
+   reg |= (rate - 2) << MASTER_RS_CLK_SEL_SHIFT;
rs->speed = speed;
 
reg &= ~MT7621_LSB_FIRST;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 9/9 v3] staging: spi: mt7621: Remove superfluous pre-declaration of struct mt7621_spi

2019-02-01 Thread Stefan Roese
This patch removes the superfluous pre-declaration of struct mt7621_spi.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index d6385220b796..167d0f09823b 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -51,8 +51,6 @@
 #define MT7621_CPOLBIT(4)
 #define MT7621_LSB_FIRST   BIT(3)
 
-struct mt7621_spi;
-
 struct mt7621_spi {
struct spi_master   *master;
void __iomem*base;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 6/9 v3] staging: spi: mt7621: Use recommended comment style

2019-02-01 Thread Stefan Roese
This patch changes some comments to use the recommended multi-line
comment style.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index e548f816ea9e..00cff75ee7ac 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -123,10 +123,10 @@ static int mt7621_spi_prepare(struct spi_device *spi, 
unsigned int speed)
if (spi->mode & SPI_LSB_FIRST)
reg |= MT7621_LSB_FIRST;
 
-   /* This SPI controller seems to be tested on SPI flash only
-* and some bits are swizzled under other SPI modes probably
-* due to incorrect wiring inside the silicon. Only mode 0
-* works correctly.
+   /*
+* This SPI controller seems to be tested on SPI flash only and some
+* bits are swizzled under other SPI modes probably due to incorrect
+* wiring inside the silicon. Only mode 0 works correctly.
 */
reg &= ~(MT7621_CPHA | MT7621_CPOL);
 
@@ -155,9 +155,10 @@ static inline int mt7621_spi_wait_till_ready(struct 
mt7621_spi *rs)
 static void mt7621_spi_read_half_duplex(struct mt7621_spi *rs,
int rx_len, u8 *buf)
 {
-   /* Combine with any pending write, and perform one or
-* more half-duplex transactions reading 'len' bytes.
-* Data to be written is already in MT7621_SPI_DATA*
+   /*
+* Combine with any pending write, and perform one or more half-duplex
+* transactions reading 'len' bytes. Data to be written is already in
+* MT7621_SPI_DATA.
 */
int tx_len = rs->pending_write;
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/9 v3] staging: spi: mt7621: Switch to SPDX identifier

2019-02-01 Thread Stefan Roese
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- No change
 
v2:
- Changes are done to the driver in staging before moving it out of
  staging into drivers/spi

 drivers/staging/mt7621-spi/spi-mt7621.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 513b6e79b985..c2f6f9ce52a2 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
  *
@@ -8,10 +9,6 @@
  * Some parts are based on spi-orion.c:
  *   Author: Shadi Ammouri 
  *   Copyright (C) 2007-2008 Marvell Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
  */
 
 #include 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/9 v3] staging: spi: mt7621: Remove superfluous SPI_BPW_MASK definition

2019-02-01 Thread Stefan Roese
This patch removes the SPI_BPW_MASK definition as this is already
available in include/linux/spi/spi.h.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index ca4632740827..fe9c863af1cc 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -19,8 +19,6 @@
 #include 
 #include 
 
-#define SPI_BPW_MASK(bits) BIT((bits) - 1)
-
 #define DRIVER_NAME"spi-mt7621"
 /* in usec */
 #define RALINK_SPI_WAIT_MAX_LOOP   2000
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 7/9 v3] staging: spi: mt7621: Sort register definitions

2019-02-01 Thread Stefan Roese
This patch sorts the SPI register definitions by increasing addresses.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 00cff75ee7ac..89586a895320 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -36,9 +36,9 @@
 #define SPI_CTL_TX_RX_CNT_MASK 0xff
 #define SPI_CTL_START  BIT(8)
 
-#define MT7621_SPI_POLAR   0x38
 #define MT7621_SPI_MASTER  0x28
 #define MT7621_SPI_MOREBUF 0x2c
+#define MT7621_SPI_POLAR   0x38
 #define MT7621_SPI_SPACE   0x3c
 
 #define MT7621_CPHABIT(5)
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/9 v3] staging: spi: mt7621: Clean up excessive header usage

2019-02-01 Thread Stefan Roese
This patch removes unnecessary header includes and sorts the remaining
ones alphabetically.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index c2f6f9ce52a2..440c3f77fde8 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -11,19 +11,13 @@
  *   Copyright (C) 2007-2008 Marvell Ltd.
  */
 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-
-#include 
 
 #define SPI_BPW_MASK(bits) BIT((bits) - 1)
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/9 v3] staging: spi: mt7621: Add return code check on device_reset()

2019-02-01 Thread Stefan Roese
This patch adds a return code check on device_reset() and removes the
compile warning.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 440c3f77fde8..ca4632740827 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -321,6 +321,7 @@ static int mt7621_spi_probe(struct platform_device *pdev)
int status = 0;
struct clk *clk;
struct mt7621_spi_ops *ops;
+   int ret;
 
match = of_match_device(mt7621_spi_match, >dev);
if (!match)
@@ -368,7 +369,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)
rs->pending_write = 0;
dev_info(>dev, "sys_freq: %u\n", rs->sys_freq);
 
-   device_reset(>dev);
+   ret = device_reset(>dev);
+   if (ret) {
+   dev_err(>dev, "SPI reset failed!\n");
+   return ret;
+   }
 
mt7621_spi_reset(rs);
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/9 v3] staging: spi: mt7621: Minor cosmetic changes

2019-02-01 Thread Stefan Roese
Align  macro definitions and add some empty lines to make the code better
readable.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v3:
- New patch, changes spilt into separate patches

 drivers/staging/mt7621-spi/spi-mt7621.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index fe9c863af1cc..e548f816ea9e 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -19,12 +19,13 @@
 #include 
 #include 
 
-#define DRIVER_NAME"spi-mt7621"
+#define DRIVER_NAME"spi-mt7621"
+
 /* in usec */
-#define RALINK_SPI_WAIT_MAX_LOOP   2000
+#define RALINK_SPI_WAIT_MAX_LOOP 2000
 
 /* SPISTAT register bit field */
-#define SPISTAT_BUSY   BIT(0)
+#define SPISTAT_BUSY   BIT(0)
 
 #define MT7621_SPI_TRANS   0x00
 #define SPITRANS_BUSY  BIT(16)
@@ -186,6 +187,7 @@ static void mt7621_spi_read_half_duplex(struct mt7621_spi 
*rs,
*buf++ = val & 0xff;
val >>= 8;
}
+
rx_len -= i;
}
 }
@@ -279,6 +281,7 @@ static int mt7621_spi_transfer_one_message(struct 
spi_master *master,
mt7621_spi_flush(rs);
 
mt7621_spi_set_cs(spi, 0);
+
 msg_done:
m->status = status;
spi_finalize_current_message(master);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread Stefan Roese

On 01.02.19 10:03, Greg Kroah-Hartman wrote:

On Fri, Feb 01, 2019 at 09:57:12AM +0100, Stefan Roese wrote:

This patch cleans up some minor issues with this driver:
- Remove unnecessary header includes
- Sort header alphabetically
- Use correct comment style
- Add return code check on device_reset()
- Remove SPI_BPW_MASK definition (already available in
   include/linux/spi/spi.h)
- Use macros instead of hardcoded values for SPI_MASTER register access
   as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)


When you have to start listing the different things you do in a patch,
that's a huge sign you need to break this up into different patches :)


I personally find this over complex for these type of changes, that's
why I prefer to send such "minor" changes in a single patch. But I
can definitely split this up into multiple patches, if this is what's
preferred by you (and others).
 

Please do that here, it should be a series, each one doing a single type
of thing.


Sure, will do.
 
Thanks,

Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread Stefan Roese
This patch cleans up some minor issues with this driver:
- Remove unnecessary header includes
- Sort header alphabetically
- Use correct comment style
- Add return code check on device_reset()
- Remove SPI_BPW_MASK definition (already available in
  include/linux/spi/spi.h)
- Use macros instead of hardcoded values for SPI_MASTER register access
  as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v2:
- Changes are done to the driver in staging before moving it out of
  staging into drivers/spi
- Remove SPI_BPW_MASK macro
- Use macros instead of hardcoded values for SPI_MASTER bits
- Remove code cleanup comment from TODO file

 drivers/staging/mt7621-spi/TODO |  1 -
 drivers/staging/mt7621-spi/spi-mt7621.c | 65 ++---
 2 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/mt7621-spi/TODO b/drivers/staging/mt7621-spi/TODO
index fdbc5002c32a..126cc80c7c68 100644
--- a/drivers/staging/mt7621-spi/TODO
+++ b/drivers/staging/mt7621-spi/TODO
@@ -1,5 +1,4 @@
 
-- general code review and clean up
 - ensure device-tree requirements are documented
 
 Cc: NeilBrown 
diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index c2f6f9ce52a2..167d0f09823b 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -11,28 +11,21 @@
  *   Copyright (C) 2007-2008 Marvell Ltd.
  */
 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
-#include 
+#define DRIVER_NAME"spi-mt7621"
 
-#define SPI_BPW_MASK(bits) BIT((bits) - 1)
-
-#define DRIVER_NAME"spi-mt7621"
 /* in usec */
-#define RALINK_SPI_WAIT_MAX_LOOP   2000
+#define RALINK_SPI_WAIT_MAX_LOOP 2000
 
 /* SPISTAT register bit field */
-#define SPISTAT_BUSY   BIT(0)
+#define SPISTAT_BUSY   BIT(0)
 
 #define MT7621_SPI_TRANS   0x00
 #define SPITRANS_BUSY  BIT(16)
@@ -43,17 +36,21 @@
 #define SPI_CTL_TX_RX_CNT_MASK 0xff
 #define SPI_CTL_START  BIT(8)
 
-#define MT7621_SPI_POLAR   0x38
 #define MT7621_SPI_MASTER  0x28
+#define MASTER_MORE_BUFMODEBIT(2)
+#define MASTER_FULL_DUPLEX BIT(10)
+#define MASTER_RS_CLK_SEL  GENMASK(27, 16)
+#define MASTER_RS_CLK_SEL_SHIFT16
+#define MASTER_RS_SLAVE_SELGENMASK(31, 29)
+
 #define MT7621_SPI_MOREBUF 0x2c
+#define MT7621_SPI_POLAR   0x38
 #define MT7621_SPI_SPACE   0x3c
 
 #define MT7621_CPHABIT(5)
 #define MT7621_CPOLBIT(4)
 #define MT7621_LSB_FIRST   BIT(3)
 
-struct mt7621_spi;
-
 struct mt7621_spi {
struct spi_master   *master;
void __iomem*base;
@@ -84,9 +81,13 @@ static void mt7621_spi_reset(struct mt7621_spi *rs)
 {
u32 master = mt7621_spi_read(rs, MT7621_SPI_MASTER);
 
-   master |= 7 << 29;
-   master |= 1 << 2;
-   master &= ~(1 << 10);
+   /*
+* Select SPI device 7, enable "more buffer mode" and disable
+* full-duplex (only half-duplex really works on this chip
+* reliably)
+*/
+   master |= MASTER_RS_SLAVE_SEL | MASTER_MORE_BUFMODE;
+   master &= ~MASTER_FULL_DUPLEX;
 
mt7621_spi_write(rs, MT7621_SPI_MASTER, master);
rs->pending_write = 0;
@@ -122,18 +123,18 @@ static int mt7621_spi_prepare(struct spi_device *spi, 
unsigned int speed)
rate = 2;
 
reg = mt7621_spi_read(rs, MT7621_SPI_MASTER);
-   reg &= ~(0xfff << 16);
-   reg |= (rate - 2) << 16;
+   reg &= ~MASTER_RS_CLK_SEL;
+   reg |= (rate - 2) << MASTER_RS_CLK_SEL_SHIFT;
rs->speed = speed;
 
reg &= ~MT7621_LSB_FIRST;
if (spi->mode & SPI_LSB_FIRST)
reg |= MT7621_LSB_FIRST;
 
-   /* This SPI controller seems to be tested on SPI flash only
-* and some bits are swizzled under other SPI modes probably
-* due to incorrect wiring inside the silicon. Only mode 0
-* works correctly.
+   /*
+* This SPI controller seems to be tested on SPI flash only and some
+* bits are swizzled under other SPI modes probably due to incorrect
+* wiring inside the silicon. Only mode 0 works correctly.
 */
reg &= ~(MT7621_CPHA | MT7621_CPOL);
 
@@ -162,9 +163,10 @@ static inline int mt7621_spi_wait_till_ready(struct 
mt7621_spi *rs)
 static void mt7621_spi_read_half_duplex(struct mt7621_spi *rs,
int rx_len, u8 *buf)
 {
-   /* Combine with any pending write, and perform one or
-* more half-duplex transactions reading 'len' bytes.
-* Data to be w

[PATCH 1/2 v2] staging: spi: mt7621: Switch to SPDX identifier

2019-02-01 Thread Stefan Roese
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Stefan Roese 
Cc: Mark Brown 
Cc: Greg Kroah-Hartman 
Cc: NeilBrown 
Cc: Sankalp Negi 
Cc: Chuanhong Guo 
Cc: John Crispin 
---
v2:
- Changes are done to the driver in staging before moving it out of
  staging into drivers/spi

 drivers/staging/mt7621-spi/spi-mt7621.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c 
b/drivers/staging/mt7621-spi/spi-mt7621.c
index 513b6e79b985..c2f6f9ce52a2 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
  *
@@ -8,10 +9,6 @@
  * Some parts are based on spi-orion.c:
  *   Author: Shadi Ammouri 
  *   Copyright (C) 2007-2008 Marvell Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
  */
 
 #include 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel