summaryrefslogtreecommitdiff
path: root/board/sh7763rdp
diff options
context:
space:
mode:
Diffstat (limited to 'board/sh7763rdp')
-rw-r--r--board/sh7763rdp/Makefile18
-rw-r--r--board/sh7763rdp/lowlevel_init.S1
-rw-r--r--board/sh7763rdp/sh7763rdp.c17
-rw-r--r--board/sh7763rdp/u-boot.lds1
4 files changed, 20 insertions, 17 deletions
diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile
index 9e63ea7..62a683d 100644
--- a/board/sh7763rdp/Makefile
+++ b/board/sh7763rdp/Makefile
@@ -23,25 +23,29 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := sh7763rdp.o
+COBJS := sh7763rdp.o
SOBJS := lowlevel_init.o
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
- rm -f $(LIB) core *.bak .depend
+ rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
--include .depend
+sinclude $(obj).depend
#########################################################################
diff --git a/board/sh7763rdp/lowlevel_init.S b/board/sh7763rdp/lowlevel_init.S
index 1942892..2a44eee 100644
--- a/board/sh7763rdp/lowlevel_init.S
+++ b/board/sh7763rdp/lowlevel_init.S
@@ -348,4 +348,3 @@ SR_MASK_D: .long 0xEFFFFF0F
WDTST_D: .long 0x5A000FFF
WDTCSR_D: .long 0xA5000000
WDTBST_D: .long 0x55000000
-
diff --git a/board/sh7763rdp/sh7763rdp.c b/board/sh7763rdp/sh7763rdp.c
index 6f9501b..92ac7b7 100644
--- a/board/sh7763rdp/sh7763rdp.c
+++ b/board/sh7763rdp/sh7763rdp.c
@@ -49,19 +49,20 @@ int board_init(void)
{
vu_short dat;
- *(vu_short *)(CPU_CMDREG) |= 0x0001;
+ /* Enable mode */
+ writew(inw(CPU_CMDREG)|0x0001, CPU_CMDREG);
/* GPIO Setting (eth1) */
- dat = *(vu_short *)(PSEL1);
- *(vu_short *)PSEL1 = ((dat & ~0xff00) | 0x2400);
- *(vu_short *)PFCR = 0;
- *(vu_short *)PGCR = 0;
- *(vu_short *)PHCR = 0;
+ dat = inw(PSEL1);
+ writew(((dat & ~0xff00) | 0x2400), PSEL1);
+ writew(0, PFCR);
+ writew(0, PGCR);
+ writew(0, PHCR);
return 0;
}
-int dram_init (void)
+int dram_init(void)
{
DECLARE_GLOBAL_DATA_PTR;
@@ -71,6 +72,6 @@ int dram_init (void)
return 0;
}
-void led_set_state (unsigned short value)
+void led_set_state(unsigned short value)
{
}
diff --git a/board/sh7763rdp/u-boot.lds b/board/sh7763rdp/u-boot.lds
index 8f8229b..c07f0d8 100644
--- a/board/sh7763rdp/u-boot.lds
+++ b/board/sh7763rdp/u-boot.lds
@@ -103,4 +103,3 @@ SECTIONS
PROVIDE (_end = .);
}
-