Skip to content

Commit

Permalink
Blackfin: clean up mach header includes
Browse files Browse the repository at this point in the history
The main asm/blackfin.h header will pull in mach/blackfin.h to get
all the fun Blackfin defines.  So having any of the sub-mach headers
trying to include asm/blackfin.h makes no sense -- punt it.

The mach/blackfin.h header takes care of including the part-specific
def headers which in turn will include any other needed def file.
Similarly, it takes care of pulling in the part-specific cdef header.
So move this logic out of the blackfin.h when necessary.

Further, make sure the cdef headers do not waste time including the
def headers again.

Since all parts need the common def/cdef headers, move this logic
out of the part-specific headers and into the mach/blackfin.h file.

Finally, we need to split the BF539 def header since the BF538 does
not have MXVR and we don't want to expose those MMRs.

So now all parts should have the same behavior:
	mach/blackfin.h
		asm/def_LPBlackfin.h
		part-specific def.h
		if ! asm
			asm/cdef_LPBlackfin.h
			part-specific cdef.h
And the sub def/cdef headers only tail into what they need.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mike Frysinger committed Jan 10, 2011
1 parent 51946b1 commit 1a5c226
Show file tree
Hide file tree
Showing 45 changed files with 1,990 additions and 2,142 deletions.
63 changes: 30 additions & 33 deletions arch/blackfin/mach-bf518/include/mach/blackfin.h
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
/*
* Copyright 2008-2009 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _MACH_BLACKFIN_H_
#define _MACH_BLACKFIN_H_

#include "bf518.h"
#include "defBF512.h"
#include "anomaly.h"

#if defined(CONFIG_BF518)
#include "defBF518.h"
#endif

#if defined(CONFIG_BF516)
#include "defBF516.h"
#endif

#if defined(CONFIG_BF514)
#include "defBF514.h"
#endif

#if defined(CONFIG_BF512)
#include "defBF512.h"
#endif

#if !defined(__ASSEMBLY__)
#include "cdefBF512.h"

#if defined(CONFIG_BF518)
#include "cdefBF518.h"
#endif

#if defined(CONFIG_BF516)
#include "cdefBF516.h"
#endif

#if defined(CONFIG_BF514)
#include "cdefBF514.h"
#endif
#include <asm/def_LPBlackfin.h>
#ifdef CONFIG_BF512
# include "defBF512.h"
#endif
#ifdef CONFIG_BF514
# include "defBF514.h"
#endif
#ifdef CONFIG_BF516
# include "defBF516.h"
#endif
#ifdef CONFIG_BF518
# include "defBF518.h"
#endif

#ifndef __ASSEMBLY__
# include <asm/cdef_LPBlackfin.h>
# ifdef CONFIG_BF512
# include "cdefBF512.h"
# endif
# ifdef CONFIG_BF514
# include "cdefBF514.h"
# endif
# ifdef CONFIG_BF516
# include "cdefBF516.h"
# endif
# ifdef CONFIG_BF518
# include "cdefBF518.h"
# endif
#endif

#endif
10 changes: 1 addition & 9 deletions arch/blackfin/mach-bf518/include/mach/cdefBF512.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/*
* Copyright 2008-2009 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _CDEF_BF512_H
#define _CDEF_BF512_H

/* include all Core registers and bit definitions */
#include "defBF512.h"

/* include core specific register pointer definitions */
#include <asm/cdef_LPBlackfin.h>

/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF512 */

/* include cdefBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
#include "cdefBF51x_base.h"

Expand Down
5 changes: 1 addition & 4 deletions arch/blackfin/mach-bf518/include/mach/cdefBF514.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
* Copyright 2008-2009 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _CDEF_BF514_H
#define _CDEF_BF514_H

/* include all Core registers and bit definitions */
#include "defBF514.h"

/* BF514 is BF512 + RSI */
#include "cdefBF512.h"

Expand Down
5 changes: 1 addition & 4 deletions arch/blackfin/mach-bf518/include/mach/cdefBF516.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
* Copyright 2008-2009 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _CDEF_BF516_H
#define _CDEF_BF516_H

/* include all Core registers and bit definitions */
#include "defBF516.h"

/* BF516 is BF514 + EMAC */
#include "cdefBF514.h"

Expand Down
5 changes: 1 addition & 4 deletions arch/blackfin/mach-bf518/include/mach/cdefBF518.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
* Copyright 2008-2009 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _CDEF_BF518_H
#define _CDEF_BF518_H

/* include all Core registers and bit definitions */
#include "defBF518.h"

/* BF518 is BF516 + IEEE-1588 */
#include "cdefBF516.h"

Expand Down
9 changes: 1 addition & 8 deletions arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
/*
* Copyright 2008 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
*/

#ifndef _CDEF_BF52X_H
#define _CDEF_BF52X_H

#include <asm/blackfin.h>

#include "defBF51x_base.h"

/* Include core specific register pointer definitions */
#include <asm/cdef_LPBlackfin.h>

/* ==== begin from cdefBF534.h ==== */

/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
Expand Down
7 changes: 1 addition & 6 deletions arch/blackfin/mach-bf518/include/mach/defBF512.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/*
* Copyright 2008 Analog Devices Inc.
* Copyright 2008-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _DEF_BF512_H
#define _DEF_BF512_H

/* Include all Core registers and bit definitions */
#include <asm/def_LPBlackfin.h>

/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF512 */

/* Include defBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
#include "defBF51x_base.h"

Expand Down
33 changes: 18 additions & 15 deletions arch/blackfin/mach-bf527/include/mach/blackfin.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
/*
* Copyright 2007-2009 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _MACH_BLACKFIN_H_
#define _MACH_BLACKFIN_H_

#include "bf527.h"
#include "defBF522.h"
#include "anomaly.h"

#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
#include "defBF527.h"
#include <asm/def_LPBlackfin.h>
#if defined(CONFIG_BF523) || defined(CONFIG_BF522)
# include "defBF522.h"
#endif

#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
#include "defBF525.h"
# include "defBF525.h"
#endif

#if !defined(__ASSEMBLY__)
#include "cdefBF522.h"

#if defined(CONFIG_BF527) || defined(CONFIG_BF526)
#include "cdefBF527.h"
# include "defBF527.h"
#endif

#if defined(CONFIG_BF525) || defined(CONFIG_BF524)
#include "cdefBF525.h"
#endif
#if !defined(__ASSEMBLY__)
# include <asm/cdef_LPBlackfin.h>
# if defined(CONFIG_BF523) || defined(CONFIG_BF522)
# include "cdefBF522.h"
# endif
# if defined(CONFIG_BF525) || defined(CONFIG_BF524)
# include "cdefBF525.h"
# endif
# if defined(CONFIG_BF527) || defined(CONFIG_BF526)
# include "cdefBF527.h"
# endif
#endif

#endif
12 changes: 2 additions & 10 deletions arch/blackfin/mach-bf527/include/mach/cdefBF522.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _CDEF_BF522_H
#define _CDEF_BF522_H

/* include all Core registers and bit definitions */
#include "defBF522.h"

/* include core specific register pointer definitions */
#include <asm/cdef_LPBlackfin.h>

/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF522 */

/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
#include "cdefBF52x_base.h"

Expand Down
7 changes: 2 additions & 5 deletions arch/blackfin/mach-bf527/include/mach/cdefBF525.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _CDEF_BF525_H
#define _CDEF_BF525_H

/* include all Core registers and bit definitions */
#include "defBF525.h"

/* BF525 is BF522 + USB */
#include "cdefBF522.h"

Expand Down
7 changes: 2 additions & 5 deletions arch/blackfin/mach-bf527/include/mach/cdefBF527.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _CDEF_BF527_H
#define _CDEF_BF527_H

/* include all Core registers and bit definitions */
#include "defBF527.h"

/* BF527 is BF525 + EMAC */
#include "cdefBF525.h"

Expand Down
11 changes: 2 additions & 9 deletions arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _CDEF_BF52X_H
#define _CDEF_BF52X_H

#include <asm/blackfin.h>

#include "defBF52x_base.h"

/* Include core specific register pointer definitions */
#include <asm/cdef_LPBlackfin.h>

/* ==== begin from cdefBF534.h ==== */

/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
Expand Down
7 changes: 1 addition & 6 deletions arch/blackfin/mach-bf527/include/mach/defBF522.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/

#ifndef _DEF_BF522_H
#define _DEF_BF522_H

/* Include all Core registers and bit definitions */
#include <asm/def_LPBlackfin.h>

/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF522 */

/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
#include "defBF52x_base.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/mach-bf527/include/mach/defBF525.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/mach-bf527/include/mach/defBF527.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2008 Analog Devices Inc.
* Copyright 2007-2010 Analog Devices Inc.
*
* Licensed under the ADI BSD license or the GPL-2 (or later)
*/
Expand Down
15 changes: 9 additions & 6 deletions arch/blackfin/mach-bf533/include/mach/blackfin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2009 Analog Devices Inc.
* Copyright 2005-2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later
* Licensed under the GPL-2 or later.
*/

#ifndef _MACH_BLACKFIN_H_
Expand All @@ -10,11 +10,14 @@
#define BF533_FAMILY

#include "bf533.h"
#include "defBF532.h"
#include "anomaly.h"

#if !defined(__ASSEMBLY__)
#include "cdefBF532.h"
#include <asm/def_LPBlackfin.h>
#include "defBF532.h"

#ifndef __ASSEMBLY__
# include <asm/cdef_LPBlackfin.h>
# include "cdefBF532.h"
#endif

#endif /* _MACH_BLACKFIN_H_ */
#endif
Loading

0 comments on commit 1a5c226

Please sign in to comment.