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

Re: [microblaze-uclinux] drivers/mtd/chips/jedec_probe.c MTD M25P16 SPI Flash Problems



Hi Eldin,

Smajic Eldin wrote:

I tried enabling it here, and it builds OK, but wasn't able to boot test due to lack of suitable hardware.

Options I enabled were

drivers -> SPI -> SPI master and SPI bitbang
drivers -> MTD -> self contained -> M25P80



These steps I did:

1. I downloaded the file 'drivers/spi/xilinx_spi.c' from git.xilinx.com and stored it into PetaLinux tree '/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix/drivers/spi'.

2. I added following line into the '/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix/drivers/spi/Makefile':

obj-$(CONFIG_SPI_XILINX)                += xilinx_spi.o

3. I added following lines into '/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix/drivers/spi/Kconfig':

config SPI_XILINX
	tristate "Xilinx SPI controller"
	depends on SPI_MASTER && XILINX_VIRTEX && EXPERIMENTAL
	select SPI_BITBANG

Remove the XILINX_VIRTEX dependency here, it's not used in the current PetaLinux Kconfig structure. I'm looking to sync these eventually.


 	help
	This exposes the SPI controller IP from the Xilinx EDK.
	See the "OPB Serial Peripheral Interface (SPI) (v1.00e)"
	Product Specification document (DS464) for hardware details.

Do I have to add some more bits of the drivers/spi/Makefile and Kconfig?

Upon removing the XILINX_VIRTEX dependency, you've oprobably got now an option under drivers->SPI submenu to choose xilinx-spi. Enable that, and rebuild.

Finally, you'll need to create a new file in arch/microblaze/platform/common, to create a platform device initialiser for the device. You can see the pattern from the xgpio.c, xuarlite.c and friends.

You'll want to create a new platform device with name "xilinx_spi" so it is picked up by the driver at boot time.


4. Finally I build the image.bin and booted PetaLinux. Unfortunately the SPI Flash could wasn't detected as you can see in the bootup-sequence below.

The driver wasn't building or being registered, so that's not a surprise.

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/