Re: [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

* Tero Kristo <t-kristo@xxxxxx> [170530 07:51]:
> This function gets the physical base address of a clockdomain.
..
> +static u32 omap4_clkdm_xlate_address(struct clockdomain *clkdm)
> +{
> +	u32 addr = (u32)_cm_bases[clkdm->prcm_partition] - OMAP2_L4_IO_OFFSET +
> +		clkdm->cm_inst + clkdm->clkdm_offs;
> +
> +	return addr;
> +}
> +

Hmm this will be flakey as it assumes fixed mappings
for all these which we do not have on all SoCs.

It would be best to pass the domain bases around as
struct resource then just ioremap locally.

It might be enough if we changed _cm_bases[] locally
to be an array of:

struct omap_domain_base {
       struct resource res;
       void __iomem *va;
};

Or do you have better ideas?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux