summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* console: allow to specify the device idJean-Christophe PLAGNIOL-VILLARD2015-01-131-1/+1
| | | | | | | so we can use dynamic number id with specific devname Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/netconsole'Sascha Hauer2015-01-091-0/+7
|\
| * console: Add set_active callbackSascha Hauer2014-12-171-0/+7
| | | | | | | | | | | | | | | | The netconsole needs to be able to deny activation when the network has not been enabled. Add an optional callback to the console for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mxs'Sascha Hauer2015-01-094-1/+42
|\ \
| * | console: Make sure xzalloc is only used when it's availableSascha Hauer2015-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | To make it possible to call the pr_* functions very early before malloc is initialized test if malloc is available before using it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | malloc: Add a function to detect if malloc pool is already initializedSascha Hauer2015-01-051-0/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add PBL console supportSascha Hauer2015-01-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds simple console support to the PBL which makes it possible to print more complex messages in the PBL than just strings or hex numbers. For now puts_ll is used to print the messages, so it depends on CONFIG_DEBUG_LL which makes it more a debugging option. However, this could be extended later to get regular output from the PBL if desired. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | printf: move panic() to common/misc.cSascha Hauer2015-01-051-0/+22
| |/ | | | | | | | | | | | | | | panic() is not really a printf like function, so move it to common/misc.c. This is done because we want to have printf support in the PBL, but PBL has it's own panic() implementation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-01-092-3/+19
|\ \
| * | sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clock: incorporate dummy clocksource into core clock codeAntony Pavlov2014-12-171-2/+18
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2015-01-092-0/+21
|\ \ | |/ |/|
| * efi: mount efivarfs by default if enabledLucas Stach2014-12-091-0/+6
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * efi: add function to determine type of device pathLucas Stach2014-12-091-0/+15
| | | | | | | | | | | | | | | | | | Thanks to the wonders of UEFI we have to walk down the device path all the way until we arrive at the device we got this path from... Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | blspec: print error when devicetree not foundSascha Hauer2014-12-161-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/randconfig-1'Sascha Hauer2014-12-081-1/+1
|\
| * Kconfig: make BROKEN invisibleSascha Hauer2014-11-281-1/+0
| | | | | | | | | | | | | | | | BROKEN is a developer option to keep things in the tree we know are broken. Make this option invisible so that randconfig builds do not enable it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: Let MMU depend on !CPU_ARM946ESascha Hauer2014-11-281-0/+1
| | | | | | | | | | | | | | CPU_ARM946E is selected by boards, so letting it depend on !MMU leads to broken dependencies. Let MMU depend on !CPU_ARM946E instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/persistent-vars'Sascha Hauer2014-12-084-78/+360
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/config
| * | defaultenv-2: Make use of nonvolatile variablesSascha Hauer2014-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the variable assignments previously done in /env/config-board to non volatile variables in /env/nv/. This makes the settings adjustable by the user without editing a file. Most of the changes are simple conversions which for many boards makes /env/config-board unnecessary. Some boards had some logic to assign global.boot.default based on the current bootsource. This has been moved to /env/init/bootsource. An additional check is added to not overwrite a nv.boot.default should it exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | globalvar: Add support for printing all global variablesSascha Hauer2014-11-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This could previously only be done with 'devinfo global'. While this is still possible this adds a more direct access via the globalvar command. This variant also adds a '*' in front of the variable if the corresponding non volatile variable exists. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Add support for non volatile variablesSascha Hauer2014-11-063-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds (back) support for non volatile variables. Non volatile variables are variables which are stored in the environment over reboot. They are used in the same way as the global variables, but with a 'nv' command and device. The variables are stored under /env/nv/, one variable per file. Adding a nv variable automatically adds a global variable with the same name. Changing a nv variable also changes the same global variable, but not the other way round. This allows for example to configure the username as: nv user=sha; saveenv Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: Only save changes to the defaultenvSascha Hauer2014-11-062-14/+108
| | | | | | | | | | | | | | | | | | | | | Instead of storing the complete files with a 'saveenv' command only store the files that have changes to the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: refactor saveenvSascha Hauer2014-11-061-68/+75
| | | | | | | | | | | | | | | | | | | | | | | | Collect all files in a list first and iterate over the list when creating the actual environment image. Makes the next patches easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: remove unused variableSascha Hauer2014-11-051-1/+0
| | | | | | | | | | | | | | | | | | fd is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: drop unnecessary castsSascha Hauer2014-11-051-6/+6
| | | | | | | | | | | | | | | | | | No Need to cast void pointers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2014-12-081-1/+1
|\ \ \ | |_|/ |/| |
| * | partitions/efi: Fix off-by-one error in 'last_lba'Andrey Smirnov2014-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | LBAs are numbered starting from zero so the last LBA # would be equal to total number of blocks minus one. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | blspec: depend on, not select flexible bootargsLucas Stach2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blspec is a consumer of the flexible bootargs mechanism, so it should depend on it rather than select it. Fixes: warning: (BLSPEC && DEFAULT_ENVIRONMENT_GENERIC_NEW) selects FLEXIBLE_BOOTARGS which has unmet direct dependencies (COMMAND_SUPPORT && CMD_GLOBAL) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | common: menu needs PROCESS_ESCAPE_SEQUENCELucas Stach2014-11-241-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | common: firmware: include libfileLucas Stach2014-11-241-0/+1
|/ / | | | | | | | | | | | | | | | | | | Fixes common/firmware.c:206:2: error: implicit declaration of function 'copy_file' in a number of configuration where this file isn't pulled in through other headers. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / blspec: fix incompatible pointer type warningLucas Stach2014-11-071-1/+1
|/ | | | | | | | | The warning is correct in that we pass in size_t instead of int. As we are not interested in the size of the property at this point, just remove the assignment. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/xz'Sascha Hauer2014-11-052-0/+9
|\
| * Add xz decompression supportSascha Hauer2014-11-041-0/+5
| | | | | | | | | | | | | | | | This adds xz decompression support from the kernel. Both compressing the barebox binary with xz and decompressing xz files on the commandline is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: Add XZ filetype supportSascha Hauer2014-10-241-0/+4
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/tegra'Sascha Hauer2014-11-051-0/+1
|\ \
| * | reset_source: add thermal resetLucas Stach2014-11-041-0/+1
| |/ | | | | | | | | | | | | | | Some SoCs are able to detect if they got reset in response to an overtemperature event. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: fix mbr filetype detectionZahari Doychev2014-11-052-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes mbr is erroneously recocognised as FAT partion. Due to this the mbr partition parser is not being called and the partitions on the media are not detected. This patch should fix the problem. The checking is done as in the linux kernel. I have seen the problem using usb sticks. Although partitioning and formatting them under linux. The file system type field in the mbr remains there which causes the wrong detections as FAT32 type and not as mbr. Signed-off-by: Zahari Doychev <zahari.doychev@linux.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | param: let dev_add_param return the newly created paramSascha Hauer2014-10-081-1/+6
| | | | | | | | | | | | | | | | dev_add_param creates a new parameter so it makes more sense to return it than to return an error code. Since the return value is hardly ever checked this is only a small patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clock.c: fix whitespacesAntony Pavlov2014-10-081-47/+47
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-err-ptr'Sascha Hauer2014-10-022-7/+15
|\
| * resource: Let request_ioport_region return an error pointerSascha Hauer2014-09-161-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * resource: Let request_iomem_region return an error pointerSascha Hauer2014-09-162-9/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * resource: Let __request_region return an error pointerSascha Hauer2014-09-162-6/+20
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/firmware'Sascha Hauer2014-10-023-0/+215
|\ \
| * | Add a Firmware programming frameworkJuergen Beisert2014-09-093-0/+215
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This framework handles a list of registered Firmware programming handlers to unify a firmware programming interface by hiding the details how to program a specific Firmware in its handler. This is created with FPGAs in mind but should be usable for other devices aswell. A user has two possibilities to load a firmware. A device file is create under /dev/ which can be used to copy a firmware to. Additionally a firmwareload command is introduced which can list the registered firmware handlers and also to upload a firmware. 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>
* | Introduce message logging supportSascha Hauer2014-09-302-3/+129
| | | | | | | | | | | | | | | | | | | | This adds a buffer for log messages and a 'dmesg' command to print the messages. The log buffer is implemented as log objects rather than a string buffer. This makes it easy to implement limiting the messages, cleaning the buffer and timestamping the messages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | startup: Don't print multiple lines with pr_infoSascha Hauer2014-09-301-1/+3
| | | | | | | | | | | | | | | | Print the banner with pr_info, but the empty lines before and after it with printf. This makes the banner show up in the log show up properly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clock: make get_time_ns() safe to be called without clocksourceSascha Hauer2014-09-301-0/+3
| | | | | | | | | | | | | | | | make it possible to call get_time_ns() before the clocksource has been registered. Just return 0 in this case which is still better than crashing the system. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clock: Add a variable with the first timestamp after startupSascha Hauer2014-09-301-0/+8
|/ | | | | | | For measuring the startup time it's useful to save the first timestamp after the clocksource has been registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>