We can see the i/o has been memory mapped ok, but memtool always encounters a BUS ERROR trying to access the GPIO registers.
We're in the process of upgrading Linux from 2.6.35 to 3.14.33.
tls450# cat /proc/iomem
50008000-5000bfff : mmc0
53f80800-53f809ff : /soc/aips@50000000/usbmisc@53f80800
53f84000-53f87fff : /soc/aips@50000000/gpio@53f84000
53f88000-53f8bfff : /soc/aips@50000000/gpio@53f88000
53f8c000-53f8ffff : /soc/aips@50000000/gpio@53f8c000
53f90000-53f93fff : /soc/aips@50000000/gpio@53f90000
53f98000-53f9bfff : /soc/aips@50000000/wdog@53f98000
53fa8000-53fabfff : /soc/aips@50000000/iomuxc@53fa8000
53fb4000-53fb7fff : /soc/aips@50000000/pwm@53fb4000
53fb8000-53fbbfff : /soc/aips@50000000/pwm@53fb8000
53fc0000-53fc3fff : imx-uart
53fdc000-53fdffff : /soc/aips@50000000/gpio@53fdc000
53fe0000-53fe3fff : /soc/aips@50000000/gpio@53fe0000
53fe4000-53fe7fff : /soc/aips@50000000/gpio@53fe4000
53fec000-53feffff : /soc/aips@50000000/i2c@53fec000
63fb0000-63fb3fff : 63fb0000.sdma
63fc4000-63fc7fff : /soc/aips@60000000/i2c@63fc4000
63fec000-63feffff : /soc/aips@60000000/ethernet@63fec000
70000000-efffffff : System RAM
70008000-70749f33 : Kernel code
70780000-70d238e7 : Kernel data
f8000000-f801ffff : /soc/sram@f8000000
Solved! Go to Solution.
Hi Fabio,
I use memtool to access the GPIO and IOMUX registers, makes it easy to setup pad controls and the like.
I created a simple kernel driver to read and write the registers via IOCTLs, and that's working fine.
I plan to look and see how the driver's ioremap differs from mmaps, but development is back on track with this work around.
Thanks
Joe
Hi Joe,
Maybe you could try devmem2 utility for reading the registers?
Take a look at:
http://www.element14.com/community/thread/32436/l/gpio-ports-on-riot-board?displayFullThread=true
Regards,
Fabio Estevam
Hi Fabio,
Thanks for the suggestion.
I still get the same results trying to access a GPIO register.
joe# ./devmem2 0x53f84000
/dev/mem opened.
Memory mapped at address 0x76f8d000.
Bus error
I'll keep investigating.
Thanks again.
Joe
Hi Joe,
What is the specific register you are trying to access and which SoC (mx51 or mx53)?
Regards,
Fabio Estevam
Hi Fabio,
I use memtool to access the GPIO and IOMUX registers, makes it easy to setup pad controls and the like.
I created a simple kernel driver to read and write the registers via IOCTLs, and that's working fine.
I plan to look and see how the driver's ioremap differs from mmaps, but development is back on track with this work around.
Thanks
Joe
The memtool problem occurs on the 2.6 kernel as well as the 3.14 kernel. It seems to be related to mapping i/o memory.
running memtool on either kernel to an area described in /proc/iomem results in a bus error.
It's more noticeable in the 3.14 kernel because the gpio and iomux areas are now mapped.
Will continue to investigate further.
Hi JOE
I think one can try with i.mx53qsb yocto demo images
Public images - fsl-community-bsp/master/440/framebuffer/imx53qsb
Index of /releases/yocto/yocto-1.6/machines/imx53qsb
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
That was our next idea, thanks for the response.
The images on the two links seem to use the 2.6.35 kernel and boot loader, which we have working.
We're trying to upgrade to the 3.14.33 kernel.
I suspect we're having issues setting up the device tree correctly.
Are there images available with a newer kernel?
Hi JOE
I think you can try below steps
[Share] How to make memtool accessing the WEIM registers success in iMX25 Linux BSP
Best regards
igor
Hi Igor,
A quick update, some portions of the chip are accessed fine via memtool.
For instance, the IPU can be read and written fine.
tls450# memtool 1e04000c 1
Reading 0x1 count starting at address 0x1E04000C
0x1E04000C: 20F90000
tls450# memtool 1e04000c=20F90000
Writing 32-bit value 0x20F90000 to address 0x1E04000C
I'll check out the link above.
Thanks
Joe