mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
omap-gpio: remove PROP_PTR
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. Move/adapt the existing TODO comment about a clock framework. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
0fd20c532f
commit
ba2aba8370
4 changed files with 52 additions and 38 deletions
|
@ -77,6 +77,16 @@ typedef struct omap_intr_handler_s omap_intr_handler;
|
|||
/*
|
||||
* TODO: Ideally we should have a clock framework that
|
||||
* let us wire these clocks up with QOM properties or links.
|
||||
*
|
||||
* qdev should support a generic means of defining a 'port' with
|
||||
* an arbitrary interface for connecting two devices. Then we
|
||||
* could reframe the omap clock API in terms of clock ports,
|
||||
* and get some type safety. For now the best qdev provides is
|
||||
* passing an arbitrary pointer.
|
||||
* (It's not possible to pass in the string which is the clock
|
||||
* name, because this device does not have the necessary information
|
||||
* (ie the struct omap_mpu_state_s*) to do the clockname to pointer
|
||||
* translation.)
|
||||
*/
|
||||
void omap_intc_set_iclk(omap_intr_handler *intc, omap_clk clk);
|
||||
void omap_intc_set_fclk(omap_intr_handler *intc, omap_clk clk);
|
||||
|
@ -87,13 +97,28 @@ void omap_intc_set_fclk(omap_intr_handler *intc, omap_clk clk);
|
|||
|
||||
typedef struct OMAPI2CState OMAPI2CState;
|
||||
|
||||
/*
|
||||
* TODO: Ideally we should have a clock framework that
|
||||
* let us wire these clocks up with QOM properties or links.
|
||||
*/
|
||||
/* TODO: clock framework (see above) */
|
||||
void omap_i2c_set_iclk(OMAPI2CState *i2c, omap_clk clk);
|
||||
void omap_i2c_set_fclk(OMAPI2CState *i2c, omap_clk clk);
|
||||
|
||||
/* omap_gpio.c */
|
||||
#define TYPE_OMAP1_GPIO "omap-gpio"
|
||||
#define OMAP1_GPIO(obj) \
|
||||
OBJECT_CHECK(struct omap_gpif_s, (obj), TYPE_OMAP1_GPIO)
|
||||
|
||||
#define TYPE_OMAP2_GPIO "omap2-gpio"
|
||||
#define OMAP2_GPIO(obj) \
|
||||
OBJECT_CHECK(struct omap2_gpif_s, (obj), TYPE_OMAP2_GPIO)
|
||||
|
||||
typedef struct omap_gpif_s omap_gpif;
|
||||
typedef struct omap2_gpif_s omap2_gpif;
|
||||
|
||||
/* TODO: clock framework (see above) */
|
||||
void omap_gpio_set_clk(omap_gpif *gpio, omap_clk clk);
|
||||
|
||||
void omap2_gpio_set_iclk(omap2_gpif *gpio, omap_clk clk);
|
||||
void omap2_gpio_set_fclk(omap2_gpif *gpio, uint8_t i, omap_clk clk);
|
||||
|
||||
/* OMAP2 l4 Interconnect */
|
||||
struct omap_l4_s;
|
||||
struct omap_l4_region_s {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue