summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* / net: eth: Remove ethaddr_paramJan Remmet2015-11-201-1/+0
|/ | | | | | | | commit d00db554 introduce ethaddr_param. But it is not initialized, so devinfo fails to show the mac. Remove it and use edev->ethaddr. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2015-11-061-0/+1
|\
| * usb: core: return -EAGAIN on usb_* functions reentrancePeter Mamonov2015-10-141-0/+1
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-11-061-2/+1
|\ \
| * | clock.h: include <types.h> under guard macroAntony Pavlov2015-10-221-2/+1
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/memtest'Sascha Hauer2015-11-062-2/+47
|\ \
| * | memtest: By default only test biggest regionSascha Hauer2015-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Often enough the biggest free region spans most free RAM, so it doesn't add much value to test the remaining free regions. This patch changes the default behaviour to only test the biggest free region and adds the -t option to test all regions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memtest: split tests in separate functionsSascha Hauer2015-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The memtest does a bus integrity check and a moving inversions test. Split the tests into two separate functions so that the can be called separately. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rework remap_rangeSascha Hauer2015-11-031-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | memtest: move request/release regions to common/Sascha Hauer2015-10-271-0/+3
| |/ | | | | | | | | | | | | | | Normally code providing a feature should be implemented in common/ which is then called from the command code. Follow this rule and move some more of the memtest code to common/. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fcntl: Fix O_CREAT clashing with O_RWSIZE_8Sascha Hauer2015-11-041-6/+6
|/ | | | | | | | | | | | | | | | | | | O_CREAT and O_RWSIZE_8 are both defined as 0100. Fix this by moving the O_RWSIZE_* flags to unused bits. This bug leads to incomplete writes when the destination file is created and mem_write is involved, for example with the memcpy command: memcpy -s /some/file -d /dev/ram0 0 0 10 In this case only 8 bytes will be copied and it will be done using 8 byte accesses which may not work properly if the destination is not sufficiently aligned, i.e.: memcpy -s /some/file -d /dev/ram0 0 1 8 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* Merge branch 'for-next/usb'Sascha Hauer2015-10-074-92/+170
|\
| * common: clock: introduce mdelay_non_interruptible()Peter Mamonov2015-10-022-0/+2
| | | | | | | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: chipidea: Add udc unregister for device removalMarkus Pargmann2015-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The host may assume that the usb device is still up and running after booting if we do not deregister the udc here. I observed issues when the linux kernel was using a usb gadget directly where the complete USB Hub got disconnected through this. This patch adds a proper USB disconnect for gadget devices. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * endian: sync {big,little}_endian.h with linux-4.2Antony Pavlov2015-09-102-80/+156
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * endian: Always evaluate argumentsDavid S. Miller2015-09-022-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on commit 3d6f4a20cc287a8980c6186624834cf10a70752b Author: David Miller <davem@davemloft.net> Date: Thu Jul 24 23:38:31 2008 -0700 endian: Always evaluate arguments. In barebox.git/drivers/usb/core/usb.c, function usb_parse_config() we have had le16_to_cpus(&(dev->config.wTotalLength)); which evaluates to "do { } while (0)" on little endian, so struct usb_configuration field misuse will never be discovered on little endian. Therefore, always evaluate the arguments to nop endian transformation operations. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap'Sascha Hauer2015-10-071-0/+1
|\ \
| * | detect_fs: use device instead of fileVicente Bergas2015-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | detect_fs would usually mount a device on a directory, so, use a device-specific type detection. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2015-10-071-0/+12
|\ \ \
| * | | mtd nand: added 'bits_per_cell' propertyEnrico Jorns2015-09-231-0/+12
| |/ / | | | | | | | | | | | | | | | | | | This one is available in the kernel and used by the denali driver Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>