summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Fix typo seperate -> separateSascha Hauer2013-05-211-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* GPIO: Add gpio_to_desc helperAlexander Shiyan2013-05-171-44/+51
| | | | | | | | Patch adds gpio_to_desc helper for validate GPIO. A bit optimization is performed (about -160 bytes on ARM). Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MCI/MXS: fix signed/unsigned mismatchJuergen Beisert2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the MXS MCI driver with an eight bit capable eMMC results into the 'devinfo' message the interface uses '0' bits for data transfer: barebox:/ devinfo mxs_mci0 resources: num : 0 start : 0x80034000 size : 0x00002000 driver: mxs_mci bus: platform Interface Min. bus clock: 1476 Hz Max. bus clock: 48000000 Hz Current bus clock: 24000000 Hz Bus width: 0 bit The eight bit interface width is stored internally as value '2'. And a two bit '2' ends up into 0xfffffffe when used as an array index. Using an unsigned field instead fixes this issue: barebox:/ devinfo mxs_mci0 resources: num : 0 start : 0x80034000 size : 0x00002000 driver: mxs_mci bus: platform Interface Min. bus clock: 1476 Hz Max. bus clock: 48000000 Hz Current bus clock: 24000000 Hz Bus width: 8 bit Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* qt1070: drop non used bufJean-Christophe PLAGNIOL-VILLARD2013-05-081-1/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2013-05-063-0/+222
|\
| * tegra: add GPIO controller driverLucas Stach2013-04-143-0/+222
| | | | | | | | | | | | | | | | Taken from the Linux kernel, simplified and reworked to match barebox. Signed-off-by: Lucas Stach <dev@lynxeye.de> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/param'Sascha Hauer2013-05-0614-238/+134
|\ \ | | | | | | | | | | | | Conflicts: drivers/mci/mci-core.c
| * | USB gadget at91: Use dev_add_param_bool for vbus parameterSascha Hauer2013-04-111-16/+7
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: Nand: Use dev_add_param_bool for erasebad parameterSascha Hauer2013-04-111-10/+12
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | console: Use dev_add_param_int for baudrate parameterSascha Hauer2013-04-111-7/+8
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pwm: Use dev_add_param_int for pwm parametersSascha Hauer2013-04-111-59/+30
| | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
| * | fb: imx-ipu-fb: Use dev_add_param_int for alpha parameterSascha Hauer2013-04-111-17/+10
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fb: imxfb: Use dev_add_param_int for alpha parameterSascha Hauer2013-04-111-17/+9
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fb: Use dev_add_param_bool for enable parameterSascha Hauer2013-04-111-21/+12
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ata: Use dev_add_param_bool for probe parameterSascha Hauer2013-04-111-11/+10
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: Use dev_add_param_int for probe parameterSascha Hauer2013-04-111-28/+10
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Use dev_add_param_int_ro where possibleSascha Hauer2013-04-115-35/+20
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: ksz8864: Use dev_add_param_bool for enable parameterSascha Hauer2013-04-111-19/+11
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/of'Sascha Hauer2013-05-0611-29/+783
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-imx/Makefile
| * | | pinctrl: move imx-iomux-v1 to drivers/pinctrl/Sascha Hauer2013-04-233-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | For consistency reasons. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl: move imx-iomux-v2 to drivers/pinctrl/Sascha Hauer2013-04-233-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | For consistency reasons. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pinctrl: switch i.MX iomux-v3 support to pinctrlSascha Hauer2013-04-233-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches the iomux-v3 (found on i.MX25,35,51,53,6) to pinctrl support. The old SoC specific API is kept for compatibility. The pinctrl devicetree support is enabled automatically when OFDEVICE support is available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add initial pinctrl supportSascha Hauer2013-04-236-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a massively stripped down pinctrl support. The upper API consists of only of: int pinctrl_select_state(struct device_d *dev, const char *state); This is used to setup the pinmux for a device to a certain state. This function normally does not need to be called manually. The device core will setup the default state before probing a device. The pinctrl core has the job of handling the devicetree. It parses the pinctrl phandles for a device from devicetree, finds the correct pinctrl device and calls its set_state callback with the pinctrl setup device node. The simplicity of this pinctrl framework comes from the fact that we: - Limit usage to devicetree only for now. For non devicetree use the old legacy SoC specific APIs still can be used. - Do not parse the devicetree into internal data structures which are used by the drivers later. This adds the overhead that we may parse the devicetree multiple times for more dynamic setups, but on the other hand we do not need to parse devices from the devicetree we don't use in barebox - Do not detect resource conflicts. Since the framework mainly is a devicetree parser this would be hard to implement. It should be easy for board maintainers to avoid resource conflicts though. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: partitions: create bb device for nand flashesSascha Hauer2013-04-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | For nand flashes automatically create a bb device for each partion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: partitions: pass struct cdev as argumentSascha Hauer2013-04-221-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass a struct cdev instead of the cdev name to of_parse_partitions. This is available to the caller anyway and makes it easier to use additional stuff from the cdev (like knowing whether it's a mtd device). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: read resource names from devicetreeSascha Hauer2013-04-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Resources can have names and these can also be specified in the devicetree. Add support for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: Allow multiple resources in 'reg' propertySascha Hauer2013-04-221-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices need multiple resources in the reg property. This patch adds support for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: Add of_property_read_string_index()Sascha Hauer2013-04-221-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Directly imported from the Kernel Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: parse phandles before probing devicesSascha Hauer2013-04-221-7/+17
| | |/ | |/| | | | | | | | | | | | | | | | | | | The phandles have to be parsed completely before registering the devices from the devicetree. Otherwise drivers can't rely on of_find_node_by_phandle in their probe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mxs'Sascha Hauer2013-05-062-15/+76
|\ \ \
| * | | MXS/MCI: simplify reset of the MCI device blockJuergen Beisert2013-04-271-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since a generic block reset function is a available, also the MCI driver should make use of it. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM/MXS: add more ROM code related documentationJuergen Beisert2013-04-091-1/+74
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 17176c2e2bba606190d9ae51943acb5701063573 adds a test of a new RTC register flag to distinguish a system reset and a wake up event. Shame on me, I have forgotten to define the newly used flag yet. While already here, I also try to document the other flags the RTC provides. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd'Sascha Hauer2013-05-062-8/+9
|\ \ \
| * | | mtd: update NAND manufacturer names from the kernelJan Luebbe2013-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nand_base: detect more ONFI flashEric Bénard2013-04-111-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if the flash has a known type, the ONFI detection won't occur and thus we may not detect the right parameters. By testing both namd and pagesize, as done in the kernel, we can detect ONFI flash with know IDs. As an example on an i.MX53 board : - without the patch : NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit), page size: 4096, OOB size: 128 - with the patch : ONFI flash detected ... ONFI param page 0 valid NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP), page size: 4096, OOB size: 224 in the first case the OOB size is wrong. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer2013-05-064-7/+12
|\ \ \ \
| * | | | NAND: imx: Fix memory leakAlexander Shiyan2013-04-301-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MCI: imx: Fix possible null pointer dereferenceAlexander Shiyan2013-04-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MCI: atmel: Fix possible null pointer dereferenceAlexander Shiyan2013-04-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ata: Remove wrong DISK_DRIVE symbolAlexander Shiyan2013-04-301-1/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | DISK_DRIVE is missing in Kconfig, so remove the "select" statement. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mci'Sascha Hauer2013-05-063-11/+9
|\ \ \ \
| * | | | MCI/MXS: report a better matching error code when the transfer failsJuergen Beisert2013-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EIO is a better error message to describe the data transfer to or from the SD cards has failed. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MCI/Core: honor transmission limits at the card's sideJuergen Beisert2013-04-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The host limits are only one limit we must honor when changing the transmission frequency. The SD cards have their own limits, so take them also into account. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MCI/Core: increase the transmission frequency while card detectionJuergen Beisert2013-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the SD card spec the detection can happen at 400 kHz Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mci: imx-esdhc: remove cache snoop register accessSascha Hauer2013-04-261-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some leftover from former powerpc support which has no relevance for i.MX based esdhc controllers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/gpio'Sascha Hauer2013-05-064-1/+213
|\ \ \ \ \
| * | | | | ARM: i.MX: Move GPIO driver to drivers/gpioAlexander Shiyan2013-04-223-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | GPIO: Rename "drivers/gpio.c" to "drivers/gpiolib.c"Alexander Shiyan2013-04-222-1/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename "drivers/gpio.c" to "drivers/gpiolib.c". Reason is for understand functionality of driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | clkdev: fix typoAntony Pavlov2013-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | MXS/MCI: don't touch variables in the host structureJuergen Beisert2013-04-261-5/+5
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMC_BUS_WIDTH_* macros do not correspond with the real bus width. After setting a bus width larger than 1 bit the next call to change the frequency ends in the default handler and the host interface stays silently at the previous frequency. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>