Wadim Egorov [Mon, 21 Aug 2017 11:36:57 +0000 (13:36 +0200)]
rockchip: rk3288: Add reset reason detection
Sometimes it's helpful to know the reset reason caused in the SoC.
Add reset reason detection for the RK3288 SoC.
This will set an environment variable which represents the reset reason.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Clemens Gruber [Sun, 3 Sep 2017 17:17:10 +0000 (19:17 +0200)]
crypto/fsl: fix obj-yy in Makefile
When enabling CONFIG_CMD_BLOB and/or CONFIG_CMD_DEKBLOB, the build fails
with a linker error:
...
LD u-boot
arch/arm/mach-imx/built-in.o: In function `blob_encap_dek':
/home/clemens/dev/u-boot/arch/arm/mach-imx/cmd_dek.c:46: undefined
reference to `blob_dek'
This is due to an error in the Makefile, resulting in obj-yy/obj-yn/..
and fsl_blob.o is therefore not linked.
Fix it by splitting it up into two obj-y lines.
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
omap3: evm: Fixes for CONFIG_NAND, SPL_OS_BOOT, USB, and environment
- Pass MTDPARTS kernel arguments to kernel
- Use Kconfig CONFIG_NAND instead of CONFIG_SYS_EXTRA_OPTIONS="NAND"
- Call 'usb_stop' on kernel start
- Update Falcon mode setup to match other OMAP3 boards
- Use "uEnv.txt" as boot script instead of "boot.scr"
Bin Meng [Sat, 2 Sep 2017 15:15:36 +0000 (08:15 -0700)]
nvme: Fix potential sign extension issue in nvme_blk_rw()
"lbas" with type "u16" (16 bits, unsigned) is promoted in
"lbas << ns->lba_shift" to type "int" (32 bits, signed), then
sign-extended to type "unsigned long long" (64 bits, unsigned).
If "lbas << ns->lba_shift" is greater than 0x7FFFFFFF, the upper
bits of the result will all be 1.
Fix it by casting "lbas" to "u32".
Reported-by: Coverity (CID: 166730) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Lukasz Majewski [Sun, 27 Aug 2017 11:46:22 +0000 (13:46 +0200)]
fix: fw_env: Prevent writing error message on special files, which don't support fsync
According to fsync specification [1] some special files (e.g., a pipe, FIFO,
or socket) don't support synchronization and return either EROFS or EINVAL.
On the linux side the sys_fsync -> do_fsync() checks if the requested file
has f_op->fsync defined. If not it returns EINVAL [2].
This commit prevents writing error messages for files (devices), which
do not support fsync().
Jonathan Gray [Sun, 27 Aug 2017 10:45:14 +0000 (20:45 +1000)]
bch: don't use __BSD_VISIBLE to test for fls
Commit 4ecc988301bc8e981e6d7538c57cdb3aa82f7c1d assumes fls is in libc
if __BSD_VISIBLE is defined. This appears to only be true on FreeBSD
and DragonFlyBSD. OpenBSD defines __BSD_VISIBLE and does not have fls
in strings.h/libc.
Switch the test for __BSD_VISIBLE to one for __DragonFly__ and
__FreeBSD__ to unbreak the build on OpenBSD.
This commit removes definitions of CONFIG_SYS_BARGSIZE defined to be
equal to CONFIG_SYS_CBSIZE in numerous configuration files.
We remove such definitions in two situations:
- CONFIG_SYS_CBSIZE is otherwise not defined in the board
configuration file, which means the default value of
CONFIG_SYS_CBSIZE == 256 applies. In this case, the default value
of CONFIG_SYS_BARGSIZE == 512 (common/image.c) is suitable, as it is
larger.
- CONFIG_SYS_CBSIZE is defined in the board configuration file, but
to a value equal or less than 512. In this case, the default value
of CONFIG_SYS_BARGSIZE == 512 (common.image.c) is suitable, as it
is equal or larger.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:05 +0000 (22:59 +0200)]
include/configs: remove default values of CONFIG_SYS_BARGSIZE
CONFIG_SYS_BARGSIZE is already defined to 512 in common/image.c when
not defined. Therefore, there is no point in having board
configuration files define it to 512.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:04 +0000 (22:59 +0200)]
include/configs: drop default definitions of CONFIG_SYS_MAXARGS
Now that include/config_fallbacks.h define a sane fallback for
CONFIG_SYS_MAXARGS, we can drop the definition of this constant in all
configurations that were using the default value.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:03 +0000 (22:59 +0200)]
include/config_fallbacks.h: add default for CONFIG_SYS_MAXARGS
CONFIG_SYS_MAXARGS contains the maximum number of arguments accepted
by U-Boot commands. Since the vast majority of the platforms define it
to 16, it makes sense to have a default definition to 16, which will
allow to remove this definition from a significant number of
platforms.
It will allow to remove the default definition from 216 platform .h
files, leaving only 56 platforms with non-default values (15, 24, 32,
48, 64, 96, 128 or 256).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:02 +0000 (22:59 +0200)]
include/configs: drop default definitions of CONFIG_SYS_PBSIZE
Now that the fallback value of CONFIG_SYS_PBSIZE in
include/config_fallbacks.h has been adjusted, remove its definition
from a large number of board configuration files.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:01 +0000 (22:59 +0200)]
include/config_fallbacks.h: change fallback for CONFIG_SYS_PBSIZE
Most of the platforms are using CONFIG_SYS_CBSIZE +
sizeof(CONFIG_SYS_PROMPT) + 16 as their value for CONFIG_SYS_PBSIZE,
so let's adopt this for the fallback value of CONFIG_SYS_PBSIZE.
This will allow us to drop an explicit definition of CONFIG_SYS_PBSIZE
from a large number of platforms.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:00 +0000 (22:59 +0200)]
include/configs: remove CONFIG_SYS_CBSIZE when the default value is used
Now that include/config_fallbacks.h define a sane fallback for
CONFIG_SYS_CBSIZE, we can drop the definition of this constant in all
configurations that were using the default value.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Drop <config.h> from stih410-b2260.h] Signed-off-by: Tom Rini <trini@konsulko.com>
Thomas Petazzoni [Wed, 23 Aug 2017 20:58:59 +0000 (22:58 +0200)]
include/config_fallbacks.h: add default for CONFIG_SYS_CBSIZE
CONFIG_SYS_CBSIZE contains the buffer size for input for the
console. The vast majority of platforms define them to some reasonable
value (256, 512 or 1024 bytes), and it is quite annoying to repeat
this definition for all platforms while it isn't really HW-related.
Therefore, let's provide a sane fallback value in config_fallbacks.h,
so that platforms can rely on it instead of having to explicitly
define it.
We use 1024 when KGDB is enabled, and 256 otherwise, which is what the
majority of the platforms are doing.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Wed, 23 Aug 2017 14:01:33 +0000 (16:01 +0200)]
part: efi: Disable overlap check
The current code checks that no partitions overlap with the GPT partition
table using the offset of the first LBA usable for that partition.
This works fine, unless you have a partition entry that is further away
than it usually is and you want to create partitions in the gap between the
GPT header and the GPT partition entries, for example to reflash a
bootloader that needs to be set there.
Rework the test to something a bit smarter that checks whether a partition
would overlap with either the GPT header or the partition entries, no
matter where it is on the disk.
Partitions that do not have a start LBA specified will still start at the
first LBA usable set in the GPT header, to avoid weird behaviours.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Wed, 23 Aug 2017 14:01:30 +0000 (16:01 +0200)]
part: efi: Fix offset
Both the config option and the DT options specify the offset to set the GPT
at in bytes, yet the code treats those values as block numbers.
Fix that.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Adam Ford [Sun, 13 Aug 2017 14:00:28 +0000 (09:00 -0500)]
Kconfig: Add EEPROM options to Kconfig when I2C_EEPROM is set
Add the following options to drivers/misc/Kconfig:
SYS_I2C_EEPROM_ADDR
SYS_I2C_EEPROM_BUS
SYS_EEPROM_SIZE
SYS_EEPROM_PAGE_WRITE_BITS
SYS_EEPROM_PAGE_WRITE_DELAY_MS
SYS_I2C_EEPROM_ADDR_LEN
SYS_I2C_EEPROM_ADDR_OVERFLOW
This does not migrate any boards, but provides a foundations for
those who want/need these options
Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Migrate uniphier] Signed-off-by: Tom Rini <trini@konsulko.com>
Stefan Roese [Wed, 30 Aug 2017 07:40:17 +0000 (09:40 +0200)]
x86: theadorable-x86-common: Remove "ip=dhcp" from default environment
Without ethernet cable plugged, "ip=dhcp" leads to a complete hangup in
Linux booting and the system does not boot into userland at all. Since
its not required to have an active network connection on these board,
lets remove this statement from the default environment.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng [Tue, 29 Aug 2017 05:09:11 +0000 (22:09 -0700)]
x86: baytrail: acpi: Add full reset bit to the reset register value in FADT
It was noticed a few times, that the reboot from Linux (reboot command)
is different from the reboot (reset command) under U-Boot. The U-Boot
version does seem to reset the board more deeply (PCI cards etc) than
the Linux reboot.
This is actually caused by missing full reset bit in the reset register
value in the ACPI FADT table.
Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stefan Roese <sr@denx.de>
Bin Meng [Sun, 27 Aug 2017 02:22:58 +0000 (19:22 -0700)]
x86: ich-spi: Remove useless assignment in ich_spi_xfer()
In ich_spi_xfer() when the driver presets control fields, control
variable gets assigned twice. Apparently only the last assignment
takes effect. Remove the other one.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
Adam Ford [Fri, 11 Aug 2017 11:39:34 +0000 (06:39 -0500)]
Convert CONFIG_SYS_I2C_BUS_MAX to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_I2C_BUS_MAX
Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Fix AM43XX drop AM44XX] Signed-off-by: Tom Rini <trini@konsulko.com>
Adam Ford [Fri, 11 Aug 2017 11:39:13 +0000 (06:39 -0500)]
Configs: Migrate I2C_BUS_MAX to CONFIG_SYS_I2C_BUS_MAX
For consistency with other platforms and in preparation of Kconfig
migration, let's change Several TI platforms that use I2C_BUS_MAX
to CONFIG_SYS_I2C_BUS_MAX
Tom Rini [Fri, 25 Aug 2017 21:50:27 +0000 (17:50 -0400)]
Kconfig: Migrate all of cmd/fastboot/Kconfig to defconfigs
- Move ANDROID_IMAGE_SUPPORT to top level Kconfig under images as it's
not strictly part of fastboot.
- Add some defaults for the fastboot buffer location and size
- Migrate all options listed in cmd/fastboot/Kconfig
- Cleanup the README
Tom Rini [Fri, 25 Aug 2017 21:50:26 +0000 (17:50 -0400)]
configs: Migrate all of the existing USB symbols, except fastboot
This syncs all of the currently Kconfig'd symbols out of the headers and
into the defconfig files. This has two exceptions, first am335x_evm
needs to be converted to DM in SPL and then it can stop undef'ing
CONFIG_DM_USB. Leaving this as-is results in a build failure, and
without work, run time failure. The other case is am43xx_evm.h and in
turn am43xx_evm_usbhost_boot. The problem here is that we need DWC3 USB
host mode in SPL, but still desire to have gadget mode in U-Boot proper.
Dave Prue [Thu, 31 Aug 2017 17:21:01 +0000 (19:21 +0200)]
sunxi: Fix CONFIG_SUNXI_GMAC references
SUNXI_GMAC was still used to configure the code where as the
same has been renamed and moved to Kconfig in below commit
"sunxi: Move SUNXI_GMAC to Kconfig"
(sha1: 4d43d065db3262f9a9918ba72457bf36dfb8e0bb)
Signed-off-by: Dave Prue <dave@prue.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Tested-by: Mark Kettenis <kettenis@openbsd.org>
[Tweek commit message, config_whitelist.txt, build-whitelist.sh] Signed-off-by: Jagan Teki <jagan@openedev.com>
Chen-Yu Tsai [Thu, 31 Aug 2017 13:57:48 +0000 (21:57 +0800)]
mmc: sunxi: Only update timing mode bit when enabling new timing mode
When enabling the new mmc timing mode, we inadvertently clear all the
remaining bits in the new timing mode register. The bits cleared
include a default phase delay on the output clock. The BSP kernel
states that the default values are supposed to be used. Clearing them
results in decreased performance or transfer errors on some boards.
Fixes: de9b1771c3b6 ("mmc: sunxi: Support new mode") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Jagan Teki [Mon, 28 Aug 2017 11:15:47 +0000 (16:45 +0530)]
i.MX6Q: spl: Fix falcon to use dram_init_banksize
Memory dt node update introduced by spl_fixup_fdt() in below
commit was making DDR configuration in-appropriate
to boot falcon mode. Hence added dram_init_banksize for
explicit assignment of proper base and size of DDR.
Stefan Agner [Tue, 29 Aug 2017 16:10:11 +0000 (09:10 -0700)]
imx: remove SATA boot mode for i.MX 6UL and 6ULL
The NXP i.MX 6UL and 6ULL do not support SATA and have no SATA
boot mode, hence remove it from the boot device detecion. This
fixes a build error introduced with 3bd1642d4d50 ("imx: fix USB
boot mode detection for i.MX 6UL and 6ULL")
Fixes: 3bd1642d4d50 ("imx: fix USB boot mode detection for i.MX 6UL and 6ULL") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
Chris Packham [Tue, 29 Aug 2017 08:37:54 +0000 (20:37 +1200)]
ARM: mvebu: add "spi-flash" compatible string
U-boots spi-nor support is currently considered a work in progress. For
now to avoid issues it is necessary to add a "spi-flash" compatible
string. Eventually the "jedec,spi-nor" will be sufficient when the core
U-boot code is updated to support it.
Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Stefan Roese <sr@denx.de>
CONFIG_NAND_DENALI select's CONFIG_SYS_NAND_SELF_INIT, so the
NAND initialization process is driven by the driver itself.
CONFIG_SYS_NAND_MAX_CHIPS and CONFIG_SYS_NAND_BASE are unused.
Masahiro Yamada [Sat, 26 Aug 2017 08:57:59 +0000 (17:57 +0900)]
ARM: uniphier: move PLLCTRL register macros to each SoC .c file
The new SoC PXs3 changed the address of PLL, but still uses the
same PLL name. We can not define SC_*PLLCTRL in the common header.
Move them to per-SoC .c file. Also, fix some PLL comments.
Masahiro Yamada [Sat, 26 Aug 2017 08:57:58 +0000 (17:57 +0900)]
ARM: uniphier: replace <common.h> with <linux/delay.h> in pll settings
The #include <common.h> was added for mdelay(). Later, the declaration
of mdelay was moved to <linux/delay.h> by commit 5bc516ed661a ("delay:
collect {m, n, u}delay declarations to include/linux/delay.h").
Masahiro Yamada [Fri, 25 Aug 2017 16:12:31 +0000 (01:12 +0900)]
mtd: nand: denali_dt: add a DT driver
A patch for NAND uclass support was proposed about half a year ago:
https://patchwork.ozlabs.org/patch/722282/
It was not merged and I do not see on-going work for this.
Without DM-based probing, we need to set up pinctrl etc. in an ad-hoc
way and give lots of crappy CONFIG options for base addresses and
properties, which are supposed to be specified by DT. This is painful.
This commit just provides a probe hook to retrieve "reg" from DT and
allocate private data in a DM manner. This DT driver is not essentially
a NAND driver, in fact it is (ab)using UCLASS_MISC. Once UCLASS_NAND is
supported, it would be possible to migrate to it.
video: ipuv3_fb: skip IPU shutdown if IPU was not enabled before
Boards can skip display interface init using board_video_skip().
If display interface was not initialized (e.g. no ipuv3 framebuffer
registered or IPU clock disabled), booting Linux stops due to the
crash in IPU shutdown function, when accessing IPU registers.
Check IPU clock and skip shutdown if clock is not enabled.
imx: timer: don't clear the GPT control register multiple times
There is no need to clear the control register 100 times in a
loop, a single zero write clears the register. I didn't find any
justification why clearing this register in a loop is needed
(no info in i.MX6 errata or GPT timer linux driver, linux driver
uses single write to clear this control register).
Niko Mauno [Thu, 3 Aug 2017 06:53:24 +0000 (09:53 +0300)]
splash_source: Verify FIT magic
Before reading entire FIT image, add sanity check by testing image
header against FDT_MAGIC. This should help avoid problems in situations
where FIT is not yet available from storage device, for example when
performing initial programming of device.
Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Tomas Melin <tomas.melin@vaisala.com>
Masahiro Yamada [Thu, 24 Aug 2017 16:30:20 +0000 (01:30 +0900)]
usb: dwc3: fix Kconfig dependency to accept host driver in drivers/usb/dwc3
We see the choice of USB_DWC3_HOST / _GADGET in drivers/usb/dwc3/Kconfig,
but we can not choose USB_DWC3_HOST unless USB_GADGET is defined.
This is strange.
Loosen the "depends on" and also move "select USB_GADGET_DUALSPEED" to
the correct place.
Maxime Ripard [Wed, 23 Aug 2017 10:03:41 +0000 (12:03 +0200)]
mmc: sunxi: Support new mode
Almost all of the newer Allwinner SoCs have a new operating mode for the
eMMC clocks that needs to be enabled in both the clock and the MMC
controller.
Details about that mode are sparse, and the name itself (new mode vs old
mode) doesn't give much details, but it seems that the it changes the
sampling of the MMC clock. One side effect is also that it divides the
parent clock rate by 2.
Add support for it through a Kconfig option.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Hannes Schmelzer [Fri, 25 Aug 2017 12:27:37 +0000 (14:27 +0200)]
bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot
Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).
Afterwards the only (common) place for this fixup is during
image_setup_libfdt(...) and this is only called, at least on ARM
platform, from image_setup_linux(...).
All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
called on booting a linux image and not on booting a vxWorks image.
We fix this with adding the fdt_fixup_ethernet(...) call again to
do_bootvx_fdt(...)
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Wilson Lee [Fri, 25 Aug 2017 07:06:29 +0000 (00:06 -0700)]
common: console: Fix duplicated CONFIG in silent env callback
The silent environment callback function does not update the silent
flag during silent env set or unset. That is because of duplicated
CONFIG keyword at preprocessor condition in silent environment
callback function and cause silent env callback unable to work.
This patch is to remove the duplicated CONFIG keywork in silent
environment callback function.
Signed-off-by: Wilson Lee <wilson.lee@ni.com> Cc: Keng Soon Cheah <keng.soon.cheah@ni.com> Cc: Chen Yee Chew <chen.yee.chew@ni.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Tue, 22 Aug 2017 15:15:16 +0000 (08:15 -0700)]
nvme: Get rid of the global variable nvme_info
At present the NVMe uclass driver uses a global variable nvme_info
to store global information like namespace id, and NVMe controller
driver's priv struct has a blk_dev_start that is used to calculate
the namespace id based on the global information from nvme_info.
This is not a good design in the DM world and can be replaced with
the following changes:
- Encode the namespace id in the NVMe block device name during
the NVMe uclass post probe
- Extract the namespace id from the device name during the NVMe
block device probe
- Let BLK uclass calculate the devnum for us by passing -1 to
blk_create_devicef() as the devnum
Bin Meng [Tue, 22 Aug 2017 15:15:14 +0000 (08:15 -0700)]
nvme: Apply cache operations on the DMA buffers
So far cache operations are only applied on the submission queue and
completion queue, but they are missing in other places like identify
and block read/write routines.
In order to correctly operate on the caches, the DMA buffer passed
to identify routine must be allocated properly on the stack with the
existing macro ALLOC_CACHE_ALIGN_BUFFER().
Bin Meng [Tue, 22 Aug 2017 15:15:12 +0000 (08:15 -0700)]
nvme: Use macros to access NVMe queues
NVMe driver only uses two queues. The first one is allocated to do
admin stuff, while the second one is for IO stuff. So far the driver
uses magic number (0/1) to access them. Change to use macros.
Bin Meng [Tue, 22 Aug 2017 15:15:11 +0000 (08:15 -0700)]
nvme: Respect timeout when en/disabling the controller
So far the driver unconditionally delays 10ms when en/disabling the
controller and still return 0 if 10ms times out. In fact, spec defines
a timeout value in the CAP register that is the worst case time that
host software shall wait for the controller to become ready.