summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeLines
...
| * | cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]Miao Yan2016-05-23-3/+3
| | | | | | | | | | | | | | | | | | | | | Make file names consistent with CONFIG_QFW and CONFIG_CMD_QFW Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: qemu: move x86 specific operations out of qfw coreMiao Yan2016-05-23-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original implementation of qfw includes several x86 specific operations, like directly calling outb/inb and using some inline assembly code which prevents it being ported to other architectures. This patch adds callback functions and moves those to arch/x86/ Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: qemu: split qfw command interface and qfw coreMiao Yan2016-05-23-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits qfw command interface and qfw core function into two files, and introduces a new Kconfig option (CONFIG_QFW) for qfw core. Now when qfw command interface is enabled, it will automatically select qfw core. This patch also makes the ACPI table generation select CONFIG_QFW. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2016-05-23-0/+1269
|\ \ \
| * | | ar933x: serial: Remove the explicit pinctrl settingWills Wang2016-05-21-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct pinctrl is handled automatically so we don't need to do it in the driver. Signed-off-by: Wills Wang <wills.wang@live.com>
| * | | ath79: spi: Remove the explicit pinctrl settingWills Wang2016-05-21-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct pinctrl is handled automatically so we don't need to do it in the driver. Signed-off-by: Wills Wang <wills.wang@live.com>
| * | | drivers: mtd: add Microchip PIC32 internal non-CFI flash driver.Purna Chandra Mandal2016-05-21-0/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PIC32 internal flash devices are parallel NOR flash divided into number of banks to allow erase-programming in one while fetch and execution continues on other. As the flash banks are memory mapped stored code can be executed directly from flash (XIP), also there is additional hardware logic to prefetch and cache contents to improve execution performance. These flash can also be used to store user data (like environment). Flash erase and programming are handled by on-chip NVM controller. Driver implemented driver model but MTD is not really support. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | drivers: spi: add spi support for QCA/Atheros ath79 SOCsWills Wang2016-05-21-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add a compatible spi driver for ath79 series SOC. Signed-off-by: Wills Wang <wills.wang@live.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * | | drivers: serial: add serial driver for ar933x SOCWills Wang2016-05-21-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support for ar933x serial. Signed-off-by: Wills Wang <wills.wang@live.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | drivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros qca953x.Wills Wang2016-05-21-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple pinctrl driver, it just support uart and spi pin-mux now. Signed-off-by: Wills Wang <wills.wang@live.com> Reviewed-by: Simon Glass <sjg@chromium.org> [fixed typo in commit subject line] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * | | drivers: pinctrl: Add simple pinctrl driver for Qualcomm/Atheros ar933x.Wills Wang2016-05-21-0/+151
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This is a simple pinctrl driver, it just support uart and spi pin-mux now. Signed-off-by: Wills Wang <wills.wang@live.com> Reviewed-by: Simon Glass <sjg@chromium.org> [fixed typo in commit subject line] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | | omap3: Fix SPI registers on am33xx and am43xxMartin Hejnfelt2016-05-23-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the base registers are read from device tree the base is not 0x48030100 as the driver expects, but 0x48030000, resulting in non functioning SPI. To deal with this, use same idea as how this is done in the linux kernel (drivers/spi/spi-omap2-mcspi.c) and add a structure with a field that is used to shift the registers on these systems. v2: Fixed commit subject line to correct cpu Signed-off-by: Martin Hejnfelt <mh@newtec.dk>
* | | arm: mvebu: a38x: Weed out floating point useMarek Vasut2016-05-20-19/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reason unknown, recently, the DDR init code writers are really fond of hiding some small floating point operating deep in their creations. This patch removes one from the Marvell A38x code. Instead of returning size of chip as float from ddr3_get_device_size() in GiB units, return it as int in MiB units. Since this would interfere with the huge switch code in ddr3_calc_mem_cs_size(), rework the code to match the change. Before this patch, the cs_mem_size variable could have these values: ( { 16, 32 } x { 8, 16 } x { 0.01, 0.5, 1, 2, 4, 8 } ) / 8 = { 0.000000, 0.001250, 0.002500, 0.005000, 0.062500, 0.125000, 0.250000, 0.500000, 1.000000, 2.000000, 4.000000, } The switch code checked for a subset of the resulting RAM sizes, which is in range 128 MiB ... 2048 MiB. With this patch, the cs_mem_size variable can have these values: ( { 16, 32 } x { 8, 16 } x { 0, 512, 1024, 2048, 4096, 8192 } ) / 8 = { 0, 64, 128, 256, 512, 1024, 2048, 4096 } To retain previous behavior, filter out 0 MiB (invalid size), 64 MiB and 4096 MiB options. Removing the floating point stuff also saves 1.5k from text segment: clearfog : spl/u-boot-spl:all -1592 spl/u-boot-spl:text -1592 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge git://git.denx.de/u-boot-dmTom Rini2016-05-17-339/+2338
|\ \
| * | 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-12/+54
| | | | | | | | | | | | | | | | | | | | | 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/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+4
| | | | | | | | | | | | | | | | | | | | | 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: mmc: Move the device list into a separate fileSimon Glass2016-05-17-117/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+11
| | | | | | | | | | | | | | | | | | | | | 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 functions to select a hardware partitionSimon Glass2016-05-17-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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-7/+13
| | | | | | | | | | | | | | | | | | 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/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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: Drop the host_get_dev() functionSimon Glass2016-05-17-10/+0
| | | | | | | | | | | | | | | | | | 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-1/+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-11/+3
| | | | | | | | | | | | | | | | | | 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-14/+2
| | | | | | | | | | | | | | | | | | 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-0/+1
| | | | | | | | | | | | | | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: mmc: Add an implementation of the 'devnum' functionsSimon Glass2016-05-17-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-17-3/+27
| | | | | | | | | | | | | | | | | | Add a legacy block interface for MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: sandbox: Add a legacy host block interfaceSimon Glass2016-05-17-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-17-0/+14
| | | | | | | | | | | | | | | | | | Add a legacy block interface for systemace. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: blk: Add a legacy block interfaceSimon Glass2016-05-17-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | sandbox: Add dummy SATA functionsSimon Glass2016-05-17-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-17-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>
| * | dm: Rename disk uclass to ahciSimon Glass2016-05-17-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-17-4/+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>