Subject: Re: [PATCH 4/5] [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads

From: Vitaly Bordug <[email-masked]>
Date: Thu, 11 Jan 2007 00:41:36 +0300

On Wed, 10 Jan 2007 14:58:31 -0600
Kumar Gala wrote:

> 
> On Jan 10, 2007, at 2:50 PM, Vitaly Bordug wrote:
> 
> > On Wed, 10 Jan 2007 11:11:05 -0600
> > Kumar Gala wrote:
> >
[snip]
> >>> b/include/asm-powerpc/fs_pd.h index 3d0e819..2ba51b9 100644
> >>> --- a/include/asm-powerpc/fs_pd.h
> >>> +++ b/include/asm-powerpc/fs_pd.h
> >>> @@ -25,6 +25,12 @@ static inline int uart_clock(void)
> >>>          return ppc_proc_freq;
> >>>  }
> >>>
> >>> +#if defined(CONFIG_8260)
> >>> +#include <asm/mpc8260.h>
> >>> +#elif defined(CONFIG_85xx)
> >>> +#include <asm/mpc85xx.h>
> >>> +#endif
> >>> +
> >>
> >> what do we need these includes for?
> >>
> >
> > This is to keep ppc stuff still working mostly. Basically, whole
> > this header is for such aim.
> > To be specific, both fs_enet and cpm_uart will bail the
> > compilation out
> > failing to find CPM_MAP_ADDR:
> >
> > drivers/net/fs_enet/fs_enet-main.c:1144: error: 'CPM_MAP_ADDR'
> > undeclared (first use in this function)
> >
> > and so forth.
> 
> How about wrapping it a ifndef CONFIG_PPC_MERGE so we know its just  
> for that and can get ride of it in the future.
> 

I afraid it will make arch/ppc unhappy - these got included to both.
And the headers required because there used to be same asm/io.h where this stuff used to reside, and from 
the recent time, arch/powerpc has separate io.h that made all the CPM2-related kinda hosed.

As a good thing, this header is only for the time we'll have to have same target working both in ppc and powerpc.
I think this can be revisited after the patch about cleaning-up CPM_MAP_ADDR from the drivers and core code.

> >>>  #define
> >>> cpm2_map(member)						\
> >>> ({
> >>> \ u32 offset = offsetof(cpm2_map_t, member);
> >>> \
> >>
> >> - k
>