From 964930bcfdc67112ea76727163f3408bcf40f614 Mon Sep 17 00:00:00 2001 From: Christian Riesch Date: Mon, 28 Nov 2011 23:46:14 +0000 Subject: [PATCH] arm, davinci: Move pinmux functions from board to arch tree Signed-off-by: Christian Riesch Cc: Sandeep Paulraj Cc: Heiko Schocher Cc: Sudhakar Rajashekhara Cc: Syed Mohammed Khasim Cc: Sughosh Ganu Cc: Nick Thompson Cc: Stefano Babic Acked-by: Heiko Schocher Acked-by: Nick Thompson --- arch/arm/cpu/arm926ejs/davinci/Makefile | 2 +- .../arm/cpu/arm926ejs/davinci/pinmux.c | 0 arch/arm/include/asm/arch-davinci/hardware.h | 2 ++ board/davinci/common/Makefile | 2 +- board/davinci/da8xxevm/da830evm.c | 2 -- board/davinci/da8xxevm/da850evm.c | 2 -- board/davinci/da8xxevm/hawkboard_nand_spl.c | 2 -- board/davinci/ea20/ea20.c | 2 -- nand_spl/board/davinci/da8xxevm/Makefile | 6 +++--- 9 files changed, 7 insertions(+), 13 deletions(-) rename board/davinci/common/davinci_pinmux.c => arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%) diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile index aeb058acd0..2105ec5de9 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS-y += cpu.o timer.o psc.o +COBJS-y += cpu.o timer.o psc.o pinmux.o COBJS-$(CONFIG_DA850_LOWLEVEL) += da850_lowlevel.o COBJS-$(CONFIG_SOC_DM355) += dm355.o COBJS-$(CONFIG_SOC_DM365) += dm365.o diff --git a/board/davinci/common/davinci_pinmux.c b/arch/arm/cpu/arm926ejs/davinci/pinmux.c similarity index 100% rename from board/davinci/common/davinci_pinmux.c rename to arch/arm/cpu/arm926ejs/davinci/pinmux.c diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 3e9a3b6de2..06819a68c8 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -480,6 +480,8 @@ struct davinci_syscfg_regs { #define davinci_syscfg_regs \ ((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE) +#define pinmux(x) (&davinci_syscfg_regs->pinmux[x]) + /* Emulation suspend bits */ #define DAVINCI_SYSCFG_SUSPSRC_EMAC (1 << 5) #define DAVINCI_SYSCFG_SUSPSRC_I2C (1 << 16) diff --git a/board/davinci/common/Makefile b/board/davinci/common/Makefile index 9d7b164238..bc99da38be 100644 --- a/board/davinci/common/Makefile +++ b/board/davinci/common/Makefile @@ -29,7 +29,7 @@ endif LIB = $(obj)lib$(VENDOR).o -COBJS := misc.o davinci_pinmux.o +COBJS := misc.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c index 2021e73242..c45c94b4c0 100644 --- a/board/davinci/da8xxevm/da830evm.c +++ b/board/davinci/da8xxevm/da830evm.c @@ -46,8 +46,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (&davinci_syscfg_regs->pinmux[x]) - /* SPI0 pin muxer settings */ static const struct pinmux_config spi0_pins[] = { { pinmux(7), 1, 3 }, diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index e0a3bbefcf..844e585f60 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -34,8 +34,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (&davinci_syscfg_regs->pinmux[x]) - /* SPI0 pin muxer settings */ static const struct pinmux_config spi1_pins[] = { { pinmux(5), 1, 1 }, diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c index 32b17ce7f4..0fdccac435 100644 --- a/board/davinci/da8xxevm/hawkboard_nand_spl.c +++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c @@ -32,8 +32,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (&davinci_syscfg_regs->pinmux[x]) - static const struct pinmux_config mii_pins[] = { { pinmux(2), 8, 1 }, { pinmux(2), 8, 2 }, diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 720a3607a7..9b6c4c047d 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -40,8 +40,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (&davinci_syscfg_regs->pinmux[x]) - static const struct da8xx_panel lcd_panel = { /* Casio COM57H531x */ .name = "Casio_COM57H531x", diff --git a/nand_spl/board/davinci/da8xxevm/Makefile b/nand_spl/board/davinci/da8xxevm/Makefile index accf71607c..7b06cd2fe5 100644 --- a/nand_spl/board/davinci/da8xxevm/Makefile +++ b/nand_spl/board/davinci/da8xxevm/Makefile @@ -42,7 +42,7 @@ SOBJS = _divsi3.o \ COBJS = cpu.o \ davinci_nand.o \ - davinci_pinmux.o \ + pinmux.o \ div0.o \ hawkboard_nand_spl.o \ memsize.o \ @@ -78,9 +78,9 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from board directory -$(obj)davinci_pinmux.c: +$(obj)pinmux.c: @rm -f $@ - @ln -s $(TOPDIR)/board/davinci/common/davinci_pinmux.c $@ + @ln -s $(TOPDIR)/arch/arm/cpu/arm926ejs/davinci/pinmux.c $@ # from drivers/mtd/nand directory $(obj)davinci_nand.c: -- 2.25.1