Re: [PATCH RFC] DT support for omap4-iss

Tony Lindgren
2015-08-11T11:16:08Z

* Michael Allwright <michael.allwright@upb.de> [150810 08:19]:
> +
> +/*
> +We need a better solution for this
> +*/
> +#include <../arch/arm/mach-omap2/omap-pm.h>

Please let's not do things like this, I end up having to deal with
all these eventually :(

> +static void iss_set_constraints(struct iss_device *iss, bool enable)
> +{
> + if (!iss)
> + return;
> +
> + /* FIXME: Look for something more precise as a good throughtput limit */
> + omap_pm_set_min_bus_tput(iss->dev, OCP_INITIATOR_AGENT,
> + enable ? 800000 : -1);
> +}
> +
> +static struct iss_platform_data iss_dummy_pdata = {
> + .set_constraints = iss_set_constraints,
> +};

If this is one time setting, you could do it based on the
compatible string using arch/arm/mach-omap2/pdata-quirks.c.

If you need to toggle it, you could populate a function pointer
in pdata-quirks.c. Those are easy to fix once there is some Linux
generic API available :)

Regards,

Tony