public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Alex Zeffertt <ajz@cambridgebroadband•com>
To: Kevin Fry <kevin@carts•com>,
	linuxppc-embedded <linuxppc-embedded@lists•linuxppc.org>
Subject: Re: SPI driver?
Date: Tue, 18 Dec 2001 10:54:18 +0000	[thread overview]
Message-ID: <3C1F205A.F851FF62@cambridgebroadband.com> (raw)
In-Reply-To: 3C1F1156.6EBFF01A@cambridgebroadband.com


Alex Zeffertt wrote:
>
> >
> > A link to an 8xx driver would be almost as good. The only one I've found
> > so far has been SPI over a PC's parallel port. heh
>

Kevin,

Sorry, I forgot to add that you need to make the following mods to arch/ppc/8xx_io/commproc.h

Alex

diff -u linux-2.4.4-2001-11-24/arch/ppc/8xx_io/commproc.h
linux-2.4.4-2001-11-24.new/arch/ppc/8xx_io/commproc.h
--- linux-2.4.4-2001-11-24/arch/ppc/8xx_io/commproc.h   Mon Sep 10 16:29:33
2001                                                               +++
linux-2.4.4-2001-11-24.new/arch/ppc/8xx_io/commproc.h       Fri Dec  7 11:54:58 2001
@@ -37,6 +37,7 @@
 #define CPM_CR_RESTART_TX      ((ushort)0x0006)
 #define CPM_CR_SET_GADDR       ((ushort)0x0008)
 #define CPM_CR_SET_TIMER       CPM_CR_SET_GADDR
+#define CPM_CR_CLOSE_RX_BD  ((ushort)0x0007)

 /* Channel numbers.
 */
@@ -93,7 +94,9 @@
 #define BD_SC_PR       ((ushort)0x0008)        /* Parity error */
 #define BD_SC_NAK      ((ushort)0x0004)        /* NAK - did not respond */
 #define BD_SC_OV       ((ushort)0x0002)        /* Overrun */
+#define BD_SC_UN    ((ushort)0x0002)    /* Underrun */
 #define BD_SC_CD       ((ushort)0x0001)        /* ?? */
+#define BD_SC_CL    ((ushort)0x0001)    /* Collision */

 /* Parameter RAM offsets.
 */
@@ -704,7 +707,11 @@
 #define SICR_ENET_MASK ((uint)0x0000ff00)
 #define SICR_ENET_CLKRT        ((uint)0x00003E00)

-#undef USE_IIC_PATCH                           /* We need the I²C µCode Patch */
+#ifdef CONFIG_UCODE_PATCH
+#  define USE_IIC_PATCH
+#else
+#  undef  USE_IIC_PATCH                                /* We need the I²C µCode Patch */
+#endif

 #endif /* CONFIG_LWMON */

@@ -962,6 +969,16 @@
 #define SPMODE_EN      ((ushort)0x0100)        /* Enable */
 #define SPMODE_LENMSK  ((ushort)0x00f0)        /* character length */
 #define SPMODE_PMMSK   ((ushort)0x000f)        /* prescale modulus */
+#define SPMODE_MASTER  ((ushort)0x0200)     /* Am SPI master */
+#define SPMODE_LEN_SHIFT 4                  /* shift of character length field */
+#define SPMODE_PM_SHIFT  0                  /* shift of Prescale Modulus field */
+
+/* SPIE fields */
+#define SPIE_MME  0x20
+#define SPIE_TXE  0x10
+#define SPIE_BSY  0x04
+#define SPIE_TXB  0x02
+#define SPIE_RXB  0x01

 /* CPM interrupts.  There are nearly 32 interrupts generated by CPM
  * channels or devices.  All of these are presented to the PPC core

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-12-18 10:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-18  0:48 SPI driver? Kevin Fry
2001-12-18  9:50 ` Alex Zeffertt
2001-12-18 10:54   ` Alex Zeffertt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-10 16:16 Hesam Kohanteb
2007-09-11 15:50 ` Nicholas Hickman
2007-09-11 20:19   ` Wolfgang Denk
2001-12-18  0:58 Rod Boyce
2001-12-18  1:38 ` Kevin Fry
2000-11-08 21:18 Dan Winkler
2000-11-08 18:12 clark
2000-11-08 18:37 ` Tobias Otto-Adamczak

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=3C1F205A.F851FF62@cambridgebroadband.com \
    --to=ajz@cambridgebroadband$(echo .)com \
    --cc=kevin@carts$(echo .)com \
    --cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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