The return value check of the write call is completely bogus. We
check if we have written at minimum sizeof(struct envfs_super) bytes
instead of all bytes. Properly check for all bytes written instead
and allow write to write less bytes than requested.
Do not use write_full because this file is compiled for userspace
aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
'ret' is only initialized when info->fbops->fb_activate_var exists, so
only use it in this case.
Reported-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Direction for CS GPIOs (for some targets) is undefined.
This patch fixes this issue.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Otherwise reading or writing to the SPI flash doesn't
work.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Rework the current framework so that I/O mapped I/O resources are
also possible.
Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Allows to make relationship between DT and driver
more explicit and avoids duplication.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds a convenience function to register a MAC address device
parameter. The only current user is converted to use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For a version 1.0 board the rest of loco_late_init should be executed
to completely configure the board.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The board code does a phy reset. This implicitly requests the phy reset
gpio. This gpio is also registered in the devicetree as phy reset gpio,
so the fec driver probe can't request the gpio and bails out with -EBUSY.
Fix this by freeing the phy reset gpio in the board code. While at it use
gpio_request_array for the gpios.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds CBUS UART dts support;
also it adds the necessary macros for DEBUG_LL.
qemu-malta supports three serial interfaces:
* two ports are provided by the FDC37M817
Super I/O; this chip is connected via LPC bus
to Intel 82371EB (PIIX4E) South Bridge;
* the third serial port is provided by
the discrete TI 16C550C (CBUS UART);
this chip is connected via CBUS directly
to the board's GT64120 North Bridge.
See Malta User's Manual (MD00048) for details.
CBUS UART Instructions for use:
1. Enable CONFIG_CONSOLE_ACTIVATE_ALL in .config
(or disable uart0 in dts) and compile barebox;
2. run qemu:
qemu-system-mips -nographic -nodefaults \
-monitor null -M malta -m 256 \
-serial null -serial null -serial stdio \
-bios barebox-flash-image
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add an environment partition and support commands so that the system
configuration can be permanent.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>