summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* bootm: use names instead of numbers for image partsSascha Hauer2016-01-221-3/+3
| | | | | | | | | The uImage format uses numbers for to identify the different parts of a image, but the FIT image format uses names. To better integrate the FIT image format into bootm always use names and convert them to numbers when necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_get_os_sizeSascha Hauer2016-01-221-0/+1
| | | | | | | | ARM do_bootm_linux is not only called with uImages but also with raw images, so we can't use uimage_get_size() here. Introduce bootm_get_os_size() which handles the different image types. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rtc'Sascha Hauer2016-01-112-0/+10
|\
| * net: Add SNTP supportSascha Hauer2016-01-071-0/+8
| | | | | | | | | | | | | | | | This adds support for retrieving the time via Simple Network Time Protocol (SNTP). No fancy features are supported, only plainly getting the current time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * hwclock command: use format like the Linux tool doesSascha Hauer2016-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print three-letter abbreviations of the days and months. With a fixup by Andrey Smirnov: | common/date.c: Fix off-by-one error | | As per http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html | 'tm_wday' is zero indexed with zero representing Sunday, this is also | corroborated by the code in rtc_time_to_tm() which used 4 to represent | Thursday. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pstore'Sascha Hauer2016-01-116-0/+293
|\ \
| * | fs: Add pstore filesystemMarkus Pargmann2015-12-102-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pstore is a persistent storage filesystem used for RAMOOPS. It is used to store console logs, panics, ftrace and other information in case of a crash/panic/oops/reboot. pstore is implemented for barebox as a read-only filesystem at the moment. It may be extended later on. The idea is to provide a way to extract essential data from the last running kernel. Most of the code is copied from the kernel. However this is only a lightweight implementation without real write support yet. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: Import reed solomon code from kernelMarkus Pargmann2015-12-101-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | reed solomon code is used by RAMOOPS to check and fix data stored in volatile memory. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | vsprintf: Add scnprintf from kernelMarkus Pargmann2015-12-101-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | printk: Add missing include/declarationMarkus Pargmann2015-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | There are functions or structs used that do need these. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | log2: Add missing __rounddown_pow_of_two()Markus Pargmann2015-12-101-0/+9
| |/ | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2016-01-111-2/+2
|\ \
| * | net: resolv: Make argument constSascha Hauer2015-12-141-2/+2
| |/ | | | | | | | | | | resolv() is not allowed to change the hostname argument, make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-01-111-0/+5
|\ \
| * | mtd: nand: Add erased page bitflip check helper functionsMarkus Pargmann2016-01-041-0/+5
| |/ | | | | | | | | | | | | | | | | | | This adds the bitflip check helper functions from the kernel. They are used to check for bitflips in erased pages and correct them in the buffer so that UBI can work with it. Unfortunately most nand controllers do not have ECC for erased pages and don't do this on their own. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-01-113-6/+26
|\ \
| * | of: Add of_property_for_each_phandle() iteratorTrent Piepho2016-01-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is like of_property_for_each_{string,u32} but loops over a list of phandles instead of strings or ints. Returns the node the handle points to as that's generally more useful than the handle value itself. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add for_each_compatible_node_from iteratorTrent Piepho2016-01-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing iterator for_each_compatible_node() searches for each compatible node starting from the root of the loaded device tree. This means it only works on the barebox device tree and not the tree to be passed to the Linux kernel, which is what an of_fixup would probably want to use. This adds for_each_compatible_node_from(), which takes an additional parameter of a root to search from. This could be the device tree to be used for the kernel. It could also be used to search just a subtree. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | devfs: Add symlink supportSascha Hauer2016-01-081-0/+5
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootstrap: constify stringsTrent Piepho2016-01-081-4/+4
| |/ | | | | | | | | | | | | Various parameters for device names, etc. should be const strings. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gcc5'Sascha Hauer2016-01-111-2/+2
|\ \
| * | linux/barebox-wrapper: Silence gcc5 warningSascha Hauer2015-12-101-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | gcc5 warns about using flags uninitialized in spin_lock_irqsave, although it could look into the static inline spin_lock_irqsave implementation and see it's not used at all. An empty define instead of the static inline wrapper would lead to a "unused variable" warning. Let's create a macro and fake some usage of the flags variable. This probably helps until gcc6 is out. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | led: add missing includesAlexander Aring2016-01-071-0/+3
| | | | | | | | | | | | | | | | The led header use some parts which are missing when include the this header. This patch adds them. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootstrap: Boot barebox with kernel calling conventionTrent Piepho2015-12-141-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | In commit 8e3ddc13eb8239177ed20f119e3a3d02518b941d the bootm code was changed to boot barebox using the same calling convention as the kernel. Which on ARM is to pass three arguments which are zero, an architecture code, and a params pointer. A 2nd stage barebox can be booted using lib/bootstrap, which is different code from bootm. This code just leaves garbage in the first three parameters and so doesn't follow the convention. Change it to be compatible with the ARM kernel booting convention. This just sends a zero for the architecture, since the code for architectures depends on boot[zmu] and something using bootstrap wouldn't have those too. And it just passes NULL for the params since we don't have a way to pass a device tree from the preloader. All users of bootstrap are ARM based, but the code is in lib so a non-ARM board might someday make use of it. If the current code would work for them, then the change here will be ok too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i2c: Port two utility functions from Linux kernelAndrey Smirnov2015-12-081-0/+15
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2015-12-083-1/+27
|\
| * crypto: add simple keystoreMarc Kleine-Budde2015-11-271-0/+26
| | | | | | | | | | | | | | | | This patch adds a simple keystore to barebox. The keystore implements a simple key-value store to hold arbitrary values. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: disable load commandEnrico Jorns2015-11-271-1/+0
| | | | | | | | | | | | | | | | | | Explicitly loading environment is not required as it will be loaded if available during device probing Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_path: add of_find_path_by_node()Marc Kleine-Budde2015-11-271-0/+1
| | | | | | | | | | | | | | | | | | This patch adds the function of_find_path_by_node(), which is similar to of_find_path(), but it translates a device tree node into a barebox device path directly. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/reset'Sascha Hauer2015-12-081-18/+4
|\ \
| * | reset: Add gpio reset supportSascha Hauer2015-11-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a device has the reset-gpios property we can support this through the reset controller API, so drivers do not have to open code the support for this property each time themselves as done a few dozen times in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | reset: Remove unused *_optional functionsSascha Hauer2015-11-231-22/+0
| |/ | | | | | | | | | | | | | | Since we now have dummy reset controllers we no longer need the *_optional functions. These have been unused anyway, so just remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2015-12-081-0/+2
|\ \
| * | of: mtd: Import of_get_nand_ecc_{step_size, strength} from LinuxSebastian Hesselbarth2015-11-231-0/+2
| |/ | | | | | | | | | | | | | | This imports DT helpers for MTD ECC step size and strength from Linux kernel. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mmc'Sascha Hauer2015-12-082-1/+3
|\ \
| * | mci: dw_mmc: Delete devname in platform_dataTrent Piepho2015-11-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing used it. Also delete the local mci alias pointer to host->mci in dw_mmc_probe(). It only saved a few characters and all the references but one are using host->mci. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: dw_mmc: socfpga: Supply bus-width in platform_dataTrent Piepho2015-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is no OF support in the xloader on socfpga it uses the platform_data system. There needs to be a way to supply the equivalent of the DT property bus-width this way to support devices that need to use a smaller bus. So that we don't need to put every flag that might get added to the MMC_CAP list into platform_data, just put the bus width ones into platform_data. The socfpga dts sources specify a bus-width of 4 so use that in the platform_data for socfpga. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: core: bus-width property should override driver defaultTrent Piepho2015-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OF code for parsing bus-width would only add the specified width to those the driver might have already set capability flags for. Because of this, if the driver had set 8 or 4 bit width, it wasn't possible for the DT to specify that fewer pins were used on the board and a smaller width was necessary. Change this so the width in the DT overrides whatever widths the driver says it supports. There is no reason to have an incorrect device tree and it makes far more sense for the DT to override the driver default than for the driver default to override the DT. The widths the driver puts in host_caps before calling mci_of_parse() are considered the default if the DT doesn't specify bus-width. This should cause the least amount of change to existing boards, as despite a comment that no bus-width meant to use 1 bit, using the driver default is what was really happening. Unfortunately, half of existing drivers default to the largest width they support while the other half default to the smallest. Boards should just stick the width in the device tree. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-12-081-1/+2
|\ \ \
| * | | spi: i.MX: optimize transfers for ECSPI v2.3Sascha Hauer2015-11-301-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of writing one word to the txfifo and then wait until one is received in the rxfifo we can write while the txfifos are not full and read as long the rxfifos contain data. This makes transfers for the m25p80 driver around 7 times faster here. Unlike the last version this time we only optimize the common case with 8 bits per word and SPI_LSB_FIRST cleared. The other cases would require more bit shuffling of the data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/i2c'Sascha Hauer2015-12-083-1/+63
|\ \ \
| * | | eeprom: Add support for 24c1025 EEPROMTrent Piepho2015-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the Microchip version of the Atmel 24c1024, which is already supported. The key difference between them is that the I2C address bit used to select between the two banks is bit 2 for the 1025 and not bit 0 as in the 1024. Add a flag to describe this difference. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: add pca954x bus multiplexer driverAntony Pavlov2015-11-191-0/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: import multiplexed I2C bus core support from linux kernelAntony Pavlov2015-11-192-1/+45
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: Create for_each_i2c_adapter()Sascha Hauer2015-11-191-0/+4
| |/ / | | | | | | | | | | | | | | | This can be used by the i2c_probe command to iterate over i2c adapters. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/fb'Sascha Hauer2015-12-081-4/+11
|\ \ \
| * | | font: fbconsole: add custom font supportsDu Huanpeng2015-11-231-0/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fbconsole: register fonts dynamicallySascha Hauer2015-11-131-4/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having a fixed array of fonts register the fonts dynamically. This allows easier adding of fonts to the tree since only one file per font has to be added and no other files modified. Currently we have to register the fonts very early before the first framebuffer is registered. This is because of our limited dev_add_param_enum() which wants to know the number of elements when called, so we can't add elements once after we've called dev_add_param_enum(). Maybe a dev_add_param_array() has to be created whithout this limitation, but that's left for a future exercise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm'Sascha Hauer2015-12-081-6/+0
|\ \ \ | |_|/ |/| |
| * | ARM: Remove do_execute and thumb2_executeTrent Piepho2015-12-071-6/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 104a6a7ccfb7928ca5dc28c8cbe0ea231ffc45ee support was added for Thumb2. It added do_execute() as a way to provide arch dependent calling veneers for use in "go" and thumb2_execute() as the thumb2 to arm veneer. But thumb2_execute() isn't necessary as gcc generates a proper calling sequence from a standard function pointer call. Thumb2 barebox is compiled with the AAPCS ABI which requires this. It also had a bug and didn't pass the arguments properly, but code execute via "go" rarely uses arguments so this wasn't very noticeable. Since thumb2 was always the only user of do_execute(), go ahead and delete that too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>