Skip to contentSkip to conversation

at91rm9200: emac move register header to drivers

PATCH New Jean-Christophe PLAGNIOL-VILLARD 6 participants 21 messages Jul 14, 2011 – Jul 22, 2011

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

PATCH 1/7 at91rm9200: emac move register header to drivers

move from mach-at91/include/mach/at91rm9200_emac.h to drivers/net/arm/at91_ether.h

Cc Nicolas Ferre <[email protected]>
Cc netdev at vger.kernel.org
---
 drivers/net/arm/at91_ether.c                       |    1 -
 .../net/arm/at91_ether.h                           |  112 ++++++++++++++++++--
 2 files changed, 101 insertions(+), 12 deletions(-)
 rename arch/arm/mach-at91/include/mach/at91rm9200_emac.h => drivers/net/arm/at91_ether.h (65%)
drivers/net/arm/at91_ether.c +0 -1
index e07b314..8f0b212 100644
@@ -33,7 +33,6 @@
 #include <asm/uaccess.h>
 #include <asm/mach-types.h>
 
-#include <mach/at91rm9200_emac.h>
 #include <mach/gpio.h>
 #include <mach/board.h>
 
drivers/net/arm/at91_ether.h renamed from arch/arm/mach-at91/include/mach/at91rm9200_emac.h +101 -11

126 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 2/7 at91/i2c: move register header to drivers

Cc Nicolas Ferre <[email protected]>
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%)
drivers/i2c/busses/i2c-at91.c +2 -1
index 305c075..7402fed 100644
@@ -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 */
 
 
drivers/i2c/busses/i2c-at91.h renamed from arch/arm/mach-at91/include/mach/at91_twi.h +3 -4
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
@@ -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
-
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/7 at91/i2c: move register header to drivers

Hi Jean-Christophe,

Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
Cc Nicolas Ferre <[email protected]>
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?

Signature · 1 line
Jean Delvare
#3 lore raw

PATCH 2/7 at91/i2c: move register header to drivers

Quoted 12 lines · Jean Delvare

Hi Jean-Christophe,

Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
Cc Nicolas Ferre <[email protected]>
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%)
Quoted 2 lines

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.

#4 lore raw

PATCH 3/7 at91_mci: move register header to drivers

In reply to Jean-Christophe PLAGNIOL-VILLARD
Cc Nicolas Ferre <[email protected]>
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%)
drivers/mmc/host/at91_mci.c +2 -1
index d3e6a96..a4aa3af 100644
@@ -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"
 
drivers/mmc/host/at91_mci.h renamed from arch/arm/mach-at91/include/mach/at91_mci.h +1 -1
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
@@ -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
Signature · 1 line
1.7.5.4
#5 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 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
arch/arm/mach-at91/include/mach/at91_spi.h deleted +0 -81
deleted file mode 100644
index 2f6ba0c..0000000
@@ -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
Signature · 1 line
1.7.5.4
#6 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

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.

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
---
  arch/arm/mach-at91/include/mach/at91_spi.h |   81 

----------------------------

Quoted 2 lines
  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

#7 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 13 lines · Detlef Vollmann

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.

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
---
  arch/arm/mach-at91/include/mach/at91_spi.h |   81

----------------------------

Quoted 2 lines
  1 files changed, 0 insertions(+), 81 deletions(-)

delete mode 100644 arch/arm/mach-at91/include/mach/at91_spi.h

[...]

Quoted 8 lines

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.

#8 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 20 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 19 lines · Detlef Vollmann

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.

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
---
   arch/arm/mach-at91/include/mach/at91_spi.h |   81

----------------------------

Quoted 2 lines
   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.

Quoted 3 lines
Quoted 2 lines

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.

Quoted 1 line

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

#9 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 24 lines · Detlef Vollmann
Quoted 20 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 19 lines · Detlef Vollmann

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.

Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
---
  arch/arm/mach-at91/include/mach/at91_spi.h |   81

----------------------------

Quoted 2 lines
  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.

Quoted 3 lines
Quoted 2 lines

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

Quoted 8 lines

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

Quoted 8 lines
Quoted 2 lines

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.

#10 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 6 lines
Quoted 5 lines

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

Signature · 9 lines
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>
#11 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 7 lines · Wolfram Sang
Quoted 6 lines
Quoted 5 lines

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

Quoted 7 lines

[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.

Quoted 6 lines

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

#12 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 35 lines · Detlef Vollmann
Quoted 7 lines · Wolfram Sang
Quoted 6 lines
Quoted 5 lines

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

Quoted 7 lines

[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.

Quoted 6 lines

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.

Quoted 7 lines

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.

#13 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD

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

#14 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

Quoted 8 lines · Detlef Vollmann
Quoted 2 lines · Jean-Christophe PLAGNIOL-VILLARD

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.

#15 lore raw

PATCH 4/7 at91: remove non used at91_spi.h

hi,

Quoted 2 lines

if you need to atmel_spi.h for mainline for other drivers you need to post your patch.

The at91_spi.h header is also use by the original SPI stack. The atmel_spi and mtd_dataflash don't work properly for AT91RM9200-based boards, therefore out-of-tree drivers need to be used.
http://maxim.org.za/at91_26.html
(And I have spent way too many hours trying to get atmel_spi to work)

Regards,
Andrew Victor

#16 lore raw

PATCH 5/7 at91: remove non used at91_ssc.h

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 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
arch/arm/mach-at91/include/mach/at91_ssc.h deleted +0 -106
deleted file mode 100644
index a81114c..0000000
@@ -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
Signature · 1 line
1.7.5.4
#17 lore raw

PATCH 6/7 at91rm9200/rtc: move register header to drivers

In reply to Jean-Christophe PLAGNIOL-VILLARD
Cc Nicolas Ferre <[email protected]>
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%)
drivers/rtc/rtc-at91rm9200.c +1 -1
index e39b77a..b916bd3 100644
@@ -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 */
drivers/rtc/rtc-at91rm9200.h renamed from arch/arm/mach-at91/include/mach/at91_rtc.h +1 -1
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
@@ -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
Signature · 1 line
1.7.5.4
#18 lore raw

PATCH 7/7 at91sam9/wdt: move register header to drivers

In reply to Jean-Christophe PLAGNIOL-VILLARD
Cc Nicolas Ferre <[email protected]>
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%)
drivers/watchdog/at91sam9_wdt.c +1 -1
index eac2602..98ee810 100644
@@ -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"
 
drivers/watchdog/at91sam9_wdt.h renamed from arch/arm/mach-at91/include/mach/at91_wdt.h +1 -1
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
@@ -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.
Signature · 1 line
1.7.5.4
#20 lore raw

PATCH 7/7 at91sam9/wdt: move register header to drivers

In reply to Jean-Christophe PLAGNIOL-VILLARD

Hi Jean-Christophe,

Quoted 8 lines
Cc Nicolas Ferre <[email protected]>
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%)

Added this patch to the linux-2.6-watchdog-next tree.

Kind regards,
Wim.