[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang



I've managed to get the xilinx_spi char driver to load at boot:

xilinx_spi 0: at 0x41600000 mapped to 0x41600000, irq=0

Now, I'm wondering if anyone could guide me to what functions I use to access SPI.  I've been reading through all the mailings of people trying to use SPI, but I didn't see a good example of implementing the SPI char driver.

Also, another method we considered was writing one of our user apps using xio.h and xparameters.h and then accessing all the hardware directly using various BASEADDR entries.  This hasn't worked so far, but from what I read online I get the impression that this isn't the proper way to go about it.

Again, any guidance on the char driver would be great  Thanks!

Matt

On Fri, Feb 20, 2009 at 12:56, Matt Staniszewski <matt.staniszewski@xxxxxxxxx> wrote:
Hey Stephen,

I figured out my issue with the hang.

Make sure you rerun petalinux-copy-autoconfig in your reference design directory after successfully building the EDK design with SPI included.  Also, be sure you use your new download.bit file to program the board for loading the SREC, configuration, and kernel files.

Mine now boots fine, but I don't see any entry in the bootup for 'xilinx_spi', so I'm not sure if SPI is being initialized properly.

Hope this helps, and if anyone could provide guidance on working with SPI that'd be awesome.

Thanks guys,

Matt



On Thu, Feb 19, 2009 at 12:01, Stephen Kyne <var_raven@xxxxxxxxxxx> wrote:
I have a similar problem using the same board. I haven't yet determined the source of the problem unfortunitely.
 

Date: Wed, 18 Feb 2009 22:30:42 -0800
Subject: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang
From: matt.staniszewski@xxxxxxxxx
To: microblaze-uclinux@xxxxxxxxxxxxxx


Hi everyone,

I'm trying to add an SPI core to my hardware design so I can develop with an SPI DAC within uCLinux.  I'm using a S3E500 and I've added the SPI core to the default reference design using instructions provided to me by a collegue who had this booting before.  However, when I load the new download.bit file into the board, kermit shows that the board gets hung up and never boots the kernel:

=================================================
FS-BOOT First Stage Bootloader (c) 2006 PetaLogix
Project name: Xilinx-Spartan3E500-RevD-edk91
Build date: Feb 18 2009 22:05:39  FS
Serial console: Uartlite
=================================================
FS-BOOT: System initialisation completed.
FS-BOOT: Booting from FLASH. Press 's' for image download.
FS-BOOT: Booting image...
SDRAM :
        Enabling caches :
                Icache:OK
                Dcache:OK
        U-Boot Start:0x27fc0000
        Malloc Start:0x27f60000
        Board Info Start:0x27f5ffd0
        Boot Parameters Start:0x27f4ffd0
FLASH: 16 MB
ETHERNET: MAC:00:0a:35:00:22:01

Hit any key to stop autoboot:  0
## Booting image at 210c0000 ...
   Image Name:   PetaLinux Kernel 2.6
   Image Type:   Microblaze Linux Kernel Image (uncompressed)
   Data Size:    4509871 Bytes =  4.3 MB
   Load Address: 24000000
   Entry Point:  24000000
   Verifying Checksum ... OK
OK
Found romfs @ 0x2420e08c (0x0023f000)
#### klimit 24226000 ####
Moving 0x0023f000 bytes from 0x2420e08c to 0x242259cc
New klimit: 0x24465000


At this point, it stalls.  What is wrong?  Thanks.

Matt


Join the all-new Windows Live Messenger family Click here!