summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/pci'Sascha Hauer2016-05-095-109/+217
|\
| * PCI: imx6: Add DT bindings to configure PHY Tx driver settingsAndrey Smirnov2016-05-031-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The settings in GPR8 are dependent upon the particular layout of the hardware platform. As such, they should be configurable via the device tree. Look up PHY Tx driver settings from the device tree. Fall back to the original hard-coded values if they are not specified in the device tree. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Justin Waters <justin.waters@timesys.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Remove broken Gen2 workaroundAndrey Smirnov2016-05-031-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the remnants of the workaround for erratum ERR005184 which was never completely implemented. The checks alone don't carry any value as we don't act properly on the result. A workaround should be added to the lane speed change in establish_link later. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Move PHY reset into imx6_pcie_establish_link()Andrey Smirnov2016-05-031-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the PHY reset into a common error path of imx6_pcie_establish_link(), deduplicating some of the debug prints. Also reduce the severity of the "no-link" message in the one place where it is expected to be hit when no peripheral is attached. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Move imx6_pcie_reset_phy() near other PHY handling functionsAndrey Smirnov2016-04-281-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Move imx6_pcie_reset_phy() near the other PHY related functions in the file. This is a cosmetic change, but also allows to do the following changes without introducing needless forward declarations. [Andrey Smirnov: port to Barebox codebase] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Simplify a trivial if-return sequenceFabio Estevam2016-04-281-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Simplify a trivial if-return sequence by combining it with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Rename imx6_pcie_start_link() to imx6_pcie_establish_link()Andrey Smirnov2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rename imx6_pcie_start_link() to imx6_pcie_establish_link() to follow the convention of other DesignWare-based host drivers. No functional change. [Andrey Smirnov: port to BB codebase] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Pratyush Anand <pratyush.anand@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Add proper i.MX6+ reset sequenceAndrey Smirnov2016-04-282-29/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.MX6+ version of the silicon exposed PCIe core's reset signal as a bit in one of the control registers. As a result using old, pre-i.MX6+, reset sequence on i.MX6+ leads to Barebox hanging during startup. Using exposed reset bit instead solves the problem. This commit is based on portions of commit c34068d48273e24d392d9a49a38be807954420ed in http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * OF: Port of_match_device() and of_device_get_match_data()Andrey Smirnov2016-04-283-1/+82
| | | | | | | | | | | | | | | | | | Port of_match_device() and of_device_get_match_data() from Linux kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PCI: imx6: Simplify imx6_pcie_remove()Andrey Smirnov2016-04-281-18/+1
| | | | | | | | | | | | | | | | | | | | Instead of manualy flipping the bits call imx6_pcie_assert_core_reset() to give the code, executing after BB, a clean slate. This also makes the function match similar code in Linux kernel driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-05-093-58/+42
|\ \
| * | mtd: nand: omap_gpmc: Fix bitflips in empty pageTeresa Remmet2016-04-121-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using BCH8 decoding, bitflips in an empty page are not checked. This can cause issues if UBI/UBIFS are used. Extend the omap_correct_bch() function to check for them. Code is based on linux mainline mtd/nand/omap2.c driver. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: omap_gpmc: Remove BCH4 supportTeresa Remmet2016-04-123-39/+1
| | | | | | | | | | | | | | | | | | | | | This has no users and seems to be untested. Removed it. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-05-0951-531/+724
|\ \ \
| * | | net: phy: Add fixed link supportSascha Hauer2016-05-092-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some network devices, especially when connected to a switch, are connected via a fixed link. This patch adds support for a fixed phy configured through device tree. TODO: Add support for the "speed" and "full-duplex" properties. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
| * | | Kconfig: Create Kconfig symbol for NVVARSascha Hauer2016-04-283-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvvar support not only needs globalvar, but also persistent environment storage. Add a separate default-y option which depends on ENV_HANDLING for this case. Make the option visible to let the user decide whether he wants to have this option and add a help text to make this decision easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Kconfig: Make ENV_HANDLING visibleSascha Hauer2016-04-282-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENV_HANDLING is usable even without explicit loadenv/saveenv command support. Instead of selecting this option from loadenv/saveenv, make this option visible. loadenv/saveenv can then depend on ENV_HANDLING rather than selecting it. This reduces Kconfig dependencies hassles. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Kconfig: Make GLOBALVAR visibleSascha Hauer2016-04-282-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently global environment variables are only enabled when the "global" command is enabled. In fact, they could be used even with the "global" command disabled, so make the GLOBALVAR option visible. While at it, add a help text for this option. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ATA: Implement a hook for 'devinfo'Andrey Smirnov2016-04-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement simple adapter function to serve as a hook for 'devinfo' command. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | scripts: Add big endian conversion macros to endian.hSascha Hauer2016-04-281-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Some programs need the big endian macros, add them to andian.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: fix of_tree_for_each_node_from() macroBoris Brezillon2016-04-281-32/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_tree_for_each_node_from() is supposed to iterate over all DT nodes after the one pointed by the from parameter, but with the current of_next_node() implementation we cannot access the root node. Patch of_next_node() to point to root_node when from is NULL. Doing that also simplifies users of of_tree_for_each_node_from() which were duplicating the logic to point to the root_node when from is NULL. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | state: Fix Kconfig dependenciesSascha Hauer2016-04-282-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | State support does not need OF_BAREBOX_DRIVERS and never did, so drop the dependency there. It's the state driver which needs of_find_path(), since this symbol now is always enabled when OF is enabled, we don't have to add the dependency to the state driver, but instead can depend on OFDEVICE. We could depend on OF instead, but compiling the state driver without OFDEVICE makes no sense. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers/of: Always compile of_path.c with OF supportSascha Hauer2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | of_find_path() is a OF specific library function, so always compile it when OF support is enabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: preserve /memreserve/ entriesSascha Hauer2016-04-251-6/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some dts files for the Kernel specify a reserved memory area using the /memreserve/ dtc directive. These entries get lost during unflattening/flattening the device tree and are never passed to the Kernel. This patch fixes this behaviour. This is done by copying the entries into a /memreserve node in the unflattened tree and moving them back during flattening the tree. The entries added by barebox dynamically are appended to the static entries from the original dtb. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | whole tree: remove trailing whitespacesDu Huanpeng2016-04-2132-438/+438
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | menu: add vi like key supportDu Huanpeng2016-04-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add vi like key support: j: down k: up <Space>: select Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | wchar_t: wchar_t should go to stddef.hDu Huanpeng2016-04-143-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | according to C99 standard, the definition of wchar_t should go stddef.h this patch also remove wchar_t local definition and use stddef.h instead. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | NULL: keep NULL definition in stddef.h onlyDu Huanpeng2016-04-142-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove other local definition of NULL, use #include <linux/stddef.h> instead. I use this command to search NULL definition, grep -R "define\s*\<NULL\>" hope there are no more definition of NULL. from ISO/IEC 9899:TC3: The macros are NULL which expands to an implementation-defined null pointer constant; Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: mxs: add support for dt aliases to name devicesUwe Kleine-König2016-04-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While changing there, reformat the comment and use ; instead of , after the previous call. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl: mxs: add raw value from device tree to debug outputUwe Kleine-König2016-04-121-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Not sure this is of general interest, but it helped me matching pin configs from a static table to device tree entries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/include-pdata'Sascha Hauer2016-05-0989-81/+54
|\ \ \
| * | | include: Move ide platform_data to include/platform_dataSascha Hauer2016-04-155-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move smc911x eth platform_data to include/platform_dataSascha Hauer2016-04-154-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move dm9000 eth platform_data to include/platform_dataSascha Hauer2016-04-159-8/+7
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move ns16550 serial platform_data to include/platform_dataSascha Hauer2016-04-1521-20/+11
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move fec eth platform_data to include/platform_dataSascha Hauer2016-04-1537-36/+20
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move davinci emac platform_data to include/platform_dataSascha Hauer2016-04-152-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move designware eth platform_data to include/platform_dataSascha Hauer2016-04-153-2/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move smc91111 eth platform_data to include/platform_dataSascha Hauer2016-04-156-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: Move ep93xx eth platform_data to include/platform_dataSascha Hauer2016-04-153-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/include-cleanup'Sascha Hauer2016-05-09130-584/+509
|\ \ \ \
| * | | | commands: mmc_extcsd: Fix incorrect usage of sprintfAndrey Smirnov2016-04-281-33/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a number of places print_field_ge_v7() and print_field() function would call sprintf() without providing is with appropriate output buffer (str is initialized to NULL). Replace the sprintf() with basprintf() to fix that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | stdio: Whitespace cleanupSascha Hauer2016-04-151-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the tabs with spaces before the function names. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | stdio: Replace FILE functions with filedescriptor functionsSascha Hauer2016-04-155-37/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have defined stdin, stdout and stderr as integer file descriptors, but normally they should be FILE *. Also fprintf, fputc and fputs take file descriptors instead of FILE *. As FILE * are inconvenient in the barebox environment replace the f* functions with the corresponding d* functions. dprintf is POSIX conform whereas dputc and dputs are barebox specific, but do not conflict with any stdc function. fgetc is unused and can be removed without replacing it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | stdio: replace fprintf(stderr,...) with eprintfSascha Hauer2016-04-157-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a shortcut for fprintf(stderr, so use it. This is done to be able to remove fprintf in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | stdio: rename getc to getcharSascha Hauer2016-04-1512-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | fs: move libc function prototypes to their correct locationsSascha Hauer2016-04-157-140/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the function prototypes in include/fs.h which also exist in the libc to the locations they would have in libc. With this it becomes easier to share code between barebox and userspace since the usual libc include files will exist. Also users of the libc functions no longer have to include the barebox internal fs.h header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | move unlink_recursive declaration to libfile.hSascha Hauer2016-04-155-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unlink_recursive is a file utility function, so move the prototype to libfile.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | move make_directory declaration to libfile.hSascha Hauer2016-04-157-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a utility function for file handling make_directory() is well suited for libfile. Move it there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | string: Fix (v)asprintf prototypesSascha Hauer2016-04-1577-165/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>