sh: Renesas R0P7785LC0011RL board support
Subsystems (2)
PATCH 1/1 sh: Renesas R0P7785LC0011RL board support
This board has SH7785, 512MB DDR2-SDRAM, NOR Flash, Graphic controller, Ethernet, USB, SD, and RTC.
This patch supports the following functions:
- 128MB DDR2-SDRAM (29-bit address mode only)
- NOR Flash
- USB host
- Ethernet
--- MAINTAINERS | 1 + MAKEALL | 1 + Makefile | 5 + board/r0p7785lc0011rl/Makefile | 43 ++++ board/r0p7785lc0011rl/config.mk | 26 +++ board/r0p7785lc0011rl/lowlevel_init.S | 318 +++++++++++++++++++++++++++ board/r0p7785lc0011rl/r0p7785lc0011rl.c | 51 +++++ board/r0p7785lc0011rl/rtl8169.h | 62 ++++++ board/r0p7785lc0011rl/rtl8169_mac.c | 354 +++++++++++++++++++++++++++++++ board/r0p7785lc0011rl/selfcheck.c | 196 +++++++++++++++++ board/r0p7785lc0011rl/u-boot.lds | 97 +++++++++ include/configs/r0p7785lc0011rl.h | 173 +++++++++++++++ 12 files changed, 1327 insertions(+), 0 deletions(-) create mode 100644 board/r0p7785lc0011rl/Makefile create mode 100644 board/r0p7785lc0011rl/config.mk create mode 100644 board/r0p7785lc0011rl/lowlevel_init.S create mode 100644 board/r0p7785lc0011rl/r0p7785lc0011rl.c create mode 100644 board/r0p7785lc0011rl/rtl8169.h create mode 100644 board/r0p7785lc0011rl/rtl8169_mac.c create mode 100644 board/r0p7785lc0011rl/selfcheck.c create mode 100644 board/r0p7785lc0011rl/u-boot.lds create mode 100644 include/configs/r0p7785lc0011rl.h
MAINTAINERS +1 -0
@@ -731,6 +731,7 @@ Mark Jonas <[email protected]> Yoshihiro Shimoda <[email protected]> MS7720SE SH7720 + R0P77850011RL SH7785 Yusuke Goda <[email protected]>
MAKEALL +1 -0
@@ -753,6 +753,7 @@ LIST_sh4=" \ r7780mp \ r2dplus \ sh7763rdp \ + r0p7785lc0011rl \ " LIST_sh=" \
Makefile +5 -0
@@ -2955,6 +2955,11 @@ sh7763rdp_config : unconfig @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp +r0p7785lc0011rl_config : unconfig + @ >include/config.h + @echo "#define CONFIG_R0P7785LC0011RL 1" >> include/config.h + @./mkconfig -a $(@:_config=) sh sh4 r0p7785lc0011rl + #======================================================================== # SPARC #========================================================================
board/r0p7785lc0011rl/Makefile new file +43 -0
43 lines not on this page · raw message
board/r0p7785lc0011rl/config.mk new file +26 -0
@@ -0,0 +1,26 @@ +# +# Copyright (C) 2007 +# Nobuhiro Iwamatsu <[email protected]> +# +# 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., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA + +# +# TEXT_BASE refers to image _after_ relocation. +# +# NOTE: Must match value used in u-boot.lds (in this directory). +# +TEXT_BASE = 0x0ff80000 +
board/r0p7785lc0011rl/lowlevel_init.S new file +318 -0
318 lines not on this page · raw message
board/r0p7785lc0011rl/r0p7785lc0011rl.c new file +51 -0
51 lines not on this page · raw message
board/r0p7785lc0011rl/rtl8169.h new file +62 -0
62 lines not on this page · raw message
board/r0p7785lc0011rl/rtl8169_mac.c new file +354 -0
354 lines not on this page · raw message
board/r0p7785lc0011rl/selfcheck.c new file +196 -0
196 lines not on this page · raw message
board/r0p7785lc0011rl/u-boot.lds new file +97 -0
97 lines not on this page · raw message
include/configs/r0p7785lc0011rl.h new file +173 -0
173 lines not on this page · raw message
PATCH 1/1 sh: Renesas R0P7785LC0011RL board support
board/r0p7785lc0011rl/Makefile line 28
Quoted 9 lines
board/r0p7785lc0011rl/Makefile new file +9
-0+include $(TOPDIR)/config.mk + +LIB = lib$(BOARD).a + +COBJS := r0p7785lc0011rl.o selfcheck.o rtl8169_mac.o +SOBJS := lowlevel_init.o + +$(LIB): $(COBJS) $(SOBJS) + $(AR) crv $@ $(COBJS) $(SOBJS)
please use $(ARFLAGS) instead of 'crv'
board/r0p7785lc0011rl/Makefile line 34
Quoted 6 lines
board/r0p7785lc0011rl/Makefile new file +6
-0+ +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend
pelase add the $(obj)
Quoted 28 lines
board/r0p7785lc0011rl/rtl8169.h new file +28
-0+ +######################################################################### + +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) +$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ + +-include .depend + +* MA 02111-1307 USA +*/ + +#define PCIREG_8 (_adr) (*(volatile unsigned char *)(_adr)) +#define PCIREG_32 (_adr) (*(volatile unsigned long *)(_adr)) +#define PCI_PAR PCIREG_32(0xfe0401c0) +#define PCI_PDR PCIREG_32(0xfe040220) +#define PCI_CR PCIREG_32(0xfe040100) +#define PCI_CONF1 PCIREG_32(0xfe040004) + +#define EEPROM_ADD 0x00000050 +#define HIGH 1 +#define LOW 0 + +#define PCI_PROG 0x80 + +#define PCI_EEP_ADDRESS (unsigned short)0x0007 +#define PCI_MAC_ADDRESS_SIZE 3 + +#define TIME1 100
board/r0p7785lc0011rl/rtl8169.h line 46
Quoted 10 lines
board/r0p7785lc0011rl/rtl8169.h new file +9
-0+#define TIME2 20000 +#define BIT_DUMMY 0 +#define MAC_EEP_READ 1 +#define MAC_EEP_WRITE 2 +#define MAC_EEP_ERACE 3 +#define MAC_EEP_EWEN 4 +#define MAC_EEP_EWDS 5 + +#define DEBUG 0
Please remove
Could you add few comment about the data?
Quoted 59 lines
(quoted diff) +58
-0+ +/* RTL8169 */ +const unsigned short EEPROM_W_Data_8169_A[] = { + 0x8129, 0x10ec, 0x8169, 0x1154, 0x032b, + 0x4020, 0xa101 +}; +const unsigned short EEPROM_W_Data_8169_B[] = { + 0x4d15, 0xf7c2, 0x8000, 0x0000, 0x0000, 0x1300, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + + +int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int i; + unsigned char mac[6]; + char *s, *e; + + if (argc != 2) { + printf("Usage:\n%s\n", cmdtp->usage); + return 1; + } + + s = argv[1]; + + for (i = 0; i < 6; i++) { + mac[i] = s ? simple_strtoul(s, &e, 16) : 0; + if (s) + s = (*e) ? e + 1 : e; + } + mac_write(mac); + + return 0; +} + +U_BOOT_CMD( + setmac, 2, 1, do_set_mac, + "setmac - write MAC address for RTL8110SCL\n", + "\n" + "setmac <mac address> - write MAC address for RTL8110SCL\n" +); + +int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int i; + uchar mac[6]; + + if (argc != 1) { + printf("Usage:\n%s\n", cmdtp->usage); + return 1; + } + + mac_read();
Review
Quoted 10 lines
(quoted diff) +10
-0+ + return 0; +} + +U_BOOT_CMD( + printmac, 1, 1, do_print_mac, + "printmac - print MAC address for RTL8110\n", + "\n" + " - print MAC address for RTL8110\n" +);
Could you add a README for this board and describe its specific command?
Quoted 7 lines
board/r0p7785lc0011rl/selfcheck.c new file +7
-0+ + +U_BOOT_CMD ( + hwtest,2 ,1 , do_hw_test, +"hwtest - hardware test for R0P7785LC0011RL board\n" , +"\n" + "hwtest all - test all hardware\n"
board/r0p7785lc0011rl/selfcheck.c line 195
Quoted 10 lines
board/r0p7785lc0011rl/selfcheck.c new file +10
-0+"hwtest pld - output pld version\n" +"hwtest led - test LED\n" +"hwtest dipsw - test DIPSW\n" +"hwtest sm107 - output SM107 version\n" +"hwtest usb - test R8A66597\n" +"hwtest i2c - output PCA9564 version\n" +"hwtest net - compare RTL8110 ID\n" +"hwtest sata - compare SiI3512 ID\n" +"hwtest pci - output PCI slot device ID\n" +);
idem
Quoted 1 line
+
+
include/configs/r0p7785lc0011rl.h line 58
Quoted 4 lines
include/configs/r0p7785lc0011rl.h new file +4
-0+#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.10.100 +#define CONFIG_SERVERIP 192.168.10.77 +#define CONFIG_GATEWAYIP 192.168.10.77
please remove this 4 defines
include/configs/r0p7785lc0011rl.h line 144
Quoted 3 lines
include/configs/r0p7785lc0011rl.h new file +3
-0+ +#define __io +#define __mem_pci
is it really the good place to define it??
include/configs/r0p7785lc0011rl.h line 149
Quoted 5 lines
include/configs/r0p7785lc0011rl.h new file +5
-0+ +#define CONFIG_PCI_MEM_BUS 0xFD000000/* Memory space base addr */ +#define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS +#define CONFIG_PCI_MEM_SIZE 0x01000000/* Size of Memory window */ +
Best Regards,
J.
PATCH 1/1 sh: Renesas R0P7785LC0011RL board support
Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
board/r0p7785lc0011rl/Makefile line 28
Quoted 9 lines
board/r0p7785lc0011rl/Makefile new file +9
-0+include $(TOPDIR)/config.mk + +LIB = lib$(BOARD).a + +COBJS := r0p7785lc0011rl.o selfcheck.o rtl8169_mac.o +SOBJS := lowlevel_init.o + +$(LIB): $(COBJS) $(SOBJS) + $(AR) crv $@ $(COBJS) $(SOBJS)please use $(ARFLAGS) instead of 'crv'
I will fix it.
Quoted 7 lines
board/r0p7785lc0011rl/Makefile line 34
Quoted 6 lines
board/r0p7785lc0011rl/Makefile new file +6
-0+ +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .dependpelase add the $(obj)
I will fix it, too.
Quoted 30 lines
Quoted 29 lines
board/r0p7785lc0011rl/rtl8169.h new file +29
-0+ +######################################################################### + +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) +$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ + +-include .depend + +* MA 02111-1307 USA +*/ + +#define PCIREG_8 (_adr) (*(volatile unsigned char *)(_adr)) +#define PCIREG_32 (_adr) (*(volatile unsigned long *)(_adr)) +#define PCI_PAR PCIREG_32(0xfe0401c0) +#define PCI_PDR PCIREG_32(0xfe040220) +#define PCI_CR PCIREG_32(0xfe040100) +#define PCI_CONF1 PCIREG_32(0xfe040004) + +#define EEPROM_ADD 0x00000050 +#define HIGH 1 +#define LOW 0 + +#define PCI_PROG 0x80 + +#define PCI_EEP_ADDRESS (unsigned short)0x0007 +#define PCI_MAC_ADDRESS_SIZE 3 + +#define TIME1 100 +#define TIME2 20000
Quoted 9 lines
board/r0p7785lc0011rl/rtl8169.h line 46
Quoted 8 lines
board/r0p7785lc0011rl/rtl8169.h new file +8
-0+#define BIT_DUMMY 0 +#define MAC_EEP_READ 1 +#define MAC_EEP_WRITE 2 +#define MAC_EEP_ERACE 3 +#define MAC_EEP_EWEN 4 +#define MAC_EEP_EWDS 5 + +#define DEBUG 0Please remove
I will remove DEBUG.
Quoted 1 line
Could you add few comment about the data?
I'm sorry. I cannot add comment, because I don't know detail of the data.
Quoted 62 lines
Quoted 62 lines
(quoted diff) +61
-0+ +/* RTL8169 */ +const unsigned short EEPROM_W_Data_8169_A[] = { + 0x8129, 0x10ec, 0x8169, 0x1154, 0x032b, + 0x4020, 0xa101 +}; +const unsigned short EEPROM_W_Data_8169_B[] = { + 0x4d15, 0xf7c2, 0x8000, 0x0000, 0x0000, 0x1300, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + + +int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int i; + unsigned char mac[6]; + char *s, *e; + + if (argc != 2) { + printf("Usage:\n%s\n", cmdtp->usage); + return 1; + } + + s = argv[1]; + + for (i = 0; i < 6; i++) { + mac[i] = s ? simple_strtoul(s, &e, 16) : 0; + if (s) + s = (*e) ? e + 1 : e; + } + mac_write(mac); + + return 0; +} + +U_BOOT_CMD( + setmac, 2, 1, do_set_mac, + "setmac - write MAC address for RTL8110SCL\n", + "\n" + "setmac <mac address> - write MAC address for RTL8110SCL\n" +); + +int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int i; + uchar mac[6]; + + if (argc != 1) { + printf("Usage:\n%s\n", cmdtp->usage); + return 1; + } + + mac_read(); + + return 0; +}
Quoted 8 lines
board/r0p7785lc0011rl/rtl8169_mac.c line 353
Quoted 7 lines
board/r0p7785lc0011rl/rtl8169_mac.c new file +7
-0+ +U_BOOT_CMD ( + printmac,1 ,1 , do_print_mac, +"printmac - print MAC address for RTL8110\n" , +"\n" +" - print MAC address for RTL8110\n" +);Could you add a README for this board and describe its specific command?
Yes, I will add a README.
Quoted 18 lines
Quoted 7 lines
board/r0p7785lc0011rl/selfcheck.c new file +7
-0+ + +U_BOOT_CMD ( + hwtest,2 ,1 , do_hw_test, +"hwtest - hardware test for R0P7785LC0011RL board\n" , +"\n" + "hwtest all - test all hardware\n"board/r0p7785lc0011rl/selfcheck.c line 195
Quoted 10 lines
board/r0p7785lc0011rl/selfcheck.c new file +10
-0+"hwtest pld - output pld version\n" +"hwtest led - test LED\n" +"hwtest dipsw - test DIPSW\n" +"hwtest sm107 - output SM107 version\n" +"hwtest usb - test R8A66597\n" +"hwtest i2c - output PCA9564 version\n" +"hwtest net - compare RTL8110 ID\n" +"hwtest sata - compare SiI3512 ID\n" +"hwtest pci - output PCI slot device ID\n" +);idem
Quoted 7 lines
Quoted 1 line
+
+
include/configs/r0p7785lc0011rl.h line 58
Quoted 4 lines
include/configs/r0p7785lc0011rl.h new file +4
-0+#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.10.100 +#define CONFIG_SERVERIP 192.168.10.77 +#define CONFIG_GATEWAYIP 192.168.10.77please remove this 4 defines
OK. I will remove it.
Quoted 4 lines
include/configs/r0p7785lc0011rl.h line 144
Quoted 3 lines
include/configs/r0p7785lc0011rl.h new file +3
-0+ +#define __io +#define __mem_pciis it really the good place to define it??
I will remove it, Because It is unnecessary.
Quoted 5 lines
include/configs/r0p7785lc0011rl.h line 149
Quoted 5 lines
include/configs/r0p7785lc0011rl.h new file +5
-0+ +#define CONFIG_PCI_MEM_BUS 0xFD000000/* Memory space base addr */ +#define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS +#define CONFIG_PCI_MEM_SIZE 0x01000000/* Size of Memory window */ +
Best Regards,
Yoshihiro Shimoda
PATCH 1/1 sh: Renesas R0P7785LC0011RL board support
In reply to Yoshihiro ShimodaQuoted 10 lines · On Wed, 09 Jul 2008 21:07:47 +0900 Yoshihiro Shimoda…
This board has SH7785, 512MB DDR2-SDRAM, NOR Flash, Graphic controller, Ethernet, USB, SD, and RTC.
This patch supports the following functions:
- 128MB DDR2-SDRAM (29-bit address mode only)
- NOR Flash
- USB host
- EthernetSigned-off-by Yoshihiro Shimoda <[email protected]>
Quoted 13 lines
--- MAINTAINERS | 1 + MAKEALL | 1 + Makefile | 5 + board/r0p7785lc0011rl/Makefile | 43 ++++ board/r0p7785lc0011rl/config.mk | 26 +++ board/r0p7785lc0011rl/lowlevel_init.S | 318 +++++++++++++++++++++++++++ board/r0p7785lc0011rl/r0p7785lc0011rl.c | 51 +++++ board/r0p7785lc0011rl/rtl8169.h | 62 ++++++ board/r0p7785lc0011rl/rtl8169_mac.c | 354 +++++++++++++++++++++++++++++++ board/r0p7785lc0011rl/selfcheck.c | 196 +++++++++++++++++ board/r0p7785lc0011rl/u-boot.lds | 97 +++++++++ include/configs/r0p7785lc0011rl.h | 173 +++++++++++++++
Can this be renamed something simpler, like sh7785rdp or something?
Kim
PATCH 1/1 sh: Renesas R0P7785LC0011RL board support
Quoted 27 lines · Kim Phillips
Quoted 10 lines · On Wed, 09 Jul 2008 21:07:47 +0900 Yoshihiro Shimoda…
This board has SH7785, 512MB DDR2-SDRAM, NOR Flash, Graphic controller, Ethernet, USB, SD, and RTC.
This patch supports the following functions:
- 128MB DDR2-SDRAM (29-bit address mode only)
- NOR Flash
- USB host
- EthernetSigned-off-by Yoshihiro Shimoda <[email protected]>Quoted 13 lines
--- MAINTAINERS | 1 + MAKEALL | 1 + Makefile | 5 + board/r0p7785lc0011rl/Makefile | 43 ++++ board/r0p7785lc0011rl/config.mk | 26 +++ board/r0p7785lc0011rl/lowlevel_init.S | 318 +++++++++++++++++++++++++++ board/r0p7785lc0011rl/r0p7785lc0011rl.c | 51 +++++ board/r0p7785lc0011rl/rtl8169.h | 62 ++++++ board/r0p7785lc0011rl/rtl8169_mac.c | 354 +++++++++++++++++++++++++++++++ board/r0p7785lc0011rl/selfcheck.c | 196 +++++++++++++++++ board/r0p7785lc0011rl/u-boot.lds | 97 +++++++++ include/configs/r0p7785lc0011rl.h | 173 +++++++++++++++
Quoted 1 line
Can this be renamed something simpler, like sh7785rdp or something?
Thank you for your comment.
Yes, I will rename the file "sh7785lcr".
Best Regards,
Yoshihiro Shimoda