[U-Boot] [PATCH 1/2] nds32: add linkage support

Add linkage support.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- arch/nds32/include/asm/linkage.h | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/linkage.h
diff --git a/arch/nds32/include/asm/linkage.h b/arch/nds32/include/asm/linkage.h new file mode 100644 index 0000000..9d6edd9 --- /dev/null +++ b/arch/nds32/include/asm/linkage.h @@ -0,0 +1,31 @@ +/* + * U-boot - linkage.h + * + * Copyright (c) 2005-2007 Analog Devices Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __ASM_LINKAGE_H +#define __ASM_LINKAGE_H + +#define __ALIGN .align 4 +#define __ALIGN_STR ".align 4" + +#endif

Add linkage support to watchdog.S.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/nds32/cpu/n1213/ag101/watchdog.S b/arch/nds32/cpu/n1213/ag101/watchdog.S index fc39f3f..18f0b66 100644 --- a/arch/nds32/cpu/n1213/ag101/watchdog.S +++ b/arch/nds32/cpu/n1213/ag101/watchdog.S @@ -22,12 +22,12 @@ */
#include <asm/arch-ag101/ag101.h> +#include <linux/linkage.h>
.text
#ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -.globl turnoff_watchdog -turnoff_watchdog: +ENTRY(turnoff_watchdog)
#define WD_CR 0xC #define WD_ENABLE 0x1 @@ -45,4 +45,5 @@ turnoff_watchdog:
ret
+ENDPROC(turnoff_watchdog) #endif

Hi Mike,
2011/12/1 Mike Frysinger vapier@gentoo.org
On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
Add linkage support.
let's add this to our linux/linkage.h: #ifndef __ALIGN #define __ALIGN .align 4 #define __ALIGN_STR ".align 4" #endif
i think most arches will be this way -mike
I'm not sure for this because I've found there exists different configurations for other architectures in Linux. For example, ../../../arch/arm/include/asm/linkage.h:4:#define __ALIGN .align 0 ../../../arch/arm/include/asm/linkage.h:5:#define __ALIGN_STR ".align 0" ../../../arch/avr32/include/asm/linkage.h:4:#define __ALIGN .balign 2 ../../../arch/avr32/include/asm/linkage.h:5:#define __ALIGN_STR ".balign 2" ../../../arch/score/include/asm/linkage.h:4:#define __ALIGN .align 2 ../../../arch/score/include/asm/linkage.h:5:#define __ALIGN_STR ".align 2"

On Wednesday 30 November 2011 21:29:02 Macpaul Lin wrote:
2011/12/1 Mike Frysinger vapier@gentoo.org
On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
Add linkage support.
let's add this to our linux/linkage.h: #ifndef __ALIGN #define __ALIGN .align 4 #define __ALIGN_STR ".align 4" #endif
i think most arches will be this way
I'm not sure for this because I've found there exists different configurations for other architectures in Linux.
more than half will use ".align 4". for the few that do not, they can still define __ALIGN themselves, and thus the "#ifndef __ALIGN" i quoted above will keep it from executing. -mike

Add linkage support.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- Changes for v2: - remove architecture related define of align. - remain this empty file for the compilation necessary.
arch/nds32/include/asm/linkage.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/linkage.h
diff --git a/arch/nds32/include/asm/linkage.h b/arch/nds32/include/asm/linkage.h new file mode 100644 index 0000000..6d4493a --- /dev/null +++ b/arch/nds32/include/asm/linkage.h @@ -0,0 +1,28 @@ +/* + * U-boot - linkage.h + * + * Copyright (c) 2005-2007 Analog Devices Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __ASM_LINKAGE_H +#define __ASM_LINKAGE_H + +#endif

Add linkage support to watchdog.S.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- Changes for v2: - No change.
arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/nds32/cpu/n1213/ag101/watchdog.S b/arch/nds32/cpu/n1213/ag101/watchdog.S index fc39f3f..18f0b66 100644 --- a/arch/nds32/cpu/n1213/ag101/watchdog.S +++ b/arch/nds32/cpu/n1213/ag101/watchdog.S @@ -22,12 +22,12 @@ */
#include <asm/arch-ag101/ag101.h> +#include <linux/linkage.h>
.text
#ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -.globl turnoff_watchdog -turnoff_watchdog: +ENTRY(turnoff_watchdog)
#define WD_CR 0xC #define WD_ENABLE 0x1 @@ -45,4 +45,5 @@ turnoff_watchdog:
ret
+ENDPROC(turnoff_watchdog) #endif

Hi Macpaul
2011/12/1 Macpaul Lin macpaul@andestech.com
Add linkage support to watchdog.S.
Signed-off-by: Macpaul Lin macpaul@andestech.com
Changes for v2:
- No change.
arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks,
participants (3)
-
Macpaul Lin
-
Macpaul Lin
-
Mike Frysinger