From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
spi-devel-general@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 1/8] powerpc/cpm: Remove SPI defines and spi structs
Date: Wed, 19 Aug 2009 02:04:10 +0400 [thread overview]
Message-ID: <20090818220410.GA25090@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20090818220304.GA23640@oksana.dev.rtsoft.ru>
When cpm2.h included into spi_mpc8xxx driver, the SPI defines
in the header conflict with defines in the driver.
We don't need them in the header file, so remove them. Plus
remove "struct spi", we'll use a better version in the driver.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/include/asm/cpm1.h | 45 ---------------------------------------
arch/powerpc/include/asm/cpm2.h | 39 ---------------------------------
2 files changed, 0 insertions(+), 84 deletions(-)
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h
index 7685ffd..81b0119 100644
--- a/arch/powerpc/include/asm/cpm1.h
+++ b/arch/powerpc/include/asm/cpm1.h
@@ -478,51 +478,6 @@ typedef struct iic {
char res2[2]; /* Reserved */
} iic_t;
-/* SPI parameter RAM.
-*/
-typedef struct spi {
- ushort spi_rbase; /* Rx Buffer descriptor base address */
- ushort spi_tbase; /* Tx Buffer descriptor base address */
- u_char spi_rfcr; /* Rx function code */
- u_char spi_tfcr; /* Tx function code */
- ushort spi_mrblr; /* Max receive buffer length */
- uint spi_rstate; /* Internal */
- uint spi_rdp; /* Internal */
- ushort spi_rbptr; /* Internal */
- ushort spi_rbc; /* Internal */
- uint spi_rxtmp; /* Internal */
- uint spi_tstate; /* Internal */
- uint spi_tdp; /* Internal */
- ushort spi_tbptr; /* Internal */
- ushort spi_tbc; /* Internal */
- uint spi_txtmp; /* Internal */
- uint spi_res;
- ushort spi_rpbase; /* Relocation pointer */
- ushort spi_res2;
-} spi_t;
-
-/* SPI Mode register.
-*/
-#define SPMODE_LOOP ((ushort)0x4000) /* Loopback */
-#define SPMODE_CI ((ushort)0x2000) /* Clock Invert */
-#define SPMODE_CP ((ushort)0x1000) /* Clock Phase */
-#define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */
-#define SPMODE_REV ((ushort)0x0400) /* Reversed Data */
-#define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */
-#define SPMODE_EN ((ushort)0x0100) /* Enable */
-#define SPMODE_LENMSK ((ushort)0x00f0) /* character length */
-#define SPMODE_LEN4 ((ushort)0x0030) /* 4 bits per char */
-#define SPMODE_LEN8 ((ushort)0x0070) /* 8 bits per char */
-#define SPMODE_LEN16 ((ushort)0x00f0) /* 16 bits per char */
-#define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */
-
-/* SPIE fields */
-#define SPIE_MME 0x20
-#define SPIE_TXE 0x10
-#define SPIE_BSY 0x04
-#define SPIE_TXB 0x02
-#define SPIE_RXB 0x01
-
/*
* RISC Controller Configuration Register definitons
*/
diff --git a/arch/powerpc/include/asm/cpm2.h b/arch/powerpc/include/asm/cpm2.h
index 990ff19..236cfa3 100644
--- a/arch/powerpc/include/asm/cpm2.h
+++ b/arch/powerpc/include/asm/cpm2.h
@@ -654,45 +654,6 @@ typedef struct iic {
uint iic_txtmp; /* Internal */
} iic_t;
-/* SPI parameter RAM.
-*/
-typedef struct spi {
- ushort spi_rbase; /* Rx Buffer descriptor base address */
- ushort spi_tbase; /* Tx Buffer descriptor base address */
- u_char spi_rfcr; /* Rx function code */
- u_char spi_tfcr; /* Tx function code */
- ushort spi_mrblr; /* Max receive buffer length */
- uint spi_rstate; /* Internal */
- uint spi_rdp; /* Internal */
- ushort spi_rbptr; /* Internal */
- ushort spi_rbc; /* Internal */
- uint spi_rxtmp; /* Internal */
- uint spi_tstate; /* Internal */
- uint spi_tdp; /* Internal */
- ushort spi_tbptr; /* Internal */
- ushort spi_tbc; /* Internal */
- uint spi_txtmp; /* Internal */
- uint spi_res; /* Tx temp. */
- uint spi_res1[4]; /* SDMA temp. */
-} spi_t;
-
-/* SPI Mode register.
-*/
-#define SPMODE_LOOP ((ushort)0x4000) /* Loopback */
-#define SPMODE_CI ((ushort)0x2000) /* Clock Invert */
-#define SPMODE_CP ((ushort)0x1000) /* Clock Phase */
-#define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */
-#define SPMODE_REV ((ushort)0x0400) /* Reversed Data */
-#define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */
-#define SPMODE_EN ((ushort)0x0100) /* Enable */
-#define SPMODE_LENMSK ((ushort)0x00f0) /* character length */
-#define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */
-
-#define SPMODE_LEN(x) ((((x)-1)&0xF)<<4)
-#define SPMODE_PM(x) ((x) &0xF)
-
-#define SPI_EB ((u_char)0x10) /* big endian byte order */
-
/* IDMA parameter RAM
*/
typedef struct idma {
--
1.6.3.3
next prev parent reply other threads:[~2009-08-18 22:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 22:03 [PATCH v2 0/8] spi_mpc8xxx: Add support for DMA transfers Anton Vorontsov
2009-08-18 22:04 ` Anton Vorontsov [this message]
2009-08-28 5:45 ` [PATCH 1/8] powerpc/cpm: Remove SPI defines and spi structs Kumar Gala
2009-09-28 17:34 ` Anton Vorontsov
2009-08-18 22:04 ` [PATCH 3/8] powerpc/cpm: Move CPMFCR_* defines into cpm.h Anton Vorontsov
[not found] ` <20090818220416.GC25090-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2009-08-28 5:45 ` Kumar Gala
2009-08-18 22:04 ` [PATCH 4/8] powerpc/qe&cpm: Implement static inline stubs for non-QE/CPM builds Anton Vorontsov
2009-08-18 22:27 ` Greg KH
2009-08-18 23:47 ` Anton Vorontsov
2009-08-28 5:45 ` Kumar Gala
[not found] ` <20090818220304.GA23640-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2009-08-18 22:04 ` [PATCH 2/8] powerpc/qe&cpm2: Avoid redefinitions in CPM2 and QE headers Anton Vorontsov
[not found] ` <20090818220415.GB25090-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2009-08-28 5:45 ` Kumar Gala
2009-08-18 22:04 ` [PATCH 5/8] spi_mpc8xxx: Fix uninitialized variable Anton Vorontsov
2009-08-28 5:48 ` Kumar Gala
2009-08-18 22:04 ` [PATCH 6/8] spi_mpc8xxx: Factor out SPI mode change steps into a call Anton Vorontsov
2009-08-18 22:04 ` [PATCH 7/8] spi_mpc8xxx: Turn qe_mode into flags Anton Vorontsov
2009-08-18 22:04 ` [PATCH 8/8] spi_mpc8xxx: Add support for QE DMA mode and CPM1/CPM2 chips Anton Vorontsov
2009-08-28 4:41 ` [PATCH v2 0/8] spi_mpc8xxx: Add support for DMA transfers David Brownell
2009-09-04 16:37 ` Anton Vorontsov
-- strict thread matches above, loose matches on Subject: below --
2009-10-12 16:48 [RESEND][PATCH " Anton Vorontsov
2009-10-12 16:49 ` [PATCH 1/8] powerpc/cpm: Remove SPI defines and spi structs Anton Vorontsov
2009-11-05 13:46 ` Kumar Gala
2009-08-14 22:24 [PATCH 0/8] spi_mpc8xxx: Add support for DMA transfers Anton Vorontsov
2009-08-14 22:25 ` [PATCH 1/8] powerpc/cpm: Remove SPI defines and spi structs Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090818220410.GA25090@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=akpm@linux-foundation.org \
--cc=dbrownell@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).