summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* | | Merge branch 'for-next/misc'Sascha Hauer2015-10-073-6/+8
|\ \ \
| * | | introduce strerrorpSascha Hauer2015-09-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | putting an error pointer into strerror can be a bit confusing since strerror takes a positive error code but PTR_ERR returns a negative number, so we have to do strerror(-PTR_ERR(errp)). Some places got this wrong already, so introduce a strerrorp function which directly takes an error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clock: remove duplicate xdelay declarationsSascha Hauer2015-09-232-6/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | ndelay is declared in include/clock.h, udelay in include/common.h and mdelay in include/common.h and include/clock.h. Move them all to include/clock.h and remove duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mci'Sascha Hauer2015-10-071-0/+106
|\ \ \
| * | | drivers: mci: Add mci_get_device_by_name functionDaniel Schultz2015-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get a 'struct mci' by search after the device name. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: mci: Add new ext. CSD field definesDaniel Schultz2015-09-041-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added missing defines for the extended CSD register until standard 5.1. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: mci: Make two functions publicDaniel Schultz2015-09-041-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | There is no possibility to read/write to the extended CSD register of MMC devices from a command. To avoid duplicated driver code, two driver functions have to be public. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-10-071-0/+3
|\ \ \
| * | | chipidea-imx: allow phymode configuration in pdataEric Bénard2015-09-291-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | it's currently only handled through DT and for i.MX25 OTG port (at least), we need to configure portsc to get host mode working but it actually fails as ci->phymode is 0 which is USBPHY_INTERFACE_MODE_UNKNOWN Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / Revert "spi: i.MX: optimize transfers for ECSPI v2.3"Sascha Hauer2015-10-051-2/+1
|/ / | | | | | | | | | | | | This does not work on the Efika MX Smartbook which uses SPI to connect the MC13892. Needs some rework. This reverts commit 746a5530bee37c8d2ffc75609447641b3f3cb55b.
* | reset-source: add stub for of_get_reset_source_priorityLucas Stach2015-09-041-2/+6
| | | | | | | | | | | | | | Allow drivers to build even if reset source support isn't built in. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | wd: add stub for of_get_watchdog_priorityLucas Stach2015-09-041-2/+6
|/ | | | | | | Allow drivers to build even if WD core isn't enabled. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/restart'Sascha Hauer2015-09-014-3/+41
|\
| * reset-source: Allow different prioritiesSascha Hauer2015-08-281-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Different devices may report the reset source with different levels of certainty. For example a SoC may see a power-on reset, but this may only be because an external PMIC has power cycled the SoC. This means the PMIC knows the real reason better and thus the reset reason from the PMIC should be preferred. This patch introduces priorities for the reset_source to handle the above scenario. Also add a of_get_reset_source_priority() function to retrieve the desired priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: Give watchdogs a nameSascha Hauer2015-08-271-0/+2
| | | | | | | | | | | | | | This adds a dev and name member to struct watchdog which helps distinguishing between different watchdogs. Also add some debugging aids. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: Allow multiple watchdogsSascha Hauer2015-08-271-0/+6
| | | | | | | | | | | | | | | | | | Put watchdogs on a list to allow multiple watchdogs. Add a priority field to be able to pick the highest priority watchdog. This patch also provides a of_get_watchdog_priority() function to allow configuring the watchdog priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-272-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/param'Sascha Hauer2015-09-012-4/+4
|\|
| * param_enum: Make name strings constSascha Hauer2015-08-262-4/+4
| | | | | | | | | | | | | | | | Not only the array containing the pointers should be const but also the strings themselves, so instead of using const char ** use const char * const *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of_path'Sascha Hauer2015-09-011-0/+2
|\ \
| * | cdev: Add function to find cdev by device_nodeSascha Hauer2015-09-011-0/+2
| |/ | | | | | | | | | | | | | | | | | | This adds a device_node member to struct cdev and a function to find a cdev by device_node. This also removes the setting of cdev->dev->device_node in the of partition parser. We must not set the device since it may not refer to a partition but to a whole device with partitions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2015-09-012-2/+6
|\ \
| * | spi: i.MX: optimize transfers for ECSPI v2.3Sascha Hauer2015-08-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of writing one word to the txfifo and then wait until one is received in the rxfifo we can write until 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. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: i.MX: use start mode control bitSascha Hauer2015-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The i.MX SPI controller in version 2.3 can immediately start a transfer when the txfifo is written to. In this mode we no longer have to trigger the transfer with the xch bit which makes the code a bit simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: m25p80: make it possible to use large blocks if desiredSascha Hauer2015-08-261-1/+3
| |/ | | | | | | | | | | | | | | | | | | Some SPI NOR flashes support 4K erase blocks. 4K erase blocks do not work with UBIFS which needs a minimum erase block size of 15360 bytes. Also bigger sectors are faster to erase. This patch adds a device tree option to use the bigger blocks instead of the default 4K blocks. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-09-011-2/+2
|\ \
| * | watchdog: Fix static inline opsSascha Hauer2015-08-281-2/+2
| |/ | | | | | | | | | | ...by actually making them static inline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/login'Sascha Hauer2015-09-012-19/+6
|\ \
| * | login: cleanup password codeSascha Hauer2015-08-281-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | - make some locally used functions static - remove read_passwd which is unused - some refactoring to make code pathes clearer Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | login: rework login mechanismSascha Hauer2015-08-282-3/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have the login functionality in the /env/bin/init script. This is hard to review and it's too easy to break the login functionality with changes to this script. Move the places to ask for a password to C code where we have only a few places where we have to ask for a password. Mainly these are run_shell() and the menutree command. This patch introduces a login() function which will only return if the correct password has been entered. Following calls will return immediately without asking for a password again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio'Sascha Hauer2015-09-013-10/+67
|\ \
| * | i2c: add bus recovery infrastructureJan Luebbe2015-08-201-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | This is based on the code introduced to the kernel in 5f9296ba21b3c395e53dd84e7ff9578f97f24295. Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: Drop asm-generic/gpio.hSascha Hauer2015-08-202-10/+22
| |/ | | | | | | | | | | | | | | | | | | Since we no longer have custom gpio function prototypes we can drop the prototypes from asm-generic/gpio.h can add them to include/gpio.h instead. While at it add static inline dummy wrappers for !CONFIG_GENERIC_GPIO so that code using gpios can compile without gpio support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fb-imx-ipu-v3'Sascha Hauer2015-09-012-0/+18
|\ \
| * | video: backlight: add fallbacks for client functionsLucas Stach2015-08-191-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add empty static inline function fallbacks if backlight support is not enabled, so that drivers using the backlight don't fail to build. Fixes: In function `simple_panel_ioctl': undefined reference to `of_backlight_find' undefined reference to `backlight_set_brightness_default' undefined reference to `backlight_set_brightness' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | implement dma_alloc_writecombineSascha Hauer2015-08-071-0/+1
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gui: implement blitting screen areasSascha Hauer2015-08-201-0/+2
| | | | | | | | | | | | | | So far we only supported blitting the whole screen from the shadow fb to the framebuffer. Add a function to blit areas. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gui: Use fb provided shadowfb for offscreen renderingSascha Hauer2015-08-202-7/+3
| | | | | | | | | | | | | | The fb core now has builtin support for offscreen rendering, use this and drop offscreen handling in the gui code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: Add shadowfb supportSascha Hauer2015-08-201-0/+3
|/ | | | | | | | | | | | For speeding up rendering we need shadow framebuffers. This is currently implemented in the gui functions. This does not work properly when two users (splash and fbconsole) use the same framebuffer since in this case two different shadow framebuffers will be used. This patch implements shadowfb handling in the fb core directly. With this the fb device gets a parameter 'shadowfb'. When this is true the fb core will allocate a shadow fb and provide it to the users. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vpl'Sascha Hauer2015-08-074-0/+106
|\