summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/phylib'Sascha Hauer2012-12-079-62/+347
|\ | | | | | | | | Conflicts: drivers/net/phy/phy.c
| * net: phy: micrel: fix typo in driver nameJan Luebbe2012-12-051-1/+1
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: add micrel supportJean-Christophe PLAGNIOL-VILLARD2012-11-203-0/+180
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: add fixup supportJean-Christophe PLAGNIOL-VILLARD2012-11-202-8/+107
| | | | | | | | | | | | | | | | if board need specific phy fixup they can register it and then the code will executed only if needed Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mdio_bus: fix matchJean-Christophe PLAGNIOL-VILLARD2012-11-201-1/+1
| | | | | | | | | | | | | | on barebox we have the weird way the return 0 true on bus match Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: fix generic phy driver probeJean-Christophe PLAGNIOL-VILLARD2012-11-204-45/+34
| | | | | | | | | | | | | | the generic phy driver is used if no driver are found Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * driver: introduce device_probe to manully probe a deviceJean-Christophe PLAGNIOL-VILLARD2012-11-201-6/+17
| | | | | | | | | | | | | | | | This will expect a driver to be specified This is needed by the phylib the probe the generic phy if not driver found Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * macb/ether: split flags for drivers and phylibJean-Christophe PLAGNIOL-VILLARD2012-11-192-4/+3
| | | | | | | | | | | | | | | | | | as in the kernel use is_rmii flags for pinctrl phy_flags for phylib flags Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: introduction of forced 100MbpsJean-Christophe PLAGNIOL-VILLARD2012-11-191-0/+4
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phylib: export phy_id via paramJean-Christophe PLAGNIOL-VILLARD2012-11-191-0/+3
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2012-12-073-60/+6
|\ \
| * | mtd core: call driver write function with complete bufferSascha Hauer2012-12-071-53/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtd->write is supposed to loop around pages internally, no need to do this in mtd_write. This fixes a huge write performance drop with the m25p80 driver when it was converted to a mtd driver recently. Since mtd->writesize is 1 for this driver mtd_write ended up doing single byte writes on the flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd nand: allow partial page writesSascha Hauer2012-12-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nand layer handles partial page writes just fine. If the start or end of the data is not page aligned, the nand layer will copy the data to a temporary page buffer. Remove the check which disallows partial page writes since this is what we want to do on barebox when for example an image is written to nand which is not padded to page size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd oob: do not register oob device for devices without oobSascha Hauer2012-11-291-0/+3
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-12-072-6/+12
|\ \ \
| * | | at25: use dev_lseek_default as at24 doesAntony Pavlov2012-12-031-6/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM/MXS/i.MX28: distinguish POR and wake-up event correctlyJuergen Beisert2012-12-031-0/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the built-in RTC in the i.MX28 is programmed to wake-up the SoC, the RTC reports two events: RST and WAKE. RST is okay in this case, because the PMIC was really powered down. But the real event is the WAKE from the RTC and should have precedence over the RST event. So, report the WAKE event for this special case. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mfd'Sascha Hauer2012-12-071-1/+2
|\ \ \
| * | | mfd stmpe: fix test for featuresSascha Hauer2012-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use '&' to test for the bit as it was intended. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mfd stmpe: add index to devicenameSascha Hauer2012-11-291-1/+2
| | |/ | |/| | | | | | | | | | | | | Otherwise it's not possible to register multiple stmpe devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mci'Sascha Hauer2012-12-072-13/+52
|\ \ \
| * | | mci i.MX esdhc: turn error message into debug messageSascha Hauer2012-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During card probe the mci core may send commands to the card which the card doesn't understand. This is intended, so do not print an error message here. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: Fix capacity calculation for high capacity MMC cardsSascha Hauer2012-12-031-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For these cards we have to calculate the size using the ext csd sector count fields. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: Add STUFF_BITS and use itSascha Hauer2012-11-291-5/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | This adds the STUFF_BITS macro from the kernel to extract numbers from the csd. This also fixes several places where the csd fields in SD cards differ from MMC cards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/led'Sascha Hauer2012-12-072-0/+51
|\ \ \
| * | | led-gpio: add bicolor led supportJean-Christophe PLAGNIOL-VILLARD2012-11-192-0/+51
| | |/ | |/| | | | | | | | | | | | | | | | those led can have 2 colors but one at a time otherwise they are black Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/driver'Sascha Hauer2012-12-072-0/+15
|\ \ \
| * | | bus: add bus deviceJean-Christophe PLAGNIOL-VILLARD2012-11-192-0/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automatically add it as parent of any bus device if none already specified we have now a nice output per bus barebox@Atmel at91sam9x5-ek:/ devices: `---- platform `---- atmel_usart0 `---- cs0 `---- atmel_usart1 `---- cs1 `---- mem0 `---- 0x00000000-0x07ffffff: /dev/ram0 `---- mem1 `---- 0x00000000-0x00007fff: /dev/sram0 `---- mem2 `---- 0x00000000-0x000037bf: /dev/defaultenv `---- mem3 `---- 0x00000000-0xfffffffe: /dev/mem `---- cs2 `---- w1-gpio `---- w1_bus0 `---- w1-2d-0 `---- 0x00000000-0x0000007f: /dev/ds24310 `---- w1-2d-1 `---- 0x00000000-0x0000007f: /dev/ds24311 `---- w1-23-0 `---- 0x00000000-0x000001ff: /dev/ds24330 `---- at91sam9x5cm `---- at91sam9x5ek `---- at91sam9x5dm `---- atmel_nand0 `---- nand0 `---- 0x00000000-0x1fffffff: /dev/nand0 `---- 0x00000000-0x0003ffff: /dev/at91bootstrap_raw `---- 0x00040000-0x0009ffff: /dev/self_raw `---- 0x000a0000-0x000bffff: /dev/env_raw `---- 0x000c0000-0x000dffff: /dev/env_raw1 `---- 0x00000000-0x0003ffff: /dev/nand0.at91bootstrap `---- 0x00040000-0x0009ffff: /dev/nand0.barebox `---- 0x000a0000-0x000bffff: /dev/nand0.bareboxenv `---- 0x000c0000-0x000dffff: /dev/nand0.bareboxenv2 `---- 0x000e0000-0x000fffff: /dev/nand0.oftree `---- 0x00100000-0x001fffff: /dev/nand0.free `---- 0x00200000-0x007fffff: /dev/nand0.kernel `---- 0x00800000-0x07ffffff: /dev/nand0.rootfs `---- 0x08000000-0x1fffffff: /dev/nand0.data `---- macb0 `---- miibus0 `---- eth0 `---- atmel_spi0 `---- mtd_dataflash0 `---- dataflash0 `---- 0x00000000-0x0041ffff: /dev/dataflash0 `---- atmel_mci0 `---- mci0 `---- 0x00000000-0x1d9bfffff: /dev/disk0 `---- 0x00100000-0x064fffff: /dev/disk0.0 `---- 0x06500000-0x1d9bfffff: /dev/disk0.1 `---- i2c-gpio0 `---- i2c0 `---- qt10700 `---- cs3 `---- mdio_bus `---- spi `---- i2c `---- w1_bus `---- fs `---- ramfs0 `---- devfs0 `---- net `---- global drivers: atmel_usart ramfs devfs fat macb Generic PHY atmel_nand mtd_dataflash m25p80 atmel_spi i2c-gpio mci atmel_mci qt1070 w1-gpio ds2431 ds2433 mem Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/clk'Sascha Hauer2012-12-074-3/+160
|\ \ \
| * \ \ Merge branch 'pu/clk' into for-next/clkSascha Hauer2012-12-079-19/+141
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: include/linux/clk.h
| | * | | clk: Add clk table based divider supportSascha Hauer2012-12-062-1/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For easy support of table based dividers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | clk: use the 'CLK_ALWAYS_ENABLED' flag for clk-fixed by defaultAntony Pavlov2012-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: clk_dump: denote always enabled clocksAntony Pavlov2012-12-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | clk: add always enabled clocksAntony Pavlov2012-12-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current barebox clk framework allow disable any clock and there is no means to prevent that. But there are the clocks that can't be disabled by software at all. This patch allow registration of a clock immune to clk_disable(). Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | clk: check for invalid clocksSascha Hauer2012-11-291-0/+23
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Checking for invalid clocks on function entry allows users to for example do a clk_set_rate(clk_lookup("myclk"), x) without checking for validity of the result of clk_lookup first. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: Add i.MX AHCI driverSascha Hauer2012-12-073-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the glue code for the i.MX SATA controller. This controller needs some i.MX specific setup and some SoC specific setting outside the controller itself. The code for setting up the correct clock source for the SATA phy has been taken from U-Boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: Add ahci supportSascha Hauer2012-12-074-0/+866
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds ahci controller support based on U-Boot ahci support. Unlike U-Boot we do not push the SCSI layer in between, but use the ata interface directly. Tested on a Freescale i.MX53. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: Use dma_alloc for bufferSascha Hauer2012-12-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ATA devices using DMA may need a sufficiently aligned buffer, so use dma_alloc instead of regular malloc. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: align ata command defines with kernelSascha Hauer2012-12-071-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: split ide sff suport to separate fileSascha Hauer2012-12-076-314/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only support oldschool IDE SFF devices. This is done by registering a register layout struct and everything else is done by the generic IDE SFF driver. Since modern ATA devices still use ATA, but not the SFF interface anymore, split out the IDE SFF support to a separate file to allow for other types of ata interfaces. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: fix status flagsSascha Hauer2012-12-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some status flags are wrong, fix them. All of them are currently unused, so no functional change included. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: register disks as /dev/ata*Sascha Hauer2012-12-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using /dev/disk* for every type of device is not helpful. It increases the chance that the user doesn't know which file corresponds to which device. So rename ata device files to /dev/ata*. Also add a dev_info about which device just has been registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | ata: Add i.MX PATA driver supportSascha Hauer2012-12-063-0/+211
| |/ / |/| | | | | | | | | | | | | | | | | Straight forward driver, we only have to configure some additional bits and then use the generic ide support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problemsWolfram Sang2012-12-061-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It could happen (1 out of 100 times) that NAND did not start up correctly after warm rebooting, so barebox could not find its environment or DMA timed out due to a stalled BCH. When resetting BCH together with GPMI, the issue could not be observed anymore. We probably need the consistent state already before sending commands to NAND. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mdio_bus: fix matchJean-Christophe PLAGNIOL-VILLARD2012-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | on barebox we have the weird way the return 0 true on bus match Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | USB ulpi: pass return valueSascha Hauer2012-12-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Pass the return value from ulpi_probe in ulpi_setup instead of returning -1 (which is -EPERM and does not make sense in this context) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mfd stmpe: fix test for featuresSascha Hauer2012-12-031-1/+1
| | | | | | | | | | | | | | | | | | Use '&' to test for the bit as it was intended. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | ata: Allow partitions > 4GiBSascha Hauer2012-12-031-9/+1
| | | | | | | | | | | | | | | | | | | | | Since barebox now uses 64bit for device accesses this is no issue anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | correct simple typo, "plarform_init"Robert P. J. Day2012-12-031-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | i2c: Add missing DEVICE_ID_DYNAMICSascha Hauer2012-12-031-0/+1
|/ / | | | | | | | | | | Otherwise it's not possible to register multiple identical devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>