summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-074-0/+121
|\ | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * Add release stringSascha Hauer2014-07-221-0/+4
| | | | | | | | | | | | | | | | | | Currently we only have version_string which contains information about the date the binary was compiled and by whom it has been compiled. This adds a release_string which only contains the plain release version. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add function to parse a string in dfu formatSascha Hauer2014-07-223-0/+117
| | | | | | | | | | | | | | | | | | The dfu command parses a string which contains a list of devices and flags. This format is useful for other users aswell, so add common helper functions to parse it and let the dfu command use this format. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Merge branch 'for-next/console' into for-next/usb-gadgetSascha Hauer2014-07-221-2/+8
| |\
| * \ Merge branch 'for-next/misc' into for-next/usb-gadgetSascha Hauer2014-07-223-170/+3
| |\ \
* | \ \ Merge branch 'for-next/misc'Sascha Hauer2014-08-074-171/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile
| * | | | Revert "common: resource: print conflicts as warning"Sascha Hauer2014-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On several i.MX boards we register SDRAM with the values from the SDRAM controller and also with values from the device tree. This now issues a warning each time the board is started. Revert the commit for now. A better solution might be to check if the same SDRAM region already exists before trying to register it again. This reverts commit c9e2e08edcdce4205821226817686e62dc349eab. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | sandbox: disable bareboxcrc32 in sandbox modeHolger Schurig2014-07-221-0/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | It won't compile currently anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | introduce verbose debugSascha Hauer2014-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During debugging it sometimes helps to me even more verbose. This adds an additional debug level for this. Also we remove an already existing pr_vdebug definition in the USB gadget u_serial driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dlmalloc: remove unused functionsSascha Hauer2014-07-091-169/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove unused function declarations and definitions: - vallocc is #if 0 in source code - pvalloc is defined but not used - cfree is defined but not used - malloc_usable_size is unused - mallopt is not defined - mallinfo is not defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | hush: Fix error code returned valueHerve Codina2014-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just returns error code instead of 0 or 1. With this fix, $? is set to child exit code in all cases. Without this fix, /child $PATH;echo $? displays 1 even if child script calls exit with a specific non zero error code. Signed-off-by: Herve Codina <Herve.CODINA@celad.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/metadata'Sascha Hauer2014-08-079-0/+361
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile common/Makefile lib/Makefile
| * | | | Add support for metadata in barebox imagesSascha Hauer2014-08-074-1/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's often useful to get some information about a barebox image before starting or flashing it. This patch introduces barebox Image MetaData (IMD). When enabled a barebox image will contain a list of tags containing the desired information. We have tags for: - the barebox release (2014.07.0-00160-g035de50-dirty) - the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014) - the board model the image is intended for - the device tree toplevel compatible property Also there is an additional generic key-value store which stores parameters for which no dedicated tag exists. In this patch it is used for the memory size an image supports. Since there is no fixed offset in a barebox image which can be used for storing the information, the metadata is stored somewhere in the image and found by iterating over the image. This works for most image types, but obviously not for SoC images which are encoded or encrypted in some way. There is a 'imd' tool compiled from the same sources for barebox, for the compile host and for the target, so the metadata information is available whereever needed. For device tree boards the model and of_compatible tags are automatically generated. Example output of the imd tool for a Phytec phyFLEX image: build: #889 Wed Jul 30 16:08:54 CEST 2014 release: 2014.07.0-00167-g6b2070d-dirty parameter: memsize=1024 of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | move file helper functions to separate fileSascha Hauer2014-08-075-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have our file helper functions in several places. Move them all to lib/libfile.c. With this we no longer have file helpers in fs/fs.c which contains the core fs functions and no functions in lib/libbb.c which are not from busybox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/env'Sascha Hauer2014-08-071-8/+25
|\ \ \ \ \
| * | | | | envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to mark an stored envfs image with special features (intentional ignore for example), we now can feed forward these flags. By forwarding a '0' for the flags nothing changes because the envfs superblock was already allocated with xzalloc. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | envfs: provide an intentional way to ignore an existing external environmentJuergen Borleis2014-08-011-0/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple flag to envfs to be able to mark an external environment as "not to be used". This change should not affect existing systems, because the current envfs implementation ensures the 'flags' member in the envfs master block is always zeroed. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/efi'Sascha Hauer2014-08-0710-4/+1504
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore Makefile drivers/serial/Makefile
| * | | | | EFI: introduce efi_strguid to convert GUID to human readable namesJean-Christophe PLAGNIOL-VILLARD2014-07-161-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use in devinfo Protocols Tested today on qemu with all the GUID translated Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | Add initial EFI architecture supportSascha Hauer2014-07-166-3/+1394
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for running barebox in an EFI environment on X86 PC hardware. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | filetype: Add DOS EXE file detection supportSascha Hauer2014-07-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | Move efi.h to include/Sascha Hauer2014-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With upcoming EFI payload support the efi.h file will diverge from the kernel, so move it from include/linux/ to include/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | block: Add flush callbackSascha Hauer2014-07-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some block devices need an explicit callback for flushing written blocks. Add this callback. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | console: Add puts callback to console devicesSascha Hauer2014-07-111-0/+29
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices may have a much more efficient way to output strings rather than single characters. Let console devices implement a callback for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/console'Sascha Hauer2014-08-071-2/+8
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| |
| * | | console: Allow persistent device namesSascha Hauer2014-07-111-2/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | Add a devname field to struct console_device so that the device name can be set by the driver. This makes it possible to have persistent device names. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / barebox: common: Add missing filetype descriptionWadim Egorov2014-07-241-0/+1
|/ / | | | | | | | | | | | | Added missing filetype description for UBIFS. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / barebox: common: added new filetypesWadim Egorov2014-07-091-0/+12
|/ | | | | | | | | - Added omap CH image header recognition * filetype_ch_image * filetype_ch_image_be Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-07-041-1/+1
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/boards/chumby_falconwing/falconwing.c arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c arch/x86/mach-x86.dox scripts/setupmbr/setupmbr.c
| * common: resource: print conflicts as warningAlexander Aring2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crazy things happen if there are resource conflicts and a device probe runs dev_request_mem_region. The dev_request_mem_region returns a start pointer which is zero. The probe function doesn't check on this and probing the device on zero base address. To debug this in debug log level there are many other outputs. This patch replace the debug print to a warning printout. A conflict should normally never happen. If there is a conflict it's much easier to see it with this patch. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/doc'Sascha Hauer2014-07-041-4/+0
|\ \
| * | Documentation: remove doxygen documentationSascha Hauer2014-06-261-4/+0
| |/ | | | | | | | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / menutree: let it select GLOB and GLOB_SORTHolger Schurig2014-07-021-2/+6
|/ | | | | | | | | | | | | | The menutree doesn't select CONFIG_GLOB, but it depends on it. Without it will just hang. So let it select it automatically. Also remove the dependency of CONFIG_GLOB on CONFIG_HUSH, because glob() will run with the simple shell as well. Also let CONFIG_MENUTREE select on CONFIG_GLOB_SORT. While is not strictly needed, many people use menu/00-foo menu/10-bar menu/20-barf to sort their menu entries. So select it out of convenience. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove address of the Free Software FoundationAntony Pavlov2014-06-111-4/+0
| | | | | | | | | | | | | | | | | | The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix format specifiersSascha Hauer2014-06-052-3/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-06-041-5/+7
|\ | | | | | | | | Conflicts: commands/devinfo.c
| * hush: setting variables may failSascha Hauer2014-05-161-5/+7
| | | | | | | | | | | | | | | | In case of device parameters setting variables may fail. return the result of set_local_var so that the user has a chance to detect the failure with $?. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: beautify outputHolger Schurig2014-06-021-2/+2
| | | | | | | | | | | | | | | | | | * fix indentation of options in 'help bootm' * add missing help for -m * put some output into debug/verbose mode Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | misc: upper-case some abbreviationsHolger Schurig2014-06-022-12/+12
| | | | | | | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>