On 19:09 Wed 16 Jul     , Yoshihiro Shimoda wrote:
> This board has SH7785, 512MB DDR2-SDRAM, NOR Flash,
> Graphic, Ethernet, USB, SD, RTC, and I2C controller.
> 
> This patch supports the following functions:
>  - 128MB DDR2-SDRAM (29-bit address mode only)
>  - NOR Flash
>  - USB host
>  - Ethernet
> 
> Signed-off-by: Yoshihiro Shimoda <[EMAIL PROTECTED]>
> ---
> 
> PATCH v2 :
>  - fix the Makefile.
>  - remove unnecessary #define.
>  - add README for this board.
>  - change the directory name from r0p7785lc0011rl to sh7785lcr.
>  - fix compile warning in rtl8169_mac.c and selfcheck.c.
> 
>  MAINTAINERS                     |    1 +
>  MAKEALL                         |    1 +
>  Makefile                        |    5 +
>  board/sh7785lcr/Makefile        |   42 +++++
>  board/sh7785lcr/config.mk       |   26 +++
>  board/sh7785lcr/lowlevel_init.S |  318 +++++++++++++++++++++++++++++++++++
>  board/sh7785lcr/rtl8169.h       |   58 +++++++
>  board/sh7785lcr/rtl8169_mac.c   |  349 
> +++++++++++++++++++++++++++++++++++++++
>  board/sh7785lcr/selfcheck.c     |  173 +++++++++++++++++++
>  board/sh7785lcr/sh7785lcr.c     |   51 ++++++
>  board/sh7785lcr/u-boot.lds      |   97 +++++++++++
>  doc/README.sh7785lcr            |   83 +++++++++
>  include/configs/sh7785lcr.h     |  167 +++++++++++++++++++
>  13 files changed, 1371 insertions(+), 0 deletions(-)
>  create mode 100644 board/sh7785lcr/Makefile
>  create mode 100644 board/sh7785lcr/config.mk
>  create mode 100644 board/sh7785lcr/lowlevel_init.S
>  create mode 100644 board/sh7785lcr/rtl8169.h
>  create mode 100644 board/sh7785lcr/rtl8169_mac.c
>  create mode 100644 board/sh7785lcr/selfcheck.c
>  create mode 100644 board/sh7785lcr/sh7785lcr.c
>  create mode 100644 board/sh7785lcr/u-boot.lds
>  create mode 100644 doc/README.sh7785lcr
>  create mode 100644 include/configs/sh7785lcr.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a3d70b1..b6f7002 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -731,6 +731,7 @@ Mark Jonas <[EMAIL PROTECTED]>
>  Yoshihiro Shimoda <[EMAIL PROTECTED]>
> 
>       MS7720SE                SH7720
> +     R0P77850011RL           SH7785
> 
>  Yusuke Goda <[EMAIL PROTECTED]>
> 
> diff --git a/MAKEALL b/MAKEALL
> index 9f80b3d..a37b503 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -753,6 +753,7 @@ LIST_sh4="                \
>       r7780mp         \
>       r2dplus         \
>       sh7763rdp       \
> +     sh7785lcr       \
>  "
> 
>  LIST_sh="            \
> diff --git a/Makefile b/Makefile
> index ac3f98f..648a032 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2955,6 +2955,11 @@ sh7763rdp_config  :   unconfig
>       @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h
>       @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp
> 
> +sh7785lcr_config  :   unconfig
> +     @ >include/config.h
> +     @echo "#define CONFIG_SH7785LCR 1" >> include/config.h
> +     @./mkconfig -a $(@:_config=) sh sh4 sh7785lcr
please use $(MKCONFIG)

btw why not create renesas vendor dir
> +
>  #========================================================================
>  # SPARC
>  #========================================================================
> diff --git a/board/sh7785lcr/Makefile b/board/sh7785lcr/Makefile
> new file mode 100644
> index 0000000..e948ba1
> --- /dev/null
> +++ b/board/sh7785lcr/Makefile
> @@ -0,0 +1,42 @@
> +#
> +# Copyright (C) 2008  Yoshihiro Shimoda <[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
> +
> +include $(TOPDIR)/config.mk
> +
> +LIB  = lib$(BOARD).a
> +
> +COBJS        := sh7785lcr.o selfcheck.o rtl8169_mac.o
> +SOBJS        := lowlevel_init.o
> +
> +$(LIB):      $(COBJS) $(SOBJS)
> +     $(AR) $(ARFLAGS) $@ $(COBJS) $(SOBJS)
please add $(obj).depend in LIB dependancy
> +
> +clean:
> +     rm -f $(SOBJS) $(OBJS)
> +
> +distclean:   clean
> +     rm -f $(LIB) core *.bak $(obj).depend
> +
> +#########################################################################
> +
> +.depend:     Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
> +             $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
> +
> +-include .depend
please replace with

# defines $(obj).depend target
include $(SRCTREE)/rules.mk

sinclude $(obj).depend

> +
> +#########################################################################
> +             MacBitDtSet(1);
> +             MacBitDtSet(0);
> +             MacBitDtSet(0);
> +             break;
> +     case MAC_EEP_EWDS:
> +             MacBitDtSet(1);
> +             MacBitDtSet(0);
> +             MacBitDtSet(0);
> +             break;
> +     default:
> +             break;
> +     }
> +}
> +
> +static inline unsigned short MacEpGetDt(void)
IMHO please do not use Upper case in function name
> +{
> +     unsigned short data = 0;
> +     int i;
> +
> +     MacBitDtGet();                  /* DUMMY */
> +     for (i = 0 ; i < 16 ; i++) {
> +             data <<= 1;
> +             data |= MacBitDtGet();
> +     }
> +     return data;
> +}
> +
> +static inline void MacEpSetAdd(unsigned short address)
IMHO please do not use Upper case in function name
> +{
> +     MacBitDtSet(address & 0x0020);    /* A5 */
                                      ^^^^
> +     MacBitDtSet(address & 0x0010);    /* A4 */
                                      ^^^^
> +     MacBitDtSet(address & 0x0008);    /* A3 */
                                      ^^^^
> +     MacBitDtSet(address & 0x0004);    /* A2 */
                                      ^^^^
> +     MacBitDtSet(address & 0x0002);    /* A1 */
                                      ^^^^
> +     MacBitDtSet(address & 0x0001);    /* A0 */
                                      ^^^^
whitespace
> +}
> +     PROVIDE (_egot = .);
> +
> +     PROVIDE (__u_boot_cmd_start = .);
> +     .u_boot_cmd :
> +     {
> +             *(.u_boot_cmd)
> +             . = ALIGN(4);
> +     }
> +     PROVIDE (__u_boot_cmd_end = .);
> +
> +     PROVIDE (reloc_dst_end = .);
> +     /* _reloc_dst_end = .; */
if no need please remove
> +
> +     PROVIDE (bss_start = .);
> +     PROVIDE (__bss_start = .);
> +     .bss :
> +     {
> +             *(.bss)
> +             . = ALIGN(4);
> +     }
> +     PROVIDE (bss_end = .);
> +
> +     PROVIDE (_end = .);
> +}
> +
> diff --git a/doc/README.sh7785lcr b/doc/README.sh7785lcr
> +
> +#define CONFIG_BAUDRATE              115200
> +#define CONFIG_BOOTDELAY     3
> +#define CONFIG_BOOTARGS              "console=ttySC1,115200 root=/dev/nfs 
> ip=dhcp"
> +
> +#define CONFIG_EXTRA_ENV_SETTINGS                                    \
> +     "bootdevice=0:1\0"                                              \
> +     "usbload=usb reset;usbboot;usb stop;bootm\0"
> +
> +#define CONFIG_VERSION_VARIABLE
> +#undef  CONFIG_SHOW_BOOT_PROGRESS
         ^^
whitespace
> +
> +/* MEMORY */
> +#define SH7785LCR_SDRAM_BASE         (0x08000000)
> +#define SH7785LCR_SDRAM_SIZE         (128 * 1024 * 1024)
> +#define SH7785LCR_FLASH_BASE_1               (0xa0000000)
> +#define SH7785LCR_FLASH_BANK_SIZE    (64 * 1024 * 1024)
> +#define SH7785LCR_USB_BASE           (0xb4000000)
> +
> +#define CFG_LONGHELP
> +#define CFG_PROMPT           "=> "
> +#define CFG_CBSIZE           256
> +#define CFG_PBSIZE           256
> +#define CFG_MAXARGS          16
> +#define CFG_BARGSIZE         512
> +#define CFG_BAUDRATE_TABLE   { 115200 }
> +
> +/* SCIF */
> +#define CFG_SCIF_CONSOLE     1
> +#define CONFIG_CONS_SCIF1    1
> +#define CONFIG_SCIF_EXT_CLOCK        1
> +#undef  CFG_CONSOLE_INFO_QUIET
         ^^
> +#undef  CFG_CONSOLE_OVERWRITE_ROUTINE
         ^^
> +#undef  CFG_CONSOLE_ENV_OVERWRITE
         ^^
whitespace
> +
> +
> +#define CFG_MEMTEST_START    (SH7785LCR_SDRAM_BASE)
> +#define CFG_MEMTEST_END              (CFG_MEMTEST_START + \
> +                                     (SH7785LCR_SDRAM_SIZE) - \
> +                                      4 * 1024 * 1024)
> +#undef  CFG_ALT_MEMTEST
         ^^
> +#undef  CFG_MEMTEST_SCRATCH
         ^^
> +#undef  CFG_LOADS_BAUD_CHANGE
         ^^
whitespace
> +
> +#define CFG_SDRAM_BASE       (SH7785LCR_SDRAM_BASE)
> +#define CFG_SDRAM_SIZE       (SH7785LCR_SDRAM_SIZE)
> +#define CFG_LOAD_ADDR        (CFG_SDRAM_BASE + 16 * 1024 * 1024)
> +
> +#define CFG_MONITOR_BASE     (SH7785LCR_FLASH_BASE_1)
> +#define CFG_MONITOR_LEN              (512 * 1024)
> +#define CFG_MALLOC_LEN               (512 * 1024)
> +#define CFG_GBL_DATA_SIZE    (256)
> +#define CFG_BOOTMAPSZ                (8 * 1024 * 1024)
> +
> +/* FLASH */
> +#define CFG_FLASH_CFI
> +#define CFG_FLASH_CFI_DRIVER
> +#undef  CFG_FLASH_QUIET_TEST
         ^^
whitespace
> +#define CFG_FLASH_EMPTY_INFO
> +#define CFG_FLASH_BASE               (SH7785LCR_FLASH_BASE_1)
> +#define CFG_MAX_FLASH_SECT   512
> +
> +#define CFG_MAX_FLASH_BANKS  1
> +#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE + \
> +                              (0 * SH7785LCR_FLASH_BANK_SIZE) }
> +
> +#define CFG_FLASH_ERASE_TOUT (3 * 1000)
> +#define CFG_FLASH_WRITE_TOUT (3 * 1000)
> +#define CFG_FLASH_LOCK_TOUT  (3 * 1000)
> +#define CFG_FLASH_UNLOCK_TOUT        (3 * 1000)
> +
> +#undef  CFG_FLASH_PROTECTION
         ^^
whitespace
> +#undef  CFG_DIRECT_FLASH_TFTP
         ^^
whitespace
> +
> +/* R8A66597 */
> +#define LITTLEENDIAN                 /* for include/usb.h */
> +#define CONFIG_USB_R8A66597_HCD
> +#define CONFIG_R8A66597_BASE_ADDR    SH7785LCR_USB_BASE
> +#define CONFIG_R8A66597_XTAL         0x0000  /* 12MHz */
> +#define CONFIG_R8A66597_LDRV         0x8000  /* 3.3V */
> +#define CONFIG_R8A66597_ENDIAN               0x0000  /* little */

Best Regards,
J.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to