Re: [PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Jassi Brar
On 19 March 2014 00:40, Rob Herring  wrote:
> On Tue, Mar 18, 2014 at 1:45 PM, Jassi Brar  wrote:
>> Convert the PL320 controller driver to work with the common
>> mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
>> to work with thee API. Drop the obsoleted driver pl320-ipc.c
>>
>> Signed-off-by: Jassi Brar 
>> ---
>>  drivers/cpufreq/highbank-cpufreq.c |  24 -
>>  drivers/mailbox/Makefile   |   2 +-
>>  drivers/mailbox/pl320-ipc.c| 198 --
>>  drivers/mailbox/pl320.c| 214 
>> +
>
> Would you mind resending with rename detection enabled.
>
> You can make that the default by adding this to your config:
>
> [diff]
> renames = true
>
The driver isn't just renamed. The new driver is quite different from
original. So '-M' option to git format-patch doesn't make it simpler.
Btw I do have "git config --global diff.renames true" as well.

-Jassi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Rob Herring
On Tue, Mar 18, 2014 at 1:45 PM, Jassi Brar  wrote:
> Convert the PL320 controller driver to work with the common
> mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
> to work with thee API. Drop the obsoleted driver pl320-ipc.c
>
> Signed-off-by: Jassi Brar 
> ---
>  drivers/cpufreq/highbank-cpufreq.c |  24 -
>  drivers/mailbox/Makefile   |   2 +-
>  drivers/mailbox/pl320-ipc.c| 198 --
>  drivers/mailbox/pl320.c| 214 
> +

Would you mind resending with rename detection enabled.

You can make that the default by adding this to your config:

[diff]
renames = true

Rob

>  include/linux/pl320-ipc.h  |  17 ---
>  5 files changed, 237 insertions(+), 218 deletions(-)
>  delete mode 100644 drivers/mailbox/pl320-ipc.c
>  create mode 100644 drivers/mailbox/pl320.c
>  delete mode 100644 include/linux/pl320-ipc.h
>
> diff --git a/drivers/cpufreq/highbank-cpufreq.c 
> b/drivers/cpufreq/highbank-cpufreq.c
> index b464f29..4846734 100644
> --- a/drivers/cpufreq/highbank-cpufreq.c
> +++ b/drivers/cpufreq/highbank-cpufreq.c
> @@ -19,7 +19,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>
>  #define HB_CPUFREQ_CHANGE_NOTE 0x8001
> @@ -29,8 +29,28 @@
>  static int hb_voltage_change(unsigned int freq)
>  {
> u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 
> 100};
> +   struct mbox_client cl;
> +   int ret = -ETIMEDOUT;
> +   struct mbox_chan *chan;
>
> -   return pl320_ipc_transmit(msg);
> +   cl.rx_callback = NULL;
> +   cl.tx_done = NULL;
> +   cl.tx_block = true;
> +   cl.tx_tout = 1000; /* 1 sec */
> +   cl.link_data = NULL;
> +   cl.knows_txdone = false;
> +   cl.chan_name = "pl320:A9_to_M3";
> +
> +   chan = mbox_request_channel();
> +   if (IS_ERR(chan))
> +   return PTR_ERR(chan);
> +
> +   if (mbox_send_message(chan, (void *)msg))
> +   ret = msg[1]; /* PL320 updates buffer with FIFO after ACK */
> +
> +   mbox_free_channel(chan);
> +
> +   return ret;
>  }
>
>  static int hb_cpufreq_clk_notify(struct notifier_block *nb,
> diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
> index 2fa343a..f3f4ab7 100644
> --- a/drivers/mailbox/Makefile
> +++ b/drivers/mailbox/Makefile
> @@ -2,7 +2,7 @@
>
>  obj-$(CONFIG_MAILBOX)  += mailbox.o
>
> -obj-$(CONFIG_PL320_MBOX)   += pl320-ipc.o
> +obj-$(CONFIG_PL320_MBOX)   += pl320.o
>
>  obj-$(CONFIG_OMAP_MBOX)+= omap-mailbox.o
>  obj-$(CONFIG_OMAP1_MBOX)   += mailbox_omap1.o
> diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
> deleted file mode 100644
> index f3755e0..000
> --- a/drivers/mailbox/pl320-ipc.c
> +++ /dev/null
> @@ -1,198 +0,0 @@
> -/*
> - * Copyright 2012 Calxeda, Inc.
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms and conditions of the GNU General Public License,
> - * version 2, as published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope it will be useful, but WITHOUT
> - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> - * more details.
> - *
> - * You should have received a copy of the GNU General Public License along 
> with
> - * this program.  If not, see .
> - */
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -
> -#define IPCMxSOURCE(m) ((m) * 0x40)
> -#define IPCMxDSET(m)   (((m) * 0x40) + 0x004)
> -#define IPCMxDCLEAR(m) (((m) * 0x40) + 0x008)
> -#define IPCMxDSTATUS(m)(((m) * 0x40) + 0x00C)
> -#define IPCMxMODE(m)   (((m) * 0x40) + 0x010)
> -#define IPCMxMSET(m)   (((m) * 0x40) + 0x014)
> -#define IPCMxMCLEAR(m) (((m) * 0x40) + 0x018)
> -#define IPCMxMSTATUS(m)(((m) * 0x40) + 0x01C)
> -#define IPCMxSEND(m)   (((m) * 0x40) + 0x020)
> -#define IPCMxDR(m, dr) (((m) * 0x40) + ((dr) * 4) + 0x024)
> -
> -#define IPCMMIS(irq)   (((irq) * 8) + 0x800)
> -#define IPCMRIS(irq)   (((irq) * 8) + 0x804)
> -
> -#define MBOX_MASK(n)   (1 << (n))
> -#define IPC_TX_MBOX1
> -#define IPC_RX_MBOX2
> -
> -#define CHAN_MASK(n)   (1 << (n))
> -#define A9_SOURCE  1
> -#define M3_SOURCE  0
> -
> -static void __iomem *ipc_base;
> -static int ipc_irq;
> -static DEFINE_MUTEX(ipc_m1_lock);
> -static DECLARE_COMPLETION(ipc_completion);
> -static ATOMIC_NOTIFIER_HEAD(ipc_notifier);
> -
> -static inline void set_destination(int source, int mbox)
> -{
> -   __raw_writel(CHAN_MASK(source), ipc_base + 

[PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Jassi Brar
Convert the PL320 controller driver to work with the common
mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
to work with thee API. Drop the obsoleted driver pl320-ipc.c

Signed-off-by: Jassi Brar 
---
 drivers/cpufreq/highbank-cpufreq.c |  24 -
 drivers/mailbox/Makefile   |   2 +-
 drivers/mailbox/pl320-ipc.c| 198 --
 drivers/mailbox/pl320.c| 214 +
 include/linux/pl320-ipc.h  |  17 ---
 5 files changed, 237 insertions(+), 218 deletions(-)
 delete mode 100644 drivers/mailbox/pl320-ipc.c
 create mode 100644 drivers/mailbox/pl320.c
 delete mode 100644 include/linux/pl320-ipc.h

diff --git a/drivers/cpufreq/highbank-cpufreq.c 
b/drivers/cpufreq/highbank-cpufreq.c
index b464f29..4846734 100644
--- a/drivers/cpufreq/highbank-cpufreq.c
+++ b/drivers/cpufreq/highbank-cpufreq.c
@@ -19,7 +19,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #define HB_CPUFREQ_CHANGE_NOTE 0x8001
@@ -29,8 +29,28 @@
 static int hb_voltage_change(unsigned int freq)
 {
u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 100};
+   struct mbox_client cl;
+   int ret = -ETIMEDOUT;
+   struct mbox_chan *chan;
 
-   return pl320_ipc_transmit(msg);
+   cl.rx_callback = NULL;
+   cl.tx_done = NULL;
+   cl.tx_block = true;
+   cl.tx_tout = 1000; /* 1 sec */
+   cl.link_data = NULL;
+   cl.knows_txdone = false;
+   cl.chan_name = "pl320:A9_to_M3";
+
+   chan = mbox_request_channel();
+   if (IS_ERR(chan))
+   return PTR_ERR(chan);
+
+   if (mbox_send_message(chan, (void *)msg))
+   ret = msg[1]; /* PL320 updates buffer with FIFO after ACK */
+
+   mbox_free_channel(chan);
+
+   return ret;
 }
 
 static int hb_cpufreq_clk_notify(struct notifier_block *nb,
diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
index 2fa343a..f3f4ab7 100644
--- a/drivers/mailbox/Makefile
+++ b/drivers/mailbox/Makefile
@@ -2,7 +2,7 @@
 
 obj-$(CONFIG_MAILBOX)  += mailbox.o
 
-obj-$(CONFIG_PL320_MBOX)   += pl320-ipc.o
+obj-$(CONFIG_PL320_MBOX)   += pl320.o
 
 obj-$(CONFIG_OMAP_MBOX)+= omap-mailbox.o
 obj-$(CONFIG_OMAP1_MBOX)   += mailbox_omap1.o
diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
deleted file mode 100644
index f3755e0..000
--- a/drivers/mailbox/pl320-ipc.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright 2012 Calxeda, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see .
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#define IPCMxSOURCE(m) ((m) * 0x40)
-#define IPCMxDSET(m)   (((m) * 0x40) + 0x004)
-#define IPCMxDCLEAR(m) (((m) * 0x40) + 0x008)
-#define IPCMxDSTATUS(m)(((m) * 0x40) + 0x00C)
-#define IPCMxMODE(m)   (((m) * 0x40) + 0x010)
-#define IPCMxMSET(m)   (((m) * 0x40) + 0x014)
-#define IPCMxMCLEAR(m) (((m) * 0x40) + 0x018)
-#define IPCMxMSTATUS(m)(((m) * 0x40) + 0x01C)
-#define IPCMxSEND(m)   (((m) * 0x40) + 0x020)
-#define IPCMxDR(m, dr) (((m) * 0x40) + ((dr) * 4) + 0x024)
-
-#define IPCMMIS(irq)   (((irq) * 8) + 0x800)
-#define IPCMRIS(irq)   (((irq) * 8) + 0x804)
-
-#define MBOX_MASK(n)   (1 << (n))
-#define IPC_TX_MBOX1
-#define IPC_RX_MBOX2
-
-#define CHAN_MASK(n)   (1 << (n))
-#define A9_SOURCE  1
-#define M3_SOURCE  0
-
-static void __iomem *ipc_base;
-static int ipc_irq;
-static DEFINE_MUTEX(ipc_m1_lock);
-static DECLARE_COMPLETION(ipc_completion);
-static ATOMIC_NOTIFIER_HEAD(ipc_notifier);
-
-static inline void set_destination(int source, int mbox)
-{
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxDSET(mbox));
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxMSET(mbox));
-}
-
-static inline void clear_destination(int source, int mbox)
-{
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxDCLEAR(mbox));
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxMCLEAR(mbox));
-}
-
-static void __ipc_send(int mbox, u32 *data)
-{
-   int i;
-   for (i = 0; i < 7; i++)
-   __raw_writel(data[i], ipc_base + IPCMxDR(mbox, i));
-   

[PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Jassi Brar
Convert the PL320 controller driver to work with the common
mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
to work with thee API. Drop the obsoleted driver pl320-ipc.c

Signed-off-by: Jassi Brar jaswinder.si...@linaro.org
---
 drivers/cpufreq/highbank-cpufreq.c |  24 -
 drivers/mailbox/Makefile   |   2 +-
 drivers/mailbox/pl320-ipc.c| 198 --
 drivers/mailbox/pl320.c| 214 +
 include/linux/pl320-ipc.h  |  17 ---
 5 files changed, 237 insertions(+), 218 deletions(-)
 delete mode 100644 drivers/mailbox/pl320-ipc.c
 create mode 100644 drivers/mailbox/pl320.c
 delete mode 100644 include/linux/pl320-ipc.h

diff --git a/drivers/cpufreq/highbank-cpufreq.c 
b/drivers/cpufreq/highbank-cpufreq.c
index b464f29..4846734 100644
--- a/drivers/cpufreq/highbank-cpufreq.c
+++ b/drivers/cpufreq/highbank-cpufreq.c
@@ -19,7 +19,7 @@
 #include linux/cpu.h
 #include linux/err.h
 #include linux/of.h
-#include linux/pl320-ipc.h
+#include linux/mailbox_client.h
 #include linux/platform_device.h
 
 #define HB_CPUFREQ_CHANGE_NOTE 0x8001
@@ -29,8 +29,28 @@
 static int hb_voltage_change(unsigned int freq)
 {
u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 100};
+   struct mbox_client cl;
+   int ret = -ETIMEDOUT;
+   struct mbox_chan *chan;
 
-   return pl320_ipc_transmit(msg);
+   cl.rx_callback = NULL;
+   cl.tx_done = NULL;
+   cl.tx_block = true;
+   cl.tx_tout = 1000; /* 1 sec */
+   cl.link_data = NULL;
+   cl.knows_txdone = false;
+   cl.chan_name = pl320:A9_to_M3;
+
+   chan = mbox_request_channel(cl);
+   if (IS_ERR(chan))
+   return PTR_ERR(chan);
+
+   if (mbox_send_message(chan, (void *)msg))
+   ret = msg[1]; /* PL320 updates buffer with FIFO after ACK */
+
+   mbox_free_channel(chan);
+
+   return ret;
 }
 
 static int hb_cpufreq_clk_notify(struct notifier_block *nb,
diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
index 2fa343a..f3f4ab7 100644
--- a/drivers/mailbox/Makefile
+++ b/drivers/mailbox/Makefile
@@ -2,7 +2,7 @@
 
 obj-$(CONFIG_MAILBOX)  += mailbox.o
 
-obj-$(CONFIG_PL320_MBOX)   += pl320-ipc.o
+obj-$(CONFIG_PL320_MBOX)   += pl320.o
 
 obj-$(CONFIG_OMAP_MBOX)+= omap-mailbox.o
 obj-$(CONFIG_OMAP1_MBOX)   += mailbox_omap1.o
diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
deleted file mode 100644
index f3755e0..000
--- a/drivers/mailbox/pl320-ipc.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright 2012 Calxeda, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see http://www.gnu.org/licenses/.
- */
-#include linux/types.h
-#include linux/err.h
-#include linux/delay.h
-#include linux/export.h
-#include linux/io.h
-#include linux/interrupt.h
-#include linux/completion.h
-#include linux/mutex.h
-#include linux/notifier.h
-#include linux/spinlock.h
-#include linux/device.h
-#include linux/amba/bus.h
-
-#include linux/pl320-ipc.h
-
-#define IPCMxSOURCE(m) ((m) * 0x40)
-#define IPCMxDSET(m)   (((m) * 0x40) + 0x004)
-#define IPCMxDCLEAR(m) (((m) * 0x40) + 0x008)
-#define IPCMxDSTATUS(m)(((m) * 0x40) + 0x00C)
-#define IPCMxMODE(m)   (((m) * 0x40) + 0x010)
-#define IPCMxMSET(m)   (((m) * 0x40) + 0x014)
-#define IPCMxMCLEAR(m) (((m) * 0x40) + 0x018)
-#define IPCMxMSTATUS(m)(((m) * 0x40) + 0x01C)
-#define IPCMxSEND(m)   (((m) * 0x40) + 0x020)
-#define IPCMxDR(m, dr) (((m) * 0x40) + ((dr) * 4) + 0x024)
-
-#define IPCMMIS(irq)   (((irq) * 8) + 0x800)
-#define IPCMRIS(irq)   (((irq) * 8) + 0x804)
-
-#define MBOX_MASK(n)   (1  (n))
-#define IPC_TX_MBOX1
-#define IPC_RX_MBOX2
-
-#define CHAN_MASK(n)   (1  (n))
-#define A9_SOURCE  1
-#define M3_SOURCE  0
-
-static void __iomem *ipc_base;
-static int ipc_irq;
-static DEFINE_MUTEX(ipc_m1_lock);
-static DECLARE_COMPLETION(ipc_completion);
-static ATOMIC_NOTIFIER_HEAD(ipc_notifier);
-
-static inline void set_destination(int source, int mbox)
-{
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxDSET(mbox));
-   __raw_writel(CHAN_MASK(source), ipc_base + IPCMxMSET(mbox));
-}
-
-static inline void clear_destination(int source, int mbox)
-{
-   

Re: [PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Rob Herring
On Tue, Mar 18, 2014 at 1:45 PM, Jassi Brar jassisinghb...@gmail.com wrote:
 Convert the PL320 controller driver to work with the common
 mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
 to work with thee API. Drop the obsoleted driver pl320-ipc.c

 Signed-off-by: Jassi Brar jaswinder.si...@linaro.org
 ---
  drivers/cpufreq/highbank-cpufreq.c |  24 -
  drivers/mailbox/Makefile   |   2 +-
  drivers/mailbox/pl320-ipc.c| 198 --
  drivers/mailbox/pl320.c| 214 
 +

Would you mind resending with rename detection enabled.

You can make that the default by adding this to your config:

[diff]
renames = true

Rob

  include/linux/pl320-ipc.h  |  17 ---
  5 files changed, 237 insertions(+), 218 deletions(-)
  delete mode 100644 drivers/mailbox/pl320-ipc.c
  create mode 100644 drivers/mailbox/pl320.c
  delete mode 100644 include/linux/pl320-ipc.h

 diff --git a/drivers/cpufreq/highbank-cpufreq.c 
 b/drivers/cpufreq/highbank-cpufreq.c
 index b464f29..4846734 100644
 --- a/drivers/cpufreq/highbank-cpufreq.c
 +++ b/drivers/cpufreq/highbank-cpufreq.c
 @@ -19,7 +19,7 @@
  #include linux/cpu.h
  #include linux/err.h
  #include linux/of.h
 -#include linux/pl320-ipc.h
 +#include linux/mailbox_client.h
  #include linux/platform_device.h

  #define HB_CPUFREQ_CHANGE_NOTE 0x8001
 @@ -29,8 +29,28 @@
  static int hb_voltage_change(unsigned int freq)
  {
 u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 
 100};
 +   struct mbox_client cl;
 +   int ret = -ETIMEDOUT;
 +   struct mbox_chan *chan;

 -   return pl320_ipc_transmit(msg);
 +   cl.rx_callback = NULL;
 +   cl.tx_done = NULL;
 +   cl.tx_block = true;
 +   cl.tx_tout = 1000; /* 1 sec */
 +   cl.link_data = NULL;
 +   cl.knows_txdone = false;
 +   cl.chan_name = pl320:A9_to_M3;
 +
 +   chan = mbox_request_channel(cl);
 +   if (IS_ERR(chan))
 +   return PTR_ERR(chan);
 +
 +   if (mbox_send_message(chan, (void *)msg))
 +   ret = msg[1]; /* PL320 updates buffer with FIFO after ACK */
 +
 +   mbox_free_channel(chan);
 +
 +   return ret;
  }

  static int hb_cpufreq_clk_notify(struct notifier_block *nb,
 diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
 index 2fa343a..f3f4ab7 100644
 --- a/drivers/mailbox/Makefile
 +++ b/drivers/mailbox/Makefile
 @@ -2,7 +2,7 @@

  obj-$(CONFIG_MAILBOX)  += mailbox.o

 -obj-$(CONFIG_PL320_MBOX)   += pl320-ipc.o
 +obj-$(CONFIG_PL320_MBOX)   += pl320.o

  obj-$(CONFIG_OMAP_MBOX)+= omap-mailbox.o
  obj-$(CONFIG_OMAP1_MBOX)   += mailbox_omap1.o
 diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
 deleted file mode 100644
 index f3755e0..000
 --- a/drivers/mailbox/pl320-ipc.c
 +++ /dev/null
 @@ -1,198 +0,0 @@
 -/*
 - * Copyright 2012 Calxeda, Inc.
 - *
 - * This program is free software; you can redistribute it and/or modify it
 - * under the terms and conditions of the GNU General Public License,
 - * version 2, as published by the Free Software Foundation.
 - *
 - * This program is distributed in the hope it will be useful, but WITHOUT
 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 - * more details.
 - *
 - * You should have received a copy of the GNU General Public License along 
 with
 - * this program.  If not, see http://www.gnu.org/licenses/.
 - */
 -#include linux/types.h
 -#include linux/err.h
 -#include linux/delay.h
 -#include linux/export.h
 -#include linux/io.h
 -#include linux/interrupt.h
 -#include linux/completion.h
 -#include linux/mutex.h
 -#include linux/notifier.h
 -#include linux/spinlock.h
 -#include linux/device.h
 -#include linux/amba/bus.h
 -
 -#include linux/pl320-ipc.h
 -
 -#define IPCMxSOURCE(m) ((m) * 0x40)
 -#define IPCMxDSET(m)   (((m) * 0x40) + 0x004)
 -#define IPCMxDCLEAR(m) (((m) * 0x40) + 0x008)
 -#define IPCMxDSTATUS(m)(((m) * 0x40) + 0x00C)
 -#define IPCMxMODE(m)   (((m) * 0x40) + 0x010)
 -#define IPCMxMSET(m)   (((m) * 0x40) + 0x014)
 -#define IPCMxMCLEAR(m) (((m) * 0x40) + 0x018)
 -#define IPCMxMSTATUS(m)(((m) * 0x40) + 0x01C)
 -#define IPCMxSEND(m)   (((m) * 0x40) + 0x020)
 -#define IPCMxDR(m, dr) (((m) * 0x40) + ((dr) * 4) + 0x024)
 -
 -#define IPCMMIS(irq)   (((irq) * 8) + 0x800)
 -#define IPCMRIS(irq)   (((irq) * 8) + 0x804)
 -
 -#define MBOX_MASK(n)   (1  (n))
 -#define IPC_TX_MBOX1
 -#define IPC_RX_MBOX2
 -
 -#define CHAN_MASK(n)   (1  (n))
 -#define A9_SOURCE  1
 -#define M3_SOURCE  0
 -
 -static void __iomem *ipc_base;
 -static int ipc_irq;
 -static DEFINE_MUTEX(ipc_m1_lock);
 -static 

Re: [PATCHv4 3/5] mailbox: pl320: Introduce common API driver

2014-03-18 Thread Jassi Brar
On 19 March 2014 00:40, Rob Herring robherri...@gmail.com wrote:
 On Tue, Mar 18, 2014 at 1:45 PM, Jassi Brar jassisinghb...@gmail.com wrote:
 Convert the PL320 controller driver to work with the common
 mailbox API. Also convert the only user of PL320, highbank-cpufreq.c
 to work with thee API. Drop the obsoleted driver pl320-ipc.c

 Signed-off-by: Jassi Brar jaswinder.si...@linaro.org
 ---
  drivers/cpufreq/highbank-cpufreq.c |  24 -
  drivers/mailbox/Makefile   |   2 +-
  drivers/mailbox/pl320-ipc.c| 198 --
  drivers/mailbox/pl320.c| 214 
 +

 Would you mind resending with rename detection enabled.

 You can make that the default by adding this to your config:

 [diff]
 renames = true

The driver isn't just renamed. The new driver is quite different from
original. So '-M' option to git format-patch doesn't make it simpler.
Btw I do have git config --global diff.renames true as well.

-Jassi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/