From: Domen Puncer <domen.puncer@telargo.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 0/2] mpc52xx: stop drivers from accessing clock config directly
Date: Wed, 24 Oct 2007 22:54:03 +0200 [thread overview]
Message-ID: <20071024205403.GE3369@nd47.coderock.org> (raw)
In-Reply-To: <fa686aa40710241314w2dbe0863ja15746614cff0dd@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1707 bytes --]
On 24/10/07 14:14 -0600, Grant Likely wrote:
> On 10/24/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > On 24/10/07 12:24 -0600, Grant Likely wrote:
> > > Domen,
> > >
> > > Here's a real solution to the problem. I've somewhat tested this on
> > > the lite5200b. Can you give it a spin on efika and see if SPI still
> > > works for you?
> >
> > My test case was lite5200b too, I don't think I ever tried SPI on
> > efika.
> > (Are even the right pins on irda connector, or is a necessary line
> > missing?)
>
> Hmm, I guess that's right. Can you at least make sure it still boots
> on Efika? Some of the clock detection stuff has changed so I want to
> make sure it still boots.
OK. I'll do that tomorrow.
>
> Are you setup to do your SPI test easily on you lite5200b? When I say
> "somewhat" tested; I mean I probed the driver and it didn't crash.
> :-) I haven't tried to run traffic over it.
Sorry, lite5200b is resting these days. :-(
>
> Can you check that on your system? If not, can you email me what
> setup/programs you used for testing? I know very little about the SPI
> infrastructure.
For userspace part I used something like: Documentation/spi/spidev
And for kernel the attached, to fill get binded to spidev driver.
Domen
>
> Thanks,
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely@secretlab.ca
> (403) 399-0195
--
Domen Puncer | Research & Development
.............................................................................................
Telargo d.o.o. | Zagrebška cesta 20 | 2000 Maribor | Slovenia
.............................................................................................
www.telargo.com
[-- Attachment #2: spidev_test_devices --]
[-- Type: text/plain, Size: 1502 bytes --]
---
drivers/spi/Makefile | 1 +
drivers/spi/spi_test_devices.c | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+)
Index: work-powerpc.git/drivers/spi/Makefile
===================================================================
--- work-powerpc.git.orig/drivers/spi/Makefile
+++ work-powerpc.git/drivers/spi/Makefile
@@ -35,3 +35,4 @@ obj-$(CONFIG_SPI_SPIDEV) += spidev.o
# SPI slave drivers (protocol for that link)
# ... add above this line ...
+obj-m += spi_test_devices.o
Index: work-powerpc.git/drivers/spi/spi_test_devices.c
===================================================================
--- /dev/null
+++ work-powerpc.git/drivers/spi/spi_test_devices.c
@@ -0,0 +1,38 @@
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/spi/spi.h>
+
+static struct spi_board_info spi_info[7];
+static struct spi_device *spidev[7];
+static int testdev_init(void)
+{
+ struct spi_board_info *info;
+ int i;
+
+ for (i=0; i<7; i++) {
+ struct spi_master *master;
+
+ info = &spi_info[i];
+ //info->max_speed_hz = 2*1000000;
+ info->max_speed_hz = 100000;
+ //info->max_speed_hz = 1*1000000;
+ strcpy(info->modalias, "spidev");
+
+ master = spi_busnum_to_master(i);
+ if (master)
+ spidev[i] = spi_new_device(master, info);
+ }
+ return 0;
+}
+
+static void testdev_exit(void)
+{
+ /* there is no _remove? */
+ /*for (i=0; i<7; i++) {
+ }*/
+}
+
+module_init(testdev_init);
+module_exit(testdev_exit);
+
+MODULE_LICENSE("GPL");
next prev parent reply other threads:[~2007-10-24 20:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 18:24 [PATCH 0/2] mpc52xx: stop drivers from accessing clock config directly Grant Likely
2007-10-24 18:24 ` [PATCH 1/2] mpc52xx: add cdm (clock module) helper function for PSCs Grant Likely
2007-10-25 0:50 ` Stephen Rothwell
2007-10-24 18:24 ` [PATCH 2/2] mpc5200: psc-spi driver must not touch port_config or cdm registers Grant Likely
2007-10-24 19:12 ` [PATCH 0/2] mpc52xx: stop drivers from accessing clock config directly Domen Puncer
2007-10-24 20:14 ` Grant Likely
2007-10-24 20:54 ` Domen Puncer [this message]
2007-10-25 12:29 ` Domen Puncer
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=20071024205403.GE3369@nd47.coderock.org \
--to=domen.puncer@telargo.com \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.