summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* of: Add of_alias_get functionSascha Hauer2013-05-301-0/+13
| | | | | | | This is used to retrieve the name of the alias for a given devicenode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: set name of mci device to same name as the filenameSascha Hauer2013-05-301-2/+8
| | | | | | | | | | We already have the possibility to register a mci with a certain filename to get persistent names. However, the device needed to find the probe parameter still has the name 'mcix'. This patch changes this by registering the mci device with the same name as the filename. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: embed mci device into struct mciSascha Hauer2013-05-301-122/+95
| | | | | | To safe a separate allocation and to make the code simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: make mci device a pure deviceSascha Hauer2013-05-301-8/+20
| | | | | | | No need to match and probe the device if all that we want is a logical deivice for the mci. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: Attach info callback to device, not to driverSascha Hauer2013-05-3013-71/+49
| | | | | | | | Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: Add support for MMC boot partitionsSascha Hauer2013-05-302-42/+154
| | | | | | | | | | | | | | | | | Some MMC cards support boot partitions. These are special regions on the MMC card intended to put a bootloader on. This patch adds support for these partitions, they are accessible as /dev/diskx.boot[0|1]. Additionally the partitions can be configured bootable using a device parameter. This can be used to mark the user area or one of the boot partitions as bootable. Since this feature is mostly seen on eMMC cards it is made optional to lower the size impact for boards which do not have eMMC. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci i.MX esdhc: Fix clock divider calculationSascha Hauer2013-05-302-19/+28
| | | | | | | | | | | | | | | This updates the i.MX esdhc divider settings to FSLs U-Boot. Current timings work fine for SD cards, but not for eMMC. Although the calculation is fine according to the datasheet and reading from eMMC works, writing is broken. Atleast on i.MX53/tqma53. With this patch the result is the same, but uses different divider values to achieve it. While at it, replace the udelay with a busy-loop. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MCI: Sort Makefile entriesAlexander Shiyan2013-05-301-9/+9
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directoryAlexander Shiyan2013-05-302-30/+0
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Added sd driver for bcm2835 (Raspberry PI)wilhelm2013-05-304-0/+669
| | | | | | Replaced defines according to sdhci.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: imx-esdhc: factor out common sdhci registersSascha Hauer2013-05-303-185/+175
| | | | | | | | | | | | | | | | This gives the SDHCI specific registers a common name and moves them to a separate file for use by other SDHCI like drivers. The SDHCI spec has some 16bit and 8bit registers. The i.MX accesses these as 32bit registers. These register defines now are named after the SDHCI registers they combine into one, for example: SDHCI_HOST_CONTROL__POWER_CONTROL__BLOCK_GAP_CONTROL is the 32bit version of the SDHCI registers HOST_CONTROL, POWER_CONTROL and BLOCK_GAP_CONTROL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add info functionSascha Hauer2013-05-231-2/+6
| | | | | | | Some parameters may wish to provide some information about their meaning or possible values. Provide an info callback for parameters. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fdt: Fix dt memreserve entrySascha Hauer2013-05-211-2/+1
| | | | | | | | The fdt reserve map needs address/size values, not address/end values like accidently done for generating the reserve entry for the dt. Reported-by: Jürgen Beisert <j.beisert@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand_base: sync flash detection functions with linux 3.9's codeEric Bénard2013-05-171-120/+266
| | | | | | | | | this fix the problems introduced when detecting non ONFI flashes in commit 4c2bdc8728016b3412523e3264651651fe752860 "nand_base: detect more ONFI flash" Signed-off-by: Eric Bénard <eric@eukrea.com> 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>