9
0
Fork 0
barebox/drivers/firmware
Trent Piepho 48aecb409d firmware: socfpga: Add parameter "programmed" to fpgamgr driver
This boolean parameter tells you if the FPGA is programmed or not.  It
can be accessed from the shell as "$fpga.programmed".  One could use
this to not program the FPGA if it's already programmed.

There is an annoying limitation of the way barebox puts parameters
into the shell env: it requires they have no periods in the device
name.  It uses the first period to divide the variable name into a
device and parameter name, which doesn't work correctly if the device
name has a period in it.

Since the names of any devices created from the OF device tree have a
period in them, this is a problem.

So what I did here was create a new device.  Its parent will be the OF
device for the fpgamgr and it will in turn be the parent of the
firmware cdev.  Previously the cdev's parent was the OF device.  This
device won't have period in the name and the parameter is attached to
it.  Even without the period limitation, doing this gives a nicer name
"fpga.programmed" instead of "ff706000.fpgamgr.programmed".

The fpgamgr code had a pointer to the OF device in its private state.
I changed this to be a struct for the new "fpga" device, which is then
used in all the places the former pointer was (nothing but dev_dbg,
etc. calls).

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 09:05:20 +01:00
..
Kconfig firmware: socfpga: Add necessary dependency to Kconfig 2015-04-21 14:28:46 +02:00
Makefile Firmware: socfpga: Add SoCFPGA FPGA program support 2014-09-09 10:30:26 +02:00
altera_serial.c firmware: altera: Make nSTAT GPIO optional 2015-02-19 20:50:19 +01:00
socfpga.c firmware: socfpga: Add parameter "programmed" to fpgamgr driver 2015-11-11 09:05:20 +01:00