9
0
Fork 0
Commit Graph

74 Commits

Author SHA1 Message Date
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer bf1d71d5e1 Merge branch 'for-next/misc' 2014-05-05 13:32:37 +02:00
Alexander Shiyan e8f8e45be1 ata: pata-imx: Remove unused variable
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 14:01:45 +02:00
Michel Stam 9c8f73ba86 x86: Add support for IDE on the legacy I/O ports
Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-08 08:17:55 +02:00
Eric Bénard 4395095ab5 sata-imx: i.MX53, use the internal 120MHz clock by default
this allows SATA to work on i.MX53 QSB-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

before this fix the log was :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link timeout
set parameter: Connection timed out

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:13:31 +01:00
Sascha Hauer e9ea6eeaab Merge branch 'for-next/misc'
Conflicts:
	scripts/Makefile
2013-12-06 08:23:24 +01:00
Sascha Hauer 3febd4d4ce ata: pata-imx: Add missing NULL entry in dt ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-02 13:04:15 +01:00
Alexander Aring 32a5775125 barebox: remove double semicolons
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:13:35 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Sascha Hauer 8d7f51aeea ata: ide-sff: Add missing wait for ready in write function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 11:14:01 +02:00
Sascha Hauer b4fba89c5f ata: Make 'already initialized' a debug message
This is only interesting for the debug case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:40:47 +02:00
Sascha Hauer e72805590c ata: pata-imx: implement detect callback for hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:40:41 +02:00
Sascha Hauer a6d4345e1b ata: ide: embed ata_ioports into struct ide_port and export it
Embedding struct ata_ioports into struct ide_port saves us an allocation.
Making it available to client drivers is necessary to give them access
to struct ata_port which is needed in the next patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:40:36 +02:00
Sascha Hauer 466feef31e ata: i.MX pata: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 18:49:55 +02:00
Sascha Hauer 2093884040 ata: ide: Allow to set the devicename
To get persistent devicenames under /dev/ allow to set the
devicename from the driver instead of using "ata" unconditionally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 18:48:36 +02:00
Sascha Hauer b4fee55d8b ata: i.MX sata: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 13:47:58 +02:00
Sascha Hauer 769d1faaf5 ata: ahci: Allow 'detect' on hardware device
Hook the detect callback to the hardware device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 6883fc4378 ata: implement detect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 05002a942c ata: ahci: only use lba48 on drives which support it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 7ffc9df31d ata: move ATA_ID_ fields and functions to include/
We need ata_id_has_lba48() in another C file, so move
the ATA_ID_* stuff to include/ata_drive.h like in the Linux
Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 73b0d228e5 driver: Attach info callback to device, not to driver
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>
2013-05-30 12:18:27 +02:00
Sascha Hauer c19efab886 Merge branch 'for-next/param'
Conflicts:
	drivers/mci/mci-core.c
2013-05-06 09:30:50 +02:00
Alexander Shiyan 91214e3abf ata: Remove wrong DISK_DRIVE symbol
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>
2013-04-30 08:21:33 +02:00
Sascha Hauer f3b911c820 ata: Use dev_add_param_bool for probe parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer e193326243 ata: ahci: refactor init functions
Fold ahci_host_init and __ahci_host_init into ahci_add_host

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-08 11:33:27 +01:00
Sascha Hauer 14f83c8286 ata: ahci: implement init callback
Now that we have framework support for delayed probing of
ata devices implement it in the ahci driver to actually make use
of it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-08 11:33:27 +01:00
Sascha Hauer 1cb110fb03 ata: Add init callback to ata_port_operations
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-08 11:33:27 +01:00
Sascha Hauer a2063d1015 ata: add ata logical device to defer probe
ata device usually take a long time to spin up, so it makes sense
to only spend this time when the device is actually used.

This adds a logical ata device and attaches a 'probe' parameter
to it, similar to what MMC does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-08 11:33:26 +01:00
Sascha Hauer d80505569d ata: ahci: fix wrong link check
The following commit accidently bailed out if the link is up, not
when it's down as stated in the commit message.

| commit a3f74d928c
| Author: Rob Herring <rob.herring@calxeda.com>
| Date:   Mon Feb 11 18:02:00 2013 +0100
|
|     ahci: handle COMINIT received during spin-up
|
|     Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes
|     the link to go down and we need to re-initialize the link.
|
|     Signed-off-by: Rob Herring <rob.herring@calxeda.com>
|     Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-08 11:33:26 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5f337b5452 ahci-generic: add oftree support
calxeda use the generic driver but have it's own compatible cf Linux kernel
Documentation

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:29:59 +01:00
Rob Herring a3f74d928c ahci: handle COMINIT received during spin-up
Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes
the link to go down and we need to re-initialize the link.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:09:17 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Alexander Aring def73feeec sata-imx: fix depends on ARCH_IMX
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Sascha Hauer f3468dc387 ata sff: set device pointer in ata port
This was forgotten in the last ata updates and leads to NULL
pointer dereferences.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 0957cd8d4b Remove bad Kconfig reference to DISK_DRIVE
Barebox not contain symbol DISK_DRIVE, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 1603842024 ata: Add i.MX AHCI driver
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>
2012-12-07 12:19:45 +01:00
Sascha Hauer 358ba37082 ata: Add ahci support
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>
2012-12-07 12:19:45 +01:00
Sascha Hauer 9dfc9a8e75 ata: Use dma_alloc for buffer
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>
2012-12-07 12:19:45 +01:00
Sascha Hauer 57464c10a4 ata: align ata command defines with kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:44 +01:00
Sascha Hauer 1d9e9d1b8a ata: split ide sff suport to separate file
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>
2012-12-07 12:19:41 +01:00
Sascha Hauer dd97d79696 ata: fix status flags
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>
2012-12-07 12:17:04 +01:00
Sascha Hauer 527d037636 ata: register disks as /dev/ata*
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>
2012-12-07 12:17:02 +01:00
Sascha Hauer 030904efdd ata: Add i.MX PATA driver support
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>
2012-12-06 13:52:44 +01:00
Sascha Hauer 9fdbbb34e6 ata: Allow partitions > 4GiB
Since barebox now uses 64bit for device accesses this is no
issue anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 19:50:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and
__BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace
always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then
be tested with #if __BYTE_ORDER == __xx_ENDIAN.

As we tend to use a lot of Kernel code in barebox we switch to use the kernel
way of determing the byte order.

As this always causes a lot of confusion add a check to include/common.h to
make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-28 13:49:16 +02:00