Subject: Re: [RFC PATCH 10/19] powerpc: gamecube/wii: early debugging using usbgecko

From: Arnd Bergmann <[email-masked]>
Date: Mon, 23 Nov 2009 22:13:44 +0000

On Monday 23 November 2009 19:10:55 Albert Herranz wrote:
> 
> Arnd Bergmann wrote:
> > On Sunday 22 November 2009, Albert Herranz wrote:
> >> +#ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO
> >> +setup_usbgecko_bat:
> >> +    /* prepare a BAT for early io */
> >> +    lis     r8, 0x0c00
> >> +    ori     r8, r8, 0x002a  /* uncached, guarded ,rw */
> >> +    lis     r11, 0xcc00
> >> +    ori     r11, r11, 0x3   /* 128K */
> >> +#ifdef CONFIG_WII
> >> +    oris    r8, r8, 0x0100
> >> +    oris    r11, r11, 0x0100
> >> +#endif
> >> +    mtspr   SPRN_DBAT1L, r8
> >> +    mtspr   SPRN_DBAT1U, r11
> >> +    sync
> >> +    isync
> >> +    blr
> >> +#endif
> > 
> > This will probably break other platforms if CONFIG_PPC_EARLY_DEBUG_USBGECKO
> > is set. In general, we try hard to make it possible to build generic
> > kernels for multiple systems, so it would be better to also add a runtime
> > check here.
> > 
> 
> Ok, I see the point.
> But, what makes CONFIG_PPC_EARLY_DEBUG_USBGECKO case different from CONFIG_PPC_EARLY_DEBUG_CPM case here?
> 

I looked again, and the help text for PPC_EARLY_DEBUG makes it very clear that
are never usable on a production kernel. Just leave your code the way it is here,
but if there are other places that prevent portable kernels, those should be fixed.
I'm not aware of any of those right now.

	Arnd <><