9
0
Fork 0
Commit Graph

14848 Commits

Author SHA1 Message Date
Sascha Hauer a253879abb Merge branch 'for-next/clps711x' 2016-08-03 08:08:23 +02:00
Sascha Hauer 94e7bdcd9a Merge branch 'for-next/boot' 2016-08-03 08:08:22 +02:00
Sascha Hauer 893ea7f3a1 dts: update to v4.7
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 08:08:13 +02:00
Sascha Hauer 550876cb76 dts: update to v4.7-rc6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 08:07:59 +02:00
Sascha Hauer 7defdbf78f Release v2016.08.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:56:09 +02:00
Alexander Shiyan eaacdd5876 defaultenv: Unblank cursor at startup
In some cases, the user program can disable the cursor,
for example, Qt4 library do this, so the cursor remains invisible
after the restart.
The patch adds a command to activate the cursor,
by sending DECTECM command to the terminal.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:43:23 +02:00
Uwe Kleine-König 74102fdf73 ARM: i.MX: pcm043: add a flash-header.imxcfg
This creates an image that can be booted via USB.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:32:43 +02:00
Alexander Kurz 0443a43aa0 ARM i.MX31: Add i2c register convenience functions
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Alexander Kurz 28a0baffb9 ARM i.MX31: add SPI support
The i.MX31 SPI interface was refered by freescale as spi_ver_0_4 in one
of their older vendor extended linux releases. spi_ver_0_4 differs only
in minor aspects to spi_ver_0_7 (i.MX35) which is already supported by
barebox.
Regarding barebox, the differences boil down to the location and length
of the CHIP SELECT and BIT COUNT/BURST LENGTH elements of CONREG. The
spi_ver_0_4 variant is limited to single word bursts with a maximum of
32 bits_per_word.

Add support for the i.MX31 SPI interface to the barebox spi_ver_0_7
implementation.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 0c61905025 ARM: nitrogen: rename to nitrogen6
Now that the MAX variant of the board is also supported by the
same code, rename the board directory to the more generic nitrogen6.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach b82e9f62d9 ARM: add support for Nitrogen6MAX QP variant
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 550442a1a4 ARM: nitrogen6x: disable address mirroring
The Nitrogen boards don't need it and it's actively wrong
on the 4GB variants of those boards.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach ab3697d1de ARM: nitrogen6x: use imx6q_barebox_entry
Saves some boilerplate code by calculating the DRAM size
automatically.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 470c90aa21 ARM: nitrogen6x: use upstream DTs
This gets rid of the (mostly) stub top level DTs in barebox
and switches the compatible to the proper "boundary" one.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Lucas Stach 4154abe271 ARM: imx: add QP as supported i.MX6 variant
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Ulrich Ölmann ea31b22e2e ARM: dts: i.MX6: update RIoTboard device tree
Barebox and kernel version diverged therefore bring the device tree up to date
with respect to the kernel being the reference.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:40 +02:00
Alexander Kurz d8a7c4580b mc13xxx: make driver-provided SPI frequency overridable
The preset SPI frequency for mc13xxx PMIC introduced with patch 6e18b3a48e
("mc13xxx: Define maximum SPI clock frequency global to driver") is not
desirable or working on all boards. Provide a possibility to override
the default SPI max_speed_hz from board code.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:40 +02:00
Alexander Kurz 741642a862 mtd: spi-nor: add new variants
Read access tested on W25Q20BW and MX25U4035.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:28:58 +02:00
Sascha Hauer eeaed6eee3 boot: Print a message when a boot target string does not lead to a boot target
When doing a 'boot friesel net' one expects a message when 'friesel'
does not give any bootable results and thus 'net' is booted. This patch
adds this message.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:36 +02:00
Sascha Hauer 16dc0b0b48 blspec: Turn message back to debug level
Normally one should not be interested that the blspec code scans
a directory. In case blspec is not actively used it might even be
confusing, so lower priority of the message in blspec_scan_directory()
to pr_debug.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:36 +02:00
Sascha Hauer 13daf78f1f boot command: Explicitly complain when boot target list is empty
When no targets to boot are found it can happen that the boot command
just returns silently. Explicitly print a message in this case to give
a clue what might went wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:36 +02:00
Sascha Hauer 80c5692ff8 boot: add single quotes when printing boot target names
It's nicer to read when target names have quotes around them, it
makes it clear that this is a string passed in somewhere.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:36 +02:00
Sascha Hauer 89c8ac578f boot: Move code to common/
Normally code in commands/ shall only do the option parsing whereas the
functionality shall be in common/ to make the code usable from C aswell.
Do this in the boot code aswell, move it to common/boot.c and add the
function prototypes to include/boot.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer ed71dfbbc5 boot: Use struct bootentries to pass around data
We have a struct bootentries type to collect different boot entries,
so use this to pass around data between functions rather than using
an array of strings. With this we also no longer have to convert a
string to a boot entry multiple times.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer bf07b3411a bootentries: Move struct bootentries to include/boot.h
The boot function prototypes are declared in include/blspec.h. Move them
to include/boot.h where they belong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer 3ab18b3cd0 bootentries: Move menu display string allocation to bootentries_alloc()
bootentries_alloc() is the place where the struct bootentries container
is allocated, so allocate the menu entry there aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer 86a4036ba2 blspec: Make blspec_boot static
Since blspec_boot is now only used locally we can make it static. Move
it up to avoid a static declaration.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer e113fa5f1d blspec: separate bootentries from blspec entries
This completes the separation of the blspec code from the boot
code. With this the boot code only handles generic boot entries
of type struct bootentry which are embedded into the type
(blspec/bootscript) specific structs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer ff6bc08801 bootentries: Add title/description
We currently have to special case blspec entries vs. boot scripts
in the common boot code since we want to print different informations
about them. This adds a 'title' and 'description' which can be filled
in with different information by bootscripts and blspec entries and
so we get rid of the special handling.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer 0d054f3303 blspec: factor out a struct bootentry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer dbc1894b42 blpec: rename struct lspec -> bootentries
The code in common/boot.c collects the different boot entries in
lists of type struct blspec, eventhough many of them may not be
bootloader spec entries but for example boot scripts. This is the first
step of separating the data structures from boot entries and bootloader
spec: As struct blspec is merely a container for collecting boot entries
We simply rename struct blspec to struct bootentries. No functional change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:34 +02:00
Sascha Hauer 4d85cb974a include: Move bulk of boot.h to bootm.h
The majority of the stuff currently in include/boot.h is about bootm
code implemented common/bootm.c. To be more consistent move it to a
new file include/bootm.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:31 +02:00
Sascha Hauer 70460e9723 getopt: Add support for '--' to stop option parsing
In some cases when commands have optional arguments it is necessary
to explicitly stop option parsing after the last nonpositonal option.
Add support for '--' to accomplish this as done in getopt(3) aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:30:19 +02:00
Sascha Hauer 370e90bac9 nand: mrvl: use ERR_CAST() for returning error pointers
ERR_CAST exists to return error pointers as error pointers without
casting them explicitly to the correct pointer type.

Also this Fixes:
In function 'alloc_nand_resource':
warning: return makes pointer from integer without a cast

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:26:50 +02:00
Lucas Stach c77af5e5cb commands: fbtest: select IMAGE_RENDERER
2D_PRIMITIVES needs IMAGE_RENDERER.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:21:16 +02:00
Lucas Stach f3895311ef state: only build circular backend if MTD is enabled
The circular backend depends on MTD symbols and is only useful
if MTD is present. Exclude it from the build if MTD is not enabled.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:21:16 +02:00
Sascha Hauer e844f9c60d nv: Allow wildcards when removing NV vars
With this patch 'nv -r' can also take "*" and "?" wildcards for nv
variables. This makes it easier to remove multiple nv variables.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:15:45 +02:00
Sascha Hauer 04d6b35b5d lib: Add Kconfig symbol for FNMATCH
fnmatch is useful on its own, so make a separate Kconfig symbol
and select it from GLOB.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-25 10:14:18 +02:00
Sascha Hauer cb47ddee1b boot: Call blspec_scan_directory() only on strings containing an absolute path
Avoids an unnecessary "Nothing bootable found on..." warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 14:43:20 +02:00
Sascha Hauer bf1b4877bc blspec: remove unused function prototype
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 14:43:19 +02:00
Sascha Hauer 333378d4e4 blspec: Remove once/default handling
This is widely unused and in the way of subsequent cleanups. If you are
indeed using it please complain on the list, we'll find a solution to
add it back in a different way.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 14:41:35 +02:00
Sascha Hauer 7c76559023 blspec: remove unused blspec_boot_devicename
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 13:23:38 +02:00
Sascha Hauer a435c13e88 state: Save on shutdown
The state framework is meant for storing persistent variables. To
make the state more persistent automatically save it on shutdown.
This is now the default behaviour, but can be disabled using a
'save_on_shutdown' variable attached to the state.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:44:22 +02:00
Sascha Hauer 75926bc33d nv: Use dev_remove_param to delete nv variable
dev_remove_param() is exactly for the purpose of removing a device
parameter, so use this function instead of open coding the
functionality.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:27:23 +02:00
Sascha Hauer 0c2fccceb6 nv: Allow to set/remove multiple variables with one command
It's convenient to set/remove multiple nv variables in one go. With
this patch we iterate over the remaining nonopts instead of expecting
exactly one nonopt.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:27:22 +02:00
Sascha Hauer 443f7fd655 nv: Add option to explicitly save nv variables
We now have code to save the nv variables without saving the
rest of the environment. This gives us the possibility to explicitly
save the nv variables. This patch adds an option to the 'nv' command
for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:27:22 +02:00
Sascha Hauer 3fadbdae1f nv: Save nv variables on shutdown
With this patch nv variables are automatically saved whenever barebox
shuts down (that is 'reset' is executed or a kernel is started). With
this the additional 'saveenv' step becomes unnecessary.

The nv variables are stored in the environment and the estasblished
behaviour is that files in the environment must be manually saved
using 'saveenv'. This behaviour shall be kept for now, so this patch
cannot just call 'saveenv' since that would save the modified
environment files aswell. Instead we read the environment from the
device, modifiy the nv variables and save the environment back.

Since this changes a long existing behaviour messages are printed the
first time a nv variable is modified and during shutdown when the
variables are actually saved.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:27:22 +02:00
Sascha Hauer b9ac9a9785 nv: Do not save nv variables while loading
When reading nv variables from the storage in /env/nv we do
not need to write back the value to the file we just read from.
Optimize this a bit and make it unnecessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:05:39 +02:00
Sascha Hauer ea0e077ed6 printk: Fix pr_cont
pr_cont is meant to continue a line, so do not printf the prefix given
with pr_fmt() again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:02:19 +02:00
Sascha Hauer facda5a9cb fs: Check for correct open mode
Check that readonly openen files is not written to and writeonly
files is not read from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 11:59:49 +02:00