summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
Commit message (Collapse)AuthorAgeFilesLines
* firmware: socfpga: Add parameter "programmed" to fpgamgr driverTrent Piepho2015-11-111-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* firmware: socfpga: Fix a bug in fpgamgr_program_write_buf()Andrey Smirnov2015-04-231-1/+15
| | | | | | | | | Fix a bug in fpgamgr_program_write_buf() where .rbf file whose length is not a multiple of 4 would cause an integer overflow which would result in infinite loop. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: socfpga: Add necessary dependency to KconfigAndrey Smirnov2015-04-211-1/+1
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: altera: Make nSTAT GPIO optionalAndrey Smirnov2015-02-191-15/+44
| | | | | | | | | | By taking parts of the programming handshaking protocol on faith it is possible to make due with only two GPIO for programming Altera FPGAs. This is not a very advisable practice, but sometime unavoidable in GPIO constrained designs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: altera serial: depend on GENERIC_GPIOSascha Hauer2014-11-281-0/+1
| | | | | | The driver needs gpio support, so depend on GENERIC_GPIO Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: altera-serial: fix printf messageLucas Stach2014-11-241-1/+1
| | | | | | | | | | Fixes: .../altera_serial.c:118:2: warning: too many arguments for format Also sz is of type size_t, so use proper format specifier. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: altera-serial: don't try to check void return valueLucas Stach2014-11-241-3/+1
| | | | | | | | Fixes: .../altera_serial.c:84:6: error: void value not ignored as it ought to be Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: altera-serial: depend on SPILucas Stach2014-11-241-0/+1
| | | | | | | This driver uses SPI bus functions. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: socfpga: depend on ARCH_SOCFPGALucas Stach2014-11-241-0/+1
| | | | | | | | This driver uses a lot of arch specific functionality and fails to build on anything but SOCFPGA. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Firmware: socfpga: Add SoCFPGA FPGA program supportSascha Hauer2014-09-093-0/+444
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Firmware: provide a handler to program Altera FPGAsJuergen Beisert2014-09-093-0/+327
This handler uses a regular SPI master and a few GPIOs to program an Altera FPGA in serial mode. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>