Re: [U-Boot-Users] [PATCH] add board_eth_init() for sh7785lcr board

2008-09-10 Thread Nobuhiro Iwamatsu
On Tue, 09 Sep 2008 17:52:47 +0900
Yoshihiro Shimoda [EMAIL PROTECTED] wrote:

 Fix the problem that cannot work RTL8169 on sh7785lcr board.
 
 Signed-off-by: Yoshihiro Shimoda [EMAIL PROTECTED]
 ---
  board/sh7785lcr/sh7785lcr.c |5 +
  1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
I put testing branch.

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] sh: Renesas R0P7785LC0011RL board support

2008-08-31 Thread Nobuhiro Iwamatsu
Hi, 

Thank you for comments.

I apply your comments and I sent patch.

On Sat, 30 Aug 2008 13:40:40 +0200
Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED] wrote:

snip

  
  +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
Yes, I think too. 
I will correspond by the upcoming version. 

snip

  +/* R8A66597 */
  +#define LITTLEENDIAN   /* for include/usb.h */
  +#define CONFIG_USB_R8A66597_HCD
  +#define CONFIG_R8A66597_BASE_ADDR  SH7785LCR_USB_BASE
  +#define CONFIG_R8A66597_XTAL   0x  /* 12MHz */
  +#define CONFIG_R8A66597_LDRV   0x8000  /* 3.3V */
  +#define CONFIG_R8A66597_ENDIAN 0x  /* little */
 
 Best Regards,

Thanks!

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc

2008-08-08 Thread Nobuhiro Iwamatsu
Hi, all.

Please pickup this RFC/patch.

Best regards,
 Nobuhiro

2008/6/30 Nobuhiro Iwamatsu [EMAIL PROTECTED]:
 Hi, all.

 Could comment about this patch.

 Best regards,
  Nobuhiro

 Nobuhiro Iwamatsu wrote:
 A source code of pci is written mainly on powerpc.
 Macro uses a pci source code of powerpc because other architecture
 (ex. SuperH) doesn't work.

 I made asm-ppc/pci.h and moved macro of pci.
 Other archtecture need to make the following macro in asm-xxx/pci.h
  #define pci_phys_to_mem(dev, addr)  (addr)
  #define pci_mem_to_phys(dev, addr)  (addr)
  #define pci_phys_to_io(dev, addr)   (addr)
  #define pci_io_to_phys(dev, addr)   (addr)

 Or have to make a function for pci address conversion.
 However, I want comment because I do not know the other architecture.

 Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit

2008-08-08 Thread Nobuhiro Iwamatsu
Hello,

2008/8/8 thaoth [EMAIL PROTECTED]:


 I have questions about uboot below:
 1. Reallocating address of u-boot in booting process.
 At the booting process, the address 0x8000 is executed. This is memory
 mapping address of Flash memory. and executable code of T-Monitor will be
 executed.

 (1) ROM area memory map
 In ROM, 8M byte(0x8000-0x807F)of area is implemented.
 Memory map of ROM area is shown as below.

 0x8000 +---+
|  T-Monitor code   |
|- - - - - - - - - - - - - - - -|
|   |
 0x8001 +---+
|ROM Information|
 0x80010080 +---+
|System configuration info  |
| (SYSCONF / DEVCONF)   |
|- - - - - - - - - - - - - - - -|
|   |
 0x8002 +---+
|   T-Kernel code   |
|   |
+---+
|   |
| User area |
|   |
 0x8080 +---+

 UBoot code will reflash into Flash memory at 0x8000 address. This is
 Flash Memory just readonly. Will UBoot reallocating (loading) binary code
 into SDRAM at TEXT_BASE address. In T-Engine/Sh7727, this address will be
 0x8DFC (Beginning address of SDRAM is 0x8C00). Does UBoot
 automatically reload this code into TEXT_BASE address?

Yes, U-Boot designed working on SDRAM.
In cpu/sh3/start.S, code of U-boot is copied from a flash bulb by memory and
jump in memory.
Because implementation of original U-boot comes to work as for this on memory,
I match the SuperH with this implementation.


 Because Boot starting address will begin at Flash memory (0x8000) and
 T-Monitor (current boot loader) worked at this address. I don't know how
 about UBoot. Does it reload Uboot into SDRAM (TEXT BASE) and run?

 2. This is a great site for working SH with Linux.
 http://www.superh-linux.org/platforms/index.html
 Based on Reference board board/ms7720se, I changed the UBoot configuration
 for T-Engine/SH7727 MS7727CP02 Kit.

 Many thanks to authors for your efforts
 # Nobuhiro Iwamatsu [EMAIL PROTECTED]
 # Yoshihiro Shimoda [EMAIL PROTECTED]

 I got a toolchain at
 http://www.superh-linux.org/archive/bsp/sh7721_se/toolchain_sh3_gcc4.2.tar.gz
 It supported elf32-sh-linux target.
 And I also got toolchain from T-Engine forum and it support
 elf32-sh-tkernel target.

 I don't know UBoot built with toolchain from http://www.superh-linux.org can
 work on T-Engine platform or not?
Sorry , I dont know it.
The tool chain of http://www.superh-linux.org tests only elf32-sh-linux.


 3. Debugging tool for U-Boot development.
 Please tell me how to debug UBoot can work on board. Could you tell me
 debugger tool for this purpose? Now I can reflash UBoot into Flash Memory
 but I don't know how to check UBoot can work on it. Because porting have
 others issues such as serial library, interrupt

 Could you recommend a tool can check it can work?
 Sorry for stupid question.
A developer has many cases to debug with ICE.
When there is not ICE, We write in it at SDRAM with monitor and debug
it on SDRAM.


 4. Serial driver for UBoot on T-Engine/SH7727 board.
 After make sure these configuration are correct setting (SDRAM adress, Flash
 Memory). Next step is serial porting for UBoot.

 I think serial is basic peripheral and It can work with a small changes. But
 Maybe I am wrong. Could you recommend the steps I could work on for serial
 porting of UBoot?

 T-Engine has a serial library. I don't know how can reuse this library or
 not? :(


There is two approach.
1. You delete content of Flash, and it is the method that only U-Boot uses.
   When you use this method, you come to need ICE.
   But this is very simple.

2. You call U-boot like an application from T-monitor, and to use.
   When you use this method, you will not need ICE.
   But you need Implementation serial function used T-monitor's library.


I will ask a specialist in T-engine an opinion.
I will send e-mail it if there is some information.

Many Japanese companies become the long vacation from tomorrow.
Because I am a holiday, an answer is not possible for approximately 2
weeks.

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu

-
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=100url

[U-Boot-Users] Pull request: u-boot-sh (for 1.3.4)

2008-08-08 Thread Nobuhiro Iwamatsu
Dear Wolfgang,

The following changes since commit 81091f58f0c58ecd26c5b05de2ae20ca6cdb521c:
  Jean-Christophe PLAGNIOL-VILLARD (1):
drivers/serial: Move conditional compilation to Makefile for CONFIG_* 
macros

are available in the git repository at:

  git://git.denx.de/u-boot-sh.git master

Nobuhiro Iwamatsu (1):
  sh: Update sh7763rdp config

 include/configs/sh7763rdp.h |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

Best regards,
 Nobuhiro

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit

2008-08-07 Thread Nobuhiro Iwamatsu
Hi, thaoth .

2008/8/7 thaoth [EMAIL PROTECTED]:

 Here is configuration of UBoot
 \board\ms7727se\config.mk :TEXT_BASE = 0x8DFC
 \board\ms7727se\u-boot.lds

 OUTPUT_FORMAT(elf32-sh-tkernel, elf32-sh-tkernel, elf32-sh-tkernel)
 SECTIONS
 {
. = 0x8C00 + (32*1024*1024) - (256*1024);

 \include\configs\ms7727se.h
 /* MEMORY */
 #define MS7720SE_SDRAM_BASE 0x8C00
 #define MS7720SE_FLASH_BASE_1   0x8000 //0xA000
 #define MS7720SE_FLASH_BANK_SIZE(8 * 1024 * 1024)

 #define CFG_MEMTEST_START   MS7720SE_SDRAM_BASE
 #define CFG_MEMTEST_END (CFG_MEMTEST_START + (60 * 1024 * 1024))

 #define CFG_SDRAM_BASE  MS7720SE_SDRAM_BASE
 #define CFG_SDRAM_SIZE  (32 * 1024 * 1024)

 #define CFG_LOAD_ADDR   (CFG_SDRAM_BASE + 32 * 1024 * 1024)
 #define CFG_MONITOR_BASEMS7720SE_FLASH_BASE_1
 #define CFG_MONITOR_LEN (128 * 1024)
 #define CFG_MALLOC_LEN  (256 * 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
 #define CFG_FLASH_EMPTY_INFO/* print 'E' for empty sector on flinfo */

 #define CFG_FLASH_BASE  MS7720SE_FLASH_BASE_1



 Would you please help me have a look this setting?
 1. Is this setting correct ? I am confusing about TEXT_BASE with
 CFG_LOAD_ADDR. Here is definition
 - CFG_FLASH_BASE:
Physical start address of Flash memory.

 - CFG_MONITOR_BASE:
Physical start address of boot monitor code (set by
make config files to be same as the text base address
(TEXT_BASE) used when linking) - same as
CFG_FLASH_BASE when booting from flash.

Yes, you are right.
If you use *make config_xx ; make* , you can make an u-boot.srec file starting
from the memory (May be address is 0x8DFC000).

I think that you know it, T-engine has a monitor program.
The T-engine user uses this monitor program and writes in it at a flash bulb.
However, as for this program, only a SREC file is usable.

If you want make SREC file to Flash, you need to use objcopy command.
shX-linux-objcopy -Ibinary -Osrec u-boot.bin u-boot.flash.srec
Please check doc/README.sh.


 If I am wrong, please tell me how to correct these setting.

 2. ld T-Engine toolchain only supports elf32-sh-tkernel target, but
 reference implementation (example) tell elf32-sh-linux is expected target.
 Is the setting correct?

 \board\ms7727se\u-boot.lds
 Original :
 OUTPUT_FORMAT(elf32-sh-linux, elf32-sh-linux, elf32-sh-linux)
 - My changes
 OUTPUT_FORMAT(elf32-sh-tkernel, elf32-sh-tkernel, elf32-sh-tkernel)

Hmmm, I have not used the tool-chain for t-kernel.
However, as for me, there is an acquaintance using t-kernel.
I can ask him. And, I will reply about this matter.



 I am newbie in embedded system. I am appreciating your helping.
 Thank you a lot.

I think that I want to support t-kernel and other OS to U-boot-sh.
I cooperate with you.

Best regards,
 Nobuhiro

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] sh: Renesas R0P7785LC0011RL board support

2008-07-29 Thread Nobuhiro Iwamatsu
2008/7/16 Yoshihiro Shimoda [EMAIL PROTECTED]:
 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]
Applied, thanks.
I puts in next release queue.

Best regards,
 Nobuhiro

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] USB u-boot on ST 7100

2008-07-22 Thread Nobuhiro Iwamatsu
Hi,

2008/7/19 Rodrigo Valentino [EMAIL PROTECTED]:
 Hi Folks,

 I'm working on a device from ST Micro Eletronics model ST7100, and i'm
 looking for a way to improve redirect output console to device ttyUSB,
 because the serial output


I suppose that you use U-Boot which STMicro releases.
You had better ask STMicro about these.

Best regards,
 Nobuhiro

--
Nobuhiro Iwamatsu

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Pull request: u-boot-sh

2008-07-14 Thread Nobuhiro Iwamatsu
The following changes since commit 348753d416cd2c9e7ec6520a544c8f33cf02a560:
  Kumar Gala (1):
Fix some more printf() format problems.

are available in the git repository at:

  git://git.denx.de/u-boot-sh.git master

Nobuhiro Iwamatsu (1):
  pci: sh: Add pci_skip_dev and pci_print_dev function

 drivers/pci/pci_sh4.c |   12 

-
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=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] pci: sh: Add pci_skip_dev and pci_print_dev function

2008-07-11 Thread Nobuhiro Iwamatsu
Add function of new PCI, pci_skip_dev and pci_print_dev.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/pci/pci_sh4.c |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pci_sh4.c b/drivers/pci/pci_sh4.c
index 1290c0a..057b6dd 100644
--- a/drivers/pci/pci_sh4.c
+++ b/drivers/pci/pci_sh4.c
@@ -74,3 +74,15 @@ int pci_sh4_init(struct pci_controller *hose)
hose-last_busno = pci_hose_scan(hose);
return 0;
 }
+
+int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
+{
+   return 0;
+}
+
+#ifdef CONFIG_PCI_SCAN_SHOW
+int pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
+{
+   return 1;
+}
+#endif /* CONFIG_PCI_SCAN_SHOW */
-- 
1.5.5.1


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] usb: add support for R8A66597 usb controller

2008-07-10 Thread Nobuhiro Iwamatsu
Hi, Wolfgang.

2008/7/11 Wolfgang Denk [EMAIL PROTECTED]:
 In message [EMAIL PROTECTED] you wrote:

  Can you not find some simpler name that r8a66597? That's a mess to
  type and to read.

 Thank you for your comment.

 I can change that struct r8a66597 for a simple name. For example,
 its name is struct r597. However, I do not want to change a source
 file name and CONFIG_ name, because R8A66597 is product name.

 Doesn't the board have an easy to spell and easy to remember nickname
 or so?

Unfortunately this tip does not have nicname and other.
We want to acquire a name same as Linux kernel USB driver..

Best regards,
 Nobuhiro

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: add support for SH7785

2008-07-09 Thread Nobuhiro Iwamatsu
2008/7/10 Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]:
 On 21:07 Wed 09 Jul , Yoshihiro Shimoda wrote:
 Renesas SH7785 has DDR2-SDRAM controller, PCI, and other.
 This patch supports CPU register's header file.

 Signed-off-by: Yoshihiro Shimoda [EMAIL PROTECTED]
 ---
  include/asm-sh/cpu_sh4.h|2 +
  include/asm-sh/cpu_sh7785.h |  156 
 +++
  2 files changed, 158 insertions(+), 0 deletions(-)
  create mode 100644 include/asm-sh/cpu_sh7785.h

 diff --git a/include/asm-sh/cpu_sh4.h b/include/asm-sh/cpu_sh4.h
 index 5a8a5a1..de6eb5a 100644
 --- a/include/asm-sh/cpu_sh4.h
 +++ b/include/asm-sh/cpu_sh4.h
 @@ -39,6 +39,8 @@
  # include asm/cpu_sh7763.h
  #elif defined (CONFIG_CPU_SH7780)
  # include asm/cpu_sh7780.h
 +#elif defined (CONFIG_CPU_SH7785)
 +# include asm/cpu_sh7785.h
  #else
  # error Unknown SH4 variant
  #endif
 diff --git a/include/asm-sh/cpu_sh7785.h b/include/asm-sh/cpu_sh7785.h
 new file mode 100644
 index 000..ec42bc6
 --- /dev/null
 +++ b/include/asm-sh/cpu_sh7785.h
 @@ -0,0 +1,156 @@
 +#ifndef  _ASM_CPU_SH7785_H_
 +#define  _ASM_CPU_SH7785_H_
 +
 +/*
 + * Copyright (c) 2007,2008 Nobuhiro Iwamatsu
 please add Nobuhiro Iwamatsu email if possible.
 + * Copyright (c) 2008 Yusuke Goda [EMAIL PROTECTED]
 + * Copyright (c) 2008 Yoshihiro Shimoda [EMAIL PROTECTED]
 + *

OK.
Shimoda-san, Please add email [EMAIL PROTECTED] and resend patch.

Best regards,
 Nobuhiro

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Release status - things to be done

2008-07-06 Thread Nobuhiro Iwamatsu
Hi, Wolfgang.

On Sun, 06 Jul 2008 01:05:40 +0200
Wolfgang Denk [EMAIL PROTECTED] wrote:

  3910  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 1/9] sh: Cleanup source 
 code of MS7720SE
  3911  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 2/9] sh: Cleanup source 
 code of MS7722SE
  3912  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 4/9] sh: Cleanup source 
 code of R2DPlus
  3913  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 3/9] sh: Cleanup source 
 code of R7780MP
  3914  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 5/9] sh: Cleanup source 
 code of SH7763RDP
  3915  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 6/9] sh: Update Hitachi 
 MS7722SE board
  3916  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 7/9] sh: Update Renesas 
 Migo-R board
  3917  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 8/9] sh: Update Renesas 
 R7780MP board
  3918  06/17 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH 9/9] sh: Update Renesas 
 R2DPlus board
   - for SH custodian
Already applied.
I plan to request-pull later.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Fix SH-boards compile error

2008-07-06 Thread Nobuhiro Iwamatsu
By Cleanup out-or-tree building for some boards (.depend)
(commit:c8a3b109f07f02342d097b30908965f7261d9f15)
because filse ware changed, some SH-boards have compile error.
I revised this problem.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAKEALL  |2 +-
 board/MigoR/Makefile |2 +-
 board/mpr2/Makefile  |2 +-
 board/ms7720se/Makefile  |2 +-
 board/ms7722se/Makefile  |2 +-
 board/ms7750se/Makefile  |2 +-
 board/r2dplus/Makefile   |2 +-
 board/r7780mp/Makefile   |2 +-
 board/sh7763rdp/Makefile |2 +-
 cpu/sh3/Makefile |2 +-
 cpu/sh4/Makefile |2 +-
 lib_sh/Makefile  |2 +-
 lib_sh/board.c   |4 +++-
 lib_sh/time.c|2 +-
 14 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 9f80b3d..e00bb9c 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -749,7 +749,7 @@ LIST_sh3=  \
 LIST_sh4= \
ms7750se\
ms7722se\
-   Migo-R  \
+   MigoR   \
r7780mp \
r2dplus \
sh7763rdp   \
diff --git a/board/MigoR/Makefile b/board/MigoR/Makefile
index bced511..661b59d 100644
--- a/board/MigoR/Makefile
+++ b/board/MigoR/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := migo_r.o
+COBJS  := migo_r.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/mpr2/Makefile b/board/mpr2/Makefile
index 080476b..9f8fb80 100644
--- a/board/mpr2/Makefile
+++ b/board/mpr2/Makefile
@@ -32,7 +32,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := mpr2.o
+COBJS  := mpr2.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/ms7720se/Makefile b/board/ms7720se/Makefile
index 545889f..18745ec 100644
--- a/board/ms7720se/Makefile
+++ b/board/ms7720se/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := ms7720se.o
+COBJS  := ms7720se.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/ms7722se/Makefile b/board/ms7722se/Makefile
index 744744e..b203b6d 100644
--- a/board/ms7722se/Makefile
+++ b/board/ms7722se/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := ms7722se.o
+COBJS  := ms7722se.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/ms7750se/Makefile b/board/ms7750se/Makefile
index d806101..01ddf69 100644
--- a/board/ms7750se/Makefile
+++ b/board/ms7750se/Makefile
@@ -21,7 +21,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := ms7750se.o
+COBJS  := ms7750se.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile
index 8529857..e96a8aa 100644
--- a/board/r2dplus/Makefile
+++ b/board/r2dplus/Makefile
@@ -21,7 +21,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := r2dplus.o
+COBJS  := r2dplus.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/r7780mp/Makefile b/board/r7780mp/Makefile
index 0ab6d1d..c100e7e 100644
--- a/board/r7780mp/Makefile
+++ b/board/r7780mp/Makefile
@@ -22,7 +22,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := r7780mp.o
+COBJS  := r7780mp.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile
index 8a04477..62a683d 100644
--- a/board/sh7763rdp/Makefile
+++ b/board/sh7763rdp/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk

 LIB= $(obj)lib$(BOARD).a

-OBJS   := sh7763rdp.o
+COBJS  := sh7763rdp.o
 SOBJS  := lowlevel_init.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/cpu/sh3/Makefile b/cpu/sh3/Makefile
index a7eb1e2..587413d 100644
--- a/cpu/sh3/Makefile
+++ b/cpu/sh3/Makefile
@@ -32,7 +32,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a

 SOBJS  = start.o
-OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o
+COBJS  = cpu.o interrupts.o watchdog.o time.o cache.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/cpu/sh4/Makefile b/cpu/sh4/Makefile
index e38e04f..d3c5eef 100644
--- a/cpu/sh4/Makefile
+++ b/cpu/sh4/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a

 SOBJS  = start.o
-OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o
+COBJS  = cpu.o interrupts.o watchdog.o time.o cache.o

 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/lib_sh/Makefile b/lib_sh/Makefile
index 0e4fdee..4034381 100644
--- a/lib_sh/Makefile
+++ b/lib_sh/Makefile
@@ -26,7 +26,7 @@ SOBJS-y   +=

 COBJS-y+= board.o
 COBJS-y+= bootm.o
-#COBJS-y   += time.o
+# COBJS-y  += time.o

 SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS

Re: [U-Boot-Users] Release status - things to be done

2008-07-06 Thread Nobuhiro Iwamatsu
Hi Ben.

2008/7/6 Ben Warren [EMAIL PROTECTED]:

  3645  06/11 Nobuhiro Iwamatsu  [U-Boot-Users] [PATCH v2] net: sh: Renesas
 SH7763 Ethernet device support
- for net custodian



 Didn't pick this up because it was after what I thought was the cut-off of
 6/10.  It still has issues, so I'll ask NobuHiro to re-submit.  Should it go
 in this release when OK?
 snip
II reflected your comment as this and contributed it again.
Could you apply this patch?

Best regards,
 Nobuhiro

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 1/3] sh: Add support SH2/SH2A which is CPU of Renesas Technology

2008-07-03 Thread Nobuhiro Iwamatsu
Add support SH2/SH2A basic function.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 cpu/sh2/Makefile   |   46 ++
 cpu/sh2/cache.c|  112 
 cpu/sh2/config.mk  |   29 +++
 cpu/sh2/cpu.c  |   98 ++
 cpu/sh2/interrupts.c   |   39 +++
 cpu/sh2/start.S|   84 +
 cpu/sh2/time.c |  111 +++
 cpu/sh2/watchdog.c |   33 +
 examples/Makefile  |3 +
 include/asm-sh/cpu_sh2.h   |   36 ++
 include/asm-sh/processor.h |5 ++-
 11 files changed, 595 insertions(+), 1 deletions(-)
 create mode 100644 cpu/sh2/Makefile
 create mode 100644 cpu/sh2/cache.c
 create mode 100644 cpu/sh2/config.mk
 create mode 100644 cpu/sh2/cpu.c
 create mode 100644 cpu/sh2/interrupts.c
 create mode 100644 cpu/sh2/start.S
 create mode 100644 cpu/sh2/time.c
 create mode 100644 cpu/sh2/watchdog.c
 create mode 100644 include/asm-sh/cpu_sh2.h

diff --git a/cpu/sh2/Makefile b/cpu/sh2/Makefile
new file mode 100644
index 000..afd4f80
--- /dev/null
+++ b/cpu/sh2/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# Copyright (C) 2007,2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+# Copyright (C) 2008 Renesas Solutions Corp.
+#
+# 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., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(CPU).a
+
+START  = start.o
+OBJS   = cpu.o interrupts.o watchdog.o time.o # cache.o
+
+all:   .depend $(START) $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) crv $@ $(OBJS)
+
+#
+
+.depend:   Makefile $(START:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c)  $@
+
+sinclude .depend
+
+#
diff --git a/cpu/sh2/cache.c b/cpu/sh2/cache.c
new file mode 100644
index 000..d7ac2a5
--- /dev/null
+++ b/cpu/sh2/cache.c
@@ -0,0 +1,112 @@
+/*
+ * (C) Copyright 2007
+ * Yoshihiro Shimoda [EMAIL PROTECTED]
+ *
+ * Copyright (C) 2007, 2008 Nobobuhiro Iwamatsu [EMAIL PROTECTED]
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include command.h
+#include asm/processor.h
+#include asm/io.h
+
+/*
+ * Jump to P2 area.
+ * When handling TLB or caches, we need to do it from P2 area.
+ */
+#define jump_to_P2()\
+  do {\
+unsigned long __dummy; \
+__asm__ __volatile__(  \
+   mov.l  1f, %0\n\t \
+   or %1, %0\n\t \
+   jmp@%0\n\t\
+nop\n\t  \
+   .balign 4\n   \
+   1: .long 2f\n \
+   2:\
+   : =r (__dummy)   \
+   : r (0x2000));\
+  } while (0)
+
+/*
+ * Back to P1 area.
+ */
+#define back_to_P1()\
+  do {\
+unsigned long __dummy;  \
+__asm__ __volatile__(   \
+   nop;nop;nop;nop;nop;nop;nop\n\t

[U-Boot-Users] [PATCH 2/3] sh: Add support Renesas SH7203 processor

2008-07-03 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/serial/serial_sh.c  |3 ++-
 include/asm-sh/cpu_sh2.h|4 
 include/asm-sh/cpu_sh7203.h |   41 +
 3 files changed, 47 insertions(+), 1 deletions(-)
 create mode 100644 include/asm-sh/cpu_sh7203.h

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 0801ac4..4ea117c 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -72,7 +72,8 @@
 # endif
 #elif defined(CONFIG_CPU_SH7750) || \
defined(CONFIG_CPU_SH7751) || \
-   defined(CONFIG_CPU_SH7722)
+   defined(CONFIG_CPU_SH7722) || \
+   defined(CONFIG_CPU_SH7203)
 # define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
 # define SCLSR (vu_short *)(SCIF_BASE + 0x24)
 # define LSR_ORER  1
diff --git a/include/asm-sh/cpu_sh2.h b/include/asm-sh/cpu_sh2.h
index d776cb9..7d8f92a 100644
--- a/include/asm-sh/cpu_sh2.h
+++ b/include/asm-sh/cpu_sh2.h
@@ -31,6 +31,10 @@
 #define CACHE_OC_NUM_ENTRIES   256
 #define CACHE_OC_ENTRY_SHIFT   4

+#if defined(CONFIG_CPU_SH7203)
+# include asm/cpu_sh7203.h
+#else
 # error Unknown SH2 variant
+#endif

 #endif /* _ASM_CPU_SH2_H_ */
diff --git a/include/asm-sh/cpu_sh7203.h b/include/asm-sh/cpu_sh7203.h
new file mode 100644
index 000..77dcac4
--- /dev/null
+++ b/include/asm-sh/cpu_sh7203.h
@@ -0,0 +1,41 @@
+#ifndef _ASM_CPU_SH7203_H_
+#define _ASM_CPU_SH7203_H_
+
+/* Cache */
+#define CCR1   0xFFFC1000
+#define CCRCCR1
+
+/* PFC */
+#define PACR   0xA4050100
+#define PBCR   0xA4050102
+#define PCCR   0xA4050104
+#define PETCR  0xA4050106
+
+/* Port Data Registers */
+#define PADR   0xA4050120
+#define PBDR   0xA4050122
+#define PCDR   0xA4050124
+
+/* BSC */
+
+/* SDRAM controller */
+
+/* SCIF */
+#define SCSMR_00xFFFE8000
+#define SCIF0_BASE SCSMR_0
+
+/* Timer(CMT) */
+#define CMSTR  0xFFFEC000
+#define CMCSR_0 0xFFFEC002
+#define CMCNT_0 0xFFFEC004
+#define CMCOR_0 0xFFFEC006
+#define CMCSR_1 0xFFFEC008
+#define CMCNT_1 0xFFFEC00A
+#define CMCOR_10xFFFEC00C
+
+/* On chip oscillator circuits */
+#define FRQCR  0xA415FF80
+#define WTCNT  0xA415FF84
+#define WTCSR  0xA415FF86
+
+#endif /* _ASM_CPU_SH7203_H_ */
-- 
1.5.5.1


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 3/3] sh: Renesas RSK+ 7203 board support

2008-07-03 Thread Nobuhiro Iwamatsu
This adds initial support for the RTE RSK+ SH7203 board.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS   |2 +
 MAKEALL   |3 +
 Makefile  |8 ++
 board/rsk7203/Makefile|   45 +++
 board/rsk7203/config.mk   |   28 +
 board/rsk7203/lowlevel_init.S |  265 +
 board/rsk7203/rsk7203.c   |   50 
 board/rsk7203/u-boot.lds  |  102 
 include/configs/rsk7203.h |  107 +
 9 files changed, 610 insertions(+), 0 deletions(-)
 create mode 100644 board/rsk7203/Makefile
 create mode 100644 board/rsk7203/config.mk
 create mode 100644 board/rsk7203/lowlevel_init.S
 create mode 100644 board/rsk7203/rsk7203.c
 create mode 100644 board/rsk7203/u-boot.lds
 create mode 100644 include/configs/rsk7203.h

diff --git a/MAINTAINERS b/MAINTAINERS
index a3d70b1..abb63c9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -717,12 +717,14 @@ Haavard Skinnemoen [EMAIL PROTECTED]
 #

 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ [EMAIL PROTECTED]

MS7750SESH7750
MS7722SESH7722
R7780MP SH7780
R2DPlus SH7751R
SH7763RDP   SH7763
+   RSK7203 SH7203

 Mark Jonas [EMAIL PROTECTED]

diff --git a/MAKEALL b/MAKEALL
index 32caab7..aa97597 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -740,6 +740,9 @@ LIST_blackfin= \
 ## SH Systems
 #

+LIST_sh2= \
+   rsk7203 \
+
 LIST_sh3= \
mpr2\
ms7720se\
diff --git a/Makefile b/Makefile
index 8bfc891..75f2520 100644
--- a/Makefile
+++ b/Makefile
@@ -2907,6 +2907,14 @@ atngw100_config  :   unconfig
 #

 #
+## sh2 (Renesas SuperH)
+#
+rsk7203_config: unconfig
+   @ include/config.h
+   @echo #define CONFIG_RSK7203 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh2 rsk7203
+
+#
 ## sh3 (Renesas SuperH)
 #
 mpr2_config: unconfig
diff --git a/board/rsk7203/Makefile b/board/rsk7203/Makefile
new file mode 100644
index 000..32055be
--- /dev/null
+++ b/board/rsk7203/Makefile
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2007,2008 Nobuhiro Iwamatsu
+# Copyright (C) 2008 Renesas Solutions Corp.
+#
+# u-boot/board/rsk7203/Makefile
+#
+# 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
+
+OBJS   := rsk7203.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/rsk7203/config.mk b/board/rsk7203/config.mk
new file mode 100644
index 000..61aa51f
--- /dev/null
+++ b/board/rsk7203/config.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2007,2008 Nobuhiro Iwamatsu
+# Copyright (C) 2008 Renesas Solutions Corp.
+#
+# u-boot/board/rsk7203/config.mk
+#
+# 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

[U-Boot-Users] [PATCH] net: smc911x: Fix typo output of the version check

2008-07-03 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/smc911x.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index a2d3cb2..1484b0b 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -597,7 +597,7 @@ int eth_init(bd_t *bd)

val = reg_read(BYTE_TEST);
if (val != 0x87654321) {
-   printf(DRIVERNAME : Invalid chip endian 0x08%x\n, val);
+   printf(DRIVERNAME : Invalid chip endian 0x%08x\n, val);
goto err_out;
}

-- 
1.5.5.1

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] net: smc911x: sh: Add support RSK7203 board to smc911x

2008-07-03 Thread Nobuhiro Iwamatsu
The RSK board has the SMSC9118 wired up 'incorrectly'.
This problem can support in the software side.
I put a code to evade it.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/smc911x.c |   37 +++--
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 1484b0b..ec731ea 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -53,6 +53,39 @@ static inline void reg_write(u32 addr, u32 val)
*(volatile u16*)addr = (u16)val;
*(volatile u16*)(addr + 2) = (u16)(val  16);
 }
+
+#if 0 //defined(CONFIG_RSK7203)
+/*
+ * The RSK board has the SMSC9118 wired up 'incorrectly'.
+ * Byte-swapping is necessary, and so poor performance is inevitable.
+ * It seems that this is a problem with the SMSC chip, which has an
+ * endian facility, but it only works at the word level so...
+ */
+/* 2301_6745 -- 0123_4567 */
+#define PKT_SWAP(x) ((vu_long)vu_long)x  8)  0xFF00)|\
+   (((vu_long)x  8)  0x00FF)|\
+   (((vu_long)x  8)  0xFF00)|\
+   (((vu_long)x  8)  0x00FF)))
+
+static inline u32 pkt_data_pull(u32 addr)
+{
+   volatile u16 *addr_16 = (u16 *)addr;
+   u32 d0 = (((*addr_16)  16)  0x);
+   u32 d1 = ((*(addr_16 + 1)  0x));
+   return PKT_SWAP((d0|d1));
+}
+
+static inline void pkt_data_push(u32 addr, u32 val)
+{
+   *(volatile u16 *)(addr + 2) = PKT_SWAP((u16)val);
+   *(volatile u16 *)(addr) = PKT_SWAP((u16)(val  16));
+}
+
+#else
+# define pkt_data_pull(x) reg_read(x)
+# define pkt_data_push(x, l) reg_write(x, l)
+#endif /* CONFIG_RSK7203*/
+
 #else
 #error SMC911X: undefined bus width
 #endif /* CONFIG_DRIVER_SMC911X_16_BIT */
@@ -641,7 +674,7 @@ int eth_send(volatile void *packet, int length)
tmplen = (length + 3) / 4;

while (tmplen--)
-   reg_write(TX_DATA_FIFO, *data++);
+   pkt_data_push(TX_DATA_FIFO, *data++);

/* wait for transmission */
while (!((reg_read(TX_FIFO_INF)  TX_FIFO_INF_TSUSED)  16));
@@ -684,7 +717,7 @@ int eth_rx(void)

tmplen = (pktlen + 2+ 3) / 4;
while (tmplen--)
-   *data++ = reg_read(RX_DATA_FIFO);
+   *data++ = pkt_data_pull(RX_DATA_FIFO);

if (status  RX_STS_ES)
printf(DRIVERNAME
-- 
1.5.5.1


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] net: smc911x: Fix can not compile smc911x

2008-06-30 Thread Nobuhiro Iwamatsu
When enable CONFIG_DRIVER_SMC911X_16_BIT in smc911x, can not compile it.
I revised it from elif preprocessor to elif defined.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/smc911x.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 7555cb9..a2d3cb2 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -33,7 +33,7 @@
CONFIG_DRIVER_SMC911X_16_BIT shall be set
 #endif

-#ifdef CONFIG_DRIVER_SMC911X_32_BIT
+#if defined (CONFIG_DRIVER_SMC911X_32_BIT)
 static inline u32 reg_read(u32 addr)
 {
return *(volatile u32*)addr;
@@ -42,7 +42,7 @@ static inline void reg_write(u32 addr, u32 val)
 {
*(volatile u32*)addr = val;
 }
-#elif CONFIG_DRIVER_SMC911X_16_BIT
+#elif defined (CONFIG_DRIVER_SMC911X_16_BIT)
 static inline u32 reg_read(u32 addr)
 {
volatile u16 *addr_16 = (u16 *)addr;
-- 
1.5.5.1

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc

2008-06-29 Thread Nobuhiro Iwamatsu
Hi, all.

Could comment about this patch.

Best regards,
  Nobuhiro

Nobuhiro Iwamatsu wrote:
 A source code of pci is written mainly on powerpc.
 Macro uses a pci source code of powerpc because other architecture
 (ex. SuperH) doesn't work.
 
 I made asm-ppc/pci.h and moved macro of pci.
 Other archtecture need to make the following macro in asm-xxx/pci.h
  #define pci_phys_to_mem(dev, addr)  (addr)
  #define pci_mem_to_phys(dev, addr)  (addr)
  #define pci_phys_to_io(dev, addr)   (addr)
  #define pci_io_to_phys(dev, addr)   (addr)
 
 Or have to make a function for pci address conversion.
 However, I want comment because I do not know the other architecture.
 
 Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH][RFC] pci: Add check PCI bridge class (Re: [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge)

2008-06-17 Thread Nobuhiro Iwamatsu
Nobuhiro Iwamatsu wrote:
 Hi, all.
 
 2008/5/13 Wolfgang Denk [EMAIL PROTECTED]:
 In message [EMAIL PROTECTED] you wrote:
 I made the patch that applied your comment.
 This patch skips PCI bridge ( Class code : 0x06XX).

 Could you check this patch?
 Thanks - but note that this will not make it in the v1.3.3 release in
 any case.
 
 Does the developer and Board maintainer get a problem with this patch?
 Would you test this patch?

Sorry , I forgot attached patch.

Best regards,
  Nobuhiro
---
In current source code, when the device number of PCI is 0, process PCI
bridge without fail. However, when the device number is 0, it is not PCI
always bridge. There are times when device of PCI allocates.

This patch add check PCI bridge class.

  - 0x0604 PCI to AGP bridge / PCI to PCI bridge
  - 0x0605 PCI to PCMCIA bridge
  - 0x0606 Nu Bus bridge
  - 0x0607 PCMCIA CardBus controller
  - 0x0608 RACEWay bridge

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
  drivers/pci/pci.c |   23 +++
  1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b3ae3b1..39ca130 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,14 +425,21 @@ int pci_hose_scan_bus(struct pci_controller *hose, int 
bus)
 dev   PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
 dev += PCI_BDF(0,0,1))
{
+   /* Read class register */
+   pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, class);
/* Skip our host bridge */
-   if ( dev == PCI_BDF(hose-first_busno,0,0) ) {
-#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE)  /* don't skip host 
bridge */
-   /*
-* Only skip hostbridge configuration if 
pciconfighost is not set
-*/
-   if (getenv(pciconfighost) == NULL) {
-   continue; /* Skip our host bridge */
+   if (dev == PCI_BDF(hose-first_busno,0,0)) {
+   /* CPU to PCI bridge check */
+   if (((class  0xFF00) == 0x0600)  (class != 0x0680))
+#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
+   {
+   /*
+* Only skip hostbridge configuration if
+* pciconfighost is not set
+*/
+   if (getenv(pciconfighost) == NULL) {
+   continue; /* Skip our host bridge */
+   }
}
  #else
continue; /* Skip our host bridge */
@@ -474,7 +481,7 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)

  #ifdef CONFIG_PCI_SCAN_SHOW
/* Skip our host bridge */
-   if ( dev != PCI_BDF(hose-first_busno,0,0) ) {
+   if (((class  0xFF00) != 0x0600) || (class == 0x0680)) {
unsigned char int_line;

pci_hose_read_config_byte(hose, dev, 
PCI_INTERRUPT_LINE,
-- 1.5.5.1


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 2/9] sh: Cleanup source code of MS7722SE

2008-06-17 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 board/ms7722se/ms7722se.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/ms7722se/ms7722se.c b/board/ms7722se/ms7722se.c
index 0d3d55c..cf02242 100644
--- a/board/ms7722se/ms7722se.c
+++ b/board/ms7722se/ms7722se.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007
+ * Copyright (C) 2007,2008
  * Nobuhiro Iwamatsu [EMAIL PROTECTED]
  *
  * Copyright (C) 2007
@@ -43,7 +43,7 @@ int board_init(void)
return 0;
 }

-int dram_init (void)
+int dram_init(void)
 {
DECLARE_GLOBAL_DATA_PTR;

@@ -53,7 +53,7 @@ int dram_init (void)
return 0;
 }

-void led_set_state (unsigned short value)
+void led_set_state(unsigned short value)
 {
-   *((volatile unsigned short *) LED_BASE) = (value  0xFF);
+   writew(value  0xFF, LED_BASE);
 }
-- 
1.5.5.1



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 4/9] sh: Cleanup source code of R2DPlus

2008-06-17 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 board/r2dplus/r2dplus.c |   28 +++-
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/board/r2dplus/r2dplus.c b/board/r2dplus/r2dplus.c
index 2ee3ea2..8fb8ff6 100644
--- a/board/r2dplus/r2dplus.c
+++ b/board/r2dplus/r2dplus.c
@@ -24,6 +24,7 @@
 #include common.h
 #include ide.h
 #include asm/processor.h
+#include asm/io.h
 #include asm/pci.h

 int checkboard(void)
@@ -37,7 +38,7 @@ int board_init(void)
return 0;
 }

-int dram_init (void)
+int dram_init(void)
 {
DECLARE_GLOBAL_DATA_PTR;

@@ -52,25 +53,26 @@ int board_late_init(void)
return 0;
 }

-#define FPGA_BASE  0xA400
-#define FPGA_CFCTL (FPGA_BASE + 0x04)
-#define FPGA_CFPOW (FPGA_BASE + 0x06)
-#define FPGA_CFCDINTCLR(FPGA_BASE + 0x2A)
+#define FPGA_BASE  0xA400
+#define FPGA_CFCTL (FPGA_BASE + 0x04)
+#define CFCTL_EN   (0x432)
+#define FPGA_CFPOW (FPGA_BASE + 0x06)
+#define CFPOW_ON   (0x02)
+#define FPGA_CFCDINTCLR(FPGA_BASE + 0x2A)
+#define CFCDINTCLR_EN  (0x01)

-void ide_set_reset (int idereset)
+void ide_set_reset(int idereset)
 {
/* if reset = 1 IDE reset will be asserted */
-   if (idereset){
-   (*(vu_short *)FPGA_CFCTL) = 0x432;
-   (*(vu_short *)FPGA_CFPOW) |= 0x02;
-   (*(vu_short *)FPGA_CFCDINTCLR) = 0x01;
+   if (idereset) {
+   outw(CFCTL_EN, FPGA_CFCTL); /* CF enable */
+   outw(inw(FPGA_CFPOW)|CFPOW_ON, FPGA_CFPOW); /* Power OM */
+   outw(CFCDINTCLR_EN, FPGA_CFCDINTCLR); /* Int clear */
}
 }

-#if defined(CONFIG_PCI)
 static struct pci_controller hose;
 void pci_init_board(void)
 {
-   pci_sh7751_init( hose );
+   pci_sh7751_init(hose);
 }
-#endif /* CONFIG_PCI */
-- 
1.5.5.1




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 5/9] sh: Cleanup source code of SH7763RDP

2008-06-17 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 board/sh7763rdp/sh7763rdp.c |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

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)
 {
 }
-- 
1.5.5.1




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 6/9] sh: Update Hitachi MS7722SE board

2008-06-17 Thread Nobuhiro Iwamatsu
Remove network setting from config file.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/configs/ms7722se.h |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h
index 8d92a13..7298e55 100644
--- a/include/configs/ms7722se.h
+++ b/include/configs/ms7722se.h
@@ -40,10 +40,6 @@
 #define CONFIG_BAUDRATE115200
 #define CONFIG_BOOTDELAY   3
 #define CONFIG_BOOTARGSconsole=ttySC0,115200 root=1f01
-#define CONFIG_NETMASK  255.255.255.0
-#define CONFIG_IPADDR  192.168.0.22
-#define CONFIG_SERVERIP192.168.0.1
-#define CONFIG_GATEWAYIP   192.168.0.1

 #define CONFIG_VERSION_VARIABLE
 #undef  CONFIG_SHOW_BOOT_PROGRESS
-- 
1.5.5.1




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 8/9] sh: Update Renesas R7780MP board

2008-06-17 Thread Nobuhiro Iwamatsu
New NOR Flash board support and remove network setting from config file.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/configs/r7780mp.h |   41 +++--
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h
index 4e89580..1668ba7 100644
--- a/include/configs/r7780mp.h
+++ b/include/configs/r7780mp.h
@@ -1,7 +1,7 @@
 /*
  * Configuation settings for the Renesas R7780MP board
  *
- * Copyright (C) 2007 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ * Copyright (C) 2007,2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
  * Copyright (C) 2008 Yusuke Goda [EMAIL PROTECTED]
  *
  * See file CREDITS for list of people who contributed to this
@@ -31,7 +31,8 @@
 #define CONFIG_SH4A1
 #define CONFIG_CPU_SH7780  1
 #define CONFIG_R7780MP 1
-#define __LITTLE_ENDIAN 1
+#define CFG_R7780MP_OLD_FLASH  1
+#define __LITTLE_ENDIAN__ 1

 /*
  * Command line configuration.
@@ -59,12 +60,6 @@
 /* check for keypress on bootdelay==0 */
 /*#define CONFIG_ZERO_BOOTDELAY_CHECK*/

-/* Network setting */
-#define CONFIG_NETMASK 255.0.0.0
-#define CONFIG_IPADDR  10.0.192.82
-#define CONFIG_SERVERIP10.0.0.1
-#define CONFIG_GATEWAYIP   10.0.0.1
-
 #define CFG_SDRAM_BASE (0x0800)
 #define CFG_SDRAM_SIZE (128 * 1024 * 1024)

@@ -80,22 +75,30 @@
 #define CFG_MEMTEST_START  (CFG_SDRAM_BASE)
 #define CFG_MEMTEST_END(TEXT_BASE - 0x10)

-/* NOR Flash (S29PL127J60TFI130) */
+/* Flash board support */
 #define CFG_FLASH_BASE (0xA000)
-#define CFG_FLASH_CFI_WIDTH FLASH_CFI_32BIT
-#define CFG_MAX_FLASH_BANKS (2)
-#define CFG_MAX_FLASH_SECT  270
-#define CFG_FLASH_BANKS_LIST{ CFG_FLASH_BASE,\
+#ifdef CFG_R7780MP_OLD_FLASH
+/* NOR Flash (S29PL127J60TFI130) */
+# define CFG_FLASH_CFI_WIDTH   FLASH_CFI_32BIT
+# define CFG_MAX_FLASH_BANKS   (2)
+# define CFG_MAX_FLASH_SECT270
+# define CFG_FLASH_BANKS_LIST  { CFG_FLASH_BASE,\
CFG_FLASH_BASE + 0x10,\
CFG_FLASH_BASE + 0x40,\
CFG_FLASH_BASE + 0x70, }
+#else /* CFG_R7780MP_OLD_FLASH */
+/* NOR Flash (Spantion S29GL256P) */
+# define CFG_MAX_FLASH_BANKS   (1)
+# define CFG_MAX_FLASH_SECT256
+# define CFG_FLASH_BANKS_LIST  { CFG_FLASH_BASE }
+#endif /* CFG_R7780MP_OLD_FLASH */

 #define CFG_LOAD_ADDR  (CFG_SDRAM_BASE + 4 * 1024 * 1024)
 /* Address of u-boot image in Flash */
 #define CFG_MONITOR_BASE   (CFG_FLASH_BASE)
-#define CFG_MONITOR_LEN(112 * 1024)
+#define CFG_MONITOR_LEN(256 * 1024)
 /* Size of DRAM reserved for malloc() use */
-#define CFG_MALLOC_LEN (256 * 1024)
+#define CFG_MALLOC_LEN (1204 * 1024)

 /* size in bytes reserved for initial data */
 #define CFG_GBL_DATA_SIZE  (256)
@@ -110,7 +113,7 @@
 #define CFG_FLASH_EMPTY_INFO

 #define CFG_ENV_IS_IN_FLASH
-#define CFG_ENV_SECT_SIZE  (16 * 1024)
+#define CFG_ENV_SECT_SIZE  (256 * 1024)
 #define CFG_ENV_SIZE   (CFG_ENV_SECT_SIZE)
 #define CFG_ENV_ADDR   (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
 #define CFG_FLASH_ERASE_TOUT   12
@@ -141,8 +144,10 @@
 #endif /* CONFIG_CMD_PCI */

 #if defined(CONFIG_CMD_NET)
-/* #define CONFIG_NET_MULTI
-   #define CONFIG_RTL8169 */
+/*
+#define CONFIG_NET_MULTI
+#define CONFIG_RTL8169
+*/
 /* AX88696L Support(NE2000 base chip) */
 #define CONFIG_DRIVER_NE2000
 #define CONFIG_DRIVER_AX88796L
-- 
1.5.5.1




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 9/9] sh: Update Renesas R2DPlus board

2008-06-17 Thread Nobuhiro Iwamatsu
New NOR Flash board support and remove old type flash board config.
And Remove network setting from config file.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/configs/r2dplus.h |   42 +-
 1 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h
index c20baca..e269336 100644
--- a/include/configs/r2dplus.h
+++ b/include/configs/r2dplus.h
@@ -35,12 +35,6 @@
 #define CONFIG_BOOTARGSconsole=ttySC0,115200
 #define CONFIG_ENV_OVERWRITE   1

-/* Network setting */
-#define CONFIG_NETMASK 255.0.0.0
-#define CONFIG_IPADDR  10.0.192.51
-#define CONFIG_SERVERIP10.0.0.1
-#define CONFIG_GATEWAYIP   10.0.0.1
-
 /* SDRAM */
 #define CFG_SDRAM_BASE (0x8C00)
 #define CFG_SDRAM_SIZE (0x0400)
@@ -60,45 +54,27 @@
 #define CFG_LOAD_ADDR  (CFG_SDRAM_BASE + 32 * 1024 * 1024)
 /* Address of u-boot image in Flash */
 #define CFG_MONITOR_BASE   (CFG_FLASH_BASE)
-#define CFG_MONITOR_LEN(128 * 1024)
+#define CFG_MONITOR_LEN(256 * 1024)
 /* Size of DRAM reserved for malloc() use */
-#define CFG_MALLOC_LEN (256 * 1024)
+#define CFG_MALLOC_LEN (1024 * 1024)
 /* size in bytes reserved for initial data */
 #define CFG_GBL_DATA_SIZE  (256)
 #define CFG_BOOTMAPSZ  (8 * 1024 * 1024)

 /*
- * NOR Flash
+ * NOR Flash ( Spantion S29GL256P )
  */
 #define CFG_FLASH_CFI
 #define CFG_FLASH_CFI_DRIVER
-
-#if defined(CONFIG_R2DPLUS_OLD)
-#define CFG_FLASH_BASE (0xA000)
-#define CFG_MAX_FLASH_BANKS (1)/* Max number of
-* Flash memory banks
-*/
-#define CFG_MAX_FLASH_SECT  142
-#define CFG_FLASH_BANKS_LIST{ CFG_FLASH_BASE }
-
-#else /* CONFIG_R2DPLUS_OLD */
-
 #define CFG_FLASH_BASE (0xA000)
-#define CFG_FLASH_CFI_WIDTH0x04/* 32bit */
-#define CFG_MAX_FLASH_BANKS(2)
-#define CFG_MAX_FLASH_SECT 270
-#define CFG_FLASH_BANKS_LIST{ CFG_FLASH_BASE,\
-   CFG_FLASH_BASE + 0x10,\
-   CFG_FLASH_BASE + 0x40,\
-   CFG_FLASH_BASE + 0x70, }
-#endif /* CONFIG_R2DPLUS_OLD */
+#define CFG_MAX_FLASH_BANKS (1)
+#define CFG_MAX_FLASH_SECT  256
+#define CFG_FLASH_BANKS_LIST   { CFG_FLASH_BASE }

 #define CFG_ENV_IS_IN_FLASH
-#define CFG_ENV_SECT_SIZE  0x2
-#define CFG_ENV_SIZE   (CFG_ENV_SECT_SIZE)
-#define CFG_ENV_ADDR   (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
-#define CFG_FLASH_ERASE_TOUT   12
-#define CFG_FLASH_WRITE_TOUT   500
+#define CFG_ENV_SECT_SIZE  0x4
+#define CFG_ENV_SIZE(CFG_ENV_SECT_SIZE)
+#define CFG_ENV_ADDR(CFG_MONITOR_BASE + CFG_MONITOR_LEN)

 /*
  * SuperH Clock setting
-- 
1.5.5.1




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc

2008-06-17 Thread Nobuhiro Iwamatsu
A source code of pci is written mainly on powerpc.
Macro uses a pci source code of powerpc because other architecture
(ex. SuperH) doesn't work.

I made asm-ppc/pci.h and moved macro of pci.
Other archtecture need to make the following macro in asm-xxx/pci.h
 #define pci_phys_to_mem(dev, addr)  (addr)
 #define pci_mem_to_phys(dev, addr)  (addr)
 #define pci_phys_to_io(dev, addr)   (addr)
 #define pci_io_to_phys(dev, addr)   (addr)

Or have to make a function for pci address conversion.
However, I want comment because I do not know the other architecture.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/asm-ppc/pci.h |   53 +
 include/asm-sh/pci.h  |5 
 include/pci.h |   22 +---
 3 files changed, 59 insertions(+), 21 deletions(-)
 create mode 100644 include/asm-ppc/pci.h

diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
new file mode 100644
index 000..d5f8475
--- /dev/null
+++ b/include/asm-ppc/pci.h
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Andreas Heppel [EMAIL PROTECTED]
+ *
+ * (C) Copyright 2002
+ * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+ *
+ * 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
+ * aloong with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _ASM_PCI_H
+#define _ASM_PCI_H
+
+extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
+   unsigned long addr, unsigned long 
flags);
+extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose,
+ phys_addr_t addr, unsigned long 
flags);
+
+#define pci_phys_to_bus(dev, addr, flags) \
+   pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
+#define pci_bus_to_phys(dev, addr, flags) \
+   pci_hose_bus_to_phys(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
+
+#define pci_phys_to_mem(dev, addr) pci_phys_to_bus((dev), (addr), 
PCI_REGION_MEM)
+#define pci_mem_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), 
PCI_REGION_MEM)
+#define pci_phys_to_io(dev, addr)  pci_phys_to_bus((dev), (addr), 
PCI_REGION_IO)
+#define pci_io_to_phys(dev, addr)  pci_bus_to_phys((dev), (addr), 
PCI_REGION_IO)
+
+#ifdef CONFIG_MPC824X
+extern void pci_mpc824x_init (struct pci_controller *hose);
+#endif
+
+#ifdef CONFIG_MPC85xx
+extern void pci_mpc85xx_init (struct pci_controller *hose);
+#endif
+
+#endif /* _ASM_PCI_H */
diff --git a/include/asm-sh/pci.h b/include/asm-sh/pci.h
index bc59491..1f24fb6 100644
--- a/include/asm-sh/pci.h
+++ b/include/asm-sh/pci.h
@@ -44,4 +44,9 @@ int pci_sh4_read_config_dword(struct pci_controller *hose,
 int pci_sh4_write_config_dword(struct pci_controller *hose,
pci_dev_t dev, int offset, u32 value);

+#define pci_phys_to_mem(dev, addr) (addr)
+#define pci_mem_to_phys(dev, addr) (addr)
+#define pci_phys_to_io(dev, addr)  (addr)
+#define pci_io_to_phys(dev, addr)  (addr)
+
 #endif /* _ASM_PCI_H_ */
diff --git a/include/pci.h b/include/pci.h
index 1c8e216..9b61635 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -432,21 +432,6 @@ extern __inline__ void pci_set_ops(struct pci_controller 
*hose,

 extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 
cfg_data);

-extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
-   unsigned long addr, unsigned long 
flags);
-extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose,
- phys_addr_t addr, unsigned long 
flags);
-
-#define pci_phys_to_bus(dev, addr, flags) \
-   pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
-#define pci_bus_to_phys(dev, addr, flags) \
-   pci_hose_bus_to_phys(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
-
-#define pci_phys_to_mem(dev, addr) pci_phys_to_bus((dev), (addr), 
PCI_REGION_MEM)
-#define pci_mem_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), 
PCI_REGION_MEM)
-#define pci_phys_to_io(dev, addr)  pci_phys_to_bus((dev), (addr), 
PCI_REGION_IO)
-#define pci_io_to_phys(dev, addr)  pci_bus_to_phys((dev), (addr), 
PCI_REGION_IO)
-
 extern int

Re: [U-Boot-Users] Hi All

2008-06-16 Thread Nobuhiro Iwamatsu
Hi,

2008/6/16 harshadnimje [EMAIL PROTECTED]:

 For which peripherals I need to write the driver as far as U-boot is
 concerned?

1.Real time clock
 Not Supported
2.Timer Unit
 Supported
3.Bus state controller
 Supported
4.DMA cotroller
 Not Supported
5.Serial communication interface
 Not Suported
6.I/O Ports
 Supported
7.Interrupt controller
 Not Supported
8.PCI conroller.
 Supported. But check on SH7751R only.

 In generic U-Boot1.3.2 directory structure where do I need to make the
 change?
 At what places the config files and make files will have undergo
 changes?

You need create your board configration file and Bus state controller
initialization file(lowleve_init.S).

You can take a source code of r2d board into account.
This board has SH7751R cpu too.
board/r2dplus/*

Best reagards,
 Nobuhiro

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] How do work qemu_mips image?

2008-06-16 Thread Nobuhiro Iwamatsu
Hi,  all.

I want to use MIPS archtechtute on Qemu.
I compiled qemu_mips and read doc/README.qemu_mips and was going
to work it, but U-boot boot stopped.
Is this right behavior?

Please give me advice to work a qemu_mips image on Qemu.

---
U-boot version:
  Get from Git tree ( hash:a94f22f08f280905926219e568568964cb9eeb9d)

use cross compiller:
  $ mips-linux-gnu-gcc -v
  Using built-in specs.
  Target: mips-linux-gnu
  Configured with: ../src/configure -v
--enable-languages=c,c++,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/mips-linux-gnu/include/c++/4.2.4
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug
--disable-libssp --enable-checking=release
--program-prefix=mips-linux-gnu-
--includedir=/usr/mips-linux-gnu/include --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=mips-linux-gnu
  Thread model: posix
  gcc version 4.2.4 (Debian 4.2.4-2)

use Qemu version:
  0.9.1

U-boot log:
  $ ln -s u-boot.bin mips_bios.bin
  $ xps-iwamatsu(iwamatsu:)$ qemu-system-mips -L . /dev/null -nographic


  U-Boot 1.3.3-00235-ga94f22f-dirty (Jun 16 2008 - 19:18:35)

  Board: Qemu -M mips CPU: 24Kf proc_id=0x19300
  DRAM:  128 MB
  (stopped)

Best regards,
 Nobuhiro

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Hi All

2008-06-16 Thread Nobuhiro Iwamatsu
2008/6/16 harshadnimje [EMAIL PROTECTED]:
 Hi Nobuhiro;

 Thanks for your support.

 I am not able to see the /board/r2dplus/* in uboot directory stucture.
 Can you please send me the link for this board specific source code.

Please check u-boot 1.3.3 source code.

Best regards,
 Nobuhiro.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] net: ne2000: Move dev_addr variable from grobal to local.

2008-06-16 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/ne2000.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
index eab3dd5..ec92485 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -758,8 +758,6 @@ static hw_info_t hw_info[] = {
 
 #define NR_INFO(sizeof(hw_info)/sizeof(hw_info_t))
 
-u8 dev_addr[6];
-
 #define PCNET_CMD  0x00
 #define PCNET_DATAPORT 0x10/* NatSemi-defined port window offset. */
 #define PCNET_RESET0x1f/* Issue a read to reset, a write to clear. */
@@ -877,6 +875,7 @@ void uboot_push_tx_done(int key, int val) {
 
 int eth_init(bd_t *bd) {
int r;
+   u8 dev_addr[6];
char ethaddr[20];
 
PRINTK(### eth_init\n);
-- 
1.5.5.1


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] net: ne2000: Fix compile error of NE2000

2008-06-16 Thread Nobuhiro Iwamatsu
If enable DEBUG, can not compile ne2000 driver.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/ne2000.c |   11 ---
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
index 2da57b6..eab3dd5 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -769,14 +769,14 @@ static void pcnet_reset_8390(void)
 {
int i, r;
 
-   PRINTK(nic base is %lx\n, nic_base);
+   PRINTK(nic base is %lx\n, nic.base);
 
n2k_outb(E8390_NODMA + E8390_PAGE0+E8390_STOP, E8390_CMD);
-   PRINTK(cmd (at %lx) is %x\n, nic_base + E8390_CMD, 
n2k_inb(E8390_CMD));
+   PRINTK(cmd (at %lx) is %x\n, nic.base + E8390_CMD, 
n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
-   PRINTK(cmd (at %lx) is %x\n, nic_base + E8390_CMD, 
n2k_inb(E8390_CMD));
+   PRINTK(cmd (at %lx) is %x\n, nic.base + E8390_CMD, 
n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
-   PRINTK(cmd (at %lx) is %x\n, nic_base + E8390_CMD, 
n2k_inb(E8390_CMD));
+   PRINTK(cmd (at %lx) is %x\n, nic.base + E8390_CMD, 
n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
 
n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET);
@@ -852,8 +852,6 @@ int __get_prom(u8* mac_addr)
return 0;
 }
 
-u32 nic_base;
-
 /* U-boot specific routines */
 static u8 *pbuf = NULL;
 
@@ -901,7 +899,6 @@ int eth_init(bd_t *bd) {
}
 #endif
 
-   nic_base = CONFIG_DRIVER_NE2000_BASE;
nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
 
r = get_prom(dev_addr);
-- 
1.5.5.1



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge

2008-06-16 Thread Nobuhiro Iwamatsu
Hi, all.

2008/5/13 Wolfgang Denk [EMAIL PROTECTED]:
 In message [EMAIL PROTECTED] you wrote:

 I made the patch that applied your comment.
 This patch skips PCI bridge ( Class code : 0x06XX).

 Could you check this patch?

 Thanks - but note that this will not make it in the v1.3.3 release in
 any case.

Does the developer and Board maintainer get a problem with this patch?
Would you test this patch?

Best regards,
 Nobuhiro
-- 
--
Nobuhiro Iwamatsu

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] net: sh: Renesas SH7763 Ethernet device support

2008-06-11 Thread Nobuhiro Iwamatsu
Hi, Ben.

Thank you for your check.

2008/6/10 Ben Warren [EMAIL PROTECTED]:
 Hi Nobuhiro,

 Nobuhiro Iwamatsu wrote:
 Renesas SH7763 has 2 channel Ethernet device.
 This is 10/100/1000 Base support.
 But this patch check 10/100 Base only.
 Where's the code that has this driver being initialized by net/eth.c? Is
 it in another patch or should I just go to bed?
Yes , this driver initialize used eth_init. Thank you.

snip
 This code has quite a few magic numbers. Considering that you're
 submitting a header file too, it's hard to justify not adding mnemonics.
snip
 Another magic number that should be a #defined bit mask
Thanks. I will rewrite and cleanup soruce code.

snip
 diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h
 new file mode 100644
 index 000..12a4528
 --- /dev/null
 +++ b/drivers/net/sh_eth.h
 @@ -0,0 +1,195 @@

snip

 Please use the accessors in include/asm-sh/io.h instead of defining your
 own.
OK.

I revise the place that you pointed out and resend it.
I thank for your check.

Best regards,
 Nobuhiro

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] net: sh: Renesas SH7763 Ethernet device support

2008-06-11 Thread Nobuhiro Iwamatsu
Renesas SH7763 has 2 channel Ethernet device.
This is 10/100/1000 Base support.
But this patch check 10/100 Base only.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/Makefile |1 +
 drivers/net/sh_eth.c |  603 ++
 drivers/net/sh_eth.h |  446 +
 3 files changed, 1050 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/sh_eth.c
 create mode 100644 drivers/net/sh_eth.h

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 5b031c9..e2a6b35 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -66,6 +66,7 @@ COBJS-y += uli526x.o
 COBJS-y += vsc7385.o
 COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
+COBJS-$(CONFIG_SH_ETHER) += sh_eth.o

 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
new file mode 100644
index 000..097c6c3
--- /dev/null
+++ b/drivers/net/sh_eth.c
@@ -0,0 +1,603 @@
+/*
+ * sh_eth.c - Driver for Renesas SH7763's ethernet controler.
+ *
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (c) 2008 Nobuhiro Iwamatsu
+ * Copyright (c) 2007 Carlos Munoz [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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include config.h
+#include common.h
+#include malloc.h
+#include net.h
+#include asm/errno.h
+#include asm/io.h
+
+#include sh_eth.h
+
+#ifndef CONFIG_SH_ETHER_USE_PORT
+# error Please define CONFIG_SH_ETHER_USE_PORT
+#endif
+#ifndef CONFIG_SH_ETHER_PHY_ADDR
+# error Please define CONFIG_SH_ETHER_PHY_ADDR
+#endif
+
+extern int eth_init(bd_t *bd);
+extern void eth_halt(void);
+extern int eth_rx(void);
+extern int eth_send(volatile void *packet, int length);
+
+static struct dev_info_s *dev;
+
+/*
+ * Bits are written to the PHY serially using the
+ * PIR register, just like a bit banger.
+ */
+static void sh_eth_mii_write_phy_bits(int port, u32 val, int len)
+{
+   int i;
+   u32 pir;
+
+   /* Bit positions is 1 less than the number of bits */
+   for (i = len - 1; i = 0; i--) {
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   outl(pir, PIR(port));
+   udelay(1);
+   /* Write direction, bit to write, clock is high */
+   pir = 3 | ((val  1  i) ? 1  2 : 0);
+   outl(pir, PIR(port));
+   udelay(1);
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   outl(pir, PIR(port));
+   udelay(1);
+   }
+}
+
+static void sh_eth_mii_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   outl(0, PIR(port));
+   udelay(1);
+   /* Read direction, clock is high */
+   outl(1, PIR(port));
+   udelay(1);
+   /* Read direction, clock is low */
+   outl(0, PIR(port));
+   udelay(1);
+}
+
+static void sh_eth_mii_ind_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   outl(0, PIR(port));
+   udelay(1);
+}
+
+static int sh_eth_mii_read_phy_bits(int port, u32 * val, int len)
+{
+   int i;
+   u32 pir;
+
+   *val = 0;
+   for (i = len - 1; i = 0; i--) {
+   /* Read direction, clock is high */
+   outl(1, PIR(port));
+   udelay(1);
+   /* Read bit */
+   pir = inl(PIR(port));
+   *val |= (pir  8) ? 1  i : 0;
+   /* Read direction, clock is low */
+   outl(0, PIR(port));
+   udelay(1);
+   }
+
+   return 0;
+}
+
+#define PHY_INIT   0x
+#define PHY_READ   0x02
+#define PHY_WRITE  0x01
+/*
+ * To read a phy register, mii managements frames are sent to the phy.
+ * The frames look like this:
+ * pre (32 bits):  0x 
+ * st (2 bits):01
+ * op (2bits): 10: read 01: write
+ * phyad (5 bits): x
+ * regad (5 bits): x
+ * ta (Bus release):
+ * data (16 bits): read data
+ */
+static u32 sh_eth_mii_read_phy_reg(int port, u8 phy_addr, int reg)
+{
+   u32 val;
+
+   /* Sent mii management frame */
+   /* pre */
+   sh_eth_mii_write_phy_bits(port, PHY_INIT, 32

Re: [U-Boot-Users] Question on SH7763

2008-06-09 Thread Nobuhiro Iwamatsu
Hi, Paul.

On Mon, 9 Jun 2008 14:24:11 +0900
Paul Mundt [EMAIL PROTECTED] wrote:

  If your Flash supports CFI it should work with the CFI driver in u-boot.
  Look in the u-boot readme how to start/modify the u-boot code.
  
  And I wrote a document a little.
  Please check doc/README.sh
  
 On a somewhat related note, what is the status of the SH7203 patches? I
 have some SH7206 and MX-G bits that build on top of them, yet I don't see
 any of the SH7203 stuff in the git tree?
I don't touch SH7206 and MX-G.
Do you know someone is doing the work such as MX-G? 

About SH7203 , I will put code to U-Boot 1.3.5 queue.

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] net: sh: Renesas SH7763 Ethernet device support

2008-06-09 Thread Nobuhiro Iwamatsu
Hello, Ben.

On Fri, 06 Jun 2008 16:17:48 +0900
Nobuhiro Iwamatsu [EMAIL PROTECTED] wrote:

 Renesas SH7763 has 2 channel Ethernet device.
 This is 10/100/1000 Base support.
 But this patch check 10/100 Base only.
 
 Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
 ---
  drivers/net/Makefile |1 +
  drivers/net/sh_eth.c |  599 
 ++
  drivers/net/sh_eth.h |  195 
  3 files changed, 795 insertions(+), 0 deletions(-)
  create mode 100644 drivers/net/sh_eth.c
  create mode 100644 drivers/net/sh_eth.h
 

Please apply this code to your net tree?

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Pull request: u-boot-sh

2008-06-09 Thread Nobuhiro Iwamatsu
The following changes since commit 8155efbd7ae9c65564ca98affe94631d612ae088:
  Wolfgang Denk (1):
Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master

are available in the git repository at:

  git://git.denx.de/u-boot-sh.git master

Nobuhiro Iwamatsu (3):
  sh: SH7763 SCIF support
  sh: Add support Renesas SH7763
  sh: Renesas Solutions SH7763RDP board support

 MAINTAINERS |1 +
 MAKEALL |1 +
 Makefile|5 +
 board/sh7763rdp/Makefile|   47 +
 board/sh7763rdp/config.mk   |   11 ++
 board/sh7763rdp/lowlevel_init.S |  351 +++
 board/sh7763rdp/sh7763rdp.c |   76 +
 board/sh7763rdp/u-boot.lds  |  106 
 drivers/serial/serial_sh.c  |  128 --
 include/asm-sh/cpu_sh4.h|2 +
 include/asm-sh/cpu_sh7763.h |   51 ++
 include/configs/sh7763rdp.h |  126 ++
 12 files changed, 850 insertions(+), 55 deletions(-)
 create mode 100644 board/sh7763rdp/Makefile
 create mode 100644 board/sh7763rdp/config.mk
 create mode 100644 board/sh7763rdp/lowlevel_init.S
 create mode 100644 board/sh7763rdp/sh7763rdp.c
 create mode 100644 board/sh7763rdp/u-boot.lds
 create mode 100644 include/asm-sh/cpu_sh7763.h
 create mode 100644 include/configs/sh7763rdp.h

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Question on SH7763

2008-06-08 Thread Nobuhiro Iwamatsu
Hello, Heiko.

Thank you for your comments.
 
 CC ed the u-boot mailinglist, because its more a u-boot topic. I used to
 compile the u-boot
 for a sh7750R based board (Sorry, patches for u-boot not posted yet ...)
 with the
 compiler from
 
 http://www.sh-linux.org
 
 There is also a fine readme.txt for installation.
 
 or use crosstools for making a compiler for your needs. See it at:
 
 http://www.kegel.com/crosstool/
 
 And then, hack the code ;-)
 If your Flash supports CFI it should work with the CFI driver in u-boot.
 Look in the u-boot readme how to start/modify the u-boot code.

And I wrote a document a little.
Please check doc/README.sh

Best regards,
  Nobuhiro

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] sh: Renesas Solutions SH7763RDP board support

2008-06-08 Thread Nobuhiro Iwamatsu
SH7763RDP has SCIF, NOR Flash, Ethernet, USB host, LCDC and MMC.
In this patch, support SCIF, NOR Flash, and Ethernet.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS |1 +
 MAKEALL |1 +
 Makefile|5 +
 board/sh7763rdp/Makefile|   47 +
 board/sh7763rdp/config.mk   |   11 ++
 board/sh7763rdp/lowlevel_init.S |  351 +++
 board/sh7763rdp/sh7763rdp.c |   76 +
 board/sh7763rdp/u-boot.lds  |  106 
 include/configs/sh7763rdp.h |  126 ++
 9 files changed, 724 insertions(+), 0 deletions(-)
 create mode 100644 board/sh7763rdp/Makefile
 create mode 100644 board/sh7763rdp/config.mk
 create mode 100644 board/sh7763rdp/lowlevel_init.S
 create mode 100644 board/sh7763rdp/sh7763rdp.c
 create mode 100644 board/sh7763rdp/u-boot.lds
 create mode 100644 include/configs/sh7763rdp.h

diff --git a/MAINTAINERS b/MAINTAINERS
index d3dfd48..b3daaeb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -718,6 +718,7 @@ Nobuhiro Iwamatsu [EMAIL PROTECTED]
MS7722SESH7722
R7780MP SH7780
R2DPlus SH7751R
+   SH7763RDP   SH7763

 Mark Jonas [EMAIL PROTECTED]

diff --git a/MAKEALL b/MAKEALL
index 3cb1d24..45ef33e 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -749,6 +749,7 @@ LIST_sh4=  \
Migo-R  \
r7780mp \
r2dplus \
+   sh7763rdp   \
 

 LIST_sh=  \
diff --git a/Makefile b/Makefile
index cc988e1..cb63223 100644
--- a/Makefile
+++ b/Makefile
@@ -2941,6 +2941,11 @@ r2dplus_config  :   unconfig
@echo #define CONFIG_R2DPLUS 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r2dplus

+sh7763rdp_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_SH7763RDP 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp
+
 #
 # SPARC
 #
diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile
new file mode 100644
index 000..9e63ea7
--- /dev/null
+++ b/board/sh7763rdp/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008 Renesas Solutions Corp.
+# Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+# Copyright (C) 2007 Kenati Technologies, Inc.
+#
+# board/sh7763rdp/Makefile
+#
+# 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
+
+OBJS   := sh7763rdp.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/sh7763rdp/config.mk b/board/sh7763rdp/config.mk
new file mode 100644
index 000..c52dbfd
--- /dev/null
+++ b/board/sh7763rdp/config.mk
@@ -0,0 +1,11 @@
+#
+# board/sh7763rdp/config.mk
+#
+# TEXT_BASE refers to image _after_ relocation.
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+
+TEXT_BASE = 0x8FFC
+
+# PLATFORM_CPPFLAGS += -DCONFIG_MULTIBOOT
diff --git a/board/sh7763rdp/lowlevel_init.S b/board/sh7763rdp/lowlevel_init.S
new file mode 100644
index 000..1942892
--- /dev/null
+++ b/board/sh7763rdp/lowlevel_init.S
@@ -0,0 +1,351 @@
+/*
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ * Copyright (C) 2007 Kenati Technologies, Inc.
+ *
+ * board/sh7763rdp/lowlevel_init.S
+ *
+ * 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

[U-Boot-Users] [PATCH] sh: SH7763 SCIF support

2008-06-06 Thread Nobuhiro Iwamatsu
SH7763 has 3 SCIF channels. SCIF0 and 1 are same register constitution,
but only SCIF2 is different. This patch work all SCIF channel.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/serial/serial_sh.c |  128 +---
 1 files changed, 73 insertions(+), 55 deletions(-)

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index aa4ff35..0801ac4 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -26,6 +26,8 @@
 #define SCIF_BASE  SCIF0_BASE
 #elif defined (CONFIG_CONS_SCIF1)
 #define SCIF_BASE  SCIF1_BASE
+#elif defined (CONFIG_CONS_SCIF2)
+#define SCIF_BASE  SCIF2_BASE
 #else
 #error Default SCIF doesn't set.
 #endif
@@ -36,17 +38,17 @@
 #define SCSCR  (vu_short *)(SCIF_BASE + 0x8)
 #define SCFCR  (vu_short *)(SCIF_BASE + 0x18)
 #define SCFDR  (vu_short *)(SCIF_BASE + 0x1C)
-#ifdef CONFIG_CPU_SH7720 /* SH7720 specific */
-# define SCFSR (vu_short *)(SCIF_BASE + 0x14) /* SCSSR */
+#ifdef CONFIG_CPU_SH7720   /* SH7720 specific */
+# define SCFSR (vu_short *)(SCIF_BASE + 0x14)  /* SCSSR */
 # define SCFTDR(vu_char  *)(SCIF_BASE + 0x20)
 # define SCFRDR(vu_char  *)(SCIF_BASE + 0x24)
 #else
 # define SCFTDR (vu_char  *)(SCIF_BASE + 0xC)
-# define SCFSR (vu_short *)(SCIF_BASE + 0x10)
+# define SCFSR (vu_short *)(SCIF_BASE + 0x10)
 # define SCFRDR (vu_char  *)(SCIF_BASE + 0x14)
 #endif

-#if defined(CONFIG_CPU_SH7780) || \
+#ifdefined(CONFIG_CPU_SH7780) || \
defined(CONFIG_CPU_SH7785)
 # define SCRFDR(vu_short *)(SCIF_BASE + 0x20)
 # define SCSPTR(vu_short *)(SCIF_BASE + 0x24)
@@ -54,20 +56,34 @@
 # define SCRER (vu_short *)(SCIF_BASE + 0x2C)
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0xFF
+#elif defined(CONFIG_CPU_SH7763)
+# if defined (CONFIG_CONS_SCIF2)
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0x1F
+# else
+# define SCRFDR(vu_short *)(SCIF_BASE + 0x20)
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x28)
+# define SCRER (vu_short *)(SCIF_BASE + 0x2C)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0xFF
+# endif
 #elif defined(CONFIG_CPU_SH7750) || \
defined(CONFIG_CPU_SH7751) || \
defined(CONFIG_CPU_SH7722)
 # define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
-# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0x1F
 #elif defined(CONFIG_CPU_SH7720)
-# define SCLSR  (vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
 # define LSR_ORER  0x0200
 # define FIFOLEVEL_MASK0x1F
-#elif defined(CONFIG_CPU_SH7710)
+#elif defined(CONFIG_CPU_SH7710) || \
defined(CONFIG_CPU_SH7712)
-# define SCLSR SCFSR   /* SCSSR */
+# define SCLSR SCFSR   /* SCSSR */
 # define LSR_ORER  1
 # define FIFOLEVEL_MASK0x1F
 #endif
@@ -75,34 +91,34 @@
 /* SCBRR register value setting */
 #if defined(CONFIG_CPU_SH7720)
 # define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
-#else  /* Generic SuperH */
+#else /* Generic SuperH */
 # define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
 #endif

-#define SCR_RE (1  4)
-#define SCR_TE (1  5)
-#define FCR_RFRST  (1  1) /* RFCL */
-#define FCR_TFRST  (1  2) /* TFCL */
-#define FSR_DR (1  0)
-#define FSR_RDF(1  1)
-#define FSR_FER(1  3)
-#define FSR_BRK(1  4)
-#define FSR_FER(1  3)
-#define FSR_TEND   (1  6)
-#define FSR_ER (1  7)
+#define SCR_RE (1  4)
+#define SCR_TE (1  5)
+#define FCR_RFRST  (1  1)/* RFCL */
+#define FCR_TFRST  (1  2)/* TFCL */
+#define FSR_DR (1  0)
+#define FSR_RDF(1  1)
+#define FSR_FER(1  3)
+#define FSR_BRK(1  4)
+#define FSR_FER(1  3)
+#define FSR_TEND   (1  6)
+#define FSR_ER (1  7)

 /*--*/

-void serial_setbrg (void)
+void serial_setbrg(void)
 {
DECLARE_GLOBAL_DATA_PTR;
-   *SCBRR = SCBRR_VALUE(gd-baudrate,CONFIG_SYS_CLK_FREQ);
+   *SCBRR = SCBRR_VALUE(gd-baudrate, CONFIG_SYS_CLK_FREQ);
 }

-int serial_init (void)
+int serial_init(void)
 {
*SCSCR = (SCR_RE | SCR_TE);
-   *SCSMR = 0 ;
+   *SCSMR = 0;
*SCSMR = 0;
*SCFCR = (FCR_RFRST | FCR_TFRST);
*SCFCR;
@@ -112,21 +128,21 @@ int serial_init (void)
return 0;
 }

-static int serial_rx_fifo_level (void)
+static int serial_rx_fifo_level(void)
 {
-#if defined(CONFIG_SH4A)
+#if defined(SCRFDR)
return (*SCRFDR  0)  FIFOLEVEL_MASK;
 #else
return (*SCFDR  0)  FIFOLEVEL_MASK;
 #endif
 }

-void

[U-Boot-Users] [PATCH] net: sh: Renesas SH7763 Ethernet device support

2008-06-06 Thread Nobuhiro Iwamatsu
Renesas SH7763 has 2 channel Ethernet device.
This is 10/100/1000 Base support.
But this patch check 10/100 Base only.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/Makefile |1 +
 drivers/net/sh_eth.c |  599 ++
 drivers/net/sh_eth.h |  195 
 3 files changed, 795 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/sh_eth.c
 create mode 100644 drivers/net/sh_eth.h

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 5b031c9..e2a6b35 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -66,6 +66,7 @@ COBJS-y += uli526x.o
 COBJS-y += vsc7385.o
 COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
+COBJS-$(CONFIG_SH_ETHER) += sh_eth.o

 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
new file mode 100644
index 000..869a8f0
--- /dev/null
+++ b/drivers/net/sh_eth.c
@@ -0,0 +1,599 @@
+/*
+ * sh_eth.c - Driver for Renesas SH7763's ethernet controler.
+ *
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (c) 2008 Nobuhiro Iwamatsu
+ * Copyright (c) 2007 Carlos Munoz [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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include config.h
+#include common.h
+#include malloc.h
+#include net.h
+#include asm/errno.h
+
+#include sh_eth.h
+
+#ifndef CONFIG_SH_ETHER_USE_PORT
+# error Please define CONFIG_SH_ETHER_USE_PORT
+#endif
+#ifndef CONFIG_SH_ETHER_PHY_ADDR
+# error Please define CONFIG_SH_ETHER_PHY_ADDR
+#endif
+
+extern int eth_init(bd_t *bd);
+extern void eth_halt(void);
+extern int eth_rx(void);
+extern int eth_send(volatile void *packet, int length);
+
+static struct dev_info_s *dev;
+
+/*
+ * Bits are written to the PHY serially using the
+ * PIR register, just like a bit banger.
+ */
+static void sh_eth_mii_write_phy_bits(int port, u32 val, int len)
+{
+   int i;
+   u32 pir;
+
+   /* Bit positions is 1 less than the number of bits */
+   for (i = len - 1; i = 0; i--) {
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   /* Write direction, bit to write, clock is high */
+   pir = 3 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   /* Write direction, bit to write, clock is low */
+   pir = 2 | ((val  1  i) ? 1  2 : 0);
+   OUT32(PIR(port), pir);
+   PHY_DELAY;
+   }
+}
+
+static void sh_eth_mii_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+   /* Read direction, clock is high */
+   OUT32(PIR(port), 1);
+   PHY_DELAY;
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+}
+
+static void sh_eth_mii_ind_bus_release(int port)
+{
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+}
+
+static int sh_eth_mii_read_phy_bits(int port, u32 * val, int len)
+{
+   int i;
+   u32 pir;
+
+   *val = 0;
+   for (i = len - 1; i = 0; i--) {
+   /* Read direction, clock is high */
+   OUT32(PIR(port), 1);
+   PHY_DELAY;
+   /* Read bit */
+   pir = IN32(PIR(port));
+   *val |= (pir  8) ? 1  i : 0;
+   /* Read direction, clock is low */
+   OUT32(PIR(port), 0);
+   PHY_DELAY;
+   }
+
+   return 0;
+}
+
+/* To read a phy register, mii managements frames are sent to the phy.
+   The frames look like this:
+   pre (32 bits):  0x 
+   st (2 bits):01
+   op (2bits): 10: read 01: write
+   phyad (5 bits): x
+   regad (5 bits): x
+   ta (Bus release):
+   data (16 bits): read data */
+static u32 sh_eth_mii_read_phy_reg(int port, u8 phy_addr, int reg)
+{
+   u32 val;
+
+   /* Sent mii management frame */
+   /* pre */
+   sh_eth_mii_write_phy_bits(port, 0x, 32);
+   /* st (start of frame) */
+   sh_eth_mii_write_phy_bits(port, 0x1, 2);
+   /* op (code

[U-Boot-Users] [PATCH] sh: Renesas Solutions SH7763RDP board support

2008-06-06 Thread Nobuhiro Iwamatsu
SH7763RDP has SCIF, NOR Flash, Ethernet, USB host, LCDC and MMC.
In this patch, support SCIF, NOR Flash, and Ethernet.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS |1 +
 MAKEALL |1 +
 Makefile|5 +
 board/sh7763rdp/Makefile|   47 +
 board/sh7763rdp/config.mk   |   11 ++
 board/sh7763rdp/lowlevel_init.S |  351 +++
 board/sh7763rdp/sh7763rdp.c |   76 +
 board/sh7763rdp/u-boot.lds  |  106 
 include/configs/sh7763rdp.h |  129 ++
 9 files changed, 727 insertions(+), 0 deletions(-)
 create mode 100644 board/sh7763rdp/Makefile
 create mode 100644 board/sh7763rdp/config.mk
 create mode 100644 board/sh7763rdp/lowlevel_init.S
 create mode 100644 board/sh7763rdp/sh7763rdp.c
 create mode 100644 board/sh7763rdp/u-boot.lds
 create mode 100644 include/configs/sh7763rdp.h

diff --git a/MAINTAINERS b/MAINTAINERS
index d3dfd48..b3daaeb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -718,6 +718,7 @@ Nobuhiro Iwamatsu [EMAIL PROTECTED]
MS7722SESH7722
R7780MP SH7780
R2DPlus SH7751R
+   SH7763RDP   SH7763

 Mark Jonas [EMAIL PROTECTED]

diff --git a/MAKEALL b/MAKEALL
index 3cb1d24..45ef33e 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -749,6 +749,7 @@ LIST_sh4=  \
Migo-R  \
r7780mp \
r2dplus \
+   sh7763rdp   \
 

 LIST_sh=  \
diff --git a/Makefile b/Makefile
index cc988e1..cb63223 100644
--- a/Makefile
+++ b/Makefile
@@ -2941,6 +2941,11 @@ r2dplus_config  :   unconfig
@echo #define CONFIG_R2DPLUS 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r2dplus

+sh7763rdp_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_SH7763RDP 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp
+
 #
 # SPARC
 #
diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile
new file mode 100644
index 000..9e63ea7
--- /dev/null
+++ b/board/sh7763rdp/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008 Renesas Solutions Corp.
+# Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+# Copyright (C) 2007 Kenati Technologies, Inc.
+#
+# board/sh7763rdp/Makefile
+#
+# 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
+
+OBJS   := sh7763rdp.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/sh7763rdp/config.mk b/board/sh7763rdp/config.mk
new file mode 100644
index 000..c52dbfd
--- /dev/null
+++ b/board/sh7763rdp/config.mk
@@ -0,0 +1,11 @@
+#
+# board/sh7763rdp/config.mk
+#
+# TEXT_BASE refers to image _after_ relocation.
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+
+TEXT_BASE = 0x8FFC
+
+# PLATFORM_CPPFLAGS += -DCONFIG_MULTIBOOT
diff --git a/board/sh7763rdp/lowlevel_init.S b/board/sh7763rdp/lowlevel_init.S
new file mode 100644
index 000..1942892
--- /dev/null
+++ b/board/sh7763rdp/lowlevel_init.S
@@ -0,0 +1,351 @@
+/*
+ * Copyright (C) 2008 Renesas Solutions Corp.
+ * Copyright (C) 2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ * Copyright (C) 2007 Kenati Technologies, Inc.
+ *
+ * board/sh7763rdp/lowlevel_init.S
+ *
+ * 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

Re: [U-Boot-Users] [PATCH] sh: Renesas Solutions SH7763RDP board support

2008-06-06 Thread Nobuhiro Iwamatsu
Hi, Ben.

On Fri, 06 Jun 2008 08:58:21 -0700
Ben Warren [EMAIL PROTECTED] wrote:

 snip
  +#define CONFIG_NETMASK 255.255.255.0
  +#define CONFIG_IPADDR  192.168.0.63
  +#define CONFIG_SERVERIP192.168.0.1

 Please remove default network address parameters.
Thank you for your comment.

OK. I will remove and resend.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge

2008-05-12 Thread Nobuhiro Iwamatsu
On Mon, 05 May 2008 11:34:20 -0400
Larry Johnson [EMAIL PROTECTED] wrote:

 
 Hi Nobuhiro, Stefan, and everyone,
 
 Sorry for the delay in getting back to you.  My mail reader thinks your 
 patch is part of your signature, so I missed it the first time around.
 
 I did a quick check using the Sequoia board, and it looks like the patch 
 isn't working there.  U-Boot is reporting the class of the bridge as 
 0680, which I assume is why the patch doesn't skip it.
OK. I understood.

 Nobuhiro and Stefan, do you think we can get a working fix for this into 
 1.3.3 (even if it is not the final fix)?  If not, we should patch 
 Sequoia and Korat to add CONFIG_PCI_SKIP_HOST_BRIDGE so they won't be 
 broken in that release.

Yes, I do not want to release the one that I broke, too. 

I made the patch that applied your comment. 
This patch skips PCI bridge ( Class code : 0x06XX). 

Could you check this patch?

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
From c81f6d7f7a1c730d1485b32650caf03dae8ee6f9 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu [EMAIL PROTECTED]
Date: Mon, 12 May 2008 22:39:16 +0900
Subject: [PATCH] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge

Remove CONFIG_PCI_SKIP_HOST_BRIDGE from drivers/pci/pci.c.
Add check PCI class of host bridge(CPU to PCI bridge).

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/pci/pci.c |   20 
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7944b66..eab31e9 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,14 +425,15 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 	 dev   PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
 	 dev += PCI_BDF(0,0,1))
 	{
-
-	/* Bus 0 is not necessarily PCI bridge. */
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
+		/* Read class register */
+		pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, class);
 		/* Skip our host bridge */
-		if ( dev == PCI_BDF(hose-first_busno,0,0) ) {
-#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE)  /* don't skip host bridge */
+		if ( (dev == PCI_BDF(hose-first_busno,0,0)) 
+			((class  0xFF00) == 0x0600) ) { /* CPU to PCI bridge */
+#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
 			/*
-			 * Only skip hostbridge configuration if pciconfighost is not set
+			 * Only skip hostbridge configuration if 
+			 * pciconfighost is not set
 			 */
 			if (getenv(pciconfighost) == NULL) {
 continue; /* Skip our host bridge */
@@ -441,8 +442,6 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 			continue; /* Skip our host bridge */
 #endif /* CONFIG_PCI_CONFIG_HOST_BRIDGE */
 		}
-#endif /* CONFIG_PCI_SKIP_HOST_BRIDGE */
-
 		if (PCI_FUNC(dev)  !found_multi)
 			continue;
 
@@ -477,11 +476,8 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 hose-fixup_irq(hose, dev);
 
 #ifdef CONFIG_PCI_SCAN_SHOW
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
 			/* Skip our host bridge */
-			if ( dev != PCI_BDF(hose-first_busno,0,0) )
-#endif
-			{
+			if((class  0xFF00) != 0x0600){ /* CPU to PCI bridge */
 			unsigned char int_line;
 
 			pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_LINE,
-- 
1.5.5.1

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH][RFC] pci: Remove CONFIG_PCI_SKIP_HOST_BRIDGE and Add check PCI class of host bridge (Re: PCI stopped working on MPC8343)

2008-04-28 Thread Nobuhiro Iwamatsu
Hi, all.

Sorry for the delay.

On Fri, 18 Apr 2008 16:57:15 +0200
Stefan Roese [EMAIL PROTECTED] wrote:

  The patch changes the behavior of the code _unless_
  CONFIG_PCI_SKIP_HOST_BRIDGE is defined.  Defining that switch in the
  Korat configuration fixes the problem.  The MPC8323ERDB configuration
  has also been patched to add the switch, so maybe this is is the cause
  of your problem as well.
 
  I was going to submit the patch for Korat, but then decided I'd first
  like to ask Nobuhiro and the group whether it might not be better to
  change the occurrences of
 
  #if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
 
  in drivers/pci/pci.c to
 
  #if !defined(CONFIG_PCI_NO_SKIP_HOST_BRIDGE)
 
  That would allow those boards that need to patch to specify it
  explicity, while leaving the default functionality unchanged.
 
  Comments?
 
 Yes, I totally agree. Patches should *not* change the default behavior. We 
 should change it as you suggested. Sorry, I must have missed this.
 
 Nobuhiro, could you please send a new patch to fix this problem?

Thank you for your check.
It has troubled you with my patch. 

I rewirte new patch . Could you please check this patch and confirming the work?

Best regards,
 Nobuhiro 
-- 
Nobuhiro Iwamatsu

---
Remove CONFIG_PCI_SKIP_HOST_BRIDGE from drivers/pci/pci.c.
Add check PCI class of host bridge(CPU to PCI bridge).

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/pci/pci.c |   20 
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7944b66..129a6c9 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,14 +425,15 @@ int pci_hose_scan_bus(struct pci_controller *hose, int 
bus)
 dev   PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
 dev += PCI_BDF(0,0,1))
{
-
-   /* Bus 0 is not necessarily PCI bridge. */
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
+   /* Read class register */
+   pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, class);
/* Skip our host bridge */
-   if ( dev == PCI_BDF(hose-first_busno,0,0) ) {
-#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE)  /* don't skip host 
bridge */
+   if ( (dev == PCI_BDF(hose-first_busno,0,0)) 
+   (class == 0x0600)) { /* CPU to PCI bridge */
+#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */
/*
-* Only skip hostbridge configuration if 
pciconfighost is not set
+* Only skip hostbridge configuration if 
+* pciconfighost is not set
 */
if (getenv(pciconfighost) == NULL) {
continue; /* Skip our host bridge */
@@ -441,8 +442,6 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
continue; /* Skip our host bridge */
 #endif /* CONFIG_PCI_CONFIG_HOST_BRIDGE */
}
-#endif /* CONFIG_PCI_SKIP_HOST_BRIDGE */
-
if (PCI_FUNC(dev)  !found_multi)
continue;
 
@@ -477,11 +476,8 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
hose-fixup_irq(hose, dev);
 
 #ifdef CONFIG_PCI_SCAN_SHOW
-#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
/* Skip our host bridge */
-   if ( dev != PCI_BDF(hose-first_busno,0,0) )
-#endif
-   {
+   if( class != 0x0600 ) { /* CPU to PCI bridge */
unsigned char int_line;
 
pci_hose_read_config_byte(hose, dev, 
PCI_INTERRUPT_LINE,
-- 
1.5.5


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [GIT PULL][SH] Please pull git://www.denx.de/git/u-boot-sh.git/

2008-03-29 Thread Nobuhiro Iwamatsu
Dear Wolfgang,

Please pull git://www.denx.de/git/u-boot-sh.git/.

The following changes since commit 74d1e66d22dac91388bc538b2fe19f735edc5b82:
  Bartlomiej Sieka (1):
Fix host tool build breakage, take two

are available in the git repository at:

  git://www.denx.de/git/u-boot-sh master

Mark Jonas (2):
  sh: Added support for SH7720 based board MPR2.
  sh: Removed warning when compiling drivers/serial/serial_sh.c.

Nobuhiro Iwamatsu (9):
  sh: Fix receive FIFO level register of SH4A
  sh: Add support SuperH SH7751/SH7751R
  sh: Move SuperH PCI driver from cpu/sh4 to drivers/pci
  sh: Add support PCI host driver for SH7751/SH7751R
  sh: Add support SH4 cache control
  sh: Add support Renesas Solutions R2D plus board
  sh: Add maintainer of R7780MP to MAINTAINER file
  sh: Remove disable_ctrlc function from R7780MP
  sh: Add support stat structure and stat.h

Yusuke Goda (3):
  sh: Add support SH7780
  sh: Add support PCI of SuperH and SH7780
  sh: Add support Renesas Solutions R7780MP

goda.yusuke (1):
  sh: Add support Renesas Solutions Migo-R board

 CREDITS   |4 +
 MAINTAINERS   |   12 +-
 MAKEALL   |4 +
 Makefile  |   20 ++
 board/MigoR/Makefile  |   48 
 board/MigoR/config.mk |   32 +++
 board/MigoR/lowlevel_init.S   |  269 ++
 board/MigoR/migo_r.c  |   54 +
 board/MigoR/u-boot.lds|  106 +
 board/mpr2/Makefile   |   54 +
 board/mpr2/config.mk  |   37 +++
 board/mpr2/lowlevel_init.S|  148 
 board/mpr2/mpr2.c |  162 +
 board/mpr2/u-boot.lds |  109 +
 board/r2dplus/Makefile|   43 
 board/r2dplus/config.mk   |   23 ++
 board/r2dplus/lowlevel_init.S |  154 +
 board/r2dplus/r2dplus.c   |   76 ++
 board/r2dplus/u-boot.lds  |  105 +
 board/r7780mp/Makefile|   44 
 board/r7780mp/config.mk   |   27 +++
 board/r7780mp/lowlevel_init.S |  428 +++
 board/r7780mp/r7780mp.c   |   81 +++
 board/r7780mp/r7780mp.h   |   54 +
 board/r7780mp/u-boot.lds  |  105 +
 cpu/sh4/cpu.c |3 +-
 doc/README.sh |   51 -
 drivers/pci/Makefile  |3 +
 drivers/pci/pci_sh4.c |   76 ++
 drivers/pci/pci_sh7751.c  |  199 
 drivers/pci/pci_sh7780.c  |  107 +
 drivers/serial/serial_sh.c|   70 +++---
 include/asm-sh/cache.h|   35 +++
 include/asm-sh/cpu_sh4.h  |   13 +-
 include/asm-sh/cpu_sh7720.h   |   25 ++-
 include/asm-sh/cpu_sh7750.h   |4 +-
 include/asm-sh/cpu_sh7780.h   |  503 +
 include/asm-sh/pci.h  |   47 
 include/asm-sh/processor.h|3 +-
 include/configs/MigoR.h   |  151 
 include/configs/mpr2.h|   92 
 include/configs/r2dplus.h |  150 
 include/configs/r7780mp.h |  165 ++
 include/linux/stat.h  |4 +-
 lib_sh/board.c|   13 +-
 45 files changed, 3863 insertions(+), 50 deletions(-)
 create mode 100644 board/MigoR/Makefile
 create mode 100644 board/MigoR/config.mk
 create mode 100644 board/MigoR/lowlevel_init.S
 create mode 100644 board/MigoR/migo_r.c
 create mode 100644 board/MigoR/u-boot.lds
 create mode 100644 board/mpr2/Makefile
 create mode 100644 board/mpr2/config.mk
 create mode 100644 board/mpr2/lowlevel_init.S
 create mode 100644 board/mpr2/mpr2.c
 create mode 100644 board/mpr2/u-boot.lds
 create mode 100644 board/r2dplus/Makefile
 create mode 100644 board/r2dplus/config.mk
 create mode 100644 board/r2dplus/lowlevel_init.S
 create mode 100644 board/r2dplus/r2dplus.c
 create mode 100644 board/r2dplus/u-boot.lds
 create mode 100644 board/r7780mp/Makefile
 create mode 100644 board/r7780mp/config.mk
 create mode 100644 board/r7780mp/lowlevel_init.S
 create mode 100644 board/r7780mp/r7780mp.c
 create mode 100644 board/r7780mp/r7780mp.h
 create mode 100644 board/r7780mp/u-boot.lds
 create mode 100644 drivers/pci/pci_sh4.c
 create mode 100644 drivers/pci/pci_sh7751.c
 create mode 100644 drivers/pci/pci_sh7780.c
 create mode 100644 include/asm-sh/cache.h
 create mode 100644 include/asm-sh/cpu_sh7780.h
 create mode 100644 include/asm-sh/pci.h
 create mode 100644 include/configs/MigoR.h
 create mode 100644 include/configs/mpr2.h
 create mode 100644 include/configs/r2dplus.h
 create mode 100644 include/configs/r7780mp.h


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
U-Boot-Users

[U-Boot-Users] [PATCH v3] sh: Add support Renesas Solutions R2D plus board

2008-03-28 Thread Nobuhiro Iwamatsu
R2D plus is SH reference board used with SH7751R.
This board has 266Mhz CPU, 64MB SDRAM, Cardbus, CF interface,
one PCI bus, VGA, and two Ethernet controller.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |5 ++
 board/r2dplus/Makefile|   43 +++
 board/r2dplus/config.mk   |   23 ++
 board/r2dplus/lowlevel_init.S |  154 +
 board/r2dplus/r2dplus.c   |   76 
 board/r2dplus/u-boot.lds  |  105 
 include/configs/r2dplus.h |  150 +++
 9 files changed, 558 insertions(+), 0 deletions(-)
 create mode 100644 board/r2dplus/Makefile
 create mode 100644 board/r2dplus/config.mk
 create mode 100644 board/r2dplus/lowlevel_init.S
 create mode 100644 board/r2dplus/r2dplus.c
 create mode 100644 board/r2dplus/u-boot.lds
 create mode 100644 include/configs/r2dplus.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 5471c1d..39743c7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -698,6 +698,7 @@ Nobuhiro Iwmaatsu [EMAIL PROTECTED]
 
MS7750SESH7750
MS7722SESH7722
+   R2DPlus SH7751R
 
 Mark Jonas [EMAIL PROTECTED]
 
diff --git a/MAKEALL b/MAKEALL
index ea02a8a..756cf87 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -701,6 +701,7 @@ LIST_sh4=  \
ms7722se\
Migo-R  \
r7780mp \
+   r2dplus \
 
 
 LIST_sh3= \
diff --git a/Makefile b/Makefile
index 717d4c1..975ba15 100644
--- a/Makefile
+++ b/Makefile
@@ -2865,6 +2865,11 @@ r7780mp_config: unconfig
@echo #define CONFIG_R7780MP 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r7780mp
 
+r2dplus_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_R2DPLUS 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 r2dplus
+
 #
 #
 #
diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile
new file mode 100644
index 000..ed609ea
--- /dev/null
+++ b/board/r2dplus/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+include $(TOPDIR)/config.mk
+
+LIB= lib$(BOARD).a
+
+OBJS   := r2dplus.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/r2dplus/config.mk b/board/r2dplus/config.mk
new file mode 100644
index 000..1ec7dcc
--- /dev/null
+++ b/board/r2dplus/config.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+TEXT_BASE = 0x0FFC
diff --git a/board/r2dplus/lowlevel_init.S b/board/r2dplus/lowlevel_init.S
new file mode 100644
index 000..5755de8
--- /dev/null
+++ b/board/r2dplus/lowlevel_init.S

Re: [U-Boot-Users] [PATCH] sh: Add support PCI host driver for SH7751/SH7751R

2008-03-23 Thread Nobuhiro Iwamatsu
Hi ,

Thank you for your check.

On Wed, 12 Mar 2008 23:09:50 +0100
Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED] wrote:

   START  = start.o
   OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o \
  -   pci-sh4.o pci-sh7780.o
  +   pci-sh4.o pci-sh7751.o pci-sh7780.o
 Could you split it to one line for one file
  +#if defined(CONFIG_PCI)  defined(CONFIG_SH4_PCI) \
  +defined(CONFIG_SH7751_PCI)
 Could you move it to the Makefile
[snip]
  +
  +#include asm/processor.h
  +#include asm/io.h
  +#include pci.h
 
 I think it will be good to move the pci drivers to drivers/pci
OK, I will fix this, send patch .

regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
iwamatsu @ nigauri.org / superh.org / debian.or.jp
GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Move SuperH PCI driver from cpu/sh4 to drivers/pci

2008-03-23 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 cpu/sh4/Makefile  |3 +-
 cpu/sh4/pci-sh4.c |   81 -
 cpu/sh4/pci-sh7780.c  |  111 -
 drivers/pci/Makefile  |2 +
 drivers/pci/pci_sh4.c |   76 +++
 drivers/pci/pci_sh7780.c  |  107 +++
 include/configs/r7780mp.h |1 +
 7 files changed, 187 insertions(+), 194 deletions(-)
 delete mode 100644 cpu/sh4/pci-sh4.c
 delete mode 100644 cpu/sh4/pci-sh7780.c
 create mode 100644 drivers/pci/pci_sh4.c
 create mode 100644 drivers/pci/pci_sh7780.c

diff --git a/cpu/sh4/Makefile b/cpu/sh4/Makefile
index 7a53cb6..82789fe 100644
--- a/cpu/sh4/Makefile
+++ b/cpu/sh4/Makefile
@@ -29,8 +29,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o \
-   pci-sh4.o pci-sh7780.o
+OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o 
 
 all:   .depend $(START) $(LIB)
 
diff --git a/cpu/sh4/pci-sh4.c b/cpu/sh4/pci-sh4.c
deleted file mode 100644
index 9d14f8d..000
--- a/cpu/sh4/pci-sh4.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * SH4 PCI Controller (PCIC) for U-Boot.
- * (C) Dustin McIntire ([EMAIL PROTECTED])
- * (C) 2007 Nobuhiro Iwamatsu
- * (C) 2008 Yusuke Goda [EMAIL PROTECTED]
- *
- * u-boot/cpu/sh4/pci-sh4.c
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include common.h
-
-#if defined(CONFIG_PCI)  \
-   defined(CONFIG_SH4_PCI)
-
-#include asm/processor.h
-#include asm/io.h
-#include asm/pci.h
-#include pci.h
-
-int pci_sh4_init(struct pci_controller *hose)
-{
-   hose-first_busno = 0;
-   hose-region_count = 0;
-   hose-last_busno = 0xff;
-
-   /* PCI memory space */
-   pci_set_region(hose-regions + 0,
-   CONFIG_PCI_MEM_BUS,
-   CONFIG_PCI_MEM_PHYS,
-   CONFIG_PCI_MEM_SIZE,
-   PCI_REGION_MEM);
-   hose-region_count++;
-
-   /* PCI IO space */
-   pci_set_region(hose-regions + 1,
-   CONFIG_PCI_IO_BUS,
-   CONFIG_PCI_IO_PHYS,
-   CONFIG_PCI_IO_SIZE,
-   PCI_REGION_IO);
-   hose-region_count++;
-
-   udelay(1000);
-
-   pci_set_ops(hose,
-   pci_hose_read_config_byte_via_dword,
-   pci_hose_read_config_word_via_dword,
-   pci_sh4_read_config_dword,
-   pci_hose_write_config_byte_via_dword,
-   pci_hose_write_config_word_via_dword,
-   pci_sh4_write_config_dword);
-
-   pci_register_hose(hose);
-
-   udelay(1000);
-
-#ifdef CONFIG_PCI_SCAN_SHOW
-   printf(PCI:   Bus Dev VenId DevId Class Int\n);
-#endif
-   hose-last_busno = pci_hose_scan(hose);
-   return 0;
-}
-
-#endif /* defined(CONFIG_PCI)  defined(CONFIG_SH4_PCI) */
diff --git a/cpu/sh4/pci-sh7780.c b/cpu/sh4/pci-sh7780.c
deleted file mode 100644
index 851d767..000
--- a/cpu/sh4/pci-sh7780.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * SH7780 PCI Controller (PCIC) for U-Boot.
- * (C) Dustin McIntire ([EMAIL PROTECTED])
- * (C) 2007 Nobuhiro Iwamatsu
- * (C) 2008 Yusuke Goda [EMAIL PROTECTED]
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include common.h
-
-#if defined(CONFIG_PCI)  defined(CONFIG_SH4_PCI) \
-defined(CONFIG_CPU_SH7780)
-
-#include asm

[U-Boot-Users] [PATCH] sh: Remove disable_ctrlc function from R7780MP

2008-03-23 Thread Nobuhiro Iwamatsu
 Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 board/r7780mp/r7780mp.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/board/r7780mp/r7780mp.c b/board/r7780mp/r7780mp.c
index 1e0f536..1a37711 100644
--- a/board/r7780mp/r7780mp.c
+++ b/board/r7780mp/r7780mp.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Nobuhiro Iwamatsu
+ * Copyright (C) 2007,2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
  * Copyright (C) 2008 Yusuke Goda [EMAIL PROTECTED]
  *
  * This program is free software; you can redistribute it and/or
@@ -40,9 +40,6 @@ int board_init(void)
/* SCIF Enable */
*(vu_short*)PHCR = 0x;
 
-   /* Disable Control-C */
-   disable_ctrlc(1);
-
return 0;
 }
 
-- 
1.5.4.3


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] sh: Add support Renesas Solutions R2D plus board

2008-03-23 Thread Nobuhiro Iwamatsu
R2D plus is SH reference board used with SH7751R.
This board has 266Mhz CPU, 64MB SDRAM, Cardbus, CF interface,
one PCI bus, VGA, and two Ethernet controller.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |5 ++
 board/r2dplus/Makefile|   43 +++
 board/r2dplus/config.mk   |   23 ++
 board/r2dplus/lowlevel_init.S |  154 +
 board/r2dplus/r2dplus.c   |   76 
 board/r2dplus/u-boot.lds  |  105 
 include/configs/r2dplus.h |  152 
 9 files changed, 560 insertions(+), 0 deletions(-)
 create mode 100644 board/r2dplus/Makefile
 create mode 100644 board/r2dplus/config.mk
 create mode 100644 board/r2dplus/lowlevel_init.S
 create mode 100644 board/r2dplus/r2dplus.c
 create mode 100644 board/r2dplus/u-boot.lds
 create mode 100644 include/configs/r2dplus.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 5add085..4e4c358 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -696,6 +696,7 @@ Nobuhiro Iwmaatsu [EMAIL PROTECTED]
 
MS7750SESH7750
MS7722SESH7722
+   R2DPlus SH7751R
 
 Mark Jonas [EMAIL PROTECTED]
 
diff --git a/MAKEALL b/MAKEALL
index 7668aee..97f91cb 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -698,6 +698,7 @@ LIST_sh4=  \
ms7722se\
Migo-R  \
r7780mp \
+   r2dplus \
 
 
 LIST_sh3= \
diff --git a/Makefile b/Makefile
index 62b5d2e..1cc6c84 100644
--- a/Makefile
+++ b/Makefile
@@ -2850,6 +2850,11 @@ r7780mp_config: unconfig
@echo #define CONFIG_R7780MP 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r7780mp
 
+r2dplus_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_R2DPLUS 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 r2dplus
+
 #
 #
 #
diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile
new file mode 100644
index 000..ed609ea
--- /dev/null
+++ b/board/r2dplus/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+include $(TOPDIR)/config.mk
+
+LIB= lib$(BOARD).a
+
+OBJS   := r2dplus.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/r2dplus/config.mk b/board/r2dplus/config.mk
new file mode 100644
index 000..1ec7dcc
--- /dev/null
+++ b/board/r2dplus/config.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+TEXT_BASE = 0x0FFC
diff --git a/board/r2dplus/lowlevel_init.S b/board/r2dplus/lowlevel_init.S
new file mode 100644
index 000..5755de8
--- /dev/null
+++ b/board/r2dplus/lowlevel_init.S

Re: [U-Boot-Users] [PATCH] sh: Remove a warning when compiling drivers/serial/serial_sh.c

2008-03-23 Thread Nobuhiro Iwamatsu
Hi,  Mark.

On Sat, 22 Mar 2008 19:27:52 +0100
Mark Jonas [EMAIL PROTECTED] wrote:

 Hello,
 
 The attached patch removes a warning when compiling 
 drivers/serial/serial_sh.c.
 
 Regards,
 Mark Jonas
 
 CHANGELOG:
 --
 sh: Removed warning when compiling drivers/serial/serial_sh.c.
 
 Signed-off-by: Mark Jonas [EMAIL PROTECTED]
 
Applied, thanks.
I put testing branch.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
iwamatsu @ nigauri.org / debian.or.jp / superh.org
GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Add support Renesas Solutions R2D plus board

2008-03-12 Thread Nobuhiro Iwamatsu
R2D plus is SH reference board used with SH7751R.
This board has 266Mhz CPU, 64MB SDRAM, Cardbus, CF interface,
one PCI bus, VGA, and two Ethernet controller.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |5 ++
 board/r2dplus/Makefile|   43 +++
 board/r2dplus/config.mk   |   23 ++
 board/r2dplus/lowlevel_init.S |  154 +
 board/r2dplus/r2dplus.c   |   76 
 board/r2dplus/u-boot.lds  |  105 
 include/configs/r2dplus.h |  151 
 9 files changed, 559 insertions(+), 0 deletions(-)
 create mode 100644 board/r2dplus/Makefile
 create mode 100644 board/r2dplus/config.mk
 create mode 100644 board/r2dplus/lowlevel_init.S
 create mode 100644 board/r2dplus/r2dplus.c
 create mode 100644 board/r2dplus/u-boot.lds
 create mode 100644 include/configs/r2dplus.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 5add085..4e4c358 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -696,6 +696,7 @@ Nobuhiro Iwmaatsu [EMAIL PROTECTED]
 
MS7750SESH7750
MS7722SESH7722
+   R2DPlus SH7751R
 
 Mark Jonas [EMAIL PROTECTED]
 
diff --git a/MAKEALL b/MAKEALL
index 7668aee..97f91cb 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -698,6 +698,7 @@ LIST_sh4=  \
ms7722se\
Migo-R  \
r7780mp \
+   r2dplus \
 
 
 LIST_sh3= \
diff --git a/Makefile b/Makefile
index 62b5d2e..1cc6c84 100644
--- a/Makefile
+++ b/Makefile
@@ -2850,6 +2850,11 @@ r7780mp_config: unconfig
@echo #define CONFIG_R7780MP 1  include/config.h
@./mkconfig -a $(@:_config=) sh sh4 r7780mp
 
+r2dplus_config  :   unconfig
+   @ include/config.h
+   @echo #define CONFIG_R2DPLUS 1  include/config.h
+   @./mkconfig -a $(@:_config=) sh sh4 r2dplus
+
 #
 #
 #
diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile
new file mode 100644
index 000..ed609ea
--- /dev/null
+++ b/board/r2dplus/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+include $(TOPDIR)/config.mk
+
+LIB= lib$(BOARD).a
+
+OBJS   := r2dplus.o
+SOBJS  := lowlevel_init.o
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) crv $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+.depend:   Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+   $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)  $@
+
+-include .depend
+
+#
diff --git a/board/r2dplus/config.mk b/board/r2dplus/config.mk
new file mode 100644
index 000..1ec7dcc
--- /dev/null
+++ b/board/r2dplus/config.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2007,2008
+# 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
+#
+#
+# NOTE: Must match value used in u-boot.lds (in this directory).
+#
+TEXT_BASE = 0x0FFC
diff --git a/board/r2dplus/lowlevel_init.S b/board/r2dplus/lowlevel_init.S
new file mode 100644
index 000..5755de8
--- /dev/null
+++ b/board/r2dplus/lowlevel_init.S

[U-Boot-Users] [PATCH] sh: Add support PCI host driver for SH7751/SH7751R

2008-03-12 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 cpu/sh4/Makefile |2 +-
 cpu/sh4/pci-sh7751.c |  204 ++
 include/asm-sh/pci.h |4 +-
 3 files changed, 208 insertions(+), 2 deletions(-)
 create mode 100644 cpu/sh4/pci-sh7751.c

diff --git a/cpu/sh4/Makefile b/cpu/sh4/Makefile
index 7a53cb6..6dc8a59 100644
--- a/cpu/sh4/Makefile
+++ b/cpu/sh4/Makefile
@@ -30,7 +30,7 @@ LIB   = $(obj)lib$(CPU).a
 
 START  = start.o
 OBJS   = cpu.o interrupts.o watchdog.o time.o cache.o \
-   pci-sh4.o pci-sh7780.o
+   pci-sh4.o pci-sh7751.o pci-sh7780.o
 
 all:   .depend $(START) $(LIB)
 
diff --git a/cpu/sh4/pci-sh7751.c b/cpu/sh4/pci-sh7751.c
new file mode 100644
index 000..86d64dd
--- /dev/null
+++ b/cpu/sh4/pci-sh7751.c
@@ -0,0 +1,204 @@
+/*
+ * SH7751 PCI Controller (PCIC) for U-Boot.
+ * (C) Dustin McIntire ([EMAIL PROTECTED])
+ * (C) 2007,2008 Nobuhiro Iwamatsu [EMAIL PROTECTED]
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+
+#if defined(CONFIG_PCI)  defined(CONFIG_SH4_PCI) \
+defined(CONFIG_SH7751_PCI)
+
+#include asm/processor.h
+#include asm/io.h
+#include pci.h
+
+/* Register addresses and such */
+#define SH7751_BCR1(vu_long *)0xFF80
+#define SH7751_BCR2(vu_short*)0xFF84
+#define SH7751_WCR1(vu_long *)0xFF88
+#define SH7751_WCR2(vu_long *)0xFF8C
+#define SH7751_WCR3(vu_long *)0xFF800010
+#define SH7751_MCR (vu_long *)0xFF800014
+#define SH7751_BCR3(vu_short*)0xFF800050
+#define SH7751_PCICONF0 (vu_long *)0xFE20
+#define SH7751_PCICONF1 (vu_long *)0xFE24
+#define SH7751_PCICONF2 (vu_long *)0xFE28
+#define SH7751_PCICONF3 (vu_long *)0xFE2C
+#define SH7751_PCICONF4 (vu_long *)0xFE200010
+#define SH7751_PCICONF5 (vu_long *)0xFE200014
+#define SH7751_PCICONF6 (vu_long *)0xFE200018
+#define SH7751_PCICR(vu_long *)0xFE200100
+#define SH7751_PCILSR0  (vu_long *)0xFE200104
+#define SH7751_PCILSR1  (vu_long *)0xFE200108
+#define SH7751_PCILAR0  (vu_long *)0xFE20010C
+#define SH7751_PCILAR1  (vu_long *)0xFE200110
+#define SH7751_PCIMBR   (vu_long *)0xFE2001C4
+#define SH7751_PCIIOBR  (vu_long *)0xFE2001C8
+#define SH7751_PCIPINT  (vu_long *)0xFE2001CC
+#define SH7751_PCIPINTM (vu_long *)0xFE2001D0
+#define SH7751_PCICLKR  (vu_long *)0xFE2001D4
+#define SH7751_PCIBCR1  (vu_long *)0xFE2001E0
+#define SH7751_PCIBCR2  (vu_long *)0xFE2001E4
+#define SH7751_PCIWCR1  (vu_long *)0xFE2001E8
+#define SH7751_PCIWCR2  (vu_long *)0xFE2001EC
+#define SH7751_PCIWCR3  (vu_long *)0xFE2001F0
+#define SH7751_PCIMCR   (vu_long *)0xFE2001F4
+#define SH7751_PCIBCR3  (vu_long *)0xFE2001F8
+
+#define BCR1_BREQEN0x0008
+#define PCI_SH7751_ID  0x35051054
+#define PCI_SH7751R_ID 0x350E1054
+#define SH7751_PCICONF1_WCC0x0080
+#define SH7751_PCICONF1_PER0x0040
+#define SH7751_PCICONF1_BUM0x0004
+#define SH7751_PCICONF1_MES0x0002
+#define SH7751_PCICONF1_CMDS   0x00C6
+#define SH7751_PCI_HOST_BRIDGE 0x6
+#define SH7751_PCICR_PREFIX0xa500
+#define SH7751_PCICR_PRST  0x0002
+#define SH7751_PCICR_CFIN  0x0001
+#define SH7751_PCIPINT_D3  0x0002
+#define SH7751_PCIPINT_D0  0x0001
+#define SH7751_PCICLKR_PREFIX   0xa500
+
+#define SH7751_PCI_MEM_BASE0xFD00
+#define SH7751_PCI_MEM_SIZE0x0100
+#define SH7751_PCI_IO_BASE 0xFE24
+#define SH7751_PCI_IO_SIZE 0x0004
+
+#define SH7751_CS3_BASE_ADDR0x0C00
+#define SH7751_P2CS3_BASE_ADDR  0xAC00
+
+#define SH7751_PCIPAR   (vu_long *)0xFE2001C0
+#define SH7751_PCIPDR   (vu_long *)0xFE200220
+
+#define p4_in(addr) *(addr)
+#define p4_out(data,addr) *(addr) = (data)
+
+/* Double word */
+int pci_sh4_read_config_dword(struct pci_controller *hose,
+   pci_dev_t dev, int offset, u32 *value)
+{
+   u32 par_data = 0x8000 | dev;
+
+   p4_out(par_data | (offset  0xfc), SH7751_PCIPAR);
+   *value = p4_in

[U-Boot-Users] [RFC][PATCH] pci: Divided PCI driver for PowerPC.

2008-03-12 Thread Nobuhiro Iwamatsu
Hi, 

I have the consultation about PCI of PowerPC.
I read PCI souce code, I notice that pci_hose_phys_to_bus and 
pci_hose_bus_to_phys 
functions are PowerPC specific. Is this correct?
I wrote patch so that these functions might use only PPC. 
When this patch is applied, driver's useless macro is lost. 
(ex. #ifndef CONFIG_PPC )

I don't have knowledge of PowerPC Architecture.
Could you indicate the mistake?

regards,
 Nobuhiro

--- 
pci_hose_phys_to_bus and pci_hose_bus_to_phys functions are PowerPC specific.
These functions were divided for PowerPC.
A specific code to PowerPC can be removed from driver.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/dc2114x.c  |4 
 drivers/net/eepro100.c |5 -
 drivers/pci/pci.c  |8 +---
 include/pci.h  |   28 ++--
 4 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 7238922..5bd279b 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -185,11 +185,7 @@ static void  dc21x4x_halt(struct eth_device* dev);
 extern void  dc21x4x_select_media(struct eth_device* dev);
 #endif
 
-#if defined(CONFIG_E500)
-#define phys_to_bus(a) (a)
-#else
 #define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev-priv, a)
-#endif
 
 static int INL(struct eth_device* dev, u_long addr)
 {
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 96ed271..94e9bff 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -249,13 +249,8 @@ static int eepro100_send (struct eth_device *dev, volatile 
void *packet,
 static int eepro100_recv (struct eth_device *dev);
 static void eepro100_halt (struct eth_device *dev);
 
-#if defined(CONFIG_E500) || defined(CONFIG_DB64360) || defined(CONFIG_DB64460)
-#define bus_to_phys(a) (a)
-#define phys_to_bus(a) (a)
-#else
 #define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)dev-priv, a)
 #define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev-priv, a)
-#endif
 
 static inline int INW (struct eth_device *dev, u_long addr)
 {
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 50ca6b0..2183f02 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -217,9 +217,11 @@ pci_dev_t pci_find_device(unsigned int vendor, unsigned 
int device, int index)
 }
 
 /*
- *
+ * These function is PPC specific.
+ *  - pci_hose_phys_to_bus
+ *  - pci_hose_bus_to_phys
  */
-
+#if defined(CONFIG_PPC)
 unsigned long pci_hose_phys_to_bus (struct pci_controller *hose,
unsigned long phys_addr,
unsigned long flags)
@@ -282,7 +284,7 @@ unsigned long pci_hose_bus_to_phys(struct pci_controller* 
hose,
 Done:
return 0;
 }
-
+#endif /* CONFIG_PPC */
 /*
  *
  */
diff --git a/include/pci.h b/include/pci.h
index 8e5dacc..543c0db 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -432,20 +432,36 @@ extern __inline__ void pci_set_ops(struct pci_controller 
*hose,
 
 extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 
cfg_data);
 
+#if defined(CONFIG_PPC)
 extern unsigned long pci_hose_bus_to_phys(struct pci_controller* hose,
  unsigned long addr, unsigned long 
flags);
 extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose,
  unsigned long addr, unsigned long 
flags);
 
-#define pci_phys_to_bus(dev, addr, flags) \
+# define pci_phys_to_bus(dev, addr, flags) \
pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
-#define pci_bus_to_phys(dev, addr, flags) \
+# define pci_bus_to_phys(dev, addr, flags) \
pci_hose_bus_to_phys(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
 
-#define pci_phys_to_mem(dev, addr) pci_phys_to_bus((dev), (addr), 
PCI_REGION_MEM)
-#define pci_mem_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), 
PCI_REGION_MEM)
-#define pci_phys_to_io(dev, addr)  pci_phys_to_bus((dev), (addr), 
PCI_REGION_IO)
-#define pci_io_to_phys(dev, addr)  pci_bus_to_phys((dev), (addr), 
PCI_REGION_IO)
+# if defined(CONFIG_E500) || defined(CONFIG_DB64360) || defined(CONFIG_DB64460)
+#  define pci_phys_to_mem(dev, addr)   (addr)
+#  define pci_mem_to_phys(dev, addr)   (addr)
+#  define pci_phys_to_io(dev, addr)(addr)
+#  define pci_io_to_phys(dev, addr)(addr)
+# else /* defined(CONFIG_E500) || defined(CONFIG_DB64360) || 
defined(CONFIG_DB64460) */
+#  define pci_phys_to_mem(dev, addr)   pci_phys_to_bus((dev), (addr), 
PCI_REGION_MEM)
+#  define pci_mem_to_phys(dev, addr)   pci_bus_to_phys((dev), (addr), 
PCI_REGION_MEM)
+#  define pci_phys_to_io(dev, addr)pci_phys_to_bus((dev), (addr), 
PCI_REGION_IO)
+#  define pci_io_to_phys(dev, addr)pci_bus_to_phys((dev), (addr), 
PCI_REGION_IO)
+# endif /* defined(CONFIG_E500) || defined(CONFIG_DB64360) || 
defined(CONFIG_DB64460) */
+
+#else /* CONFIG_PPC */
+/* Architectures other than PPC

[U-Boot-Users] [PATCH] sh: Add support SH4 cache control

2008-03-12 Thread Nobuhiro Iwamatsu
Add support SH4 cache control and flash_cache function

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 cpu/sh4/cpu.c  |3 ++-
 include/asm-sh/cache.h |   35 +++
 2 files changed, 37 insertions(+), 1 deletions(-)
 create mode 100644 include/asm-sh/cache.h

diff --git a/cpu/sh4/cpu.c b/cpu/sh4/cpu.c
index 0ebf951..d94e139 100644
--- a/cpu/sh4/cpu.c
+++ b/cpu/sh4/cpu.c
@@ -24,6 +24,7 @@
 #include common.h
 #include command.h
 #include asm/processor.h
+#include asm/cache.h
 
 int checkcpu(void)
 {
@@ -51,7 +52,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 
 void flush_cache (unsigned long addr, unsigned long size)
 {
-
+   dcache_invalid_range( addr , addr + size );
 }
 
 void icache_enable (void)
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h
new file mode 100644
index 000..b987bbb
--- /dev/null
+++ b/include/asm-sh/cache.h
@@ -0,0 +1,35 @@
+#ifndef __ASM_SH_CACHE_H
+#define __ASM_SH_CACHE_H
+
+#if defined(CONFIG_SH4)
+
+#define L1_CACHE_BYTES 32
+struct __large_struct { unsigned long buf[100]; };
+#define __m(x) (*(struct __large_struct *)(x))
+
+void dcache_wback_range(u32 start, u32 end)
+{
+u32 v;
+
+start = ~(L1_CACHE_BYTES-1);
+for (v = start; v  end; v+=L1_CACHE_BYTES) {
+asm volatile(ocbwb %0
+ : /* no output */
+ : m (__m(v)));
+}
+}
+
+void dcache_invalid_range(u32 start, u32 end)
+{
+u32 v;
+
+start = ~(L1_CACHE_BYTES-1);
+for (v = start; v  end; v+=L1_CACHE_BYTES) {
+asm volatile(ocbi %0
+ : /* no output */
+ : m (__m(v)));
+}
+}
+#endif /* CONFIG_SH4 */
+
+#endif /* __ASM_SH_CACHE_H */
-- 
1.5.4.3


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Updated support for MPR2 board (SH7720)

2008-03-11 Thread Nobuhiro Iwamatsu
On Mon, 10 Mar 2008 11:37:10 +0100
Mark Jonas [EMAIL PROTECTED] wrote:

 Hello,
 
 the attached patch replaces the patch I sent before. I added myself to
 the list of board maintainers and diffed against U-Boot git from this
 morning, i.e. v1.3.2.
 
 The attached patch adds support for the Renesas SH7720 based board MPR2.
 
 Regards,
 Mark Jonas
 
 CHANGELOG:
 --
 sh: Added support for SH7720 based board MPR2.
 
 Signed-off-by: Mark Jonas [EMAIL PROTECTED]
 
Applied, thanks.
I put testing branch.

regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
iwamatsu @ nigauri.org / debian.or.jp / superh.org
GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Fix receive FIFO level register of SH4A

2008-03-10 Thread Nobuhiro Iwamatsu
Receive FIFO level register is different in SH4A.
Because register is different, cannot occasionally receive data.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/serial/serial_sh.c |   52 +--
 1 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index ecb97bf..8ee58a0 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -37,41 +37,45 @@
 #define SCFCR  (vu_short *)(SCIF_BASE + 0x18)
 #define SCFDR  (vu_short *)(SCIF_BASE + 0x1C)
 #ifdef CONFIG_CPU_SH7720 /* SH7720 specific */
-#define SCFSR  (vu_short *)(SCIF_BASE + 0x14)   /* SCSSR */
-#define SCFTDR (vu_char  *)(SCIF_BASE + 0x20)
-#define SCFRDR (vu_char  *)(SCIF_BASE + 0x24)
+# define SCFSR (vu_short *)(SCIF_BASE + 0x14) /* SCSSR */
+# define SCFTDR(vu_char  *)(SCIF_BASE + 0x20)
+# define SCFRDR(vu_char  *)(SCIF_BASE + 0x24)
 #else
-#define SCFTDR (vu_char  *)(SCIF_BASE + 0xC)
-#define SCFSR  (vu_short *)(SCIF_BASE + 0x10)
-#define SCFRDR (vu_char  *)(SCIF_BASE + 0x14)
+# define SCFTDR (vu_char  *)(SCIF_BASE + 0xC)
+# define SCFSR (vu_short *)(SCIF_BASE + 0x10)
+# define SCFRDR (vu_char  *)(SCIF_BASE + 0x14)
 #endif
 
 #if defined(CONFIG_CPU_SH7780) || \
defined(CONFIG_CPU_SH7785)
-#define SCRFDR (vu_short *)(SCIF_BASE + 0x20)
-#define SCSPTR (vu_short *)(SCIF_BASE + 0x24)
-#define SCLSR   (vu_short *)(SCIF_BASE + 0x28)
-#define SCRER  (vu_short *)(SCIF_BASE + 0x2C)
-#define LSR_ORER   1
+# define SCRFDR(vu_short *)(SCIF_BASE + 0x20)
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x24)
+# define SCLSR   (vu_short *)(SCIF_BASE + 0x28)
+# define SCRER (vu_short *)(SCIF_BASE + 0x2C)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0xFF
 #elif defined(CONFIG_CPU_SH7750) || \
defined(CONFIG_CPU_SH7722)
-#define SCSPTR (vu_short *)(SCIF_BASE + 0x20)
-#define SCLSR  (vu_short *)(SCIF_BASE + 0x24)
-#define LSR_ORER   1
+# define SCSPTR(vu_short *)(SCIF_BASE + 0x20)
+# define SCLSR (vu_short *)(SCIF_BASE + 0x24)
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0x1F
 #elif defined(CONFIG_CPU_SH7720)
-#define SCLSR   (vu_short *)(SCIF_BASE + 0x24)
-#define LSR_ORER   0x0200
+# define SCLSR   (vu_short *)(SCIF_BASE + 0x24)
+# define LSR_ORER  0x0200
+# define FIFOLEVEL_MASK0x1F
 #elif defined(CONFIG_CPU_SH7710)
defined(CONFIG_CPU_SH7712)
-#define SCLSR  SCFSR   /* SCSSR */
-#define LSR_ORER   1
+# define SCLSR SCFSR   /* SCSSR */
+# define LSR_ORER  1
+# define FIFOLEVEL_MASK0x1F
 #endif
 
 /* SCBRR register value setting */
 #if defined(CONFIG_CPU_SH7720)
-#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
+# define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
 #else  /* Generic SuperH */
-#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
+# define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
 #endif
 
 #define SCR_RE (1  4)
@@ -109,12 +113,16 @@ int serial_init (void)
 
 static int serial_tx_fifo_level (void)
 {
-   return (*SCFDR  8)  0x1F;
+   return (*SCFDR  8)  FIFOLEVEL_MASK;
 }
 
 static int serial_rx_fifo_level (void)
 {
-   return (*SCFDR  0)  0x1F;
+#if defined(CONFIG_SH4A)
+   return (*SCRFDR  0)  FIFOLEVEL_MASK;
+#else
+   return (*SCFDR  0)  FIFOLEVEL_MASK;
+#endif
 }
 
 void serial_raw_putc (const char c)
-- 
1.5.3.8

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support for MPR2 board

2008-03-07 Thread Nobuhiro Iwamatsu
Hello, Mark.

On Fri, 7 Mar 2008 10:23:35 +0100
Mark Jonas [EMAIL PROTECTED] wrote:

 Hello,
 
 the attached patch adds support for the Renesas SH7720 based board MPR2.
  

Please transmit the patch by the text without settling with tar. Could you 
send it again?
Please do not send it to this ML with the HTML mail. 

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support for MPR2 board

2008-03-07 Thread Nobuhiro Iwamatsu
Hello, Mark.

On Fri, 7 Mar 2008 23:05:16 +0100
Mark Jonas [EMAIL PROTECTED] wrote:

 Hello Nobuhiro,
 
the attached patch adds support for the Renesas SH7720 based board MPR2.
 
   Please transmit the patch by the text without settling with tar. Could you
   send it again?
 
 Attached you'll find the uncompressed patch this time. In my previous
 post the patch was not tared but compressed using bzip2. I choose to
 compress the patches because the Ethernet patch would have been more
 than 40 KiB uncompressed. Isn't compressing patches an option on this
 mailing list to minimize traffic?
 
Please check http://www.denx.de/wiki/UBoot/Patches .
The rule of this ML is written here. 

   Please do not send it to this ML with the HTML mail.
 
 I am terribly sorry to have sent HTML - although my default setting in
 GMail is plain text and not rich formatting. I also looked up my
 posting on 
 http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg02469.html
 and I am not able to see any HTML. I hope that there is no HTML this
 time.
Oh, Sorry!
It is my mistake. 

[u-boot_mpr2_20080307.patch  application/octet-stream (23.7KB)]
diff -purN u-boot_v1.3.2-rc3_20080303/board/mpr2/config.mk 
u-boot_v1.3.2-rc3_20080303_mpr2_no_net/board/mpr2/config.mk
--- u-boot_v1.3.2-rc3_20080303/board/mpr2/config.mk 1970-01-01 
01:00:00.0 +0100
+++ u-boot_v1.3.2-rc3_20080303_mpr2_no_net/board/mpr2/config.mk 2008-03-07 
08:13:13.0 +0100
snip
Please add your name and board name to MAINTAINERS file.

regards,
 Nobuhiro
 
-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] net: rtl8169: Add processing when OWNbit did't enable in rtl_recv()

2008-03-07 Thread Nobuhiro Iwamatsu
When rtl_recv() of rtl8169 is called, OWNbit of status register
is not enable occasionally.
rtl_recv() doesn't work normally when the driver doesn't do
appropriate processing.
This patch fix this problem.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/net/rtl8169.c |   18 --
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index d71323f..b142ccc 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -245,8 +245,17 @@ static struct {
u8 version; /* depend on RTL8169 docs */
u32 RxConfigMask;   /* should clear the bits supported by this chip 
*/
 } rtl_chip_info[] = {
-   {RTL-8169, 0x00, 0xff7e1880,},
-   {RTL-8169, 0x04, 0xff7e1880,},
+   {RTL-8169, 0x00, 0xff7e1880,},
+   {RTL-8169, 0x04, 0xff7e1880,},
+   {RTL-8169, 0x00, 0xff7e1880,},
+   {RTL-8169s/8110s, 0x02, 0xff7e1880,},
+   {RTL-8169s/8110s, 0x04, 0xff7e1880,},
+   {RTL-8169sb/8110sb,   0x10, 0xff7e1880,},
+   {RTL-8169sc/8110sc,   0x18, 0xff7e1880,},
+   {RTL-8168b/8111sb,0x30, 0xff7e1880,},
+   {RTL-8168b/8111sb,0x38, 0xff7e1880,},
+   {RTL-8101e,   0x34, 0xff7e1880,},
+   {RTL-8100e,   0x32, 0xff7e1880,},
 };
 
 enum _DescStatusBit {
@@ -312,6 +321,7 @@ static const unsigned int rtl8169_rx_config =
 (RX_FIFO_THRESH  RxCfgFIFOShift) | (RX_DMA_BURST  RxCfgDMAShift);
 
 static struct pci_device_id supported[] = {
+   {PCI_VENDOR_ID_REALTEK, 0x8167},
{PCI_VENDOR_ID_REALTEK, 0x8169},
{}
 };
@@ -433,6 +443,10 @@ static int rtl_recv(struct eth_device *dev)
tpc-cur_rx = cur_rx;
return 1;
 
+   } else {
+   ushort sts = RTL_R8(IntrStatus);
+   RTL_W8(IntrStatus, sts  ~(TxErr | RxErr | SYSErr));
+   udelay(100);/* wait */
}
tpc-cur_rx = cur_rx;
return (0); /* initially as this is called to flush the 
input */
-- 
1.5.3.8

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support SH7780

2008-03-06 Thread Nobuhiro Iwamatsu
On Wed, 05 Mar 2008 17:01:11 +0900
goda.yusuke [EMAIL PROTECTED] wrote:

 SH7780 is CPU of Renesas Technology.
 This CPU has
  - CPU clock 400MHz
  - PCI support
  - DDR-SDRAM controller
  - etc ...
 
 Signed-off-by: Yusuke Goda [EMAIL PROTECTED]
Applied, thanks.
I put testing branch.

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] pci: Add CONFIG_PCI_SKIP_HOST_BRIDGE

2008-03-06 Thread Nobuhiro Iwamatsu
In current source code, when the device number of PCI is 0, process PCI
bridge without fail. However, when the device number is 0, it is not PCI
always bridge. There are times when device of PCI allocates.

When CONFIG_PCI_SKIP_HOST_BRIDGE is enable, this problem is solved when
use this patch.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/pci/pci.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 50ca6b0..7944b66 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -425,6 +425,9 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 dev   PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
 dev += PCI_BDF(0,0,1))
{
+
+   /* Bus 0 is not necessarily PCI bridge. */
+#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
/* Skip our host bridge */
if ( dev == PCI_BDF(hose-first_busno,0,0) ) {
 #if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE)  /* don't skip host 
bridge */
@@ -434,10 +437,11 @@ int pci_hose_scan_bus(struct pci_controller *hose, int 
bus)
if (getenv(pciconfighost) == NULL) {
continue; /* Skip our host bridge */
}
-#else
+#else /* CONFIG_PCI_CONFIG_HOST_BRIDGE */
continue; /* Skip our host bridge */
-#endif
+#endif /* CONFIG_PCI_CONFIG_HOST_BRIDGE */
}
+#endif /* CONFIG_PCI_SKIP_HOST_BRIDGE */
 
if (PCI_FUNC(dev)  !found_multi)
continue;
@@ -473,8 +477,11 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
hose-fixup_irq(hose, dev);
 
 #ifdef CONFIG_PCI_SCAN_SHOW
+#if defined(CONFIG_PCI_SKIP_HOST_BRIDGE)
/* Skip our host bridge */
-   if ( dev != PCI_BDF(hose-first_busno,0,0) ) {
+   if ( dev != PCI_BDF(hose-first_busno,0,0) )
+#endif
+   {
unsigned char int_line;
 
pci_hose_read_config_byte(hose, dev, 
PCI_INTERRUPT_LINE,
-- 
1.5.3.8



-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] net: Add support AX88796L ethernet deivice

2008-03-06 Thread Nobuhiro Iwamatsu
On Wed, 05 Mar 2008 17:08:33 +0900
goda.yusuke [EMAIL PROTECTED] wrote:

 AX88796L is device of NE2000 compatible.
 This patch support AX88796L ethernet device.
 
 Signed-off-by: Yusuke Goda [EMAIL PROTECTED]
 ---
Acked-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]

I checked this patch and `[PATCH] net: Divided code of NE2000 ethernet driver` 
patch.
Work fine AX88796L ethernet device.

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] net: Divided code of NE2000 ethernet driver

2008-03-06 Thread Nobuhiro Iwamatsu
On Wed, 05 Mar 2008 17:08:20 +0900
goda.yusuke [EMAIL PROTECTED] wrote:

 There are more devices of the NE2000 base.
 A present code is difficult for us to support more devices.
 To support more NE2000 clone devices, separated the function.
 
 Signed-off-by: Yusuke Goda [EMAIL PROTECTED]
Acked-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [GIT PULL][SH] Please pull git://www.denx.de/git/u-boot-sh.git/

2008-02-05 Thread Nobuhiro Iwamatsu
The following changes since commit 2c5260f711168d5ee91c70ddbb7d897013eefc46:
  Ladislav Michl (1):
ARM: AT91RM9200 based boards config cleanup

are available in the git repository at:

  git://www.denx.de/git/u-boot-sh.git master

Nobuhiro Iwamatsu (1):
  sh: Fix register address of SH7722.

 include/asm-sh/cpu_sh7722.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] sh: Fix register address of SH7722

2008-02-04 Thread Nobuhiro Iwamatsu
The address of SH7722 is wrong by old document.
This patch fixes this problem.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/asm-sh/cpu_sh7722.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/asm-sh/cpu_sh7722.h b/include/asm-sh/cpu_sh7722.h
index 13d4a77..0975b78 100644
--- a/include/asm-sh/cpu_sh7722.h
+++ b/include/asm-sh/cpu_sh7722.h
@@ -1282,12 +1282,12 @@
 #define HIZCRA  0xA4050158
 #define HIZCRB  0xA405015A
 #define HIZCRC  0xA405015C
-#define MSELCR  0xA405015C
-#define PULCR   0xA405015E
-#define DRVCR   0xA4050180
-#define SBSCR   0xA4050182
-#define AUDTHCR 0xA4050184
-#define PSELF   0xA4050186
+#define HIZCRC 0xA405015C
+#define MSELCRA0xA4050180
+#define MSELCRB0xA4050182
+#define PULCR  0xA4050184
+#define SBSCR  0xA4050186
+#define DRVCR  0xA405018A
 
 /* I/O Port*/
 #define PADR0xA4050120
-- 
1.5.3.8

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] sh: Add support Renesas Solutions Migo-R board

2008-01-26 Thread Nobuhiro Iwamatsu
On Fri, 25 Jan 2008 20:46:36 +0900
goda.yusuke [EMAIL PROTECTED] wrote:

 Migo-R is a board based on SH7722 and has may devices.
 In this patch, supported SCIF, NOR flash and Ethernet.
 I removed CONFIG_ETHADDR line.
 
 Signed-off-by: Yusuke Goda [EMAIL PROTECTED]
I'll apply it, thanks.

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support Renesas Solutions Migo-R board

2008-01-25 Thread Nobuhiro Iwamatsu
Hi ,Wolfgang.

2008/1/25, Wolfgang Denk [EMAIL PROTECTED]:

 In message [EMAIL PROTECTED]
 Nobuhiro Iwamatsu wrote:
 
   +#define CONFIG_NETMASK 255.255.255.0
   +#define CONFIG_IPADDR  192.168.10.100
   +#define CONFIG_SERVERIP192.168.10.77
   +#define CONFIG_GATEWAYIP   192.168.10.77
   +#define CONFIG_ETHADDR 00:00:00:07:08:09
 
  Please change MAC address.
  Does this board have Ether ROM?
  If this board doesn't have it, please set the MAC address in
  your company. This MAC address is not good.

 The MAC address shout NOT be set in the board config file at all.

 Don't do it, it is a very bad idea!

Thank you for your comments.
Sorry. I understood the problem concerning the MAC address from ML's log.

To Goda-san:
 Please remove CONFIG_ETHADDR line from config file and resend patches.

Thanks,
 Nobuhiro

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support Renesas Solutions Migo-R board

2008-01-24 Thread Nobuhiro Iwamatsu
Hi, Goda-san.

2008/1/25, goda.yusuke [EMAIL PROTECTED]:
 Migo-R is a board based on SH7722 and has may devices.
 In this patch, supported SCIF, NOR flash and Ethernet.

 Signed-off-by: Yusuke Goda [EMAIL PROTECTED]

snip

 diff --git a/board/MigoR/migo_r.c b/board/MigoR/migo_r.c
 new file mode 100644
 index 000..23dcd49
 --- /dev/null
 +++ b/board/MigoR/migo_r.c
 @@ -0,0 +1,54 @@
 +/*
 + * Copyright (C) 2007
 + * Nobuhiro Iwamatsu [EMAIL PROTECTED]
 + *
 + * Copyright (C) 2007
 + * Kenati Technologies, Inc.
 + *
 + * board/MigoR/ms7722se.c

board/MigoR/migo_r.c ?

snip

 diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h
 new file mode 100644
 index 000..b557999
 --- /dev/null
 +++ b/include/configs/MigoR.h

snip

 +#define CONFIG_NETMASK 255.255.255.0
 +#define CONFIG_IPADDR  192.168.10.100
 +#define CONFIG_SERVERIP192.168.10.77
 +#define CONFIG_GATEWAYIP   192.168.10.77
 +#define CONFIG_ETHADDR 00:00:00:07:08:09

Please change MAC address.
Does this board have Ether ROM?
If this board doesn't have it, please set the MAC address in
your company. This MAC address is not good.

regards,
 Nobuhiro

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] pcmcia: Remove CONFIG_COMMANDS from marubun pcmcia driver

2008-01-18 Thread Nobuhiro Iwamatsu
On Thu, 17 Jan 2008 08:50:05 -0600
Jon Loeliger [EMAIL PROTECTED] wrote:
  Oh, and, a git grep CONFIG_COMMANDS reveals that there
  are a few other lingering instances of this bug around.
 
  Thank you for your comment.
  # I have not understood Amen-brother-by first.
 
 Sorry.  It means I _totally_ agree with this patch.
 The religious word Amen means Let it be or So be it.
 By adding Brother to it, it makes it familiar, and
 connotes charismatic religious fervor.  We should _all_
 violently agree with this patch. :-)
Thank you for explaining. It is a good lesson for me.

 
  I found an mistake in my tree based on your point.
 
 Atarashi pachi hoshii!
:-)
I sent patch that fix CONFIG_COMMANDS problem yesterday.

regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Add MS7720SE to MAKEALL

2008-01-15 Thread Nobuhiro Iwamatsu

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAKEALL |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index bec3541..180bc44 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -683,8 +683,9 @@ LIST_sh4=  \
ms7722se\
 
 
-LIST_sh3=
-
+LIST_sh3= \
+   ms7720se\
+
 
 LIST_sh=  \
${LIST_sh3} \
-- 
1.5.3.7

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Add maintainer of MS7720SE to the MAINTAINER file

2008-01-15 Thread Nobuhiro Iwamatsu

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 MAINTAINERS |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 40b2b51..239f5c3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -676,6 +676,10 @@ Nobuhiro Iwmaatsu [EMAIL PROTECTED]
MS7750SESH7750
MS7722SESH7722
 
+Yoshihiro Shimoda [EMAIL PROTECTED]
+
+   MS7720SESH7720
+
 #
 # End of MAINTAINERS list  #
 #
-- 
1.5.3.7


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Add support of map_physmem() and unmap_physmem() to SuperH

2008-01-15 Thread Nobuhiro Iwamatsu

This patch add the support of map_physmem() and unmap_physmem()
used with Common Flash Interface(CFI) driver.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 include/asm-sh/io.h |   27 +++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 03427ad..51fd10b 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -227,5 +227,32 @@ out:
 static inline void sync(void)
 {
 }
+
+/*
+ * Given a physical address and a length, return a virtual address
+ * that can be used to access the memory range with the caching
+ * properties specified by flags.
+ */
+typedef unsigned long phys_addr_t;
+
+#define MAP_NOCACHE (0)
+#define MAP_WRCOMBINE   (0)
+#define MAP_WRBACK  (0)
+#define MAP_WRTHROUGH   (0)
+
+static inline void *
+map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
+{
+   return (void *)paddr;
+}
+
+/*
+ * Take down a mapping set up by map_physmem().
+ */
+static inline void unmap_physmem(void *vaddr, unsigned long flags)
+{
+
+}
+
 #endif /* __KERNEL__ */
 #endif /* __ASM_SH_IO_H */
-- 
1.5.3.7


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] sh: Add support SH7710/SH7712

2008-01-15 Thread Nobuhiro Iwamatsu

SH7710/SH7712 of SH3 CPU are supported.
SH771X is called SH-Ether, and has the Ether controller in CPU.
The driver of Ether is not included in this patch.

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/serial/serial_sh.c  |   31 ++---
 include/asm-sh/cpu_sh3.h|4 ++-
 include/asm-sh/cpu_sh7710.h |   64 +++
 3 files changed, 82 insertions(+), 17 deletions(-)
 create mode 100644 include/asm-sh/cpu_sh7710.h

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index afba2d2..00a9b39 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -30,25 +30,20 @@
 #error Default SCIF doesn't set.
 #endif
 
-#if defined(CONFIG_SH3)
-/* There are SH7720's register */
-#define SCSMR  (volatile unsigned short *)(SCIF_BASE + 0x0)
-#define SCBRR  (volatile unsigned char  *)(SCIF_BASE + 0x4)
-#define SCSCR  (volatile unsigned short *)(SCIF_BASE + 0x8)
-#define SCFSR  (volatile unsigned short *)(SCIF_BASE + 0x14)   /* SCSSR */
-#define SCFCR  (volatile unsigned short *)(SCIF_BASE + 0x18)
-#define SCFDR  (volatile unsigned short *)(SCIF_BASE + 0x1C)
-#define SCFTDR (volatile unsigned char  *)(SCIF_BASE + 0x20)
-#define SCFRDR (volatile unsigned char  *)(SCIF_BASE + 0x24)
+/* Base register */
+#define SCSMR  (vu_short *)(SCIF_BASE + 0x0)
+#define SCBRR  (vu_char  *)(SCIF_BASE + 0x4)
+#define SCSCR  (vu_short *)(SCIF_BASE + 0x8)
+#define SCFCR  (vu_short *)(SCIF_BASE + 0x18)
+#define SCFDR  (vu_short *)(SCIF_BASE + 0x1C)
+#ifdef CONFIG_SH7720 /* SH7720 specific */
+#define SCFSR  (vu_short *)(SCIF_BASE + 0x14)   /* SCSSR */
+#define SCFTDR (vu_char  *)(SCIF_BASE + 0x20)
+#define SCFRDR (vu_char  *)(SCIF_BASE + 0x24)
 #else
-#define SCSMR  (vu_short *)(SCIF_BASE + 0x0)
-#define SCBRR  (vu_char  *)(SCIF_BASE + 0x4)
-#define SCSCR  (vu_short *)(SCIF_BASE + 0x8)
 #define SCFTDR (vu_char  *)(SCIF_BASE + 0xC)
 #define SCFSR  (vu_short *)(SCIF_BASE + 0x10)
 #define SCFRDR (vu_char  *)(SCIF_BASE + 0x14)
-#define SCFCR  (vu_short *)(SCIF_BASE + 0x18)
-#define SCFDR  (vu_short *)(SCIF_BASE + 0x1C)
 #endif
 
 #if defined(CONFIG_SH4A)
@@ -62,7 +57,11 @@
 #define SCLSR  (vu_short *)(SCIF_BASE + 0x24)
 #define LSR_ORER   1
 #elif defined (CONFIG_SH3)
-#define SCLSR  SCFSR   /* SCSSR */
+#ifdef CONFIG_SH7720 /* SH7720 specific */
+# define SCLSR SCFSR   /* SCSSR */
+#else
+# define SCLSR   (vu_short *)(SCIF_BASE + 0x24)
+#endif
 #define LSR_ORER   0x0200
 #endif
 
diff --git a/include/asm-sh/cpu_sh3.h b/include/asm-sh/cpu_sh3.h
index 68679c0..6db38a2 100644
--- a/include/asm-sh/cpu_sh3.h
+++ b/include/asm-sh/cpu_sh3.h
@@ -31,7 +31,9 @@
 #define CACHE_OC_NUM_ENTRIES   256
 #define CACHE_OC_ENTRY_SHIFT   4
 
-#if defined(CONFIG_CPU_SH7720)
+#if defined(CONFIG_CPU_SH7710)
+#include asm/cpu_sh7710.h
+#elif defined(CONFIG_CPU_SH7720)
 #include asm/cpu_sh7720.h
 #else
 #error Unknown SH3 variant
diff --git a/include/asm-sh/cpu_sh7710.h b/include/asm-sh/cpu_sh7710.h
new file mode 100644
index 000..e223f1c
--- /dev/null
+++ b/include/asm-sh/cpu_sh7710.h
@@ -0,0 +1,64 @@
+#ifndef _ASM_CPU_SH7710_H_
+#define _ASM_CPU_SH7710_H_
+
+#define CACHE_OC_NUM_WAYS  4
+#define CCR_CACHE_INIT 0x000D
+
+/* MMU and Cache control */
+#define MMUCR  0xFFE0
+#define CCR0xFFEC
+
+/* PFC */
+#define PACR   0xA4050100
+#define PBCR   0xA4050102
+#define PCCR   0xA4050104
+#define PETCR  0xA4050106
+
+/* Port Data Registers */
+#define PADR   0xA4050120
+#define PBDR   0xA4050122
+#define PCDR   0xA4050124
+
+/* BSC */
+#define CMNCR  0xA4FD
+#define CS0BCR 0xA4FD0004
+#define CS2BCR 0xA4FD0008
+#define CS3BCR 0xA4FD000C
+#define CS4BCR 0xA4FD0010
+#define CS5ABCR0xA4FD0014
+#define CS5BBCR0xA4FD0018
+#define CS6ABCR0xA4FD001C
+#define CS6BBCR0xA4FD0020
+#define CS0WCR 0xA4FD0024
+#define CS2WCR 0xA4FD0028
+#define CS3WCR 0xA4FD002C
+#define CS4WCR 0xA4FD0030
+#define CS5AWCR0xA4FD0034
+#define CS5BWCR0xA4FD0038
+#define CS6AWCR0xA4FD003C
+#define CS6BWCR0xA4FD0040
+
+/* SDRAM controller */
+#define SDCR   0xA4FD0044
+#define RTCSR  0xA4FD0048
+#define RTCNT  0xA4FD004C
+#define RTCOR  0xA4FD0050
+
+/* SCIF */
+#define SCSMR_00xA440
+#define SCIF0_BASE SCSMR_0
+#define SCSMR_00xA441
+#define SCIF1_BASE SCSMR_1
+
+/* Timer */
+#define TSTR0  0xA412FE92
+#define TSTR   TSTR0
+#define TCNT0  0xa412FE98
+#define TCR0   0xa412FE9C
+
+/* On chip oscillator circuits */
+#define FRQCR  0xA415FF80
+#define WTCNT  0xA415FF84
+#define WTCSR  0xA415FF86
+
+#endif /* _ASM_CPU_SH7710_H_ */
-- 
1.5.3.7

[U-Boot-Users] [PATCH] pcmcia: Remove CONFIG_COMMANDS from marubun pcmcia driver

2008-01-15 Thread Nobuhiro Iwamatsu

Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
---
 drivers/pcmcia/marubun_pcmcia.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/marubun_pcmcia.c b/drivers/pcmcia/marubun_pcmcia.c
index 7b112af..2479a66 100644
--- a/drivers/pcmcia/marubun_pcmcia.c
+++ b/drivers/pcmcia/marubun_pcmcia.c
@@ -25,11 +25,13 @@
 #include pcmcia.h
 #include asm/io.h
 
-#if(CONFIG_COMMANDS  CFG_CMD_PCMCIA)
+#undef CONFIG_PCMCIA
+
+#if defined(CONFIG_CMD_PCMCIA)
 #defineCONFIG_PCMCIA
 #endif
 
-#if(CONFIG_COMMANDS  CFG_CMD_IDE)
+#ifdefined(CONFIG_CMD_IDE)
 #defineCONFIG_PCMCIA
 #endif
 
-- 
1.5.3.7


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [SH] Please pull git://www.denx.de/git/u-boot-sh.git/

2008-01-15 Thread Nobuhiro Iwamatsu
The following changes since commit 5dd372a23d12003276dddf7f9604154fd522ae73:
  Wolfgang Denk (1):
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx

are available in the git repository at:

  git://www.denx.de/git/u-boot-sh.git/ master

Nobuhiro Iwamatsu (6):
  sh: Add MS7720SE to MAKEALL
  sh: Fix board name in MS7720SE's config.mk
  sh: Add maintainer of MS7720SE to the MAINTAINER file
  sh: Add support of map_physmem() and unmap_physmem() to SuperH
  sh: Add support SH7710/SH7712
  pcmcia: Remove CONFIG_COMMANDS from marubun pcmcia driver

Yoshihiro Shimoda (3):
  sh: Add support SH3 and SH7720
  sh: Add support for SH7720 in serial_sh driver.
  sh: Add support for MS7720RP02 board

 MAINTAINERS |4 +
 MAKEALL |5 +-
 Makefile|8 +
 board/ms7720se/Makefile |   51 
 board/ms7720se/config.mk|   34 +
 board/ms7720se/lowlevel_init.S  |  268 +++
 board/ms7720se/ms7720se.c   |   60 +
 board/ms7720se/u-boot.lds   |  108 
 cpu/sh3/Makefile|   49 +++
 cpu/sh3/cache.c |  112 
 cpu/sh3/config.mk   |   31 +
 cpu/sh3/cpu.c   |   84 
 cpu/sh3/interrupts.c|   42 ++
 cpu/sh3/start.S |   77 +++
 cpu/sh3/time.c  |  103 +++
 cpu/sh3/watchdog.c  |   33 +
 drivers/pcmcia/marubun_pcmcia.c |6 +-
 drivers/serial/serial_sh.c  |   36 -
 include/asm-sh/cpu_sh3.h|   42 ++
 include/asm-sh/cpu_sh7710.h |   64 +
 include/asm-sh/cpu_sh7720.h |  207 ++
 include/asm-sh/io.h |   27 
 include/configs/ms7720se.h  |  134 +++
 23 files changed, 1574 insertions(+), 11 deletions(-)
 create mode 100644 board/ms7720se/Makefile
 create mode 100644 board/ms7720se/config.mk
 create mode 100644 board/ms7720se/lowlevel_init.S
 create mode 100644 board/ms7720se/ms7720se.c
 create mode 100644 board/ms7720se/u-boot.lds
 create mode 100644 cpu/sh3/Makefile
 create mode 100644 cpu/sh3/cache.c
 create mode 100644 cpu/sh3/config.mk
 create mode 100644 cpu/sh3/cpu.c
 create mode 100644 cpu/sh3/interrupts.c
 create mode 100644 cpu/sh3/start.S
 create mode 100644 cpu/sh3/time.c
 create mode 100644 cpu/sh3/watchdog.c
 create mode 100644 include/asm-sh/cpu_sh3.h
 create mode 100644 include/asm-sh/cpu_sh7710.h
 create mode 100644 include/asm-sh/cpu_sh7720.h
 create mode 100644 include/configs/ms7720se.h

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] sh: Add support SH3 and SH7720

2008-01-14 Thread Nobuhiro Iwamatsu
On Mon, 03 Dec 2007 22:58:45 +0900
Yoshihiro Shimoda [EMAIL PROTECTED] wrote:

 Add support Renesas SH3 and SH7720.
 
 Signed-off-by: Yoshihiro Shimoda [EMAIL PROTECTED]
 CC: Nobuhiro Iwamatsu [EMAIL PROTECTED]
 ---
  cpu/sh3/Makefile|   49 
  cpu/sh3/cache.c |  112 ++
  cpu/sh3/config.mk   |   31 +
  cpu/sh3/cpu.c   |   84 +
  cpu/sh3/interrupts.c|   43 +++
  cpu/sh3/start.S |   78 
  cpu/sh3/time.c  |  103 
  cpu/sh3/watchdog.c  |   34 +
  include/asm-sh/cpu_sh3.h|   40 ++
  include/asm-sh/cpu_sh7720.h |  207 ++
  10 files changed, 781 insertions(+)

Applied, thanks.

-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] serial_sh: Add support for SH7720

2008-01-14 Thread Nobuhiro Iwamatsu
On Mon, 03 Dec 2007 22:58:47 +0900
Yoshihiro Shimoda [EMAIL PROTECTED] wrote:

 Add support for SH7720 in serial_sh driver.
 
 Signed-off-by: Yoshihiro Shimoda [EMAIL PROTECTED]
 CC: Nobuhiro Iwamatsu [EMAIL PROTECTED]
 ---
  drivers/serial_sh.c |   26 --
  1 file changed, 24 insertions(+), 2 deletions(-)
Applied, thanks.

-- 
Nobuhiro Iwamatsu
[EMAIL PROTECTED]
[EMAIL PROTECTED]

GPG ID : 3170EBE9

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users