summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dm: blk: Add a easier way to create a named block deviceSimon Glass2016-05-173-8/+37
| | | | | | | | Add a function that automatically builds the device name given the parent and a supplied string. Most callers will want to do this, so putting this functionality in one place makes more sense. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: blk: Allow blk_create_device() to allocate the device numberSimon Glass2016-05-172-1/+43
| | | | | | | | Allow a devnum parameter of -1 to indicate that the device number should be alocated automatically. The next highest available device number for that interface type is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Enable SATASimon Glass2016-05-171-0/+3
| | | | | | | Enable building the SATA code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Add support for driver-model block devicesSimon Glass2016-05-171-1/+30
| | | | | | | | Add driver-model block-device support to the SATA implementation. This is just a dummy implementation for now, since the SATA low-level API uses numbered devices and that doesn't fit with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Enable SCSISimon Glass2016-05-171-0/+6
| | | | | | | Enable building the SCSI code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Add support for driver-model block devicesSimon Glass2016-05-171-0/+32
| | | | | | Add driver-model block-device support to the SCSI implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Enable IDESimon Glass2016-05-171-0/+10
| | | | | | | Enable building the IDE code for sandbox. This is for build coverage only. It does not currently work. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Add support for driver-model block devicesSimon Glass2016-05-172-0/+40
| | | | | | Add driver-model block-device support to the IDE implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: part: Drop the get_dev() methodSimon Glass2016-05-171-1/+0
| | | | | | | This is now handled by the legacy block driver. The get_dev() method is no-longer used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Drop the host_get_dev() functionSimon Glass2016-05-173-13/+1
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: blk: Drop the systemace.h headerSimon Glass2016-05-172-11/+0
| | | | | | This has nothing of consequence. Remove it and its only inclusion site. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: systemace: Drop the get_dev() functionSimon Glass2016-05-174-21/+4
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Drop the get_dev() functionSimon Glass2016-05-172-3/+1
| | | | | | | | | This function is implemented by the legacy block functions now. Drop it. We cannot yet make sata_dev_desc[] private to common/sata.c as it is used by the SATA drivers. This will require the SATA interface to be reworked. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Drop the get_dev() functionSimon Glass2016-05-174-11/+2
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Drop the get_dev() functionSimon Glass2016-05-174-18/+3
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Drop the get_dev() functionSimon Glass2016-05-173-10/+1
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Drop the get_dev() functionSimon Glass2016-05-178-29/+14
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: disk: Use legacy block driver info for block device accessSimon Glass2016-05-171-4/+3
| | | | | | | Instead of calling xx_get_dev() functions for each interface type, use the new legacy block driver which can provide the device through its interface. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Separate the non-command code into its own fileSimon Glass2016-05-173-118/+107
| | | | | | | | | | | | | | | | At present the SATA command code includes both the command-processing code and the core SATA functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. With this commit: - All CONFIG option are referenced from the non-command code - The concept of a 'current SATA device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Separate the non-command code into its own fileSimon Glass2016-05-173-1276/+1228
| | | | | | | | | | | | | | | | At present the IDE command code includes both the command-processing code and the core IDE functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. With this commit: - Most CONFIG option are referenced from the non-command code - The concept of a 'current IDE device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Separate the non-command code into its own fileSimon Glass2016-05-174-603/+600
| | | | | | | | | | | | | | | | | At present the SCSI command code includes both the command-processing code and the core SCSI functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. This functions use the new legacy block functions. With this commit: - There is no CONFIG option referenced from the command code - The concept of a 'current SCSI device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Add an implementation of the 'devnum' functionsSimon Glass2016-05-171-0/+280
| | | | | | | | | | Now that the MMC code accesses devices by number, we can implement this same interface for driver model, allowing MMC to support using driver model for block devices. Add the required functions to the uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Add a legacy block interface for MMCSimon Glass2016-05-171-3/+27
| | | | | | Add a legacy block interface for MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Add a legacy block interface for USB storageSimon Glass2016-05-171-0/+7
| | | | | | Add a legacy block interface for USB storage. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Add a legacy host block interfaceSimon Glass2016-05-171-0/+7
| | | | | | Add a legacy block interface for sandbox host. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: systemace: Add a legacy block interfaceSimon Glass2016-05-172-0/+15
| | | | | | Add a legacy block interface for systemace. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: blk: Add a legacy block interfaceSimon Glass2016-05-173-0/+460
| | | | | | | | | | There is quite a bit of duplicated common code related to block devices in the IDE and SCSI implementations. Create some helper functions that can be used to reduce the duplication. These rely on a linker list of interface-type drivers Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Rename CONFIG_CMD_SCSI to CONFIG_SCSISimon Glass2016-05-1733-40/+40
| | | | | | | | This option currently enables both the command and the SCSI functionality. Rename the existing option to CONFIG_SCSI since most of the code relates to the feature. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Fix code style problems in cmd/sata.cSimon Glass2016-05-171-5/+7
| | | | | | | This file has a few coding style problems. Fix these to make future updates easier. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Remove the forward declarationsSimon Glass2016-05-171-714/+682
| | | | | | | Reorder the code to avoid needing forward declarations. Fix up code style as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Correct various code style problemsSimon Glass2016-05-171-28/+29
| | | | | | Adjust common/ide.c so that it passes most checkpatch.pl checks. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Fix up code styleSimon Glass2016-05-171-233/+226
| | | | | | Update the code style of this file so that it passes checkpatch.pl. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Remove the forward declarationsSimon Glass2016-05-171-332/+310
| | | | | | Reorder the code to avoid needing forward declarations. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add dummy SATA functionsSimon Glass2016-05-172-1/+34
| | | | | | | Add some functions needed by the SATA code. This allows it to be compiled for sandbox, thus increasing build coverage. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add dummy SCSI functionsSimon Glass2016-05-172-1/+30
| | | | | | | Add some functions needed by the SCSI code. This allows it to be compiled for sandbox, thus increasing build coverage. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add string and 16-bit I/O functionsSimon Glass2016-05-171-0/+15
| | | | | | | | | | Add outsw() and insw() functions for sandbox, as these are needed by the IDE code. The functions will not do anything useful if called, but allow the code to be compiled. Also add out16() and in16(), required by systemace. Signed-off-by: Simon Glass <sjg@chromium.org>
* Allow iotrace byte access to use an address of any sizeSimon Glass2016-05-171-2/+3
| | | | | | | | If an address is used with readb() and writeb() which is smaller than the expected size (e.g. 32-bit value on a machine with 64-bit addresses), a warning results. Fix this by adding a cast. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Rename disk uclass to ahciSimon Glass2016-05-179-12/+14
| | | | | | | | This started as 'ahci' and was renamed to 'disk' during code review. But it seems that this is too generic. Now that we have a 'blk' uclass, we can use that as the generic piece, and revert to ahci for this. Signed-off-by: Simon Glass <sjg@chromium.org>
* pci: Drop CONFIG_SYS_SCSI_SCAN_BUS_REVERSESimon Glass2016-05-173-8/+0
| | | | | | | This option is not used by any board. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: sandbox: Add a board for sandbox without CONFIG_BLKSimon Glass2016-05-172-0/+175
| | | | | | | | While the driver-model block device support is in progress, it is useful to build sandbox both with and without CONFIG_BLK. Add a separate board for the latter. Signed-off-by: Simon Glass <sjg@chromium.org>
* Revert "dm: sandbox: Drop the pre-DM host implementation"Simon Glass2016-05-171-0/+90
| | | | | | | | | | Bring this support back so that sandbox can be compiled with CONFIG_BLK. This allows sandbox to have greater build coverage during the block-device transition. This can be removed again later. This reverts commit 33cf727b1634dbd9cd68a6ebc444a88f053822d7. Signed-off-by: Simon Glass <sjg@chromium.org>
* gpio: exynos(s5p): remove gpio_xlate routineEric Nelson2016-05-171-11/+0
| | | | | | | | | With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass, the Exynos/S5P gpio driver doesn't need a custom xlate routine. Signed-off-by: Eric Nelson <eric@nelint.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Minkyu Kang <mk7.kang@samsung.com>
* gpio: rk: remove gpio_xlate routineEric Nelson2016-05-171-11/+0
| | | | | | | | With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass, the Rockchip gpio driver doesn't need a custom xlate routine. Signed-off-by: Eric Nelson <eric@nelint.com> Acked-by: Simon Glass <sjg@chromium.org>
* gpio: pic32: remove gpio_xlate routineEric Nelson2016-05-171-10/+0
| | | | | | | | | With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass, the pic32 gpio driver doesn't need a custom xlate routine. Signed-off-by: Eric Nelson <eric@nelint.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Purna Chandra Mandal <purna.mandal@microchip.com>
* gpio: omap: remove gpio_xlate routineEric Nelson2016-05-171-11/+0
| | | | | | | | With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass, the omap gpio driver doesn't need a custom xlate routine. Signed-off-by: Eric Nelson <eric@nelint.com> Acked-by: Simon Glass <sjg@chromium.org>
* gpio: intel_broadwell: remove gpio_xlate routineEric Nelson2016-05-171-10/+0
| | | | | | | | With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass, the intel_broadwell driver doesn't need a custom xlate routine. Signed-off-by: Eric Nelson <eric@nelint.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: gpio: add a default gpio xlate routineEric Nelson2016-05-172-12/+37
| | | | | | | | | | | | | | | | | Many drivers use a common form of offset + flags for device tree nodes. e.g.: <&gpio1 2 GPIO_ACTIVE_LOW> This patch adds a common implementation of this type of parsing and calls it when a gpio driver doesn't supply its' own xlate routine. This will allow removal of the driver-specific versions in a handful of drivers and simplify the addition of new drivers. Signed-off-by: Eric Nelson <eric@nelint.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* drivers: usb: common: add common code for usb drivers to useMugunthan V N2016-05-173-0/+50
| | | | | | | Add common usb code which usb drivers makes use of it. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: gpio: introduce 74x164 driverPeng Fan2016-05-173-0/+202
| | | | | | | | | | | | | | | | | | | | Introduce driver to support "fairchild,74hc595" devices. 1. Take linux drivers/drivers/gpio/gpio-74x164.c as reference. 2. Following the naming used in Linux driver with gen_7x164 as the prefix. 3. Enable CONFIG_DM_74X164 to use this driver. 4. Follow Documentation/devicetree/bindings/gpio/gpio-74x164.txt to add device nodes 5. Tested on i.MX6 UltraLite with 74LV595 using gpio command and oscillograph. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Chin Liang See <clsee@altera.com> Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: spi: introduce dm apiPeng Fan2016-05-172-7/+73
| | | | | | | | | | | Introduce dm_spi_claim_bus, dm_spi_release_bus and dm_spi_xfer Convert spi_claim_bus, spi_release_bus and spi_xfer to use the new API. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Jagan Teki <jteki@openedev.com> Acked-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud