mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-07 03:40:15 +00:00
parent
c475edccfc
commit
e3e41e5ca0
@ -64,13 +64,6 @@ append config {
|
|||||||
<start name="test-ahci">
|
<start name="test-ahci">
|
||||||
<binary name="test-blk-bench" />
|
<binary name="test-blk-bench" />
|
||||||
<resource name="RAM" quantum="5M" />
|
<resource name="RAM" quantum="5M" />
|
||||||
<config>
|
|
||||||
<libc stdout="/dev/log">
|
|
||||||
<vfs>
|
|
||||||
<dir name="dev"> <log/> </dir>
|
|
||||||
</vfs>
|
|
||||||
</libc>
|
|
||||||
</config>
|
|
||||||
<route>
|
<route>
|
||||||
<service name="Block"><child name="ahci_drv"/></service>
|
<service name="Block"><child name="ahci_drv"/></service>
|
||||||
<any-service> <parent/> <any-child /> </any-service>
|
<any-service> <parent/> <any-child /> </any-service>
|
||||||
@ -83,8 +76,7 @@ install_config $config
|
|||||||
#
|
#
|
||||||
# Boot modules
|
# Boot modules
|
||||||
#
|
#
|
||||||
set boot_modules { core init timer ahci_drv test-blk-bench libc.lib.so
|
set boot_modules { core init timer ahci_drv test-blk-bench ld.lib.so }
|
||||||
ld.lib.so }
|
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
|
||||||
|
@ -591,12 +591,16 @@ struct Port : Port_base
|
|||||||
if (read<Cmd::St>())
|
if (read<Cmd::St>())
|
||||||
return;
|
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.");
|
Genode::error("HBA busy unable to start command processing.");
|
||||||
return;
|
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.");
|
Genode::error("HBA in DRQ unable to start command processing.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -694,9 +698,12 @@ struct Port : Port_base
|
|||||||
hba.delayer().usleep(1000);
|
hba.delayer().usleep(1000);
|
||||||
write<Sctl::Det>(0);
|
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");
|
Genode::warning("Port reset failed");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serial ATA error
|
* Serial ATA error
|
||||||
|
@ -121,7 +121,9 @@ struct I2c_interface : Attached_mmio
|
|||||||
int send(uint8_t * msg, size_t msg_size)
|
int send(uint8_t * msg, size_t msg_size)
|
||||||
{
|
{
|
||||||
/* initiate message transfer */
|
/* 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");
|
Genode::error("I2C busy");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -148,7 +150,9 @@ struct I2c_interface : Attached_mmio
|
|||||||
write<Con::Irq_en>(0);
|
write<Con::Irq_en>(0);
|
||||||
write<Con::Irq_pending>(0); /* FIXME fixup */
|
write<Con::Irq_pending>(0); /* FIXME fixup */
|
||||||
if (arbitration_error()) return -1;
|
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");
|
Genode::error("I2C end transfer failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -304,7 +308,9 @@ struct Sata_phy_ctrl : Attached_mmio
|
|||||||
* at this point we should study the Linux behavior
|
* at this point we should study the Linux behavior
|
||||||
* in more depth.
|
* 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");
|
Genode::error("PLL lock failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -343,7 +349,10 @@ struct Exynos5_hba : Platform::Hba
|
|||||||
|
|
||||||
/* reset */
|
/* reset */
|
||||||
hba.write< ::Hba::Ghc::Hr>(1);
|
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");
|
Genode::error("HBA reset failed");
|
||||||
throw Root::Unavailable();
|
throw Root::Unavailable();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user