The code used to ineffectively take the end of the last partition as guess
for the disk size. Better use the end of the partition that has its end
rearmost.
Also return an unsigned type instead of int as the result is always
non-negative.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch fix a compiler warning while building sandbox barebox with
gcc version 4.8.2.
common/dlmalloc.c: In function ‘barebox_calloc’:
common/dlmalloc.c:1756:2: warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
void *mem = malloc(sz);
^
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add the Kconfig and Makefile directives to build barebox
for the GEIP DA923RC board.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The use of the DDR driver as well as early I2C support is
enabled for board initialising their memory through SPD EEPROM
data.
A SOC specific function returning the DDR bus frequency
is added for the DDR driver to translate DDR timings to
register values.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Because the port count is different between the MPC8544 and
existing CPU support, the Ethernet port count is defined on
a per CPU basis.
Accordingly, the TBI PHY initialisation code is updated.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Definitions are added to support the mpc8544 sOC.
The function returning the I2C bus frequency is updated
to take into account the mpc8544 specific clock ratio.
A mininal GPIO API is added to enable and set the GPIO
out pins.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add support to configure the active framebuffer for the kernel through
device tree.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If drivers want to fixup their specific instance they need some context
to know which instance they have to fixup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Use the mailbox driver to set up a framebuffer based on the firmware
configuration.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add the missing "right" field to struct bcm2835_mbox_tag_overscan.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add support for framebuffers with noncontiguous horizontal lines.
Video drivers can set this value if the hardware requires it.
In case a driver does not set it, the current value of
xres * (bpp / 8) is used instead.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In some cases kernel-install can fail without printing anything. Add
error messages for these cases.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this we can do 'boot <name>' where name is one of:
- a filename under /env/boot/
- a full path to a boot script
- a device name
- a partition name under /dev/
- a full path to a directory which
- contains boot scripts, or
- contains a loader/entries/ directory containing bootspec entries
Multiple names can be given, they are tried in order. So any mixture
between bootspec entries and bootscripts can be given. bootspec entries
can now also be given as a path to a directory containing bootspec entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
the cdev for a given directory can be determined by get_cdev_by_mountpath().
Use this function and remove the cdev argument from blspec_scan_directory().
Also, export the function to make code possible which boots the bootloader
spec entries found in directories.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Instead of only allowing complete devices we now also allow single
partitions to look for bootloader spec entries.
Normally the bootloader spec defines a way to find a partition containing /boot
on a device. On embedded systems it's often useful instead to have only a
single partition image which contains both the kernel and the root filesystems.
This partition image may be written to the device multiple times. With this
patch they can be booted with 'boot emmc0.<partno>'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In some cases kernel-install can fail without printing anything. Add
error messages for these cases.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
i.MX5x OTG port is hardwired to the internal UTMI PHY, so having
this configurable makes no sense and helps using this port with DT.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
not all board have a SD card.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When probing spi bus masters from devicetree they got a bus_num
of -1. This works with a single bus master only since all bus masters
had the same bus_num. Detect this and dynamically assign a valid
bus_num.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
There is no much sense in having the pinctrl drivers be user selectable
as all arches using on of them already selects the right one.
So to avoid presenting the user with the choice to enable unrelated
pinctrl drivers or pushing lots of dependencies into the Kconfig just
drop the configurability.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
blspec->menu is only valid when menu support is enabled. Check for it
before dereferencing the pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Since the mainline kernel now has its own dr_mode and phy_type DT-options
for setting modes of USB ports, do these kernel parameters compatible by
removing "barebox" prefix.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>