[PATCH 1/2] powerpc/fsl_pci: Add MPC83xx PCI-E controller RC mode support
Anton Vorontsov
avorontsov at ru.mvista.com
Fri Jan 9 06:10:21 EST 2009
On Thu, Jan 08, 2009 at 12:50:22AM -0600, Kumar Gala wrote:
>>
>> +struct mpc83xx_pcie_priv {
>> + void __iomem *cfg_map;
>> + u32 dev_base;
>> +};
>
> So was thinking about this and was wondering about doing the following:
>
> hose->cfg_addr /* use instead of dev_base to cache pci bus/dev/fn */
> hose->cfg_data /* should be the outbound window used for pci cfg cycles
> */
> hose->dn->data /* for IMMR regs to tweak window */
>
> thoughts?
I don't quite like the casts that we'll need to do this.
> Doing this means we should be able to get rid of struct
> mpc83xx_pcie_priv
Not sure what benefits this would bring? Saving few bytes of code and
data at the cost of losing clean, cast-less, self documented code?..
I was actually thinking of getting rid of hose->cfg_data usage, and
replacing it with mpc83xx_pci_priv->cfg_type0 (and rename
mpc83xx_pci_priv->cfg_map to cfg_type1).
OTOH, I can surely do that what you described, but to me it doesn't
look like a great idea (i.e. using irrelevant struct members for
hooking our data)...
--
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2
More information about the Linuxppc-dev
mailing list