| Age | Commit message (Collapse) | Author |
|
Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <[email protected]>
|
|
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
Remove <common.h> from this driver directory and when needed
add missing include files directly.
Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
Use the correct function here, since there may be multiple IDE devices
available.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
|
|
Use standard U-Boot types in the file to make the code less verbose.
Signed-off-by: Simon Glass <[email protected]>
|
|
The code has quite a few unnecessary brackets and comparisons to zero,
etc. Fix these up as well as some upper-case hex values and use of 0x in
printf() strings.
Signed-off-by: Simon Glass <[email protected]>
|
|
Avoid the use of the function name in a few of the debug() calls, since
this causes a checkpatch warning. Convert all other calls too.
Use lower-case hex consistently.
Signed-off-by: Simon Glass <[email protected]>
|
|
Avoid using #ifdef and use a single function declaration, so it is easier
to read.
Signed-off-by: Simon Glass <[email protected]>
|
|
Fix a longstanding bug where the LBA is calculated as the size of the
media instead of the number of blocks. This was perhaps not noticed
earlier since it prints the correct value first, before setting the wrong
value.
Drop the unnecessary blksz variable while we are here.
Signed-off-by: Simon Glass <[email protected]>
Fixes: 68e6f221ed0 ("block: ide: Fix block read/write with driver model")
|
|
We only use one member of the ide_dev_desc[] array at a time and it does
not stick around outside ide_probe(). Use a single element instead.
Copy over the missing members of blk_desc at the same, since this was
missing from the previous code.
Signed-off-by: Simon Glass <[email protected]>
Fixes: 68e6f221ed0 ("block: ide: Fix block read/write with driver model")
|
|
Rather than having the caller fill some of this in, do it all in the
ide_ident() function, since it knows all the values.
Signed-off-by: Simon Glass <[email protected]>
|
|
Update ide_ident() to indicate whether it finds a device or not. Use
that to decide whether to create a block device for it, rather than
looking DEV_TYPE_UNKNOWN.
Signed-off-by: Simon Glass <[email protected]>
|
|
Most of the code uses 'desc' as the variable name for a blk descriptor.
Change ide to do the same.
Tidy up some extra brackets and types while we are here.
Leave the code in ide_probe() alone since it is about to be refactored.
Signed-off-by: Simon Glass <[email protected]>
|
|
The two loops in this function operate on the same ide_dev_desc[] array.
Combine them to reduce duplication.
Signed-off-by: Simon Glass <[email protected]>
|
|
Now that ide_probe() is the only caller of ide_init(), move all the code
into the probe function, so it is easier to refactor it.
Move ide_dev_desc[] into ide_probe() to, since it is the only user.
Signed-off-by: Simon Glass <[email protected]>
|
|
The current implementation adds this information in the block device's
probe() function, which is called in the blk_probe_or_unbind() in
ide_probe().
It is simpler to do this in ide_probe() itself, since the effect is the
same. This helps to consolidate use of ide_dev_desc[] which we would like
to remove.
Use strlcpy() to keep checkpatch happy.
Signed-off-by: Simon Glass <[email protected]>
|
|
This is only used in one place now, so make it a local variable.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move this code into a separate function which returns whether the bus was
found, or not.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use IS_ENABLED() instead for all conditions. Add the 'lba48' flag into
struct blk_desc always, since it uses very little space. Use a bool so
the meaning is clearer.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
|
|
Use IS_ENABLED() instead for all conditions.
Signed-off-by: Simon Glass <[email protected]>
|
|
Change the if() to remove extra brackets and check for the positive case
first, i.e. when a device is found. Exit the loop in that case, with the
retry logic in the 'else' part.
Signed-off-by: Simon Glass <[email protected]>
|
|
This code is hard to follow as it uses #ifdef in a strange way. Adjust
it to avoid the preprocessor. Drop the special return for the non-ATAPI
case since we can rely on tries becoming 0 and exiting the loop.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use a 'tries' variable which starts at the number of tries we want to do,
rather than a 'retries' one that stops at either 1 or 2. This will make it
easier to refactor the code to avoid the horrible #ifdefs
Signed-off-by: Simon Glass <[email protected]>
|
|
Only one function is called from outside this file. Make all the others
static.
Signed-off-by: Simon Glass <[email protected]>
|
|
The use of atapi_read() was incorrect dropped. Fix this so that it will
be used when needed. Use a udevice for the first argument of atapi_read()
so it is consistent with ide_read().
This requires much of the ATAPI code to be brought out from behind the
existing #ifdef. It will still be removed by the compiler if it is not
needed.
Add an atapi flag to struct blk_desc so the information can be retained.
Fixes: 145df842b44 ("dm: ide: Add support for driver-model block devices")
Fixes: d0075059e4d ("ide: Drop non-DM code for BLK")
Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
This is used by a board so should be in the header file. Add it.
Signed-off-by: Simon Glass <[email protected]>
|
|
These are not used from outside this file anymore. Make them static and
remove them from the header file.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move these functions so they appear before they are used.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is not used anymore. Drop it.
Signed-off-by: Simon Glass <[email protected]>
|
|
At present the code does ide_init() as a separate operation, then calls
device_probe() to copy over the information. We can call ide_init() from
probe just as easily.
The only difference is that using 'ide init' twice will do nothing.
However it already fails to copy over the new data in that case, so the
effect is the same. For now, unbind the block devices and remove the IDE
device, which causes the bus to be probed again. Later patches will fix
this up fully, so that all blk_desc data is copied across.
Since ide_reset() is only called from ide_init(), there is no need to init
the ide_dev_desc[] array. This is already done at the end of ide_init() so
drop this code.
The call to uclass_first_device() is now within the probe() function of
the same device, so does nothing. Drop it.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rather than using very large numbers with udelay(), use mdelay(), which
is easier to follow.
Signed-off-by: Simon Glass <[email protected]>
|
|
This is not used outside one C file. Move it out of the header to
reduce its visbility.
Signed-off-by: Simon Glass <[email protected]>
|
|
We need extensions to be set up before we start trying to boot any of the
bootdevs. Add a new priority before all the others for tht sort of thing.
Also add a 'none' option, so that the first one is not 0.
While we are here, comment enum bootdev_prio_t fully and expand the test
for the 'bootdev hunt' command.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a bootdev for IDE so that these devices can be used with standard
boot.
Signed-off-by: Simon Glass <[email protected]>
|
|
We require CONFIG_BLK to be enabled now, so this code is unused. Drop it.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the word 'uclass' instead of 'if_type' to complete the conversion.
Signed-off-by: Simon Glass <[email protected]>
|
|
Globally replace all occurances of WATCHDOG_RESET() with schedule(),
which handles the HW_WATCHDOG functionality and the cyclic
infrastructure.
Signed-off-by: Stefan Roese <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Tested-by: Tom Rini <[email protected]> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
|
|
We currently have an if_type (interface type) and a uclass id. These are
closely related and we don't need to have both.
Drop the if_type values and use the uclass ones instead.
Maintain the existing, subtle, one-way conversion between UCLASS_USB and
UCLASS_MASS_STORAGE for now, and add a comment.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rather than setting a different interface type, use a flag to indicate
that a device is ATAPI.
Signed-off-by: Simon Glass <[email protected]>
|
|
The only platform currently that defines an ide_preinit function has an
empty one that immediately returns. Remove this hook.
Signed-off-by: Tom Rini <[email protected]>
|
|
Every time an ide bus/port is scanned and a new device is detected,
we want to call device_probe() as it will give us a chance to run
additional post-processings for some purposes.
In particular, support for creating partitions on a device will be added.
Signed-off-by: AKASHI Takahiro <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This is not used in U-Boot anymore. Drop it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
|
|
This is not needed anymore. Drop it to simplify the code.
Signed-off-by: Simon Glass <[email protected]>
Suggested-by: Heinrich Schuchardt <[email protected]>
|
|
CONFIG_SYS_ATA_PORT_ADDR is not used in the code anymore. Drop it and use
ATA_PORT_ADDR() locally instead.
Drop CONFIG_IDE_RESET_ROUTINE and CONFIG_IDE_SWAP_IO which are also
unused.
Signed-off-by: Simon Glass <[email protected]>
|
|
Define LOG_CATEGORY for all uclass to allow filtering with
log command.
Signed-off-by: Patrick Delaunay <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Fixes IDE issues found on the Malta board under Qemu:
1) DMA implied commands were sent to the controller in stead of the PIO
variants. The rest of the code is DMA free and written for PIO operation.
2) direct pointer access was used to read and write the registers instead
of the inb/inw/outb/outw functions/macros. Registers don't have to be
memory mapped and ATA_CURR_BASE() does not have to return an offset from
address zero.
3) Endian isues in ide_ident() and reading/writing data in general. Names
were corrupted and sizes misreported.
Tested malta_defconfig and maltael_defconfig to work again in Qemu.
Signed-off-by: Reinoud Zandijk <[email protected]>
Tested-by: Heinrich Schuchardt <[email protected]>
|
|
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).
Rename some of the latter variables to end with 'plat' for consistency.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move this uncommon header out of the common header.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move this header out of the common header.
Signed-off-by: Simon Glass <[email protected]>
|