On Jan 8, 2009, at 1:10 PM, Anton Vorontsov wrote:

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)...

I'm ok if you get rid of cfg_data usage.. than we aren't overloading the indirect variables for 83xx pci cfg cycles

- k
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to