[PATCH 1/4] Add support for 750CL Holly board

Josh Boyer jwboyer at linux.vnet.ibm.com
Sat May 5 06:01:53 EST 2007


On Fri, 2007-05-04 at 21:44 +0200, Arnd Bergmann wrote:
> On Friday 04 May 2007, Josh Boyer wrote:
> > +
> > +#undef DEBUG
> > +#ifdef DEBUG
> > +#define DBG(fmt...) do { printk(fmt); } while(0)
> > +#else
> > +#define DBG(fmt...) do { } while(0)
> > +#endif
> 
> Please replace this with the generic pr_debug()

Already noted, but yes.

> > +extern int tsi108_setup_pci(struct device_node *dev);
> > +extern void tsi108_pci_int_init(struct device_node *node);
> > +extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
> 
> please move any extern declarations into a header file that
> is included by both the file that defines and uses them

Ok.

> 
> > +static void holly_remap_bridge(void)
> > +{
> > +	u32 lut_val, lut_addr = 0x900, misc_cfg;
> > +	int i;
> > +
> > +	printk(KERN_ERR "Remapping PCI bridge\n");
> 
> Is it an error to remap the bridge? If not, KERN_INFO would be more
> appropriate ;-)

This whole function is under work at the moment, so it'll get cleaned
up.

> 
> > +void holly_show_cpuinfo(struct seq_file *m)
> > +{
> > +	seq_printf(m, "vendor\t\t: IBM\n");
> > +	seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
> > +}
> 
> If it's an IBM product, it should come with a product code like 123-4567,
> which fits in here, instead of just listing the CPU.

Erm... why?  There are other boards that don't do this as well...

> 
> > +static int ppc750_machine_check_exception(struct pt_regs *regs)
> > +{
> > +	extern void tsi108_clear_pci_cfg_error(void);
> 
> move declaration to header file.

Ok.

> 
> > +	const struct exception_table_entry *entry;
> > +
> > +	/* Are we prepared to handle this fault */
> > +	if ((entry = search_exception_tables(regs->nip)) != NULL) {
> > +		tsi108_clear_pci_cfg_error();
> > +		regs->msr |= MSR_RI;
> > +		regs->nip = entry->fixup;
> > +		return 1;
> > +	}
> > +	return 0;
> > +}
> 
> Are you sure that you can use the generic exception table mechanism
> like this? I can't see why it doesn't work, but it's something I haven't
> seen anyone do like this.

Yes, this works and is actually required.  See tsi108_pci.c for where
the fixup/exception table information is generated.

> > --- linux-2.6.orig/drivers/net/tsi108_eth.h
> > +++ linux-2.6/drivers/net/tsi108_eth.h
> > @@ -49,7 +49,11 @@
> >   */
> >  #define PHY_MV88E	1	/* Marvel 88Exxxx PHY */
> >  #define PHY_BCM54XX	2	/* Broardcom BCM54xx PHY */
> > +#if defined(CONFIG_HOLLY)
> > +#define TSI108_PHY_TYPE PHY_BCM54XX
> > +#else
> >  #define TSI108_PHY_TYPE	PHY_MV88E
> > +#endif
> >  
> 
> this breaks multiplatform setups.

I know.  Looking for a better suggestions.  Kumar suggested a Kconfig
option at least, which is what I'm going to go with unless someone has a
better idea...

josh




More information about the Linuxppc-dev mailing list