diff --git a/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config b/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config index 82d7a2b248..2c1dfa3088 100644 --- a/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config +++ b/repos/os/recipes/raw/drivers_interactive-imx53_qsb/drivers.config @@ -69,10 +69,13 @@ - + + + + diff --git a/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h b/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h index 26ba65df16..11d87cbdb1 100644 --- a/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h +++ b/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h @@ -207,7 +207,7 @@ class Ipu : Genode::Mmio unsigned dec_sel2 : 1; /* Decode Address Select bit[2] */ unsigned res2 : 9; /* reserved */ Genode::uint32_t res3[3]; - }; + } __attribute__((packed)); Cp_mem() { Genode::memset(this, 0, sizeof(Cp_mem)); } } __attribute__((packed)); diff --git a/repos/os/src/drivers/gpio/spec/imx/driver.h b/repos/os/src/drivers/gpio/spec/imx/driver.h index 0cd2224c06..4a90475939 100644 --- a/repos/os/src/drivers/gpio/spec/imx/driver.h +++ b/repos/os/src/drivers/gpio/spec/imx/driver.h @@ -68,7 +68,7 @@ class Imx_driver : public Gpio::Driver Irq_handler &operator = (Irq_handler const &); Genode::Irq_connection _irq; - Genode::Signal_handler _dispatcher; + Genode::Io_signal_handler _dispatcher; Gpio_bank *_bank; void _handle() diff --git a/repos/os/src/drivers/input/spec/imx53/driver.h b/repos/os/src/drivers/input/spec/imx53/driver.h index e86dac0d63..b9f86f76e1 100644 --- a/repos/os/src/drivers/input/spec/imx53/driver.h +++ b/repos/os/src/drivers/input/spec/imx53/driver.h @@ -37,14 +37,13 @@ class Input::Tablet_driver GPIO_BUTTON = 132, }; - Timer::Connection _timer; Event_queue &_ev_queue; Gpio::Connection _gpio_ts; Gpio::Connection _gpio_bt; Genode::Irq_session_client _irq_ts; Genode::Irq_session_client _irq_bt; - Genode::Signal_handler _ts_dispatcher; - Genode::Signal_handler _bt_dispatcher; + Genode::Io_signal_handler _ts_dispatcher; + Genode::Io_signal_handler _bt_dispatcher; Touchscreen _touchscreen; Buttons _buttons; @@ -62,7 +61,6 @@ class Input::Tablet_driver Tablet_driver(Genode::Env &env, Event_queue &ev_queue) : - _timer(env), _ev_queue(ev_queue), _gpio_ts(env, GPIO_TOUCH), _gpio_bt(env, GPIO_BUTTON), @@ -70,7 +68,8 @@ class Input::Tablet_driver _irq_bt(_gpio_bt.irq_session(Gpio::Session::FALLING_EDGE)), _ts_dispatcher(env.ep(), *this, &Tablet_driver::_handle_ts), _bt_dispatcher(env.ep(), *this, &Tablet_driver::_handle_bt), - _touchscreen(env, _timer), _buttons(env, _timer) + _touchscreen(env), + _buttons(env) { /* GPIO touchscreen handling */ _gpio_ts.direction(Gpio::Session::OUT); diff --git a/repos/os/src/drivers/input/spec/imx53/egalax_ts.h b/repos/os/src/drivers/input/spec/imx53/egalax_ts.h index 4ce3ced0a6..776e8904b3 100644 --- a/repos/os/src/drivers/input/spec/imx53/egalax_ts.h +++ b/repos/os/src/drivers/input/spec/imx53/egalax_ts.h @@ -44,12 +44,11 @@ class Input::Touchscreen { public: - Touchscreen(Genode::Env &env, Timer::Connection &timer) + Touchscreen(Genode::Env &env) : _irq_handler(env, Imx53::I2C_3_IRQ), _i2c_ds(env, Imx53::I2C_3_BASE, Imx53::I2C_3_SIZE), - _i2c(timer, - (Genode::addr_t)_i2c_ds.local_addr(), + _i2c((Genode::addr_t)_i2c_ds.local_addr(), _irq_handler), _state(RELEASED) { diff --git a/repos/os/src/drivers/input/spec/imx53/i2c.h b/repos/os/src/drivers/input/spec/imx53/i2c.h index 5053a2aa5e..c727a849a7 100644 --- a/repos/os/src/drivers/input/spec/imx53/i2c.h +++ b/repos/os/src/drivers/input/spec/imx53/i2c.h @@ -64,8 +64,7 @@ class I2c::I2c : Genode::Mmio class No_ack : Genode::Exception {}; - Timer::Connection &_timer; - Irq_handler &_irq_handler; + Irq_handler & _irq_handler; void _busy() { while (!read()); } @@ -77,7 +76,7 @@ class I2c::I2c : Genode::Mmio write(0); write(Control::Enable::bits(1)); - _timer.msleep(1); + while (!read()) { ; } write(1); @@ -112,9 +111,9 @@ class I2c::I2c : Genode::Mmio public: - I2c(Timer::Connection &timer, - Genode::addr_t const base, Irq_handler &irq_handler) - : Mmio(base), _timer(timer), _irq_handler(irq_handler) + I2c(Genode::addr_t const base, Irq_handler &irq_handler) + : Mmio(base), + _irq_handler(irq_handler) { write(0); write(0); @@ -167,6 +166,7 @@ class I2c::I2c : Genode::Mmio } buf[i] = read(); + _irq_handler.ack(); } _stop(); diff --git a/repos/os/src/drivers/input/spec/imx53/irq_handler.h b/repos/os/src/drivers/input/spec/imx53/irq_handler.h index 75f8b37464..bce7788d6b 100644 --- a/repos/os/src/drivers/input/spec/imx53/irq_handler.h +++ b/repos/os/src/drivers/input/spec/imx53/irq_handler.h @@ -21,9 +21,9 @@ class Irq_handler { private: - Genode::Env &_env; - Genode::Irq_connection _irq; - Genode::Signal_handler _handler; + Genode::Env &_env; + Genode::Irq_connection _irq; + Genode::Io_signal_handler _handler; unsigned _sem_cnt = 1; diff --git a/repos/os/src/drivers/input/spec/imx53/mpr121.h b/repos/os/src/drivers/input/spec/imx53/mpr121.h index 97b980484c..f1a734d5ef 100644 --- a/repos/os/src/drivers/input/spec/imx53/mpr121.h +++ b/repos/os/src/drivers/input/spec/imx53/mpr121.h @@ -52,12 +52,11 @@ class Input::Buttons { public: - Buttons(Genode::Env &env, Timer::Connection &timer) + Buttons(Genode::Env &env) : _irq_handler(env, Imx53::I2C_2_IRQ), _i2c_ds(env, Imx53::I2C_2_BASE, Imx53::I2C_2_SIZE), - _i2c(timer, - (Genode::addr_t)_i2c_ds.local_addr(), + _i2c((Genode::addr_t)_i2c_ds.local_addr(), _irq_handler), _state(0) {