9
0
Fork 0
Commit Graph

3751 Commits

Author SHA1 Message Date
Sascha Hauer fbd757cb7f Merge branch 'for-next/hab' 2016-03-11 10:49:49 +01:00
Sascha Hauer 690ec1804c Merge branch 'for-next/driver' 2016-03-11 10:49:48 +01:00
Sascha Hauer c41f840f4b Merge branch 'for-next/caam' 2016-03-11 10:49:35 +01:00
Sascha Hauer 330dc0a6b7 Merge branch 'for-next/bbu' 2016-03-11 10:49:35 +01:00
Sascha Hauer aaad4dad23 Merge branch 'for-next/arm' 2016-03-11 10:49:34 +01:00
Markus Pargmann 0240fd3f84 fastboot: Add a ARM Barebox filetype handler
This will automatically call barebox_update for the transfered file if
it is an ARM Barebox image and the destination file is defined by some
update handler.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-11 08:06:05 +01:00
Sascha Hauer 0ee69c9501 USB: imx-usb-phy: Fix uninitialized use of variable
ret may no be initialized in the error path when clk_get fails. Fix it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:38:52 +01:00
Sascha Hauer 3bd69ad077 driver: replace dev_request_mem_region with dev_request_mem_resource
dev_request_mem_region doesn't work properly one some SoCs on which
PTR_ERR() values clash with valid return values from dev_request_mem_region.
Replace them with dev_request_mem_resource where possible.

This patch has been generated with the following semantic patch:

// <smpl>
@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores)) {
...
-	return PTR_ERR(io);
-}
+	return PTR_ERR(iores);
+}
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores))
-	return PTR_ERR(io);
-}
+	return PTR_ERR(iores);
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
-if (IS_ERR(io)) {
-	ret = PTR_ERR(io);
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores)) {
+	ret = PTR_ERR(iores);
...
}
+io = IOMEM(iores->start);
...+>
}

@@
expression d;
expression n;
expression io;
identifier func;
@@
func(...) {
+struct resource *iores;
<+...
-io = dev_request_mem_region(d, n);
+iores = dev_request_mem_resource(d, n);
+if (IS_ERR(iores))
+	return PTR_ERR(iores);
+io = IOMEM(iores->start);
...+>
}

@@
identifier func;
@@
func(...) {
<+...
struct resource *iores;
-struct resource *iores;
...+>
}
// </smpl>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-07 08:57:56 +01:00
Lucas Stach 92e82d9e26 net: efi: correct function signature of set_ethaddr
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-04 07:54:58 +01:00
Sascha Hauer 246266c205 serial: imx: Support DTE mode
Based on Kernel commit 20ff2fe60a: serial: imx: add support for DTE mode

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:54:15 +01:00
Peter Mamonov d7d0c7a0bb input: usb keyboard: fix CTRL+ combinations
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-26 07:52:17 +01:00
Peter Mamonov 051b39f683 input: usb keyboard: fix BACKSPACE
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-23 08:46:57 +01:00
Sascha Hauer fe7855bb4f driver: Introduce dev_request_mem_resource
dev_request_mem_region returns a void * which shall be checked with
IS_ERR(), but in some cases the valid pointer returned clashes with
error values. This is especially the case on some Atmel SoCs.

This introduces dev_request_mem_resource which returns a struct resource
instead which in any case can be checked with IS_ERR(). It's the drivers
responsibility then to get the IOMEM pointer from the resource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-23 08:15:57 +01:00
Sascha Hauer 8ee5479a28 driver: Fix return check of dev_request_mem_region
dev_request_mem_region returns an ERR_PTR, fix places which check for a
NULL pointer instead. This patch has been generated with this semantic
patch, written by me and improved by Andrey Smirnov:

// <smpl>
@@
expression e;
expression e1;
@@
e = dev_request_mem_region(...);
...
-if (!e)
-	return e1;
+if (IS_ERR(e))
+	return PTR_ERR(e);

@ rule1 @
expression e;
@@
e = dev_request_mem_region(...);

@@
expression rule1.e;
identifier ret, label;
constant errno;
@@
if (!e) {
	...
(
-	ret = -errno;
+	ret = PTR_ERR(e);
	...
	goto label;
|
-	return -errno;
+	return PTR_ERR(e);
)
}

@depends on rule1@
expression rule1.e;
@@
-	if (e == NULL)
+	if (IS_ERR(e))
{
...
}
// </smpl>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
2016-02-23 08:14:16 +01:00
Sascha Hauer 4c24879f6a regulator: fixed: Init gpio properly
gpio has to be initialized with an invalid gpio number. 0 is a valid
number and it will be requested and used by the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-23 08:05:39 +01:00
Markus Pargmann 24ff0ab0fa fastboot: Fix usage of ubiformat for UBI image transfers
Currently all fastboot flash commands with UBI images are handled by a
final call to 'ubiformat'. This only makes sense for flash commands
where the target file is a mtd device. If we just want to transfer a UBI
image we would expect a simple copy to the correct location.

This patch checks if the destination file is a MTD device by opening it
and calling an ioctl MEMGETINFO. Only for MTD devices, ubiformat is
called.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-18 16:10:11 +01:00
Steffen Trumtrar 94844727a8 crypto: add i.MX6 CAAM support
Add the i.MX6 crypto core CAAM with support for the random number
generator.

The core itself works with jobrings in which descriptors can be
queued/dequeued for processing. Depending on descriptor type
the CAAM unit then either produces random numbers or decrypts/encrypts
data.

The code is based on the Linux v4.1 driver of the same name
without all the crypto/hashing components.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-12 15:55:55 +01:00
Marc Kleine-Budde 41498ad7cf i.MX habv3: add some more status codes
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-09 09:17:37 +01:00
Marc Kleine-Budde 9983b67f36 i.MX habv3: sort hab status codes numerically
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-09 09:17:37 +01:00
Sascha Hauer 46bb3a4d84 driver: Fix unregister device after device probe failure
When a device probe fails the device is removed from the active list.
If then the device is unregistered afterwards it is removed from the
active list again resulting in a crash. To fix this initialize the
devices active list entry when removing it from the active list.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-08 11:31:02 +01:00
Antony Pavlov c976b06e16 drivers: video: drop unused of_get_display_timing()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-08 08:30:02 +01:00
Antony Pavlov 132e226920 drivers: video: fb: make locally used fb_set_shadowfb() static
The patch fixes this compiler's warning:

    drivers/video/fb.c:233:5: warning: no previous prototype for
    'fb_set_shadowfb' [-Wmissing-prototypes]
     int fb_set_shadowfb(struct param_d *p, void *priv)
         ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-08 08:28:39 +01:00
Sascha Hauer 7482ab4de1 Merge branch 'for-next/regmap' 2016-02-08 08:27:03 +01:00
Sascha Hauer a22f59c178 Merge branch 'for-next/net' 2016-02-08 08:26:45 +01:00
Sascha Hauer 1379a5ef1e Merge branch 'for-next/misc' 2016-02-08 08:26:43 +01:00
Sascha Hauer 79606b51ed Merge branch 'for-next/linux-headers' 2016-02-08 08:26:36 +01:00
Sascha Hauer 05261801e9 Merge branch 'for-next/input' 2016-02-08 08:26:35 +01:00
Andrey Smirnov b09ee0358c spi-nor: Port erase timeout fix from Linux
Large SPI-NOR (>2MB) chips reuire more than 40 seconds to perform
all-chip erase. This patch adapts
09b6a377687b885565339e60bc62566433a0406f from Linux kernel, which
implements simple heuristics in order to calculate appropriate wait
time (see orignal commit's description for more details of the fix)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-08 08:07:08 +01:00
Sascha Hauer 1db47f7616 i.MX habv4: Fix RVT address for newer SoCs
Newer i.MX SoCs have the RVT at 0x98, not at 0x94 any more.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 15:51:42 +01:00
Sascha Hauer 77bfff1cbe mfd: mc13xxx: Switch to regmap support
This moves the mc13xxx driver over to regmap.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 14:32:16 +01:00
Sascha Hauer 7a53e162de Add initial regmap support
This adds initial regmap support. Function prototypes are from
the Kernel, the implemention is mostly rewritten. Currently the
regmap support is limited to the bare minimum to get started.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-05 14:32:16 +01:00
Sascha Hauer 48d74b1ca4 imx: hab: Make hab status functions SoC specific
The HABv4 functions need access a part of the ROM which is
located in the zero page. This must be done early, before the
MMU has been configured and the zero page has been set to faulting.
The HAB functions currently use cpu_is_imxxy(). At the stage where
HAB is called the i.MX CPU type variable is not yet initialized,
so this code only works when only one i.MX type is enabled and
cpu_is_imxxy() are compile time constants.

To fix HAB support when more than one i.MX type is enabled make the
HAB status function SoC specific so that we can drop the use of
cpu_is_imxxy().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 14:38:33 +01:00
Philipp Zabel a4cee7207a net: phy: micrel: Add workaround for bad autoneg
Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround
for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>:

    Very rarely, the KSZ9031 will appear to complete autonegotiation, but
    will drop all traffic afterwards.  When this happens, the idle error
    count will read 0xFF after autonegotiation completes.  Reset the PHY
    when in that state.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Philipp Zabel da89ee8f2e net: phy: micrel: Center FLP timing at 16ms
Based on kernel commit 6270e1ae804a ("net/phy: micrel: Center FLP
timing at 16ms") by Jaeden Amero <jaeden.amero@ni.com>:

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Philipp Zabel 9fc7b70a28 net: phy: micrel: Be more const correct
Based on kernel commit 3c9a9f7fb0ee ("net/phy: micrel: Be more const
correct") by Jaeden Amero <jaeden.amero@ni.com>:

    In a few places in this driver, we weren't using const where we could
    have. Use const more.

    In addition, change the arrays of strings in ksz9031_config_init() to be
    not only const, but also static.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Philipp Zabel ea89f30bbd net: phy: micrel: use BIT macro
Based on kernel commit 00aee095000c ("net: phy: micrel: use BIT macro")
by Johan Hovold <johan@kernel.org>.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Philipp Zabel 7be3ed46a6 net: phy: micrel: Staticise ksz8873mll_read_status()
Based on kernel commit 32d73b144eac ("net: phy: micrel: Staticise
ksz8873mll_read_status()") by Jingoo Han <jg1.han@samsung.com>:

    ksz8873mll_read_status() is used only in this file.
    Fix the following sparse warning:

    drivers/net/phy/micrel.c:147:5: warning: symbol 'ksz8873mll_read_status' was not declared. Should it be static?

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Andrey Smirnov ae2fb9b918 miitool: Add code to register a PHY
This commit changes the behaviour of the 'miitool'. Now in order to show
PHY's link information 'miitool' should be invoked as such:

miitool -s [PHY]

Also, implment code to allow to register a dummy PHY device in order to
be able to perform raw MDIO bus access.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-04 08:10:39 +01:00
Andrey Smirnov 993a28aa48 mdio_bus: Change PHY's naming scheme
Change the way PHY devices are named upon creation. This commit replaces
sequentialy numbered "/dev/phy%d" with "/dev/mdio%d-phy%02x". This way
it is significanlty easier to identify which PHY in real-life (e.g. on a
schematic) corresponds to which device in /dev.

Also, replace asprintf with xasprintf to provide some form of memory
allocation failure checking.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 08:36:33 +01:00
Andrey Smirnov 109543cf88 mdio_bus: Add mdiobus_get_bus() function
Add mdiobus_get_bus() -- a function to get a MDIO bus by its number

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 07:58:28 +01:00
Andrey Smirnov dfe0745ba2 mdio_bus: Change dev_info to dev_dbg
Change dev_info to dev_dbg in mdiobus_detect for displaying phy's
registration status as it is in of_mdiobus_register_phy(). While that
information is useful for debugging, user doesn't really need to see
that information every time they call miitool for the first time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 07:58:28 +01:00
Andrey Gusakov 09c56012a4 net: Port bitbanged MDIO code from Linux kernel
Port bitbanged MDIO framework and gpiolib MDIO bus driver that uses it
from Linux kernel.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 07:58:28 +01:00
Yegor Yefremov 6b8cf28e0c Introduce include/linux/wait.h
Move Linux wait queue related definitions to its original place.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 07:57:36 +01:00
Yegor Yefremov 7814ae61ab Introduce include/linux/mutex.h
Move mutex related defines to its original place.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-03 07:57:32 +01:00
Sascha Hauer 8aabf498e1 hab: Add HABv3 status report function
Status reporting for HABv3 is different from HABv4. Add a status
report function for HABv3.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Sascha Hauer 2ff23512d9 imx: hab: rename driver dir to hab/
There's not only HABv4 but also HABv3. No need to put the corresponding
code in separate directories, so rename the habv4 directory to hab.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-02 15:41:04 +01:00
Yegor Yefremov baa7fe1d15 Introduce include/linux/spinlock.h
Move spinlock related definitions to its original place.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-02-01 09:16:13 +01:00
Sascha Hauer 253fb33bb8 input: gpio-keys: convert to input framework
To allow asking for the button states.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-18 08:32:59 +01:00
Sascha Hauer e2306ada3e Convert users of PRINTF_CONVERSION_RESOURCE to %pa
printf now supports printing resource_size_t directly, convert
all users of the previously used PRINTF_CONVERSION_RESOURCE over
to %pa.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-15 15:33:59 +01:00
Sascha Hauer 30b7c5ead3 input: gpio-keys: Use KEY_* keycodes
The gpio-keys driver takes ascii key codes from platform_data and Linux
keycodes from device tree. Convert the ascii keys over to Linux
keycodes to get rid of the special cases in the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-01-13 16:28:08 +01:00