summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* net: phy: Fix crash when no phy is foundSascha Hauer2014-01-201-0/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: platform: Fix possible crashAlexander Shiyan2014-01-101-3/+3
| | | | | | | | "dev" may uninitialized or points to incorrect device. While at it make the message more informative. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2014-01-073-187/+224
|\
| * video: ipufb: Use uncached memory for framebufferSascha Hauer2013-12-201-2/+7
| | | | | | | | | | | | Otherwise funny caching artifacts can occur on the screen. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: simplefb: Add a8r8g8b8 supportSascha Hauer2013-12-201-0/+8
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: simplefb: Add of reserve entry for framebuffer memorySascha Hauer2013-12-201-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: imx-ipu-fb: Allow to specify framebuffer memory size via platform_dataSascha Hauer2013-12-201-2/+7
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: Add screen_size fieldSascha Hauer2013-12-201-0/+2
| | | | | | | | | | | | | | | | | | barebox does not need the screen size directly, but we pass the framebuffer to Linux via simnplefb it is desirable to pass the full size of the framebuffer. Default to calculated values from the screen resolution. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: imx-ipu-fb: Do not modify pwm registerSascha Hauer2013-12-201-5/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: Allow to disable fractional pixelclock dividerSascha Hauer2013-12-201-2/+9
| | | | | | | | | | | | | | | | The IPU has a fractional pixelclock divider. When used, this produces clock jitter which especially LVDS transceivers can't handle. Allow to disable it via platform_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: Fix divider debug printSascha Hauer2013-12-201-1/+1
| | | | | | | | | | | | The fractional part is 4 bit, not 3 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: Fix 24bit format and implement 32bit formatSascha Hauer2013-12-201-1/+8
| | | | | | | | | | | | | | | | When requested 32bit formats the IPU generated a 24bit format instead. Implement real 32bit format (xxrrggbb) and let the IPU generate a 24bit format when requested. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: calculate channel param fields from fb_bitfieldsSascha Hauer2013-12-201-33/+59
| | | | | | | | | | | | | | | | No need to hardcode the channel parameters for the rgb offsets, we can calculate them from the fb_bitfields. ipu_ch_param_write_field() is the same as is the mainline IPUv3 driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: do not use bitfieldsSascha Hauer2013-12-201-142/+129
| | | | | | | | | | | | | | | | bitfields are not portable and one should make assumptions of the layout of bitfields. Replace them with the ipu_ch_param_write_field() which is already used in the mainline IPUv3 driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: ipufb: make disp_data_fmt configurableSascha Hauer2013-12-181-26/+18
| | | | | | | | | | | | | | | | With the IPU the way the display is connected is completely independent of the framebuffer pixel format. So instead of specifying a pixel width in platform_data we have to specify how the display is connected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-chipidea'Sascha Hauer2014-01-071-6/+6
|\ \
| * | usb: chipidea i.MX: add some delay after ulpi_setupSascha Hauer2014-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | On the pcm038 the ULPI phy is found correctly, but after a power cycle the attached devices are not found. Adding some delay fixes this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: chipidea i.MX: always print an error message when ULPI failsSascha Hauer2014-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The ULPI code does not print a message when the operation times out. Add one to the caller so that he gets an idea that something is going wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: chipidea i.MX: limit port init to HSIC modeSascha Hauer2014-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | imx_chipidea_port_init() will be called during startup from the ehci driver. Calling it before setting up the PORTSC register is only necessary in HSIC mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: chipidea i.MX: remove unused pdata->init hookSascha Hauer2014-01-071-5/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/ubi'Sascha Hauer2014-01-073-17/+47
|\ \ \
| * | | UBI: Add some asserts to ubi_attach_fastmap()Richard Weinberger2014-01-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more paranioa asserts to make it easier to detect implementation errors. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: Fix memory leak in ubi_attach_fastmap() error pathRichard Weinberger2014-01-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On error we have to free all three temporary lists. Reported-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: simplify image sequence testRichard Genoud2014-01-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test: if (!a && b) a = b; can be symplified in: if (!a) a = b; And there's no need to test if ubi->image_seq is not null, because if it is, it is set to image_seq. So, we just test if image_seq is not null. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: fastmap: fix backward compatibility with image_seqRichard Genoud2014-01-071-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some old UBI implementations (e.g. U-Boot) have not implemented the image sequence feature. So, when erase blocks are written, the image sequence in the ec header is lost (set to zero). UBI scan_all() takes this case into account (commits 32bc4820287a1a03982979515949e8ea56eac641 and 2eadaad67b2b6bd132eda105128d2d466298b8e3) But fastmap scan functions (ubi_scan_fastmap() and scan_pool()) didn't. This patch fixes the issue. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: Call scan_all() with correct offset in error caseRichard Weinberger2014-01-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we find an invalid fastmap we have to scan from the very beginning. Otherwise we leak the first 64 PEBs. Reported-and-tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: Fix error path in scan_pool()Richard Weinberger2014-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to set "ret", not "err" in case of an error. Reported-and-tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: fix refill_wl_user_pool()Richard Weinberger2014-01-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no free PEBs are available refill_wl_user_pool() must not return with -ENOSPC immediately. It has to block till produce_free_peb() produced a free PEB. Reported-and-Tested-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | UBI: Fix invalidate_fastmap()Richard Weinberger2014-01-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Onging tests uncovered that invalidate_fastmap() is broken. It must not call ubi_wl_put_fm_peb() because all PEBs used by the old fastmap have already been put back. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| * | | UBI: Fix PEB leak in wear_leveling_worker()Richard Weinberger2014-01-071-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_peb_for_wl() removes the PEB from the free list. If the WL subsystem detects that no wear leveling is needed it cancels the operation and drops the gained PEB. In this case we have to put the PEB back into the free list. This issue was introduced with commit ed4b7021c (UBI: remove PEB from free tree in get_peb_for_wl()). Cc: <stable@vger.kernel.org> # 3.7.x Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
* | | Merge branch 'for-next/openrisc'Sascha Hauer2014-01-073-0/+522
|\ \ \
| * | | net: add driver for OpenCores 10/100 Mbps ethernet MACBeniamino Galvani2013-12-173-0/+522
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a driver for the OpenCores 10/100 Mbps ethernet MAC core, ported from Linux kernel with small changes. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/miiphy'Sascha Hauer2014-01-075-58/+128
|\ \ \ \ | |_|/ / |/| | |
| * | | net/phy/phy.c: fix whitespaceAntony Pavlov2014-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net/phy: add driver for LXT PHYsAntony Pavlov2014-01-063-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Linux kernel 3.12 driver. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | miitool: change behaviour closer to linux' mii-toolAntony Pavlov2014-01-061-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | miitool without arguments will try to show status for all phys. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: implement detect callback for miibus devicesSascha Hauer2013-12-112-1/+32
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: Track mii buses on a listSascha Hauer2013-12-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | To be able to iterate over registered mii buses Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: move phy_init_hw to phy_device_connectSascha Hauer2013-12-112-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed when a phy gets registered outsize of phy_device_connect but has to be attached to an ethernet device later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: track registered state of a phy deviceSascha Hauer2013-12-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this phy_device_connect only registers a phy device if it wasn't registered already. This allows us to register phy devices outside of ethernet drivers. phy_device_connect will now pick up an already registered phy given that it's not attached to another ethernet device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: check if a phy already has an ethernet deviceSascha Hauer2013-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If during a phy_device_connect a phy already has an ehternet device this can only mean it's already attached to another device. return -EBUSY in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: move duplicated code out of if/elseSascha Hauer2013-12-111-18/+9
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: bail out early in phy_device_connectSascha Hauer2013-12-111-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an ethernet device already has a phy in phy_device_connect all we have to do is to start autonegotiation. Do this early and bail out so that for the rest of the code it's clear that we have to search for a phy device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: cleanup attached device handlingSascha Hauer2013-12-112-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | phy_register_device() currently requires an attached ethernet device. This is not needed, a phy device can equally well be registered as a standalone device without an ethernet device. Remove the need for an attached ethernet device in phy_register_device. Also, make the edev <-> phy connection on a registered device which simplifies the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: Add subpagesize to mtd_info_userSascha Hauer2013-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ubiformat needs the subpagesize to work correctly. The kernel uses sysfs to pass the subpagesize, but in barebox we have the possibility to extend struct mtd_info_user. Add a corresponding field and use it in ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: fix mtd_read return valueSascha Hauer2013-12-201-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtd->read returns the number of bitflips as positive numbers. Instead of returning these numbers Return -EUCLEAN when the bitflip threshold has been reached, 0 otherwise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: fix wrong return values in cdev readSascha Hauer2013-12-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtd->read returns the number of bitflips as positive numbers. Instead of returning these numbers Return -EUCLEAN when the bitflip threshold has been reached, 0 otherwise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: nand_imx: remove trailing whitespacesSascha Hauer2013-12-191-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | nand_imx: fix read ONFI param on NFC v21Eric Bénard2013-12-191-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tested on an i.MX25 where we now get : nand: ONFI param page 0 valid nand: ONFI flash detected nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64 Signed-off-by: Eric Bénard <eric@eukrea.com> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | net: dm9k: bail out when resources can't be claimedSascha Hauer2013-12-181-0/+4
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>