[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Writing Drivers
Hi Guys,
Does anyone here have experience with writing their own drivers for
uClinux. I have a peripheral on the OPB, and it is essentially a memory
interface - i.e. register style based. with no OS I can control it
directly by addressing the memory locations in the following way
int main()
{
volatile int *my_device = BASE_ADDRESS;
my_device[0] = some_data;
.....
}
And this will work quite nicely.
However I'm sure this hackery will not work in uClinux. So how does
someone write a driver in a "standard way". I guess uClinux does things
like re-mapping the physical address, etc, for its own reasons, and the
driver would have to support this?
I guess put more simply - if you wanted to write a driver for a bram
block, how would you do it?
Once the basic driver interface is there, I can think about building the
more user-friendy functions around it.
Also, I would like to add interrupts, and a handler for it in the
driver. Its not necessary, but definalty a nice to have...is this
difficult?
Any info you could offer would be great!
Btw - on a completly unrealted note - I got uclinux running under 7.1i -
with MB version 4.00a. I had the FPU enabled, but I guess the toolchain
doesnt support it.
I'm curious though, the bogomips went from 32.97 3.00.a) to 32.95
(4.00a). No chache links though (ddr controler is not supported by the
MCH block) - would be nice to see the effect of these!
Cheers,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/