mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
parent
f5f5b8c1f1
commit
97a9ad114c
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user