9
0
Fork 0
Commit Graph

3377 Commits

Author SHA1 Message Date
Marc Kleine-Budde c681e4a45b of_path: of_find_path(): remove unused variable len
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:23:46 +01:00
Marc Kleine-Budde c961485abf drivers: remove unused function dev_protect()
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-03 08:23:46 +01:00
Lucas Stach 32a629976e net: designware: don't depend on CONFIG_OFTREE
This driver is written in a way that is should also work without
DT, but it had a compile time dependency on CONFIG_OFTREE.

Fixes:
drivers/built-in.o: In function `dwc_probe_dt':
drivers/net/designware.c:413: undefined reference to `of_get_phy_mode'

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-02 07:35:39 +01:00
Lucas Stach 02972681ac net: rtl8169: silence compiler warning
Silence warning about cast from volatile to normal pointer,
as this is the intended bhavior here.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-25 08:36:48 +01:00
Andrey Smirnov 79b40a630d firmware: altera: Make nSTAT GPIO optional
By taking parts of the programming handshaking protocol on faith it is
possible to make due with only two GPIO for programming Altera
FPGAs. This is not a very advisable practice, but sometime unavoidable
in GPIO constrained designs.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-19 20:50:19 +01:00
Sascha Hauer ed440360e6 mtd: fixup device tree partitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:44 +01:00
Sascha Hauer 2bdbd1436d mtd: Add a partitions parameter to mtd devices
The partitions parameter allows to partition a mtd device
using a standard cmdline partition description string. This
way the partitions of a mtd device can be changed at once.
The output of the string can be used to be passed to the kernel
as cmdline partition string. The partitions can also still be
changed with addpart/delpart, the partitions parameter will
be updated accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:44 +01:00
Sascha Hauer 8f19864803 mtd: Use flags parameter in mtd_add_partition
mtd_add_partition is passed a flag parameter. This has been unused
so the DEVFS_PARTITION_FIXED and DEVFS_PARTITION_READONLY were ignored.
Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:44 +01:00
Sascha Hauer 8587c5f8a9 mtd: forbid conflicting mtd partitions
mtd partitions should not conflict with each other, so forbid this.
Also add the partitions to the partitions list sorted, so that they
can be easier translated into a cmdline partition string.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:44 +01:00
Sascha Hauer 7649473f40 mtd: nand: remove automatically created bb devices
the bb devices which are created in add_mtd_device() must be removed
in del_mtd_device(). Also remove deletion of the bb devices in the
mtdparts-add environment file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:43 +01:00
Sascha Hauer 99bed34278 mtd: Add partitions to list
So that we can iterate over the existing partitions from the master
mtd device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:43 +01:00
Sascha Hauer 891e08b822 mtd: partitions: Add error check
add_mtd_device can fail. Add an error check and bail out properly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:43 +01:00
Sascha Hauer 31d8b2e83d mtd: partitions: Use xstrdup
The return value of strdup is not checked. Use xstrdup instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:43 +01:00
Sascha Hauer b798f55495 mtd: core: add error checks
register_device and devfs_create can fail. Add error checks for these.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:42 +01:00
Uwe Kleine-König dd6090ecba mtd: nand-imx: don't copy more bytes than read from hardware
The NFC command used for reading the result of a READID command to the NAND chip
reads 6 bytes (in x8 mode) or 6 words (in x16 mode with the upper bytes all
being 0). So there is no need to safe 16 bytes for later consumption.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-11 09:49:30 +01:00
Brian Norris 1a0ab5e97e mtd: nand: cleanup ONFI printed errors, warnings
This corresponds to commit c7f23a70635895b5125aeb5593aaf8cb44d3a088 in
the Linux kernel.

One notable difference is however that ONFI detection is allowed here
even in 16-bit mode. This is proved to work fine on an i.MX25 based
machine with a x16 NAND.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-11 09:49:30 +01:00
Uwe Kleine-König a6eacb9b33 mtd: nand-imx: fix byte reading in x16 mode
There are a few NAND commands that make the chip only respond on I/O
lines 0 to 7 even for x16 devices. READID (90h) is one such command
which was already handled fine in the driver (at least for NFC v1 and
v2). Other commands (like PARAM (ECh) to read out ONFI parameters)
however were not handled properly. Instead of adding another callback
make the read_byte callback handle the holes added by the NFC and depend
on the nand-base support to call read_byte when necessary instead of
read_buf.

This fixes reading the ONFI parameter page on an i.MX25 with an x16 NAND
and probably[1] also the result of READID on i.MX51/i.MX53 with x16
NAND.

[1] untested because no matching machine available

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-11 09:49:30 +01:00
Sascha Hauer c7dbb6c689 mtd: nand-bb: Also print raw position in debug messages
When debugging the nand-bb devices also the raw position on the
device is interesting, print it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:58:23 +01:00
Sascha Hauer ce073eb9e4 mtd: nand-bb: Fix test for bad block when reading
in nand_bb_read() 'offset' contains the virtual position on the device,
but we have to test for a bad block on the raw physical position, so
use bb->offset instead of offset

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:58:23 +01:00
Sascha Hauer eebfbe9116 mtd: nand-bb: fix erasing bb devices with bad blocks
mtd_erase does not skip bad blocks, we must skip them in nand_bb_erase
instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:58:18 +01:00
Sascha Hauer 3b71b23b46 mtd: nand-bb: Fix accesses beyond device
When a block is marked bad after the bb device has been created
the real size of the bb device is smaller than the calculated size
on creation. In this case we can't rely on the upper layers anymore
that they won't pass read/write sizes in that fit into the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:55:44 +01:00
Sascha Hauer 9d82489c07 mtd: Fix allowing to erase bad blocks on partitions
Partitions are mtd devices themselves, but the 'erasebad'
parameter is only set to the master mtd device. To allow to
erase bad blocks on partitions test the master device instead
of the partition devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:55:44 +01:00
Sascha Hauer 0d26729d85 mtd: nand: omap: Fix OMAP_ECC_BCH8_CODE_HW ecc mode
This is broken since:

| commit 00f119a293
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Fri Aug 1 14:09:48 2014 +0200
|
|     mtd: omap gpmc: fix ecc bytes/size
|
|     The ecc bytes / size are per subpage, not per page.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

The ecc code in omap_correct_data() expects to correct a whole page
at once, so we must tell the nand layer that we have 4 * 13 bytes of
ecc bytes and 4 * 512 bytes of ecc size. Otherwise the NAND layer will
iterate over 512 byte steps over a page and call the .correct callback
each time.

This only works for 2k pagesize and needs revisit once other page sizes
shall be supported. It would be better to tell the nand layer the real
ecc bytes (13) and ecc size (512) instead and drop the iteration in
omap_correct_bch(). However, this needs better testing so it isn't done
here now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:55:43 +01:00
Sascha Hauer 2afe398a62 Merge branch 'for-next/raspberry-pi' 2015-02-04 19:09:15 +01:00
Sascha Hauer 1b95290433 Merge branch 'for-next/pxa' 2015-02-04 19:09:15 +01:00
Sascha Hauer 7b0f932bcd Merge branch 'for-next/mxs' 2015-02-04 19:09:15 +01:00
Sascha Hauer ce961e3412 Merge branch 'for-next/misc' 2015-02-04 19:09:15 +01:00
Sascha Hauer a7c92d6c5d Merge branch 'for-next/imx' 2015-02-04 19:09:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD f72725e352 regulator: add bcm2835 driver
this will allow to handle IP power automatically and not at board level

Mainline kernel need this as they do not have the regulator driver support

as some IP such as USB are not power on at boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 15:49:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 515fefa8a5 regulator: allow to use it with non DT device
this will use the device name as regulator name

with the same Algo as clkdev for lookup

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 15:49:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5e8bf4f5d9 amba: pl011: add support for regulator
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 15:49:58 +01:00
Bo Shen 3ee82c6779 usb: at91_udc: pass the vbus initial value
If without pass the vbus initial value, the vbus status alway
present as 0 even if the vbus is connected to 5v.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 12:53:58 +01:00
Robert Jarzmik cb79adb064 net: smc1111: improve debug capability
Improve smc1111 driver debug messages by printing the register accessed,
the current bank, and the values.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 12:52:43 +01:00
Robert Jarzmik a8d19f1f2f net: smc1111: extend the driver for 91c94 and 91c96 support
All the smcs family chips 91c94, 91c96, 91c100, 91c111 share almost the
same behavior and register sets. The noticeable exceptions are coped
with in this patch, ie :
 - 91c94 and 91c96 only have an internal 10 Mbps phy
   The registers used for phy discovery on later chips will corrupt the
   91c96 state.
 - 91c94 and 91c96 have a control and config register quite different
   from their 91c1xx conterparts
   A platform data user defined couple of registers is introduced. If
   these values are 0, 91c1xx legacy behavior is assumed.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 12:52:43 +01:00
Robert Jarzmik d6f8016ce7 net: smc1111: add 16 bits accessors, allow address shift
Smc network IPs can be wired up in different funny ways. For example the
lubbock pxa25x development platform wires all address lines shifted by
2, ie. bus A2 is smc91c96 A0, bus A3 is smc91c96 A1 etc ...

In order to cope with the different possible combination, add a shift
parameter for addresses.

By default, the old behaviour using the 32 bit accesses is kept.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-04 12:52:43 +01:00
Masahiro Yamada f5cb522743 pinctrl: remove unnecessary error check
The file drivers/pinctrl/pinctrl.c is compiled only when
CONFIG_PINCTRL is defined.  "IS_ENABLED(CONFIG_PINCTRL)" is
always evaluated as 1 in this function.
(Although the compiler would optimize it, the source file does
not look nice.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:31 +01:00
Masahiro Yamada 262eef7c6a usb: abolish wait_ms() function
This function is only used in drivers/usb/*.
It is equivalent to mdelay().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-02 11:46:30 +01:00
Stefan Christ a114e9b00c ARM: i.MX6: use generic calculation in nand bbu handler
The parameters ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit in
the FCB structure depends on the nand chip's pagesize and oobsize. Instead of
hardcoding these values into the imx6 bbu handler calculate these values on the
fly. Therefore we export the necessary functions from the nand_mxs driver to
use them in the bbu handler.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 07:58:00 +01:00
Wadim Egorov f0f6a7477b Fix spelling: pathes -> paths
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:02:56 +01:00
Sascha Hauer 3a0122c712 pinctrl: Add MXS pinctrl driver
This adds a device tree pinctrl driver for MXS.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:21:18 +01:00
Sascha Hauer c42178d9fc of: Create platform_device when creating AMBA device failed
If creating an AMBA device failed, maybe because AMBA support is
not compiled in, register the device as regular platform device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer f0535fe5ee serial: stm_serial: Add devicetree support
This adds device tree support for the stm serial driver. This
driver really is a AMBA primecell, so the amba-pl011 could be
used. However, the current code tries to get the apb_pclk before
the clocks are registered, so this does not work. Use the stm
driver instead until a solution is found.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer 846f27cf92 mci: mxs: Add devicetree support
Add device tree compatibles and allow retrieving data from device tree
instead of platform_data only.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Sascha Hauer 478ea1c0b1 ARM: MXS: Make gpio a driver
This turns the MXS gpio support into a driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:43 +01:00
Uwe Kleine-König 866516511e trivial: s/flasg/flash/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-27 08:59:18 +01:00
Robert Jarzmik 0ebe45422a mtd: nand: add mrvl-nand driver
The driver is taken from the Linux kernel, with the following changes :
 - all DMA removed
 - all asynchronous handling removed, including the interrupt handler,
   and the asynchronous state handling
 - pxa armada support removed

Most the kernel structure was kept, to ease up future fixes integration
from the kernel driver.

The driver is tested on a pxa3xx system development
board (aka. zylonite), and reading, writing, erasing, and bad block
management were tested.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-19 09:02:23 +01:00
Lucas Stach e98a7e85b1 usb: musb-dsps: select OFDEVICE
Fixes:
In function `dsps_probe': undefined reference to `of_usb_get_dr_mode'

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-19 08:47:13 +01:00
Andrey Panov 58475f4599 MMC: IMX: Reset MMC_BOOT register after controller reset.
This helps with EMMC detection when booting from EMMC directly.
Taken from u-boot.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-19 08:38:12 +01:00
Andrey Smirnov c39993fcdb i.MX: SPI: Respect SPI_LSB_FIRST flag in mode settings
Add code to support SPI transfers that have data shifted out least
significant bit first. This is useful in many cases, but specifically
it is needed for drivers/firmware/altera_serial.c to work on i.MX
platform.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-16 08:11:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD a1a582f4e0 console: allow to specify the device id
so we can use dynamic number id with specific devname

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-13 08:48:59 +01:00
Sascha Hauer 39c6c3480a Merge branch 'for-next/mxs' 2015-01-09 17:38:26 +01:00
Sascha Hauer ff6383c8e4 Merge branch 'for-next/misc' 2015-01-09 17:38:26 +01:00
Sascha Hauer f5b8ea7cad Merge branch 'for-next/arm' 2015-01-09 17:38:26 +01:00
Antony Pavlov f9df80918d resource: dev_request_mem_region: fix return value for MIPS
The commit

    commit 0d7a213345
    Author: Antony Pavlov <antonynpavlov at gmail.com>
    Date:   Wed Sep 10 11:42:19 2014 +0400

        MIPS: dts: use physical addresses (as Linux does)

        With IOMEM() adapted for MIPS we can use physical addresses
        in device tree reg property.

has switched MIPS dts files to physical addresses usage.

The patch was tested on qemu, but qemu malta board is tolerant
of using physical addresses for accesing to device
(Ingenic JZ4755 and JZ4780 processors are tolerant too!).
But other CPUs (e.g. Loongson LS1B) can throw an exception
in this situation.

Additional physical address to virtual address translation
on MIPS is needed.

We already have this in include/common.h

    #if defined(CONFIG_MIPS)
    #include <asm/addrspace.h>

    #define IOMEM(addr) ((void __force __iomem *)CKSEG1ADDR(addr))
    #else
    #define IOMEM(addr) ((void __force __iomem *)(addr))
    #endif

So use IOMEM() to fix dev_request_mem_region() return value.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-09 17:09:47 +01:00
Masahiro Yamada d8753571b2 sizes.h: move include/sizes.h to include/linux/sizes.h
This file originates in Linux.  Linux has it under include/linux/
directory since commit dccd2304cc90.
Let's move it to the same place as well in barebox.

This commit was generated by the following commands:

  find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:'
  git mv include/sizes.h include/linux/

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 14:00:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 40662bbb59 driver: workaroud resource request that conflicts with errno PTR
broken since

commit ed6e965824
Author:     Sascha Hauer <s.hauer@pengutronix.de>
resource: Let dev_request_mem_region return an error pointer

Introduce dev_request_mem_region_err_null

only used on platform like at91 where the resource address conflicts
with errno PTR.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 08:07:58 +01:00
Sascha Hauer b2568de82d net: cpsw: ignore error on slave setup
The CPSW has two slaves. When one of them fails to setup continue
anyway with the other one. This fixes a crash in the beaglebone black
which only has one slave connected. The code doesn't find a phy on
the second slave and bails out, but the error path is broken: It frees
the private data structures which contains used resources.

Reported-by: Philippe Leduc <ledphilippe@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-06 15:11:59 +01:00
Robert Jarzmik fec4b79449 net: smc1111: fix memory congestions
As the SMC1111 has a shared pool of 2k memory buckets for both
transmission and reception, and as there are variants which have as few
as 4 buckets in total, the memory pool can be hogged by unclaimed
receptions, and impeed any further transmission.

This happens on the zylonite pxa board, where 4 packets, most probably
icmp and arp, fill the 4 buckets, preventing any further ethernet
transmission, and stalling the driver.

The fix is rather rough : whenever all the buckets are filled by
reception packets, and if a transmission is required, the transmission
code path will empty up all received packets.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-06 14:56:40 +01:00
Jan Weitzel c5151cae17 i2c: omap: fix fclk_rate for ti,omap4-i2c
The compatible "ti,omap4-i2c" don't help to get fclk_rate. So set it acording to
cpu compatible: "ti,am33xx" and "ti,omap4"

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-06 14:46:51 +01:00
Robert Jarzmik b9ac7f3049 net: smc1111: move print_packet function
Fix for a compiler complaint, because print_packet is needed by a
function before it is declared.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 13:12:17 +01:00
Lucas Stach 36138c6e1b net: rtl8169: remove unnecessary cache maintenance
The buffer descriptors are allocated from coherent memory, so there
is no cache maintenance needed. Only tell the compiler that the descriptors
can be modified by the hardware.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 12:52:37 +01:00
Sascha Hauer df9879c65d drivers: remove unnecessary mach/imx-regs.h include
And replace the ones needed with the SoC specific header.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 11:30:59 +01:00
Antony Pavlov fbb3be3845 clock: incorporate dummy clocksource into core clock code
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-17 12:15:11 +01:00
Lucas Stach 698f8dc533 video: imx-hdmi: search for DDC node only when EDID support is enabled
This uses i2c functions that may not be available in every configuration
and is only needed if EDID support is enabled, which in turn already
selects I2C.

Fixes:
drivers/video/imx-ipu-v3/imx-hdmi.c:
undefined reference to `of_find_i2c_adapter_by_node'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-17 11:02:42 +01:00
Lucas Stach 8f0493d431 usb: gadget: fastboot: allow to build without BOOTM
This will disable the capability to boot an uploaded image directly,
but keeps other fastboot functionality. This seems like a valid config.

Fixes:
In function `do_bootm_on_complete': undefined reference to `bootm_boot'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-17 11:02:42 +01:00
Lucas Stach e91702bd61 fdt: don't strip const qualifier
Fixes:
warning: assignment discards 'const' qualifier from pointer target type

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-11 08:37:09 +01:00
Sascha Hauer 7413dc4258 treewide: Fix typo collumn -> column
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-11 08:07:47 +01:00
Sascha Hauer b01bc4c810 Merge branch 'for-next/randconfig-1' 2014-12-08 14:54:11 +01:00
Sascha Hauer 9b1d12fff0 Merge branch 'for-next/randconfig' 2014-12-08 14:54:11 +01:00
Sascha Hauer c2b5a7015b Merge branch 'for-next/misc' 2014-12-08 14:53:59 +01:00
Sascha Hauer d3933bd350 Merge branch 'for-next/marvell' 2014-12-08 14:53:59 +01:00
Sascha Hauer 86916569a8 Merge branch 'for-next/imx' 2014-12-08 14:53:59 +01:00
Jan Luebbe 48ba0a1afd fdt: of_unflatten_dtb can work on const data
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-04 08:24:05 +01:00
Sascha Hauer 21c31b9de2 spi: mxs-spi: Allow compilation on i.MX28 only
The driver does not compile on i.MX23, so remove the i.MX23 from
the dependency list.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-28 15:21:26 +01:00
Sascha Hauer 90b90e2655 firmware: altera serial: depend on GENERIC_GPIO
The driver needs gpio support, so depend on GENERIC_GPIO

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-28 15:21:26 +01:00
Sascha Hauer 36d808c943 mci: mxs-mci: add f_min/f_max fields unconditionally
Parts of the driver need these regardless of whether CONFIG_MCI_INFO
is set, so add these fields unconditionally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-28 15:21:26 +01:00
Sascha Hauer 3bfd83d0f1 gpio: clps711x: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:15:28 +01:00
Sascha Hauer 9969c68a89 USB: Gadget: fastboot: depends on command support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:15:19 +01:00
Sascha Hauer 6f4f1c31a6 USB: Gadget: Select poller from USB_GADGET option
The poller has been merged to the gadget core, so
now the core needs poller support, not the individual drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:15:15 +01:00
Sascha Hauer cc347c3aac video: EDID: depends on I2C
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:15:05 +01:00
Sascha Hauer 08115be109 net: fec_imx: remove unused includes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:14:54 +01:00
Lucas Stach 4373afc42a net: rtl8139: depend on MIPS
Until we sort out the dma-mapping mess.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:12:40 +01:00
Lucas Stach cdb0d02b87 rtc: select GREGORIAN_CALENDER
Fixes:
drivers/rtc/rtc-lib.c:109: undefined reference to `mktime'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:12:39 +01:00
Lucas Stach 88628367db usb: musb: only build musb_barebox if host is enabled
musb_barebox.c contains code that is only ever used if CONFIG_MUSB_HOST
is set. Building it uncoditionally breaks the build depending on the link
order.

Fixes:
drivers/usb/musb/musb_barebox.c:64: undefined reference to `musb_urb_enqueue'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 17:12:39 +01:00
Sascha Hauer f2142fb6da pinctrl: Add i.MX6sx compatible entry
To let the driver probe on i.MX6sx.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 11:25:28 +01:00
Sascha Hauer 5753074866 net: fec_imx: Add i.MX6sx compatible entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 11:25:13 +01:00
Sascha Hauer 6ed8916e90 serial: i.MX: Use "per" clk
Which is the correct clock for the baud rate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 11:25:02 +01:00
Sascha Hauer 9e7c0e3176 mci: imx-esdhc: Add i.MX6sl compatible
Which will also be used for the i.MX6sx.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 11:24:58 +01:00
Sascha Hauer df17efad59 mci: imx-esdhc: Fix Interrupt enable register for i.MX6sx
The reset default of this register has changed on i.MX6sx. Explicitly
write the value we want to have to make it work on i.MX6sx.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 11:24:52 +01:00
Lucas Stach 0f1078d5cc usb: host: only activate Efika MX ULPI workaround if ULPI is selected
Fixes a build failure with disabled ULPI support.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-26 19:21:09 +01:00
Lucas Stach b1da773d9e net: ethoc: depend on OPENRISC
This driver currently only works on OpenRISC, as it uses
the cache flush/invalidate functions of this arch.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-26 19:21:09 +01:00
Dmitry Lavnikevich 54961378f0 imx6: clk: Gate off ENFC clock before setting clock rate
This fixes NAND initialization issue which appears occasionally on
some i.MX6 SoCs (particulary was observed on phyCARD-i.MX6 with
i.MX6Solo).

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-26 16:43:12 +01:00
Lucas Stach 2d22fca0e7 usb: gadget: fastboot: select BANNER
Fastboot gadget needs the 'release_string' which is available only
if CONFIG_BANNER is set.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:11 +01:00
Lucas Stach 557b403d85 mci: esdhc: add back PIO_TIMEOUT
This got lost during bd1bf53b34
(mci: imx-esdhc: factor out common sdhci registers). Seems the PIO
option isn't too heavily used.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:10 +01:00
Lucas Stach 0d18871f4b video: ipuv3: select OFDEVICE for HDMI and LVDS
Both components need the OF display timings helpers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:10 +01:00
Lucas Stach 0233462687 firmware: altera-serial: fix printf message
Fixes:
.../altera_serial.c:118:2: warning: too many arguments for format

Also sz is of type size_t, so use proper format specifier.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:07 +01:00
Lucas Stach b7782cc79f firmware: altera-serial: don't try to check void return value
Fixes:
.../altera_serial.c:84:6: error: void value not ignored as it ought to be

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:07 +01:00
Lucas Stach 7376942e46 firmware: altera-serial: depend on SPI
This driver uses SPI bus functions.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:06 +01:00
Lucas Stach b525454de5 firmware: socfpga: depend on ARCH_SOCFPGA
This driver uses a lot of arch specific functionality and
fails to build on anything but SOCFPGA.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:06 +01:00
Jan Weitzel c267e2dd73 mtd: ubi: get_bad_peb_limit from mtd master
Like mentioned in the coment we need the size of the entire flash chip.
Check if a master exists and take his size.

Otherwise the limit will be too small and kernel prints:
UBI warning: print_rsvd_warning: cannot reserve enough PEBs for \
bad PEB handling, reserved 19, need 20

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-20 14:53:42 +01:00
Jan Luebbe 78f20990ce dt: factor out common code
Currently, dt_struct is always checked with the same code after
dt_struct_advance(). Move the check after the switch statement.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-20 14:43:06 +01:00
Lucas Stach 16018ed7fe pci: tegra: relax link-up timeout
Some devices need a considerable amount of time
from reset deassertion until they are ready to
establish a link. Relaxing the link-up timeout
helps to detect them more reliable.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-17 08:35:58 +01:00
Lucas Stach 81e3bac877 pci: align bridge windows
The bridge filtering logic needs a minimum
alignment of 1MB for mem and 4KB for io resources.
Take this into account while assigning resources
to devices in oredr to not produce overlapping
windows between different bridges.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-17 08:35:54 +01:00
Lucas Stach cc9026585a pci: correct BAR size calculation
The previous math would return negative sizes
for some BARs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-17 08:35:49 +01:00
Ezequiel Garcia c3f5ff5546 net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller
This patch introduces the mvneta driver to support the network controller
found in Armada 370/XP SoCs.

Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Ezequiel Garcia 2caa4bbdcc net: phy: Support Marvell 88EE1543 PHY
This commit adds support for Marvell's 88E1543 PHY chip. This chip is
almost identical to the 88EE1545, except the 88E1545 supports QSGMII
and the 88EE1543 supports SGMII.

Therefore, the same configuration function is used for both PHYs. For now,
the only initialization provided for the 88EE1543 is the LED setup.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Ezequiel Garcia 9a026a2efa net: phy: Support Marvell 88EE1545 PHY
This commit adds support for Marvell's 88E1545 PHY chip. In particular, this
allows to support QSGMII interfaces.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Ezequiel Garcia d2731007bb net: phy: marvell: Fix array identation
Just a cosmetic clean-up to fix the indentation of the entries
in the phys array.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Alexander Shiyan 9a4cb25a39 treewide: Reuse init_clock() return value for clocksource drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-10 08:42:19 +01:00
Thomas Petazzoni edbd3a6ecf pci: mvebu: Fix uninitialized variable in mvebu_get_target_attr()
This is the same fix that was applied to the Linux kernel in commit
56fab6e18944 (PCI: mvebu: Fix uninitialized variable in
mvebu_get_tgt_attr()).

Fixes: 5a9ba98 ("pci: mvebu: Add PCIe driver")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-10 07:13:19 +01:00
Uwe Kleine-König 42bc1ac850 mtd: nand_orion: remove unused goto label
This fixes the following warning:

	drivers/mtd/nand/nand_orion.c: In function ‘orion_nand_probe’:
	drivers/mtd/nand/nand_orion.c:145:1: warning: label ‘no_res’ defined but not used [-Wunused-label]

Fixes: 1a215f5 ("nand: Add Marvell Orion NAND driver")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-10 07:13:18 +01:00
Jan Luebbe ea5abfb5c1 of: use OFTREE_MEM_GENERIC for the sandbox
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-07 08:01:48 +01:00
Sascha Hauer 7b4cc54579 Merge branch 'for-next/tegra' 2014-11-05 15:47:39 +01:00
Sascha Hauer e3c49aac69 Merge branch 'for-next/misc' 2014-11-05 15:47:39 +01:00
Sascha Hauer 68d2850f86 Merge branch 'for-next/led' 2014-11-05 15:47:38 +01:00
Sascha Hauer 18ded420f7 Merge branch 'for-next/am335x' 2014-11-05 15:47:37 +01:00
Lucas Stach c202b7c8d9 clk: tegra: don't enable UART clocks by default
Now that we are registering a proper driver for the
UARTs we no longer need to enable the clocks unconditionally.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:52 +01:00
Lucas Stach b5ac88e8f6 serial: ns16550: add Tegra support
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:52 +01:00
Lucas Stach 2c779cbe97 serial: ns16550: enable clock if available
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:52 +01:00
Lucas Stach d712ce1824 pinctrl: tegra: add XUSB pad controller
This is a combined pincontrol/PHY driver for
the SerDes lanes on Tegra K1.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:51 +01:00
Lucas Stach 3e41e7561a clk: tegra: slow down MSELECT to 102MHz
Don't know where I got the 204MHZ previously, but
102MHz is the official supported maximum.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:51 +01:00
Lucas Stach 8b2456a4cb pinctrl: tegra: try to select "boot" state
New DTs call the initial pinctrl state "boot" in
order to avoid Linux reconfiguring the pinctrl
by default. The bootloader should explicitly set
this state.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:51 +01:00
Lucas Stach af7c753f2e pci: tegra: add tegra124 support
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 09:50:44 +01:00
Lucas Stach 9d1fbc5d12 add generic PHY framework
This brings in the generix PHY framework from Linux.
I tried to strip it down as much as possible while
keeping it useful.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 09:50:44 +01:00
Lucas Stach e000cbeb7a clk: tegra124: add PCIe clocks
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 09:50:43 +01:00
Lucas Stach e2ac763d0f clk: tegra124: add PLLE setup functions
This adds functions to bring up the new style
Tegra114+ PLL_E.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 09:50:43 +01:00
Teresa Gámez 3249a71b26 of: Add of_device_enable_and_register functions
Function to enable and register a disabled device.
The devices can be registered using the
device node with of_device_enable_and_register() or
with the device node name/path by using the
of_device_enable_and_register_by_name() function.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 15:44:18 +01:00
Alexander Shiyan c0d6aa097d serial: ns16550: Remove unused fields from NS16550_plat structure
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 13:26:11 +01:00
Lucas Stach 7d60a02034 net: rtl8169: clean receive buffer after net handler
The processing of the buffer might change some data, which
will eventually trigger a cache writeback later on, corrupting
data written by the network chip. Clean the cache range
to make sure there is no writeback pending.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 09:36:30 +01:00
Lucas Stach fd378e779b net: rtl8169: add support for RTL-8168/8111g
This is the version of the chip found on Jetson-TK1.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 09:36:24 +01:00
Antony Pavlov bc4312717b Typoes: "whith" -> "with"
This patch is based on linux kernel commit

    commit e1b8513d21845fbeb93d6d2c4973db874385059f
    Author: Robert P. J. Day <rpjday@crashcourse.ca>
    Date:   Sun Feb 3 15:14:02 2008 +0200

        Typoes:  "whith" -> "with"

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 09:18:20 +01:00
Wadim Egorov 30427fb2da net: cpsw: Set phy device_node pointer in probe
Set the phy device_node pointer to the equivalent cpsw slave node.
We need this, because phy drivers using this pointer for their configuration.

Create and register the phy device in cpsw_probe(), so that this phy device
can be found later by phy_device_connect() in cpsw_open().

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 08:18:10 +01:00
Wadim Egorov d75ff89817 net: phy: micrel: Add OF conf. support for ksz9031
Adds support for ksz9031 PAD skew configuration over devicetree.
Based on a patch from the linux kernel.

Author: Hubert Chaumette <hchaumette@adeneo-embedded.com>
Original commit: 6e4b82730c7525504fc485b370c7f09e594e2e96

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-03 08:18:10 +01:00
Lucas Stach 5b4e4ebcf8 clk: gate: remove superfluous code
This code didn't have any effect.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-21 13:08:46 +02:00
Lucas Stach dfa6b3e46c i2c: at91: fix invalid length check
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-21 13:08:02 +02:00
Lucas Stach 672a4972dd dfu: fix possible usage of uninitialized var
The error path would in fact use the status
variable without it being initialized first.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-21 13:02:48 +02:00
Lucas Stach c677976c07 imx: ipu-v3: fix typo leading to build warning
This PAGE_SIZE clearly should not be there.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-21 13:02:48 +02:00
Dmitry Voytik d8f5a28be3 usb: ehci-hcd: Correct CLEAR_FEATURE code
This commit broke USB on olinuxino board:

  87b9bea USB: host: hub: Use usb_hub_power_on from U-Boot

This patch was ported from U-Boot with small changes. See discussion:
http://lists.denx.de/pipermail/u-boot/2013-May/153920.html

The root cause seems to be a missing mask and missing 'break' in
ehci-hcd.c. Fix both.

Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-21 12:57:25 +02:00
Teresa Gámez c145001464 net: cpsw: Fix probe for one port ethernet
If only one port is pinned out, probe fails
as the second port phy_id is not found.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-14 11:19:17 +02:00
Sascha Hauer 42327b23a7 led: trigger: Turn of flashing leds only once
The current code continuously turns leds off. Preserve the current
led status so that we only turn it off once.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 16:04:32 +02:00
Sascha Hauer b63faaa2e2 led: trigger: use max_value to turn on led instead of hardcoded '1'
For PWM LEDs '1' may be really dark. Use max_value instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 16:04:27 +02:00
Jan Weitzel 83620fb6eb net: micrel: Add ksz8081 support
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 11:08:31 +02:00
Jan Weitzel 58d33ca124 net: cpsw: Allow gigabit connection
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 11:08:31 +02:00
Lucas Stach b64b24db75 net: add rtl8169 driver
This adds the driver for RealTek 8169 and compatible
pci attached network chips.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:02 +02:00
Lucas Stach 18ff087fca pci: add Tegra host controller driver
Only tested on Tegra30 for now.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 2840294a51 of: import pci range parser from linux
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 4e4d40c1ae i2c: tegra: move to fs initcall
i2c is needed to enable voltage rails that are later
needed by other drivers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 72f493e3e6 clk: tegra30: add PCIe clocks
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach aa2e6ca831 clk: tegra: add PLLE setup functions
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 490d4fe417 pci: track parent<->child relationship
So that PCI devices hang down from bridges and root
bridges down from the PCI host controller when
calling devinfo.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 48f88df158 pci: prettyprint device names
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach b8a1bb1dd2 pci: defer device registration until after bridge setup
Otherwise the drivers for a device may probe before the
devices parent bridge is fully configured, which leads
to errors when accessing the BARs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 687ceb7716 pci: setup bridges and traverse buses behind them
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach beb6469992 pci: properly populate prefetchable BARs
Some host controllers provide a prefetchable
memory area and devices will prefer this for
some of their BARs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 06ac5b551e pci: add resource enum
Makes things way clearer than juggling numbers.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:00 +02:00
Lucas Stach 72d9846fa6 pci: split out device init
To make it reusable and the code more readable.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:00 +02:00
Sascha Hauer 86ef8cb8fb input: Let input support depend on !CONSOLE_NONE
Without console support the input devices make no sense, so add
a depends on !CONSOLE_NONE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:11:02 +02:00
Sascha Hauer 0d03667db7 Merge branch 'for-next/ubi' 2014-10-02 08:54:43 +02:00
Sascha Hauer fa93e4fb60 Merge branch 'for-next/resource-err-ptr' 2014-10-02 08:54:42 +02:00
Sascha Hauer 52a0febb3d Merge branch 'for-next/phycore-imx6' 2014-10-02 08:54:42 +02:00
Sascha Hauer 6209c24274 Merge branch 'for-next/openrisc' 2014-10-02 08:54:42 +02:00
Sascha Hauer 9d7cd03e2a Merge branch 'for-next/of' 2014-10-02 08:54:42 +02:00
Sascha Hauer 815288c598 Merge branch 'for-next/net-phy' 2014-10-02 08:54:42 +02:00
Sascha Hauer a65334019b Merge branch 'for-next/musb' 2014-10-02 08:54:42 +02:00
Sascha Hauer 868de66f8d Merge branch 'for-next/mtd' 2014-10-02 08:54:42 +02:00
Sascha Hauer 8c746628fe Merge branch 'for-next/misc' 2014-10-02 08:54:42 +02:00
Sascha Hauer 0846940668 Merge branch 'for-next/marvell' 2014-10-02 08:54:41 +02:00
Sascha Hauer 2a2a8b9052 Merge branch 'for-next/imx' 2014-10-02 08:54:41 +02:00
Sascha Hauer d0064495d3 Merge branch 'for-next/firmware' 2014-10-02 08:54:41 +02:00
Sascha Hauer 9fd083eae1 Merge branch 'for-next/dmesg' 2014-10-02 08:54:41 +02:00
Sascha Hauer 61bf20dcc6 Merge branch 'for-next/at91' 2014-10-02 08:54:41 +02:00
Teresa Gámez 0abb68b107 i2c: omap: fix dts property "clock-frequency" usage
Looking at the linux kernel the clock-frequency property of
the device tree is used to set the bus speed and not the
fclk_rate. Adapted this to be compliant with linux kernel.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-02 07:50:16 +02:00
Teresa Gámez e5707ec702 of: Added of_set_property_to_child_phandle
Set a property to a phandle of a child node. This may be used
for selections like display-timings.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-01 08:13:02 +02:00
Teresa Gámez d1d7876499 of: base: Add of_parse_phandle_from
Added of_parse_phandle_from() to be able to use external root nodes.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-01 08:13:02 +02:00
Teresa Gámez 55475204cd of: base: Add of_find_node_by_phandle_from
Added of_find_node_by_phandle_from() to find nodes by
phandle with a given root node.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-01 08:13:02 +02:00
Sascha Hauer 930ce6e142 Introduce message logging support
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>
2014-09-30 15:33:22 +02:00
Sascha Hauer 6850ccff66 USB: MUSB: Add barebox specific changes
This changes the MUSB support from the original Kernel state to
be usable with barebox. Tested on a custom board and the Beaglebone
Black. The host port on the Beaglebone works, the OTG port works
in device mode, but not yet in host mode.

Based on the initial MUSB port from Rolf Evers Fischer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer 12aeca8373 USB: Add MUSB driver from Linux
This adds the necessary files from the MUSB driver directly from Linux
3.17-rc5. No changes to the original files have been made so far.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer 98cbf263bd USB: gadget: allow multiple udc drivers
Since the MUSB driver will have it's own directory the Kconfig
entries won't be in drivers/usb/gadget/Kconfig. This is incompatible
with the current 'choice' approach for udc drivers. The udc drivers
do not implement the global usb_gadget_poll() anymore, so we can
drop the choice and allow multiple gadget drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:57 +02:00
Sascha Hauer 18d588da74 USB: gadget: put poller into core
Instead of letting each driver implement usb_gadget_poll directly
implement this function in the core which then calls into the
drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:54 +02:00
Sascha Hauer 01beb0d5f2 USB: add usb phy header file
Mostly taken from the Linux Kernel to ease porting phy
handling code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 08:49:21 +02:00
Sascha Hauer b1536a3298 USB: gadget: dfu: Add max_speed to dfu_driver
The MUSB driver checks for this field. If it doesn't contain
something useful the driver bails out.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 16:25:46 +02:00
Sascha Hauer bab50309e7 USB: gadget: fastboot: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 16:25:02 +02:00
Raphaël Poggi 25bffd8a9a of: fdt: fix typo in header
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:12:01 +02:00
Bo Shen 791ff495fb I2C: at91: fix the method for interrupt
As the i2c-at91 driver won't work in the interrupt mode,
so need to poll the interrupts.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi a0ca2c13f6 i2c: at91: add support of device tree
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi ccc282fb1b i2c: at91: add at91sam9x5 config
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi d78e8051f3 i2c: at91: fix coding style issue
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Bo Shen 739c91e1c4 net: macb: enable GEM with only FE feature
If the GEM is used, however only FE featuren enabled, then it can not
support FBLDO configured as 16, and no RGMII/GMII configuratin bit.

So, in order to support GEM only with FE feature enabled, we do:
  - using default value for FBLDO.
  - using same bit for RMII/MII configuration as GEM for RGMII/GMII.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:46:52 +02:00
Franck Jullien 9f0133d489 Subject: [PATCH] cfi: print size in human readable format
The CFI size is now printed in a human readable format.
It also adds "0x" prefix to the printed address.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:44:26 +02:00
Bo Shen 71692f1538 mci: atmel: add new ip version 0x600 support
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:42 +02:00
Bo Shen b18d562321 nand: atmel: runtime to generate galois table
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:35 +02:00
Lucas Stach 2e4640448c net: asix: handle packets crossing URB boundaries
ASIX AX88772B started to pack data even more tightly. Packets and the ASIX packet
header may now cross URB boundaries. To handle this we have to introduce
some state between individual calls to asix_rx_fixup().

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Rolf: ported from kernel to barebox 2014.09.0 ]
Signed-off-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:54:45 +02:00
Sebastian Hesselbarth 561dfebb4b ARM: mvebu: Add machine compatible to mbus ranges
Multi-SoC support for MVEBU will add mbus ranges for all compiled
SoCs. To protect the mbus node of the SoC barebox is executed on
from others ranges, pass machine's compatible to mvebu_mbus_add_range
and check before applying the fixup.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:47:35 +02:00
Sascha Hauer 1b4c08d2f2 net: phy: don't use 'dev' as name for variables of type struct phy_device
Using 'dev' as name for variables which are not of type
struct device(_d) is bad habit and leads to confusions. Use phydev
instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-18 08:41:16 +02:00
Sascha Hauer 1b5086995e net: phy: Use xzalloc for small allocations
No need to call kzalloc for small allocations, xzalloc will do without
the need for an additional check.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-18 08:40:55 +02:00
Sascha Hauer e209158d5a net: phy: introduce phy_aneg_done
phy_wait_aneg_done() is directly called by the network code, so it
should not read phy registers directly. Introduce phy_aneg_done to
give phy drivers the chance to do something different to poll for
autonegotiation completion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-17 15:12:56 +02:00
Lucas Stach 1dbf849de7 phy: marvell: move IDs to own header
So they can be used in board files to register
fixups.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-17 11:16:44 +02:00
Jan Weitzel 7e094dd2e2 phy/micrel: disable Asym_Pause support
With SUPPORTED_Asym_Pause enabled we need to hotplug the ethernet cable.
So disable it like done with PHY_ID_KSZ9021.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-17 08:53:25 +02:00
Sascha Hauer d5a82eb095 resource: Let request_ioport_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-16 08:32:10 +02:00