platform_session: bus_addr_dma_buffer to dma_addr

Issue #2243
This commit is contained in:
Norman Feske 2021-04-07 18:00:51 +02:00
parent f5f5b8c1f1
commit 97a9ad114c
5 changed files with 8 additions and 8 deletions

View File

@ -45,8 +45,8 @@ struct Platform::Client : public Genode::Rpc_client<Session>
void free_dma_buffer(Ram_dataspace_capability cap) override {
call<Rpc_free_dma_buffer>(cap); }
addr_t bus_addr_dma_buffer(Ram_dataspace_capability cap) override {
return call<Rpc_bus_addr_dma_buffer>(cap); }
addr_t dma_addr(Ram_dataspace_capability cap) override {
return call<Rpc_dma_addr>(cap); }
};
#endif /* _INCLUDE__SPEC__ARM__PLATFORM_SESSION__CLIENT_H_ */

View File

@ -80,7 +80,7 @@ struct Platform::Session : Genode::Session
/**
* Return the bus address of the previously allocated DMA memory
*/
virtual addr_t bus_addr_dma_buffer(Ram_dataspace_capability) = 0;
virtual addr_t dma_addr(Ram_dataspace_capability) = 0;
/*********************
@ -97,12 +97,12 @@ struct Platform::Session : Genode::Session
GENODE_TYPE_LIST(Out_of_ram, Out_of_caps, Fatal), size_t);
GENODE_RPC(Rpc_free_dma_buffer, void, free_dma_buffer,
Ram_dataspace_capability);
GENODE_RPC(Rpc_bus_addr_dma_buffer, addr_t, bus_addr_dma_buffer,
GENODE_RPC(Rpc_dma_addr, addr_t, dma_addr,
Ram_dataspace_capability);
GENODE_RPC_INTERFACE(Rpc_devices_rom, Rpc_acquire_device, Rpc_release_device,
Rpc_alloc_dma_buffer, Rpc_free_dma_buffer,
Rpc_bus_addr_dma_buffer);
Rpc_dma_addr);
};
#endif /* _INCLUDE__SPEC__ARM__PLATFORM_SESSION__PLATFORM_SESSION_H_ */

View File

@ -198,7 +198,7 @@ void Pl11x_driver::Main::_init_device()
reg_write(PL11X_REG_TIMING3, tim3);
/* set framebuffer address and ctrl register */
addr_t const fb_dma_base = (addr_t)_platform.bus_addr_dma_buffer(_fb_ds_cap);
addr_t const fb_dma_base = (addr_t)_platform.dma_addr(_fb_ds_cap);
reg_write(PL11X_REG_UPBASE, fb_dma_base);
reg_write(PL11X_REG_LPBASE, 0);
reg_write(PL11X_REG_IMSC, 0);

View File

@ -143,7 +143,7 @@ void Session_component::free_dma_buffer(Ram_dataspace_capability ram_cap)
}
Genode::addr_t Session_component::bus_addr_dma_buffer(Ram_dataspace_capability ram_cap)
Genode::addr_t Session_component::dma_addr(Ram_dataspace_capability ram_cap)
{
if (!ram_cap.valid()) { return 0; }

View File

@ -71,7 +71,7 @@ class Driver::Session_component :
void release_device(Device_capability) override;
Ram_dataspace_capability alloc_dma_buffer(size_t const) override;
void free_dma_buffer(Ram_dataspace_capability ram_cap) override;
addr_t bus_addr_dma_buffer(Ram_dataspace_capability) override;
addr_t dma_addr(Ram_dataspace_capability) override;
private: