[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] GPIOs
Hi Raul,
Raul Camaras wrote:
> I am not being able to write GPIOs from uClinux.
>
> I am using an old program somebody wrote for this forum(source
> attached).
> My instance in mhs file is:
>
> BEGIN opb_gpio
> PARAMETER INSTANCE = gpio_test
> PARAMETER HW_VER = 3.01.b
> PARAMETER C_IS_DUAL = 0
> PARAMETER C_GPIO_WIDTH = 2
> PARAMETER C_IS_BIDIR = 1
> PARAMETER C_BASEADDR = 0xFFFF6400
> PARAMETER C_HIGHADDR = 0xFFFF65FF
> BUS_INTERFACE SOPB = opb_v20_0
> PORT GPIO_IO = gpio_test_io
> END
>
> The entry on mss file is:
>
> BEGIN DRIVER
> PARAMETER DRIVER_NAME = gpio
> PARAMETER DRIVER_VER = 2.11.a
> PARAMETER HW_INSTANCE = gpio_test
> END
>
> When booting kernel 2.4, gpios are there:
> ...
> Starting kswapd
> xgpio #0 at 0xFFFF5400 mapped to 0xFFFF5400
> xgpio #1 at 0xFFFF6400 mapped to 0xFFFF6400
> Xilinx GPIO registered
> ...
>
> I use Xilinx tools 9.2, does anybody know if there are some problems
> when
> using the hw/sw versions I am using??
No, it looks ok. Make sure the GPIO driver is selected in menuconfig.
You should get similar messages on kernel boot, showing GPIOs detected.
> For the kernel 2.6 I guess I must rewrite the test program, looking at
> the xgpio
> driver: adapter.c, etc... Did it someone already?
Use the gpio-test application in petalinux-dist/user/gpio-test - it is
modified to also support 2.6 kernel GPIO driver.
Then you can do
gpio-test -d /dev/xgpio1 -k
for example.
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/