Subject: Re: [PATCH 1/2] powerpc/fsl_pci: Add MPC83xx PCI-E controller RC mode support

From: Anton Vorontsov <[email-masked]>
Date: Thu, 8 Jan 2009 22:10:21 +0300

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: [email-masked]
irc://irc.freenode.net/bd2