Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Linux/OMAP-L138: Lodable kernel module for spi-nor flash

$
0
0

Part Number:OMAP-L138

Tool/software: Linux

Hi!

I'm developing the linux kernel and root filesystem for a board with OMAP-L138.

The Linux kernel version is 4.4.25, but I'm still using a board support file "arch/arm/mach-davinci/board-<myboard>.c" for setting up the necessary drivers and configuration details for the peripheral devices.
This works very good for all peripheral devices with can be reached during start up.

Now I've to support a spi-nor flash ("n25q256a" from Micron) wich isn't reachable during start up.
To get access to the flash a register has to be set for switching the spi bus from a FPGA to the OMAP-L138 processor; but this can only be done only after the start of the linux kernel!

I've to build a "loadable" kernel module (*.ko) so that is loadable form userspace with "insmod".
The necessary driver is "drivers/mtd/spi-nor/spi-nor.c", but I have to set some configuration details (for example number of spi bus, spi clock frequency, flash partitions, ...)

How can I do this without having "device tree support"?
Is there an example that shows how to do it?

For any hint I would be very grateful!

Best regards,
Jan-Marc.


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>