ahci: avoid deprecated warnings

Issue #1987
This commit is contained in:
Alexander Boettcher 2017-04-06 21:02:32 +02:00 committed by Christian Helmuth
parent c475edccfc
commit e3e41e5ca0
3 changed files with 24 additions and 16 deletions

View File

@ -64,13 +64,6 @@ append config {
<start name="test-ahci">
<binary name="test-blk-bench" />
<resource name="RAM" quantum="5M" />
<config>
<libc stdout="/dev/log">
<vfs>
<dir name="dev"> <log/> </dir>
</vfs>
</libc>
</config>
<route>
<service name="Block"><child name="ahci_drv"/></service>
<any-service> <parent/> <any-child /> </any-service>
@ -83,8 +76,7 @@ install_config $config
#
# Boot modules
#
set boot_modules { core init timer ahci_drv test-blk-bench libc.lib.so
ld.lib.so }
set boot_modules { core init timer ahci_drv test-blk-bench ld.lib.so }
append_platform_drv_boot_modules

View File

@ -591,12 +591,16 @@ struct Port : Port_base
if (read<Cmd::St>())
return;
if (!wait_for<Tfd::Sts_bsy>(0, hba.delayer(), 500, 1000)) {
try {
wait_for(hba.delayer(), Tfd::Sts_bsy::Equal(0));
} catch (Polling_timeout) {
Genode::error("HBA busy unable to start command processing.");
return;
}
if (!wait_for<Tfd::Sts_drq>(0, hba.delayer(), 500, 1000)) {
try {
wait_for(hba.delayer(), Tfd::Sts_drq::Equal(0));
} catch (Polling_timeout) {
Genode::error("HBA in DRQ unable to start command processing.");
return;
}
@ -694,8 +698,11 @@ struct Port : Port_base
hba.delayer().usleep(1000);
write<Sctl::Det>(0);
if (!wait_for<Ssts::Dec>(Ssts::Dec::ESTABLISHED, hba.delayer()))
try {
wait_for(hba.delayer(), Ssts::Dec::Equal(Ssts::Dec::ESTABLISHED));
} catch (Polling_timeout) {
Genode::warning("Port reset failed");
}
}
/**

View File

@ -121,7 +121,9 @@ struct I2c_interface : Attached_mmio
int send(uint8_t * msg, size_t msg_size)
{
/* initiate message transfer */
if (!wait_for<Stat::Busy>(0, delayer)) {
try {
wait_for(delayer, Stat::Busy::Equal(0));
} catch (Polling_timeout) {
Genode::error("I2C busy");
return -1;
}
@ -148,7 +150,9 @@ struct I2c_interface : Attached_mmio
write<Con::Irq_en>(0);
write<Con::Irq_pending>(0); /* FIXME fixup */
if (arbitration_error()) return -1;
if (!wait_for<Stat::Busy>(0, delayer)) {
try {
wait_for(delayer, Stat::Busy::Equal(0));
} catch (Polling_timeout) {
Genode::error("I2C end transfer failed");
return -1;
}
@ -304,7 +308,9 @@ struct Sata_phy_ctrl : Attached_mmio
* at this point we should study the Linux behavior
* in more depth.
*/
if (!wait_for<Phstatm::Pll_locked>(1, delayer)) {
try {
wait_for(delayer, Phstatm::Pll_locked::Equal(1));
} catch (Polling_timeout) {
Genode::error("PLL lock failed");
return -1;
}
@ -343,7 +349,10 @@ struct Exynos5_hba : Platform::Hba
/* reset */
hba.write< ::Hba::Ghc::Hr>(1);
if (!hba.wait_for< ::Hba::Ghc::Hr>(0, hba.delayer(), 1000, 1000)) {
try {
hba.wait_for(::Hba::Attempts(1000), ::Hba::Microseconds(1000),
hba.delayer(), ::Hba::Ghc::Hr::Equal(0));
} catch (::Hba::Polling_timeout) {
Genode::error("HBA reset failed");
throw Root::Unavailable();
}