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

From: Vitaly Bordug <[email-masked]>
Date: Wed, 10 Jan 2007 23:50:51 +0300

On Wed, 10 Jan 2007 11:11:05 -0600
Kumar Gala wrote:

> 
> On Jan 9, 2007, at 7:12 PM, Vitaly Bordug wrote:
> 
> >
> > Recent update of asm-powerpc/io.h caused cpm-related stuff to
> > break in the
> > current kernel. Current patch fixes it, and includes other
> > overhaul and
> > improvements (incomplete list is below). Required for proper  
> > functioning of
> > the 8xx stuff as well.
> >
> > - Updated dts with a chosen node with interrupt controller,
> > - fixed messed device IDs among CPM2 SoC devices,
> > - corrected odd header name and fixed type in defines,
> > - Added 82xx subdir to the powerpc/platforms Makefile, new
> >   solely-powerpc header for 8260 family (was using one from arch/ 
> > ppc, this
> >   one cleaned up from the extra stuff).
> >
> > Signed-off-by: Vitaly Bordug <[email-masked]>
> > ---
> >
> >  arch/powerpc/platforms/82xx/mpc82xx.c     |    2 +-
> >  arch/powerpc/platforms/82xx/mpc82xx_ads.c |    2 +-
> >  arch/powerpc/platforms/82xx/pq2ads.h      |    5 +++--
> >  arch/powerpc/platforms/Makefile           |    1 +
> >  drivers/net/fs_enet/fs_enet.h             |    1 +
> >  drivers/serial/cpm_uart/cpm_uart_cpm1.h   |    3 ---
> >  drivers/serial/cpm_uart/cpm_uart_cpm2.h   |    3 ---
> >  include/asm-powerpc/fs_pd.h               |    6 ++++++
> >  include/asm-powerpc/io.h                  |    6 ++++++
> >  9 files changed, 19 insertions(+), 10 deletions(-)
> 
> > diff --git a/include/asm-powerpc/fs_pd.h
> > 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.
> >  #define
> > cpm2_map(member)						\
> > ({
> > \ u32 offset = offsetof(cpm2_map_t, member);
> > \
> 
> - k