libgloss: bfin: add support for bf50x processors

Import the headers from VisualDSP and add linker scripts for them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Michael Frysinger 2010-10-15 20:32:11 +00:00
parent 9c4461742a
commit b1b01f2615
14 changed files with 5019 additions and 11 deletions

View File

@ -1,3 +1,14 @@
2010-10-15 Mike Frysinger <vapier@gentoo.org>
* bfin/Makefile.in (BOARD_SCRIPTS): Add bf504.ld and bf506.ld.
* bfin/bf504.ld, bfin/bf506.ld: New linker scripts.
* bfin/include/cdefBF504.h, bfin/include/cdefBF504F.h,
bfin/include/cdefBF506F.h, bfin/include/cdefBF50x_base.h,
bfin/include/defBF504.h, bfin/include/defBF504F.h,
bfin/include/defBF506F.h, bfin/include/defBF50x_base.h: New files.
* bfin/include/def_LPBlackfin.h: Add DMC_P for __ADSPBF50x__.
* bfin/include/sys/_adi_platform.h: Include new bf50x headers.
2010-10-15 Stuart Henderson <stuart.henderson@analog.com>
* bfin/bfin-common-mc.ld: Add .l1.data and .l1.text input sections.

View File

@ -61,6 +61,7 @@ SIM_INSTALL = install-sim
# Here is all of the development board stuff
BOARD_SCRIPTS = bfin-common-sc.ld bfin-common-mc.ld \
bf504.ld bf506.ld \
bf512.ld bf514.ld bf516.ld bf518.ld \
bf522.ld bf523.ld bf524.ld bf525.ld bf526.ld bf527.ld \
bf531.ld bf532.ld bf533.ld \

26
libgloss/bfin/bf504.ld Normal file
View File

@ -0,0 +1,26 @@
/*
* The default linker script for standalone executables running on
* ADSP-BF506 processor.
*
* Copyright (C) 2007-2009 Analog Devices, Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
MEMORY
{
MEM_L1_CODE : ORIGIN = 0xFFA00000, LENGTH = 0x4000
MEM_L1_CODE_CACHE : ORIGIN = 0xFFA04000, LENGTH = 0x4000
MEM_L1_SCRATCH : ORIGIN = 0xFFB00000, LENGTH = 0x1000
MEM_L1_DATA_A : ORIGIN = 0xFF800000, LENGTH = 0x8000
MEM_L2 : ORIGIN = 0xFEB00000, LENGTH = 0x0
}

26
libgloss/bfin/bf506.ld Normal file
View File

@ -0,0 +1,26 @@
/*
* The default linker script for standalone executables running on
* ADSP-BF506 processor.
*
* Copyright (C) 2007-2009 Analog Devices, Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
MEMORY
{
MEM_L1_CODE : ORIGIN = 0xFFA00000, LENGTH = 0x4000
MEM_L1_CODE_CACHE : ORIGIN = 0xFFA04000, LENGTH = 0x4000
MEM_L1_SCRATCH : ORIGIN = 0xFFB00000, LENGTH = 0x1000
MEM_L1_DATA_A : ORIGIN = 0xFF800000, LENGTH = 0x8000
MEM_L2 : ORIGIN = 0xFEB00000, LENGTH = 0x0
}

View File

@ -0,0 +1,34 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF504 processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _CDEF_BF504_H
#define _CDEF_BF504_H
/* Include all Core registers and bit definitions */
#include <cdef_LPBlackfin.h>
/* Include cdefBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <cdefBF50x_base.h>
/* Define the set of macros that are specific to the ADSP-BF504 processor */
#endif /* _CDEF_BF504_H */

View File

@ -0,0 +1,34 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF504F processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _CDEF_BF504F_H
#define _CDEF_BF504F_H
/* Include all Core registers and bit definitions */
#include <cdef_LPBlackfin.h>
/* Include cdefBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <cdefBF50x_base.h>
/* Define the set of macros that are specific to the ADSP-BF504F processor */
#endif /* _CDEF_BF504F_H */

View File

@ -0,0 +1,32 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF506F processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _CDEF_BF506F_H
#define _CDEF_BF506F_H
/* Include all Core registers and bit definitions */
#include <cdef_LPBlackfin.h>
/* Include cdefBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <cdefBF50x_base.h>
#endif /* _CDEF_BF506F_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF504 processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _DEF_BF504_H
#define _DEF_BF504_H
/* Include all Core registers and bit definitions */
#include <def_LPBlackfin.h>
/* Include defBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <defBF50x_base.h>
/* Define the set of macros that are specific to the ADSP-BF504 processor */
#endif /* _DEF_BF504_H */

View File

@ -0,0 +1,100 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF504F processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _DEF_BF504F_H
#define _DEF_BF504F_H
#ifdef _MISRA_RULES
#pragma diag(push)
#pragma diag(suppress:misra_rule_5_1:"ADI header disables rule 5.1 which bars use of long identifiers (>31 chars).")
#endif /* _MISRA_RULES */
/* Include all Core registers and bit definitions */
#include <def_LPBlackfin.h>
/* Include defBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <defBF50x_base.h>
/* Define the set of macros that are specific to the ADSP-BF504F processor */
/* Flash commands */
#define FLASH_CMD_BLOCK_LOCK_CONFIRM 0x01
#define FLASH_CMD_SET_CONFIG_CONFIRM 0x03
#define FLASH_CMD_ALT_PROGRAM_SETUP 0x10
#define FLASH_CMD_BLOCK_ERASE_SETUP 0x20
#define FLASH_CMD_BLOCK_LOCKDOWN_CONFIRM 0x2F
#define FLASH_CMD_ENH_FACT_PROG_SETUP 0x30
#define FLASH_CMD_DOUBLE_WORD_PROG_SETUP 0x35
#define FLASH_CMD_PROGRAM_SETUP 0x40
#define FLASH_CMD_CLEAR_STATUS 0x50
#define FLASH_CMD_QUAD_WORD_PROG_SETUP 0x56
#define FLASH_CMD_BLOCK_LOCK_SETUP 0x60
#define FLASH_CMD_BLOCK_UNLOCK_SETUP 0x60
#define FLASH_CMD_BLOCK_LOCKDOWN_SETUP 0x60
#define FLASH_CMD_SET_CONFIG_SETUP 0x60
#define FLASH_CMD_READ_STATUS 0x70
#define FLASH_CMD_QUAD_ENH_PROG_SETUP 0x75
#define FLASH_CMD_READ_ELECTRONIC_SIG 0x90
#define FLASH_CMD_READ_CFI_QUERY 0x98
#define FLASH_CMD_PROGRAM_SUSPEND 0xB0
#define FLASH_CMD_ERASE_SUSPEND 0xB0
#define FLASH_CMD_PROTECTION_REG_PROGRAM 0xC0
#define FLASH_CMD_PROGRAM_RESUME 0xD0
#define FLASH_CMD_ERASE_RESUME 0xD0
#define FLASH_CMD_BLOCK_ERASE_CONFIRM 0xD0
#define FLASH_CMD_BLOCK_UNLOCK_CONFIRM 0xD0
#define FLASH_CMD_ENH_FACT_PROG_CONFIRM 0xD0
#define FLASH_CMD_READ_ARRAY 0xFF
/* Bit definitions for Flash Configuration Register */
#define FLASH_CR_ASYNC_READ 0x8000
#define FLASH_CR_XLAT_5 0x2800
#define FLASH_CR_XLAT_4 0x2000
#define FLASH_CR_XLAT_3 0x1800
#define FLASH_CR_XLAT_2 0x1000
#define FLASH_CR_WAIT_HIGH 0x0400
#define FLASH_CR_DATA_HOLD 0x0200
#define FLASH_CR_WAIT_ONE 0x0100
#define FLASH_CR_BURST_SEQ 0x0080
#define FLASH_CR_CLK_RISE 0x0040
#define FLASH_CR_WRAP_DIS 0x0008
#define FLASH_CR_BURST_CONT 0x0007
#define FLASH_CR_BURST_16 0x0003
#define FLASH_CR_BURST_8 0x0002
#define FLASH_CR_BURST_4 0x0001
/* Bit definitions for Flash Status Register */
#define FLASH_SR_PRG_ERASE_READY 0x0080
#define FLASH_SR_ERASE_SUSPENDED 0x0040
#define FLASH_SR_ERASE_ERROR 0x0020
#define FLASH_SR_PRG_ERROR 0x0010
#define FLASH_SR_VPP_INVALID_ABORT 0x0008
#define FLASH_SR_PRG_SUSPENDED 0x0004
#define FLASH_SR_BLK_PROT_ABORT 0x0002
#define FLASH_SR_BNK_WRITE 0x0001
#ifdef _MISRA_RULES
#pragma diag(pop)
#endif /* _MISRA_RULES */
#endif /* _DEF_BF504F_H */

View File

@ -0,0 +1,102 @@
/*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
/*
** This include file contains a list of macro "defines" to enable programs
** to use symbolic names for register-access and bit-manipulation for the
** ADSP-BF506F processor.
**
** Copyright (C) 2009 Analog Devices Inc., All Rights Reserved.
*/
#ifndef _DEF_BF506F_H
#define _DEF_BF506F_H
#ifdef _MISRA_RULES
#pragma diag(push)
#pragma diag(suppress:misra_rule_5_1:"ADI header disables rule 5.1 which bars use of long identifiers (>31 chars).")
#endif /* _MISRA_RULES */
/* Include all Core registers and bit definitions */
#include <def_LPBlackfin.h>
/* Include defBF50x_base.h for the set of #defines that are
** common to all ADSP-BF50x processors
*/
#include <defBF50x_base.h>
/*
** Define the set of macros that are specific to the ADSP-BF506F processor
*/
/* Flash commands */
#define FLASH_CMD_BLOCK_LOCK_CONFIRM 0x01
#define FLASH_CMD_SET_CONFIG_CONFIRM 0x03
#define FLASH_CMD_ALT_PROGRAM_SETUP 0x10
#define FLASH_CMD_BLOCK_ERASE_SETUP 0x20
#define FLASH_CMD_BLOCK_LOCKDOWN_CONFIRM 0x2F
#define FLASH_CMD_ENH_FACT_PROG_SETUP 0x30
#define FLASH_CMD_DOUBLE_WORD_PROG_SETUP 0x35
#define FLASH_CMD_PROGRAM_SETUP 0x40
#define FLASH_CMD_CLEAR_STATUS 0x50
#define FLASH_CMD_QUAD_WORD_PROG_SETUP 0x56
#define FLASH_CMD_BLOCK_LOCK_SETUP 0x60
#define FLASH_CMD_BLOCK_UNLOCK_SETUP 0x60
#define FLASH_CMD_BLOCK_LOCKDOWN_SETUP 0x60
#define FLASH_CMD_SET_CONFIG_SETUP 0x60
#define FLASH_CMD_READ_STATUS 0x70
#define FLASH_CMD_QUAD_ENH_PROG_SETUP 0x75
#define FLASH_CMD_READ_ELECTRONIC_SIG 0x90
#define FLASH_CMD_READ_CFI_QUERY 0x98
#define FLASH_CMD_PROGRAM_SUSPEND 0xB0
#define FLASH_CMD_ERASE_SUSPEND 0xB0
#define FLASH_CMD_PROTECTION_REG_PROGRAM 0xC0
#define FLASH_CMD_PROGRAM_RESUME 0xD0
#define FLASH_CMD_ERASE_RESUME 0xD0
#define FLASH_CMD_BLOCK_ERASE_CONFIRM 0xD0
#define FLASH_CMD_BLOCK_UNLOCK_CONFIRM 0xD0
#define FLASH_CMD_ENH_FACT_PROG_CONFIRM 0xD0
#define FLASH_CMD_READ_ARRAY 0xFF
/* Bit definitions for Flash Configuration Register */
#define FLASH_CR_ASYNC_READ 0x8000
#define FLASH_CR_XLAT_5 0x2800
#define FLASH_CR_XLAT_4 0x2000
#define FLASH_CR_XLAT_3 0x1800
#define FLASH_CR_XLAT_2 0x1000
#define FLASH_CR_WAIT_HIGH 0x0400
#define FLASH_CR_DATA_HOLD 0x0200
#define FLASH_CR_WAIT_ONE 0x0100
#define FLASH_CR_BURST_SEQ 0x0080
#define FLASH_CR_CLK_RISE 0x0040
#define FLASH_CR_WRAP_DIS 0x0008
#define FLASH_CR_BURST_CONT 0x0007
#define FLASH_CR_BURST_16 0x0003
#define FLASH_CR_BURST_8 0x0002
#define FLASH_CR_BURST_4 0x0001
/* Bit definitions for Flash Status Register */
#define FLASH_SR_PRG_ERASE_READY 0x0080
#define FLASH_SR_ERASE_SUSPENDED 0x0040
#define FLASH_SR_ERASE_ERROR 0x0020
#define FLASH_SR_PRG_ERROR 0x0010
#define FLASH_SR_VPP_INVALID_ABORT 0x0008
#define FLASH_SR_PRG_SUSPENDED 0x0004
#define FLASH_SR_BLK_PROT_ABORT 0x0002
#define FLASH_SR_BNK_WRITE 0x0001
#ifdef _MISRA_RULES
#pragma diag(pop)
#endif /* _MISRA_RULES */
#endif /* _DEF_BF506F_H */

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
*
* def_LPBlackfin.h
*
* Copyright (C) 2008, 2009 Analog Devices, Inc.
* (c) Copyright 2001-2009 Analog Devices, Inc. All rights reserved.
*
************************************************************************/
@ -351,10 +351,14 @@
#define ENDCPLB_P 0x01 /* Enable DCPLBS */
#define DMCTL_ENDCPLB_P ENDCPLB_P /* "" (older define) */
#if defined(__ADSPBF50x__)
#define DMC_P 0x03 /* L1 Data Memory Configure bit */
#else
#define DMC0_P 0x02 /* L1 Data Memory Configure bit 0 */
#define DMCTL_DMC0_P DMC0_P /* "" (older define) */
#define DMC1_P 0x03 /* L1 Data Memory Configure bit 1 */
#define DMCTL_DMC0_P DMC0_P /* "" (older define) */
#define DMCTL_DMC1_P DMC1_P /* "" (older define) */
#endif
#define DCBS_P 0x04 /* L1 Data Cache Bank Select */
#define PORT_PREF0_P 0x12 /* DAG0 Port Preference */
#define PORT_PREF1_P 0x13 /* DAG1 Port Preference */

View File

@ -12,7 +12,7 @@
/*
** Include appropriate header file for platform.
** Copyright (C) 2008, 2009 Analog Devices, Inc.
** Copyright (C) 2004-2009 Analog Devices Inc. All Rights Reserved.
*/
#ifndef __ADI_PLATFORM_H
@ -62,10 +62,10 @@
#include <cdefMT6906.h>
#elif defined (__ADSPBF504__)
#include <cdefBF504.h>
#elif defined (__ADSPBF505__)
#include <cdefBF505.h>
#elif defined (__ADSPBF506__)
#include <cdefBF506.h>
#elif defined (__ADSPBF504F__)
#include <cdefBF504F.h>
#elif defined (__ADSPBF506__) || defined (__ADSPBF506F__)
#include <cdefBF506F.h>
#elif defined (__ADSPBF512__)
#include <cdefBF512.h>
#elif defined (__ADSPBF514__)
@ -155,10 +155,10 @@
#include <defMT6906.h>
#elif defined (__ADSPBF504__)
#include <defBF504.h>
#elif defined (__ADSPBF505__)
#include <defBF505.h>
#elif defined (__ADSPBF506__)
#include <defBF506.h>
#elif defined (__ADSPBF504F__)
#include <defBF504F.h>
#elif defined (__ADSPBF506__) || defined (__ADSPBF506F__)
#include <defBF506F.h>
#elif defined (__ADSPBF512__)
#include <defBF512.h>
#elif defined (__ADSPBF514__)