James Kimble wrote:
quoted
I've been working on porting the s1d13xxxfb driver from the latest
kernel from Freescale for Coldfire to work with the S1D13A04 chip. I was
able to get things working to the point that I do get a little TUX logo
up on the screen at boot up. Seemed like a good start but none of my
user space applications will work. I can open the /dev/fb0 device and
the data in the info structure is correct but if I try to write to any
register or area in the frame buffer (or write to the device at all) I
get a seg fault.
I had an earlier driver working with the 2.6.10 kernel with the same
hardware. The same application space program should work ( I would
think...) but I get the seg fault on the first write to fb0. I tried a
different memory location (ox4400 0000 to 0x7400 0000) for the CS
associated with the video chip, no difference. Permissions for
/dev/fb0 are "rw". No other process using fb0. This is really weird.
Any help or suggestions MUCH appreciated.
You are probably not reserving and/or translating physical memory space
to virtual if you get a segfault on every access. Try cat /proc/iomem. Is
your device listed?
OTOH, a lot of arch specific code has probably changed since 2.6.10 -
2.6.25 that might not even be directly related to fb. Is your arch port
up to date?
Also you might post your fb driver and someone might spot the fault
faster..
/proc/iomem shows:
74000000-74009000 : s1d13a04fb.0
74000000-74009000 : s1d13xxxfb regs
74040000-74068000 : s1d13a04fb.0
74040000-74068000 : s1d13xxxfb mem
f000070c-f000070c : spi-int-mask
f0000740-f000075f : spi-int-level
f0000a50-f0000a50 : spi-par
f0008a00-f0008ab8 : spi-module
f0008f00-f0008f20 : MCF548X-i2c
f000a000-f000a7ff : mcf548x-flexcan.0
f000a000-f000a7ff : mcf548x-flexcan
f000a800-f000afff : mcf548x-flexcan.1
f000a800-f000afff : mcf548x-flexcan
f0020000-f0033000 : fsl-sec1
fc000000-ffffffff : physmap-flash.0
Which looks fine to me. The s1d13 lines match the mapping I set up. I've
attached the driver. It is the driver for this family of chips that was
included in the Freescale release of the 2.6.25 kernel for Coldfire. It
includes my changes.