[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] spi and spidev usage
- To: microblaze-uclinux@xxxxxxxxxxxxxx
- Subject: Re: [microblaze-uclinux] spi and spidev usage
- From: John Williams <jwilliams@xxxxxxxxxxxxxx>
- Date: Tue, 3 Feb 2009 12:47:37 +1000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=aIBGbDA8xx2wmAex9Z1G3o1INcnvdXRsTtRwYZsAu/c=; b=Egeqk6DIWBimGpc79Dpf3TZeOx5/uHyISiRnCarmzzkM/4+sz/huVdVVc+JJDOdvui c1ukT7mTUUX+R9Qjt7KL3vOTWqTY7kW8VsA186H0DysVxgDVSm3ko+51dBSkzSPm0oJg sK4hE9zBkc3ZWX6ctatqf69chQptfxHWPrD40=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=rCgX7cWiIumr0yxvdEeQt0rJgLzb/LZiHCZm65PTEFPaJgpKTAHbNVG6kg6VVZYKxH zUO6CpuZQ0xfHtObkvI17n9+2Qenoa/ZgWQ1+3xmPujE4gHbRocSXKCxO1/DdeUrcCkw BYq0nML069Zg6ddXIA7tdou1rNF504vqXDgtk=
- In-reply-to: <25A1EED44EDBC74D88859D0736F65E8701983A53@xxxxxxxxxxxxxxxx>
- References: <Acl7NIhjSfiXoeqAQF6XY4Wlnwn34g==> <25A1EED44EDBC74D88859D0736F65E8701983A53@xxxxxxxxxxxxxxxx>
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
Hi Carsten,
On Wed, Jan 21, 2009 at 5:23 AM, Bartsch Carsten <cbartsch@xxxxxxxxxx> wrote:
> I'm trying to use SPI. I added a 2nd SPI core to my FPGA.
> The software-part is based on petalinux-mmu-v0.10.
>
> The drivers spi and spidev can be build, the kernel says
> xilinx_spi 0: at 0x83400000 mapped to 0xC8100000, irq=0
> xilinx_spi 1: at 0x83500000 mapped to 0xC8120000, irq=1
> and in the list of /proc/devices there are character devices
> 123 xilinx_spi and 153 spidev.
>
> Can I test to access these devices already?
>
> The spidev documentation says to configure the SPI-slaves in the
> board initialization code using spi_register_board_info or
> defining tables of devices
> static struct spi_board_info spi_board_info[] __initdata = {...
>
> Where can I do this?
I've not used spidev however typically we place these platform
initialisers in arch/microblaze/platform/common - there is xspi.c in
there, however it sets up platform_device info for the xps_spi
controller itself. You may have a liitle more work to do using
spidev.
> The documentation told me to use udev or mdev to populate /dev
> dynamically.
> mdev is not available in the busybox config (maybe to old) and udev
> cannot
> be build. I don't need dynamic configuration.
>
> Can I add the devices in the makefile of my platform instead?
Yes, edit vendors/<myvendor>/<myplatform>/Makefile
under the romfs:: target you can do something like
[tab]touch $(ROMFSDIR)/@devname,c,maj,min
where
* [tab] is a proper tab character
* devname is the device node name
* c is for char, b for clock device
* maj is major number
* min is minor number
alternatively, you can add it to vendors/PetaLogix/common/common.mak,
look for "DEVICES =" string
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/