* [PATCH 2/7] at91/i2c: move register header to drivers
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-15 7:23 ` Jean Delvare
2011-07-14 23:52 ` [PATCH 3/7] at91_mci: " Jean-Christophe PLAGNIOL-VILLARD
` (4 subsequent siblings)
5 siblings, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-i2c at vger.kernel.org
---
drivers/i2c/busses/i2c-at91.c | 3 ++-
.../at91_twi.h => drivers/i2c/busses/i2c-at91.h | 7 +++----
2 files changed, 5 insertions(+), 5 deletions(-)
rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 305c075..7402fed 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -25,10 +25,11 @@
#include <linux/platform_device.h>
#include <linux/io.h>
-#include <mach/at91_twi.h>
#include <mach/board.h>
#include <mach/cpu.h>
+#include "i2c_at91.h"
+
#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */
diff --git a/arch/arm/mach-at91/include/mach/at91_twi.h b/drivers/i2c/busses/i2c-at91.h
similarity index 97%
rename from arch/arm/mach-at91/include/mach/at91_twi.h
rename to drivers/i2c/busses/i2c-at91.h
index bb2880f..0f33ec7 100644
--- a/arch/arm/mach-at91/include/mach/at91_twi.h
+++ b/drivers/i2c/busses/i2c-at91.h
@@ -1,5 +1,5 @@
/*
- * arch/arm/mach-at91/include/mach/at91_twi.h
+ * drivers/i2c/busses/i2c-at91.h
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
@@ -13,8 +13,8 @@
* (at your option) any later version.
*/
-#ifndef AT91_TWI_H
-#define AT91_TWI_H
+#ifndef I2C_AT91_H
+#define I2C_AT91_H
#define AT91_TWI_CR 0x00 /* Control Register */
#define AT91_TWI_START (1 << 0) /* Send a Start Condition */
@@ -65,4 +65,3 @@
#define AT91_TWI_THR 0x34 /* Transmit Holding Register */
#endif
-
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 2/7] at91/i2c: move register header to drivers
2011-07-14 23:52 ` [PATCH 2/7] at91/i2c: " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-15 7:23 ` Jean Delvare
2011-07-15 15:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 21+ messages in thread
From: Jean Delvare @ 2011-07-15 7:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Jean-Christophe,
On Fri, 15 Jul 2011 01:52:00 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: linux-i2c at vger.kernel.org
> ---
> drivers/i2c/busses/i2c-at91.c | 3 ++-
> .../at91_twi.h => drivers/i2c/busses/i2c-at91.h | 7 +++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
> rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)
Why don't you just merge i2c-at91.h into i2c-at91.c then, if it's the
only user?
--
Jean Delvare
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 2/7] at91/i2c: move register header to drivers
2011-07-15 7:23 ` Jean Delvare
@ 2011-07-15 15:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-15 15:49 UTC (permalink / raw)
To: linux-arm-kernel
On 09:23 Fri 15 Jul , Jean Delvare wrote:
> Hi Jean-Christophe,
>
> On Fri, 15 Jul 2011 01:52:00 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: linux-i2c at vger.kernel.org
> > ---
> > drivers/i2c/busses/i2c-at91.c | 3 ++-
> > .../at91_twi.h => drivers/i2c/busses/i2c-at91.h | 7 +++----
> > 2 files changed, 5 insertions(+), 5 deletions(-)
> > rename arch/arm/mach-at91/include/mach/at91_twi.h => drivers/i2c/busses/i2c-at91.h (97%)
>
> Why don't you just merge i2c-at91.h into i2c-at91.c then, if it's the
> only user?
I prefer to keep the define in a seperate file
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 3/7] at91_mci: move register header to drivers
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 2/7] at91/i2c: " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 4/7] at91: remove non used at91_spi.h Jean-Christophe PLAGNIOL-VILLARD
` (3 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-mmc at vger.kernel.org
---
drivers/mmc/host/at91_mci.c | 3 ++-
.../include/mach => drivers/mmc/host}/at91_mci.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
rename {arch/arm/mach-at91/include/mach => drivers/mmc/host}/at91_mci.h (99%)
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index d3e6a96..a4aa3af 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -77,7 +77,8 @@
#include <mach/board.h>
#include <mach/cpu.h>
-#include <mach/at91_mci.h>
+
+#include "at91_mci.h"
#define DRIVER_NAME "at91_mci"
diff --git a/arch/arm/mach-at91/include/mach/at91_mci.h b/drivers/mmc/host/at91_mci.h
similarity index 99%
rename from arch/arm/mach-at91/include/mach/at91_mci.h
rename to drivers/mmc/host/at91_mci.h
index 02182c1..eec3a6b 100644
--- a/arch/arm/mach-at91/include/mach/at91_mci.h
+++ b/drivers/mmc/host/at91_mci.h
@@ -1,5 +1,5 @@
/*
- * arch/arm/mach-at91/include/mach/at91_mci.h
+ * drivers/mmc/host/at91_mci.h
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 2/7] at91/i2c: " Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 3/7] at91_mci: " Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-15 11:47 ` Detlef Vollmann
2011-07-14 23:52 ` [PATCH 5/7] at91: remove non used at91_ssc.h Jean-Christophe PLAGNIOL-VILLARD
` (2 subsequent siblings)
5 siblings, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/mach-at91/include/mach/at91_spi.h | 81 ----------------------------
1 files changed, 0 insertions(+), 81 deletions(-)
delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h
diff --git a/arch/arm/mach-at91/include/mach/at91_spi.h b/arch/arm/mach-at91/include/mach/at91_spi.h
deleted file mode 100644
index 2f6ba0c..0000000
--- a/arch/arm/mach-at91/include/mach/at91_spi.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/at91_spi.h
- *
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
- * Serial Peripheral Interface (SPI) registers.
- * Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef AT91_SPI_H
-#define AT91_SPI_H
-
-#define AT91_SPI_CR 0x00 /* Control Register */
-#define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */
-#define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */
-#define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */
-#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
-
-#define AT91_SPI_MR 0x04 /* Mode Register */
-#define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */
-#define AT91_SPI_PS (1 << 1) /* Peripheral Select */
-#define AT91_SPI_PS_FIXED (0 << 1)
-#define AT91_SPI_PS_VARIABLE (1 << 1)
-#define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */
-#define AT91_SPI_DIV32 (1 << 3) /* Clock Selection [AT91RM9200 only] */
-#define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */
-#define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */
-#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
-#define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */
-
-#define AT91_SPI_RDR 0x08 /* Receive Data Register */
-#define AT91_SPI_RD (0xffff << 0) /* Receive Data */
-#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
-
-#define AT91_SPI_TDR 0x0c /* Transmit Data Register */
-#define AT91_SPI_TD (0xffff << 0) /* Transmit Data */
-#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
-#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
-
-#define AT91_SPI_SR 0x10 /* Status Register */
-#define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */
-#define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */
-#define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */
-#define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */
-#define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */
-#define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */
-#define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */
-#define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */
-#define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */
-#define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */
-#define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */
-
-#define AT91_SPI_IER 0x14 /* Interrupt Enable Register */
-#define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */
-#define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */
-
-#define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */
-#define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */
-#define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */
-#define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */
-#define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */
-#define AT91_SPI_BITS_8 (0 << 4)
-#define AT91_SPI_BITS_9 (1 << 4)
-#define AT91_SPI_BITS_10 (2 << 4)
-#define AT91_SPI_BITS_11 (3 << 4)
-#define AT91_SPI_BITS_12 (4 << 4)
-#define AT91_SPI_BITS_13 (5 << 4)
-#define AT91_SPI_BITS_14 (6 << 4)
-#define AT91_SPI_BITS_15 (7 << 4)
-#define AT91_SPI_BITS_16 (8 << 4)
-#define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */
-#define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */
-#define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */
-
-#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-14 23:52 ` [PATCH 4/7] at91: remove non used at91_spi.h Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-15 11:47 ` Detlef Vollmann
2011-07-15 15:46 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 21+ messages in thread
From: Detlef Vollmann @ 2011-07-15 11:47 UTC (permalink / raw)
To: linux-arm-kernel
Sorry, I couldn't find a summary message for this patch series,
so I picked this one to reply, because this one hurts me most.
On 07/15/11 01:52, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre<nicolas.ferre@atmel.com>
> ---
> arch/arm/mach-at91/include/mach/at91_spi.h | 81
----------------------------
> 1 files changed, 0 insertions(+), 81 deletions(-)
> delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h
[...]
First, I'm actually using mach/at91_spi.h in an SPI slave driver.
And I'm using arch/arm/mach-at91/include/mach/at91_spi.h instead of
drivers/spi/atmel_spi.h (which still exists in the kernel version
we use here), because arch/arm/mach-at91/include/mach/at91_spi.h
is accessible from an out-of-tree driver w/o extra effort.
And this applies to all all of those header files, so I'm
really against all patches in this series.
Detlef
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-15 11:47 ` Detlef Vollmann
@ 2011-07-15 15:46 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-15 16:44 ` Detlef Vollmann
0 siblings, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-15 15:46 UTC (permalink / raw)
To: linux-arm-kernel
On 13:47 Fri 15 Jul , Detlef Vollmann wrote:
> Sorry, I couldn't find a summary message for this patch series,
> so I picked this one to reply, because this one hurts me most.
>
> On 07/15/11 01:52, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre<nicolas.ferre@atmel.com>
> > ---
> > arch/arm/mach-at91/include/mach/at91_spi.h | 81
> ----------------------------
> > 1 files changed, 0 insertions(+), 81 deletions(-)
> > delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h
> [...]
>
> First, I'm actually using mach/at91_spi.h in an SPI slave driver.
> And I'm using arch/arm/mach-at91/include/mach/at91_spi.h instead of
> drivers/spi/atmel_spi.h (which still exists in the kernel version
> we use here), because arch/arm/mach-at91/include/mach/at91_spi.h
> is accessible from an out-of-tree driver w/o extra effort.
>
> And this applies to all all of those header files, so I'm
> really against all patches in this series.
You need the use SPI framework for this
Out of tree driver is not enough good reason to keep it
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-15 15:46 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-15 16:44 ` Detlef Vollmann
2011-07-16 10:57 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 21+ messages in thread
From: Detlef Vollmann @ 2011-07-15 16:44 UTC (permalink / raw)
To: linux-arm-kernel
On 07/15/11 17:46, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 13:47 Fri 15 Jul , Detlef Vollmann wrote:
>> Sorry, I couldn't find a summary message for this patch series,
>> so I picked this one to reply, because this one hurts me most.
>>
>> On 07/15/11 01:52, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
>>> Cc: Nicolas Ferre<nicolas.ferre@atmel.com>
>>> ---
>>> arch/arm/mach-at91/include/mach/at91_spi.h | 81
>> ----------------------------
>>> 1 files changed, 0 insertions(+), 81 deletions(-)
>>> delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h
>> [...]
>>
>> First, I'm actually using mach/at91_spi.h in an SPI slave driver.
>> And I'm using arch/arm/mach-at91/include/mach/at91_spi.h instead of
>> drivers/spi/atmel_spi.h (which still exists in the kernel version
>> we use here), because arch/arm/mach-at91/include/mach/at91_spi.h
>> is accessible from an out-of-tree driver w/o extra effort.
>>
>> And this applies to all all of those header files, so I'm
>> really against all patches in this series.
> You need the use SPI framework for this
I think you reply here to the wrong part of my message.
This part here is about the whole patch series, as I didn't
get a summary message for the patch series.
About the SPI driver:
From Documentation/spi/spi-summary:
"At this writing, Linux has no slave side programming interface."
So there's no SPI framwork that covers the slave side.
> Out of tree driver is not enough good reason to keep it
As there's currently no slave support in-tree, any Linux device
that's an SPI slave needs an out-of-tree driver.
And again, there's no rationale given for moving all the other
headers from an genarally accessible place to a generally
inaccessible place, so I'm still against the whole patch series.
Regards,
Detlef
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-15 16:44 ` Detlef Vollmann
@ 2011-07-16 10:57 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-16 11:56 ` Wolfram Sang
2011-07-16 13:41 ` Detlef Vollmann
0 siblings, 2 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-16 10:57 UTC (permalink / raw)
To: linux-arm-kernel
On 18:44 Fri 15 Jul , Detlef Vollmann wrote:
> On 07/15/11 17:46, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >On 13:47 Fri 15 Jul , Detlef Vollmann wrote:
> >>Sorry, I couldn't find a summary message for this patch series,
> >>so I picked this one to reply, because this one hurts me most.
> >>
> >>On 07/15/11 01:52, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
> >>>Cc: Nicolas Ferre<nicolas.ferre@atmel.com>
> >>>---
> >>> arch/arm/mach-at91/include/mach/at91_spi.h | 81
> >>----------------------------
> >>> 1 files changed, 0 insertions(+), 81 deletions(-)
> >>> delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h
> >>[...]
> >>
> >>First, I'm actually using mach/at91_spi.h in an SPI slave driver.
> >>And I'm using arch/arm/mach-at91/include/mach/at91_spi.h instead of
> >>drivers/spi/atmel_spi.h (which still exists in the kernel version
> >>we use here), because arch/arm/mach-at91/include/mach/at91_spi.h
> >>is accessible from an out-of-tree driver w/o extra effort.
> >>
> >>And this applies to all all of those header files, so I'm
> >>really against all patches in this series.
> >You need the use SPI framework for this
> I think you reply here to the wrong part of my message.
> This part here is about the whole patch series, as I didn't
> get a summary message for the patch series.
>
> About the SPI driver:
> From Documentation/spi/spi-summary:
> "At this writing, Linux has no slave side programming interface."
> So there's no SPI framwork that covers the slave side.
This what I mean use the SPI framework and add the SPI Slave support there
>
> >Out of tree driver is not enough good reason to keep it
> As there's currently no slave support in-tree, any Linux device
> that's an SPI slave needs an out-of-tree driver.
>
> And again, there's no rationale given for moving all the other
> headers from an genarally accessible place to a generally
> inaccessible place, so I'm still against the whole patch series.
those information are driver and IP related keep them in the
arch/arm/mach-at91 make those driver difficult to share cross arch
for the SPI this IP is shared between avr2 and arm so keep it in arch is not
acceptable at all
So if you want to add the SPI Slave support you must make is available for
both ARCH
so NACK to keep this one and the drivers/spi/atmel_spi.h and
arch/arm/mach-at91/include/mach/at91_spi.h contain the same information
so we drop the one not used
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-16 10:57 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-16 11:56 ` Wolfram Sang
2011-07-16 14:00 ` Detlef Vollmann
2011-07-16 13:41 ` Detlef Vollmann
1 sibling, 1 reply; 21+ messages in thread
From: Wolfram Sang @ 2011-07-16 11:56 UTC (permalink / raw)
To: linux-arm-kernel
> > About the SPI driver:
> > From Documentation/spi/spi-summary:
> > "At this writing, Linux has no slave side programming interface."
> > So there's no SPI framwork that covers the slave side.
> This what I mean use the SPI framework and add the SPI Slave support there
[CCing spi-devel]
If you talk about SPI slaves, be sure to have read Grant's comments in
http://thread.gmane.org/gmane.linux.kernel.spi.devel/7401
to see what would be needed for slave support. Short note: Would be
seperate subsystem, master subsystem is of limited use. I think a few
slave-drivers would be nice to evaluate, so one can get a feeling if a
subsystem makes sense and if so, how it could look like.
Detlef, have you posted your slave driver so far?
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110716/3aee55a5/attachment.sig>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-16 11:56 ` Wolfram Sang
@ 2011-07-16 14:00 ` Detlef Vollmann
2011-07-17 2:33 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 21+ messages in thread
From: Detlef Vollmann @ 2011-07-16 14:00 UTC (permalink / raw)
To: linux-arm-kernel
On 07/16/11 13:56, Wolfram Sang wrote:
>
>>> About the SPI driver:
>>> From Documentation/spi/spi-summary:
>>> "At this writing, Linux has no slave side programming interface."
>>> So there's no SPI framwork that covers the slave side.
>> This what I mean use the SPI framework and add the SPI Slave support there
>
> [CCing spi-devel]
>
> If you talk about SPI slaves, be sure to have read Grant's comments in
>
> http://thread.gmane.org/gmane.linux.kernel.spi.devel/7401
>
> to see what would be needed for slave support.
I completely agree with Gran't comments here.
> Short note: Would be
> seperate subsystem, master subsystem is of limited use. I think a few
> slave-drivers would be nice to evaluate, so one can get a feeling if a
> subsystem makes sense and if so, how it could look like.
>
> Detlef, have you posted your slave driver so far?
No, and I didn't plan to do so.
Not because I don't want to publish it, if you want to look at it,
I'm happy to send the driver.
But I don't think it makes much sense to put my driver into mainline
Linux.
The reason for this is very simple: the protocol is specific for this
hardware, and the driver needs this specific protocol.
The Atmel hardware is not able to maintain information about frame
ends when running in DMA mode, so we need to put the length of the
frame to the beginning of the frame, and also need to put in some
extra information to be able to re-sync in case of transmission errors.
So this driver is very specific for this hardware, and I wrote SPI
slave drivers in the past for other hardware that were also very
specific. I really doubt that an SPI slave framework really makes
sense.
And that's the reason why I'm keen that the hardware description
headers are available to out-of-tree drivers.
Detlef
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-16 14:00 ` Detlef Vollmann
@ 2011-07-17 2:33 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-17 2:33 UTC (permalink / raw)
To: linux-arm-kernel
On 16:00 Sat 16 Jul , Detlef Vollmann wrote:
> On 07/16/11 13:56, Wolfram Sang wrote:
> >
> >>>About the SPI driver:
> >>> From Documentation/spi/spi-summary:
> >>>"At this writing, Linux has no slave side programming interface."
> >>>So there's no SPI framwork that covers the slave side.
> >>This what I mean use the SPI framework and add the SPI Slave support there
> >
> >[CCing spi-devel]
> >
> >If you talk about SPI slaves, be sure to have read Grant's comments in
> >
> >http://thread.gmane.org/gmane.linux.kernel.spi.devel/7401
> >
> >to see what would be needed for slave support.
> I completely agree with Gran't comments here.
>
> >Short note: Would be
> >seperate subsystem, master subsystem is of limited use. I think a few
> >slave-drivers would be nice to evaluate, so one can get a feeling if a
> >subsystem makes sense and if so, how it could look like.
> >
> >Detlef, have you posted your slave driver so far?
> No, and I didn't plan to do so.
> Not because I don't want to publish it, if you want to look at it,
> I'm happy to send the driver.
> But I don't think it makes much sense to put my driver into mainline
> Linux.
> The reason for this is very simple: the protocol is specific for this
> hardware, and the driver needs this specific protocol.
> The Atmel hardware is not able to maintain information about frame
> ends when running in DMA mode, so we need to put the length of the
> frame to the beginning of the frame, and also need to put in some
> extra information to be able to re-sync in case of transmission errors.
>
> So this driver is very specific for this hardware, and I wrote SPI
> slave drivers in the past for other hardware that were also very
> specific. I really doubt that an SPI slave framework really makes
> sense.
>
> And that's the reason why I'm keen that the hardware description
> headers are available to out-of-tree drivers.
So I'm sorry but this is clear I'm not going to keep the header
out-of-tree drivers are not an enough reason to keep it
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-16 10:57 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-16 11:56 ` Wolfram Sang
@ 2011-07-16 13:41 ` Detlef Vollmann
2011-07-17 2:36 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 21+ messages in thread
From: Detlef Vollmann @ 2011-07-16 13:41 UTC (permalink / raw)
To: linux-arm-kernel
On 07/16/11 12:57, Jean-Christophe PLAGNIOL-VILLARD wrote:
> for the SPI this IP is shared between avr2 and arm so keep it in arch is not
> acceptable at all
Thanks. This was the motivation I missed.
In this case I think such include files should go somewhere under
include, so they can be accessed by other drivers.
And this is really not only true for this at91_spi.h, but also
for the other headers in this patch series.
Detlef
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/7] at91: remove non used at91_spi.h
2011-07-16 13:41 ` Detlef Vollmann
@ 2011-07-17 2:36 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-18 7:35 ` Andrew Victor
0 siblings, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-17 2:36 UTC (permalink / raw)
To: linux-arm-kernel
On 15:41 Sat 16 Jul , Detlef Vollmann wrote:
> On 07/16/11 12:57, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >for the SPI this IP is shared between avr2 and arm so keep it in arch is not
> >acceptable at all
> Thanks. This was the motivation I missed.
> In this case I think such include files should go somewhere under
> include, so they can be accessed by other drivers.
> And this is really not only true for this at91_spi.h, but also
> for the other headers in this patch series.
no we already have the header in drivers/spi so this one not used at all in
the mainline is drop
if you need to atmel_spi.h for mainline for other drivers you need to post
your patch.
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 5/7] at91: remove non used at91_ssc.h
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
` (2 preceding siblings ...)
2011-07-14 23:52 ` [PATCH 4/7] at91: remove non used at91_spi.h Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 6/7] at91rm9200/rtc: move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 7/7] at91sam9/wdt: " Jean-Christophe PLAGNIOL-VILLARD
5 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/mach-at91/include/mach/at91_ssc.h | 106 ----------------------------
1 files changed, 0 insertions(+), 106 deletions(-)
delete mode 100644 arch/arm/mach-at91/include/mach/at91_ssc.h
diff --git a/arch/arm/mach-at91/include/mach/at91_ssc.h b/arch/arm/mach-at91/include/mach/at91_ssc.h
deleted file mode 100644
index a81114c..0000000
--- a/arch/arm/mach-at91/include/mach/at91_ssc.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/at91_ssc.h
- *
- * Copyright (C) SAN People
- *
- * Serial Synchronous Controller (SSC) registers.
- * Based on AT91RM9200 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef AT91_SSC_H
-#define AT91_SSC_H
-
-#define AT91_SSC_CR 0x00 /* Control Register */
-#define AT91_SSC_RXEN (1 << 0) /* Receive Enable */
-#define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */
-#define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */
-#define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */
-#define AT91_SSC_SWRST (1 << 15) /* Software Reset */
-
-#define AT91_SSC_CMR 0x04 /* Clock Mode Register */
-#define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */
-
-#define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */
-#define AT91_SSC_CKS (3 << 0) /* Clock Selection */
-#define AT91_SSC_CKS_DIV (0 << 0)
-#define AT91_SSC_CKS_CLOCK (1 << 0)
-#define AT91_SSC_CKS_PIN (2 << 0)
-#define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */
-#define AT91_SSC_CKO_NONE (0 << 2)
-#define AT91_SSC_CKO_CONTINUOUS (1 << 2)
-#define AT91_SSC_CKI (1 << 5) /* Clock Inversion */
-#define AT91_SSC_CKI_FALLING (0 << 5)
-#define AT91_SSC_CK_RISING (1 << 5)
-#define AT91_SSC_CKG (1 << 6) /* Receive Clock Gating Selection [AT91SAM9261 only] */
-#define AT91_SSC_CKG_NONE (0 << 6)
-#define AT91_SSC_CKG_RFLOW (1 << 6)
-#define AT91_SSC_CKG_RFHIGH (2 << 6)
-#define AT91_SSC_START (0xf << 8) /* Start Selection */
-#define AT91_SSC_START_CONTINUOUS (0 << 8)
-#define AT91_SSC_START_TX_RX (1 << 8)
-#define AT91_SSC_START_LOW_RF (2 << 8)
-#define AT91_SSC_START_HIGH_RF (3 << 8)
-#define AT91_SSC_START_FALLING_RF (4 << 8)
-#define AT91_SSC_START_RISING_RF (5 << 8)
-#define AT91_SSC_START_LEVEL_RF (6 << 8)
-#define AT91_SSC_START_EDGE_RF (7 << 8)
-#define AT91_SSC_STOP (1 << 12) /* Receive Stop Selection [AT91SAM9261 only] */
-#define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */
-#define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */
-
-#define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */
-#define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */
-#define AT91_SSC_LOOP (1 << 5) /* Loop Mode */
-#define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */
-#define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */
-#define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */
-#define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */
-#define AT91_SSC_FSOS_NONE (0 << 20)
-#define AT91_SSC_FSOS_NEGATIVE (1 << 20)
-#define AT91_SSC_FSOS_POSITIVE (2 << 20)
-#define AT91_SSC_FSOS_LOW (3 << 20)
-#define AT91_SSC_FSOS_HIGH (4 << 20)
-#define AT91_SSC_FSOS_TOGGLE (5 << 20)
-#define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */
-#define AT91_SSC_FSEDGE_POSITIVE (0 << 24)
-#define AT91_SSC_FSEDGE_NEGATIVE (1 << 24)
-
-#define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */
-#define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */
-#define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */
-#define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */
-
-#define AT91_SSC_RHR 0x20 /* Receive Holding Register */
-#define AT91_SSC_THR 0x24 /* Transmit Holding Register */
-#define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */
-#define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */
-
-#define AT91_SSC_RC0R 0x38 /* Receive Compare 0 Register [AT91SAM9261 only] */
-#define AT91_SSC_RC1R 0x3c /* Receive Compare 1 Register [AT91SAM9261 only] */
-
-#define AT91_SSC_SR 0x40 /* Status Register */
-#define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */
-#define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */
-#define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */
-#define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */
-#define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */
-#define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */
-#define AT91_SSC_ENDRX (1 << 6) /* End of Reception */
-#define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */
-#define AT91_SSC_CP0 (1 << 8) /* Compare 0 [AT91SAM9261 only] */
-#define AT91_SSC_CP1 (1 << 9) /* Compare 1 [AT91SAM9261 only] */
-#define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */
-#define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */
-#define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */
-#define AT91_SSC_RXENA (1 << 17) /* Receive Enable */
-
-#define AT91_SSC_IER 0x44 /* Interrupt Enable Register */
-#define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */
-#define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */
-
-#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 6/7] at91rm9200/rtc: move register header to drivers
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
` (3 preceding siblings ...)
2011-07-14 23:52 ` [PATCH 5/7] at91: remove non used at91_ssc.h Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-14 23:52 ` [PATCH 7/7] at91sam9/wdt: " Jean-Christophe PLAGNIOL-VILLARD
5 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: rtc-linux at googlegroups.com
---
drivers/rtc/rtc-at91rm9200.c | 2 +-
.../at91_rtc.h => drivers/rtc/rtc-at91rm9200.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/mach-at91/include/mach/at91_rtc.h => drivers/rtc/rtc-at91rm9200.h (98%)
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index e39b77a..b916bd3 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -30,7 +30,7 @@
#include <asm/uaccess.h>
-#include <mach/at91_rtc.h>
+#include "rtc-at91rm9200.h"
#define AT91_RTC_EPOCH 1900UL /* just like arch/arm/common/rtctime.c */
diff --git a/arch/arm/mach-at91/include/mach/at91_rtc.h b/drivers/rtc/rtc-at91rm9200.h
similarity index 98%
rename from arch/arm/mach-at91/include/mach/at91_rtc.h
rename to drivers/rtc/rtc-at91rm9200.h
index e56f470..cb2f7c6 100644
--- a/arch/arm/mach-at91/include/mach/at91_rtc.h
+++ b/drivers/rtc/rtc-at91rm9200.h
@@ -1,5 +1,5 @@
/*
- * arch/arm/mach-at91/include/mach/at91_rtc.h
+ * drivers/rtc/rtc-at91rm9200.h
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH 7/7] at91sam9/wdt: move register header to drivers
2011-07-14 23:51 [PATCH 1/7] at91rm9200: emac move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
` (4 preceding siblings ...)
2011-07-14 23:52 ` [PATCH 6/7] at91rm9200/rtc: move register header to drivers Jean-Christophe PLAGNIOL-VILLARD
@ 2011-07-14 23:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-15 11:04 ` Wim Van Sebroeck
2011-07-22 18:28 ` Wim Van Sebroeck
5 siblings, 2 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-07-14 23:52 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-watchdog at vger.kernel.org
---
drivers/watchdog/at91sam9_wdt.c | 2 +-
.../at91_wdt.h => drivers/watchdog/at91sam9_wdt.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/mach-at91/include/mach/at91_wdt.h => drivers/watchdog/at91sam9_wdt.h (96%)
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index eac2602..98ee810 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -31,7 +31,7 @@
#include <linux/bitops.h>
#include <linux/uaccess.h>
-#include <mach/at91_wdt.h>
+#include "at91sam9_wdt.h"
#define DRV_NAME "AT91SAM9 Watchdog"
diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/drivers/watchdog/at91sam9_wdt.h
similarity index 96%
rename from arch/arm/mach-at91/include/mach/at91_wdt.h
rename to drivers/watchdog/at91sam9_wdt.h
index fecc2e9..757f9ca 100644
--- a/arch/arm/mach-at91/include/mach/at91_wdt.h
+++ b/drivers/watchdog/at91sam9_wdt.h
@@ -1,5 +1,5 @@
/*
- * arch/arm/mach-at91/include/mach/at91_wdt.h
+ * drivers/watchdog/at91sam9_wdt.h
*
* Copyright (C) 2007 Andrew Victor
* Copyright (C) 2007 Atmel Corporation.
--
1.7.5.4
^ permalink raw reply related [flat|nested] 21+ messages in thread