summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* mips: ath79: add support for AR933x SOCsWills Wang2016-05-21-0/+720
| | | | | | This patch enable work for ar933x SOC. Signed-off-by: Wills Wang <wills.wang@live.com>
* mips: add base support for QCA/Atheros ath79 SOCsWills Wang2016-05-21-0/+1610
| | | | | | | This patch add some common code for QCA/Atheros ath79 SOCs such as DDR tuning, chip reset and CPU detection. Signed-off-by: Wills Wang <wills.wang@live.com>
* Add support for 64-bit MIPS to examples/standaloneStanislav Galabov2016-05-21-0/+18
| | | | Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* Fix FreeBSD loader API so that it works on both 32-bit and 64-bit targets.Stanislav Galabov2016-05-21-44/+49
| | | | | | Specifically tested on MIPS under QEMU (works with all combination of bit-ness and endian-ness) Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* Use CONFIG_IDE_SWAP_IO when running on big-endian MIPS (32 or 64-bit) in ↵Stanislav Galabov2016-05-21-0/+8
| | | | | | QEMU so that IDE transfers work properly Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* Properly calculate ATA_SECTORWORDS, using a fixed-size integer, so it works ↵Stanislav Galabov2016-05-21-1/+1
| | | | | | for both 32-bit and 64-bit targets Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-05-17-2749/+5419
|\
| * dm: mmc: test: Add tests for MMCSimon Glass2016-05-17-3/+20
| | | | | | | | | | | | | | | | Add a simple test which checks that a sandbox-emulated SD card can be used correctly. This tests plumbing through the MMC stack's block-device implementaion. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sandbox: mmc: Enable building MMC code for sandboxSimon Glass2016-05-17-2/+6
| | | | | | | | | | | | | | Enable building the MMC code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: sandbox: Add an SD-card emulationSimon Glass2016-05-17-2/+143
| | | | | | | | | | | | | | | | Add an emulation of an SD card to sandbox, allowing MMC to be used in tests. The emulation is very simple, supporting only card detection and reading test data. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Add support for driver-model block devicesSimon Glass2016-05-17-30/+58
| | | | | | | | | | | | | | Add support for enabling CONFIG_BLK with MMC. This involves changing a few functions to use struct udevice and adding a MMC block device driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Add a way to bind MMC devices with driver modelSimon Glass2016-05-17-0/+70
| | | | | | | | | | | | | | | | | | | | Binding an MMC device when CONFIG_BLK is enabled requires that a block device be bound as a child of the MMC device. Add a function to do this. The mmc_create() method will be used only when DM_BLK is disabled. Add an unbind method also. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Implement the MMC functions for block devicesSimon Glass2016-05-17-1/+109
| | | | | | | | | | | | | | | | Implement the functions in mmc_legacy.c for driver-model block devices, so that MMC can use driver model for these. This allows CONFIG_BLK to be enabled with DM_MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sandbox: Only enable the sandbox MMC driver when validSimon Glass2016-05-17-1/+7
| | | | | | | | | | | | | | This driver will require generic MMC and block-device support in a future commit. To avoid test errors, make this change now. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Adjust mmc_switch_part() to use a struct mmcSimon Glass2016-05-17-8/+4
| | | | | | | | | | | | | | Instead of looking up the MMC device by number, just pass it in. This makes it possible to use this function with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Use the correct error code for blk_get_device_by_str()Simon Glass2016-05-17-3/+3
| | | | | | | | | | | | | | Return -EINVAL instead of -1 in this function, to provide a more meaningful error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Move the device list into a separate fileSimon Glass2016-05-17-121/+176
| | | | | | | | | | | | | | | | | | At present the MMC subsystem maintains its own list of MMC devices. This cannot work with driver model, which needs to maintain this itself. Move the list code into a separate 'legacy' file. The core MMC code remains, and will be shared with the driver-model implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Set up the device pointer when using the MMC uclassSimon Glass2016-05-17-1/+14
| | | | | | | | | | | | | | Update the existing drivers to set up this new pointer. This will be required by the MMC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Add a comment as to why the bdev member is neededSimon Glass2016-05-17-0/+5
| | | | | | | | | | | | | | This member should be explained, since it is not obvious why it is needed. Add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: part: Drop the block_drvr tableSimon Glass2016-05-17-64/+30
| | | | | | | | | | | | | | This is not needed since we can use the functions provided by the legacy block device support. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: part: Use the legacy block driver for hardware partition supportSimon Glass2016-05-17-11/+1
| | | | | | | | | | | | Drop use of the table in part.c for this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Add functions to select a hardware partitionSimon Glass2016-05-17-0/+59
| | | | | | | | | | | | | | | | The block device uclass does not currently support selecting a particular hardware partition but this is needed for MMC. Add it so that the blk API can support MMC properly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Use the new select_hwpart() APISimon Glass2016-05-17-15/+22
| | | | | | | | | | | | Avoid calling directly into the MMC code - use the new API call instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: spl: Use the legacy block interface in SPLSimon Glass2016-05-17-0/+1
| | | | | | | | | | | | | | Bring this in for SPL so that we can use generic code for loading from block devices. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Add a function to obtain the block deviceSimon Glass2016-05-17-0/+13
| | | | | | | | | | | | | | | | The MMC block device is contained within struct mmc. But with driver model this will not be the case. Add a function to obtain the block device. We can later implement this for CONFIG_BLK. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Implement the select_hwpart() methodSimon Glass2016-05-17-0/+22
| | | | | | | | | | | | | | Implement this method so that hardware partitions will work correctly with MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: Move mmc_switch_part() above its callersSimon Glass2016-05-17-24/+21
| | | | | | | | | | | | | | | | This function is defined after it is used. In preparation for making it static, move it up a little. Also drop the printf() which should not appear in a driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Free the block device name when unboundSimon Glass2016-05-17-2/+10
| | | | | | | | | | | | | | Mark the device name as allocated so that it will be freed correctly when the device is unbound. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Allow device names to be freed automaticallySimon Glass2016-05-17-0/+24
| | | | | | | | | | | | | | | | | | | | Some devices have a name that is stored in allocated memory. At present there is no mechanism to free this memory when the device is unbound. Add a device flag to track whether a name is allocated and a function to add the flag. Free the memory when the device is unbound. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Fix allocation of block-device numberingSimon Glass2016-05-17-9/+9
| | | | | | | | | | | | | | Due to code ordering the block devices are not numbered sequentially. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: sandbox: Enable systemaceSimon Glass2016-05-17-0/+4
| | | | | | | | | | | | | | Enable building the systemace code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: systemace: Add driver-mode block-device supportSimon Glass2016-05-17-0/+44
| | | | | | | | | | | | Add support for CONFIG_BLK to the systemace driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: systemace: Reorder function to avoid forward declarataionsSimon Glass2016-05-17-31/+26
| | | | | | | | | | | | | | Move the systemace_get_dev() function below systemace_read() so that we can avoid a forward declaration. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: blk: Add a easier way to create a named block deviceSimon Glass2016-05-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-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-17-29/+14
| | | | | | | | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>