[U-Boot] [PATCH 1/1] at91: Update MEESC board support

2009-09-09 Thread Daniel Gorsulowski
This patch implements several updates:
-Disable CONFIG_ENV_OVERWRITE
-Add new hardware style variants and set the arch numbers appropriate 
(autodetect)
-Pass the serial# and hardware revision to the kernel

Signed-off-by: Daniel Gorsulowski 
---
 board/esd/meesc/meesc.c |   74 --
 include/configs/meesc.h |6 +++-
 2 files changed, 75 insertions(+), 5 deletions(-)

diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 636d0ed..ecf903d 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -46,6 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 
 static int hw_rev = -1;/* hardware revision */
+static u_char hw_type; /* hardware type */
 
 int get_hw_rev(void)
 {
@@ -63,6 +64,30 @@ int get_hw_rev(void)
return hw_rev;
 }
 
+static void meesc_set_arch_number(void)
+{
+   /* read the "Type" register of the ET1100 controller */
+   hw_type = readb(CONFIG_ET1100_BASE);
+
+   switch (hw_type) {
+   case 0x11:
+   case 0x3F:
+   /* ET1100 present,
+  arch number of MEESC-Board */
+   gd->bd->bi_arch_number = MACH_TYPE_MEESC;
+   break;
+   case 0xFF:
+   /* no ET1100 present,
+  arch number of EtherCAN/2-Board */
+   gd->bd->bi_arch_number = MACH_TYPE_ETHERCAN2;
+   break;
+   default:
+   /* assume, no ET1100 present,
+  arch number of EtherCAN/2-Board */
+   gd->bd->bi_arch_number = MACH_TYPE_ETHERCAN2;
+   break;
+   }
+}
 #ifdef CONFIG_CMD_NAND
 static void meesc_nand_hw_init(void)
 {
@@ -157,7 +182,19 @@ int checkboard(void)
 {
char str[32];
 
-   puts("Board: esd CAN-EtherCAT Gateway");
+   switch (hw_type) {
+   case 0x11:
+   case 0x3F:
+   puts("Board: CAN-EtherCAT Gateway");
+   break;
+   case 0xFF:
+   puts("Board: EtherCAN/2 Gateway");
+   break;
+   default:
+   printf("FATAL! Read invalid hw_type: %02X\n", hw_type);
+   puts("Board: EtherCAN/2 Gateway");
+   break;
+   }
if (getenv_r("serial#", str, sizeof(str)) > 0) {
puts(", serial# ");
puts(str);
@@ -167,6 +204,29 @@ int checkboard(void)
return 0;
 }
 
+#ifdef CONFIG_SERIAL_TAG
+void get_board_serial(struct tag_serialnr *serialnr)
+{
+   char *str;
+
+   str = strchr(getenv("serial#"), '_');
+   if (str) {
+   serialnr->high =(*(str + 1) << 8) | *(str + 2);
+   serialnr->low = simple_strtoul(str + 3, NULL, 16);
+   } else {
+   serialnr->high =0;
+   serialnr->low = 0;
+   }
+}
+#endif
+
+#ifdef CONFIG_REVISION_TAG
+u32 get_board_rev(void)
+{
+   return hw_rev | 0x100;
+}
+#endif
+
 int board_init(void)
 {
/* Peripheral Clock Enable Register */
@@ -174,8 +234,15 @@ int board_init(void)
1 << AT91SAM9263_ID_PIOB |
1 << AT91SAM9263_ID_PIOCDE);
 
-   /* arch number of MEESC-Board */
-   gd->bd->bi_arch_number = MACH_TYPE_MEESC;
+   /* initialize ET1100 Controller */
+   meesc_ethercat_hw_init();
+
+   /* set arch number by hardware type */
+   meesc_set_arch_number();
+
+   /* switch on LED1D, if running on EtherCAN/2 hardware */
+   if (hw_type == 0xFF)
+   at91_set_gpio_output(AT91_PIN_PB12, 1);
 
/* adress of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
@@ -184,7 +251,6 @@ int board_init(void)
 #ifdef CONFIG_CMD_NAND
meesc_nand_hw_init();
 #endif
-   meesc_ethercat_hw_init();
 #ifdef CONFIG_HAS_DATAFLASH
at91_spi0_hw_init(1 << 0);
 #endif
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index 8253172..b81e24a 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -36,13 +36,14 @@
 #define CONFIG_MEESC   1   /* Board is esd MEESC */
 #define CONFIG_ARM926EJS   1   /* This is an ARM926EJS Core */
 #define CONFIG_AT91SAM9263 1   /* It's an AT91SAM9263 SoC */
-#define CONFIG_ENV_OVERWRITE   1   /* necessary on prototypes */
 #define CONFIG_DISPLAY_BOARDINFO   1
 #define CONFIG_DISPLAY_CPUINFO 1   /* display cpu info and speed */
 #define CONFIG_PREBOOT /* enable preboot variable */
 #define CONFIG_CMDLINE_TAG 1   /* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS   1
 #define CONFIG_INITRD_TAG  1
+#define CONFIG_SERIAL_TAG  1
+#define CON

Re: [U-Boot] [PATCH v2] AT91: Add SD/MMC controller support & [PATCH v3]

2009-09-09 Thread Konrad Mattheis
Hi Albin,


>Someone encoutered the same issue: 
>http://lists.denx.de/pipermail/u-boot/2009-September/059684.html
>This is because the patch is based on a change that was part of another patch 
>that added support to a new >board. You can work around this easily: in 
>at91sam9260_devices.c, simply replace

>#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)

>with

>#if defined(CONFIG_HAS_DATAFLASH)

>and the patch should then apply cleanly. Please let me know if that still 
>doesn't work.
Yes this patch apply cleanly, but I had problems on my samg20ek to get the mmc 
working.
On the command mmc init, it always say no mmc card foung.

So I tried now to apply your new Patch V3. What is the Base
of this patch (I tried again u-boot 2009.08) Is there a better
way to download the version with git?

There I have a lot of problems.

patching file cpu/arm926ejs/at91/at91cap9_devices.c
patching file cpu/arm926ejs/at91/at91sam9260_devices.c
Hunk #1 FAILED at 75.
1 out of 1 hunk FAILED -- saving rejects to file 
cpu/arm926ejs/at91/at91sam9260_devices.c.rej
patching file cpu/arm926ejs/at91/at91sam9261_devices.c
patching file cpu/arm926ejs/at91/at91sam9263_devices.c
patching file cpu/arm926ejs/at91/at91sam9m10g45_devices.c
patching file cpu/arm926ejs/at91/at91sam9rl_devices.c
patching file include/asm-arm/arch-at91/at91_common.h
patching file include/asm-arm/arch-at91/at91cap9.h
Hunk #1 FAILED at 112.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91cap9.h.rej
patching file include/asm-arm/arch-at91/at91sam9260.h
Hunk #1 FAILED at 108.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91sam9260.h.rej
patching file include/asm-arm/arch-at91/at91sam9261.h
Hunk #1 FAILED at 91.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91sam9261.h.rej
patching file include/asm-arm/arch-at91/at91sam9263.h
Hunk #1 FAILED at 111.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91sam9263.h.rej
patching file include/asm-arm/arch-at91/at91sam9g45.h
Hunk #1 FAILED at 118.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91sam9g45.h.rej
patching file include/asm-arm/arch-at91/at91sam9rl.h
Hunk #1 FAILED at 101.
1 out of 1 hunk FAILED -- saving rejects to file 
include/asm-arm/arch-at91/at91sam9rl.h.rej
patching file include/asm-arm/arch-at91/clk.h
patching file include/asm-arm/arch-at91/memory-map.h

bye
Konrad
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] at91: Update MEESC board support

2009-09-09 Thread Daniel Gorsulowski
Hello,

Daniel Gorsulowski wrote:
> Hello Wolfgang, Jean-Christophe,
> 
> Wolfgang Denk wrote:
>> Dear Daniel,
>>
>> In message <20090904211358.gr30...@game.jcrosoft.org> Jean-Christophe wrote:
 +#ifdef CONFIG_REVISION_TAG
 +u32 get_board_rev(void)
 +{
 +  return hw_rev | 0x100;
 +}
 +#endif
 +
 +int misc_init_r(void)
 +{
 +#ifdef CONFIG_MACB
 +  u32 hwaddr_btm;
 +  u16 hwaddr_top;
 +  u8 mac[6];
 +
 +  /* Set ethernet address */
 +  if (!eth_getenv_enetaddr("ethaddr", mac)) {
 +  puts("Missing environment variable 'ethaddr'\n");
 +} else {
 +  hwaddr_btm = mac[0] | mac[1] << 8 | mac[2] << 16 | mac[3] << 24;
 +  hwaddr_top = mac[4] | mac[5] << 8;
 +  writel(hwaddr_btm, (void *)(AT91SAM9263_BASE_EMAC + MACB_SA1B));
 +  writel(hwaddr_top, (void *)(AT91SAM9263_BASE_EMAC + MACB_SA1T));
>>> nack this will be done when u-boot will need to use the macb#
> Just imagine: U-boot boots a Linux kernel from NAND flash. It does NOT need 
> the
> ethernet interface, so it does NOT initialize ethernet, so the ethernet 
> address
> will NOT be written to the EMAC module!
> As a result, Linux will assign a random address, that is not acceptable!
>> Jean-Christophe means: The Etherent interface must not be always
>> initialized, but only when it is needed and used within U-Boot itself,
>> i. e. if U-boot is performing anetwork command. See also item 2 at
>> http://www.denx.de/wiki/U-Boot/DesignPrinciples  and
>> http://www.denx.de/wiki/view/DULG/EthernetDoesNotWorkInLinux
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
> I know about it.
> 
> But this patch does NOT initialize the Ethernet Interface. It JUST write
> the ethernet address to the EMAC module!
> 
> So please ACK this patch.
> 
> 
> Regards,
> Daniel Gorsulowski

it was worth an attempt...
I made a new patch without the MACB stuff, see separate mail.

Now I parse the ethaddr through the kernel commandline. The kernel patch is
temporary available at http://paste.debian.net/46114/ (maybe someone is
interested in it)

Regards,
Daniel Gorsulowski
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] PowerPC -mrelocatable

2009-09-09 Thread Joakim Tjernlund
>
> Dear Peter,
>
> In message <1252426573.6005.253.ca...@localhost.localdomain> you wrote:
> >
> > Going over the emails and my own testing, it looks the following
> > versions worked:
> ...
>
> Thanks for the detailed analysis.
>
> I remember that gcc-3.4.x has always been marked as "suspicious" in
> our tests, so for example we avoided basing an ELDK release on it.
>
> > Does anyone out there by chance have a failure case for gcc > 4.0.0,
> > because I can't seem to reproduce the issues others had in the past.
>
> Do you have an up-to-date patch that can be used for such testing?
>
> > My vote would be to find out which version of gcc contains the
> > relocation bug and spit out an error if gcc < than that version is used.
>
> Agreed.
>
> > We could also try and get fancy and dynamically turn on/off relocation
> > support at compile time based on gcc's version if other's wanted to
> > maintain support for older compilers.  These changes would only be for
> > ppc at this point btw.
>
> I think there would be not  much  lost  if  we  dropped  support  for
> versions before gcc-4.x

Please don't. I still use gcc 3.4.6 and it has no issues. I suggest
dropping support for gcc < 3.4.6 instead.

 Jocke

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] AT91: Add SD/MMC controller support & [PATCH v3]

2009-09-09 Thread Albin Tonnerre
On Wed, 09 Sep 2009 09:06 +0200, Konrad Mattheis wrote :
> Hi Albin,
> 
> 
> >Someone encoutered the same issue: 
> >http://lists.denx.de/pipermail/u-boot/2009-September/059684.html
> >This is because the patch is based on a change that was part of another 
> >patch that added support to a new >board. You can work around this easily: 
> >in at91sam9260_devices.c, simply replace
> 
> >#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
> 
> >with
> 
> >#if defined(CONFIG_HAS_DATAFLASH)
> 
> >and the patch should then apply cleanly. Please let me know if that still 
> >doesn't work.
> Yes this patch apply cleanly, but I had problems on my samg20ek to get the 
> mmc working.
> On the command mmc init, it always say no mmc card foung.

What modifications have you done to your code after applying the patch?
Providing the diff would help spotting potential errors

> So I tried now to apply your new Patch V3. What is the Base
> of this patch (I tried again u-boot 2009.08) Is there a better
> way to download the version with git?

It applies on top of 
http://lists.denx.de/pipermail/u-boot/2009-September/060053.html
The best base to apply those patches is the current master branch of the git
repository (git://git.denx.de/u-boot.git)

Regards,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] mpc52xx, mucmc52, uc101: config cleanup

2009-09-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message <4aa755cd.8050...@denx.de> you wrote:
> - as this boards are similiar, collect common config option
>   in manroland-common.h
> - add OF support
> - update default environment
> 
> Signed-off-by: Heiko Schocher 
> ---
>  board/mucmc52/mucmc52.c|7 +
>  board/uc101/uc101.c|7 +
>  include/configs/manroland-common.h |  336 
> 
>  include/configs/mucmc52.h  |  256 +--
>  include/configs/uc101.h|  266 +---
>  5 files changed, 368 insertions(+), 504 deletions(-)
>  create mode 100644 include/configs/manroland-common.h

Applied to mpc5xxx repo.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Drawing on my fine command of language, I said nothing.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message <4aa755d4.1020...@denx.de> you wrote:
> Signed-off-by: Heiko Schocher 
> ---
>  board/mucmc52/mucmc52.c |   15 +++
>  board/uc101/uc101.c |   15 +++
>  2 files changed, 30 insertions(+), 0 deletions(-)

Hmm... that looks like duplicated identical code to me. Maybe we can
move this into a central location instead?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
To be a winner, all you need to give is all you have.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] ppc4xx: Rename compactcenter to intip

2009-09-09 Thread Wolfgang Denk
Dear Dirk Eibach,

In message <1252479834-24314-1-git-send-email-eib...@gdsys.de> you wrote:
> Signed-off-by: Dirk Eibach 
> ---
> Changes since v1:
> - also changed config name
> 
> Changes since v2:
> - also changed file- and directory-names
> 
> MAINTAINERS   |2 +-
>  MAKEALL   |2 +-
>  Makefile  |   16 +-
>  board/gdsys/compactcenter/Makefile|   53 
>  board/gdsys/compactcenter/chip_config.c   |   87 --
>  board/gdsys/compactcenter/compactcenter.c |  289 ---
>  board/gdsys/compactcenter/config.mk   |   41 ---
>  board/gdsys/compactcenter/init.S  |   97 ---
>  board/gdsys/compactcenter/u-boot.lds  |  144 --
>  board/gdsys/intip/Makefile|   53 
>  board/gdsys/intip/chip_config.c   |   87 ++
>  board/gdsys/intip/config.mk   |   41 +++
>  board/gdsys/intip/init.S  |   97 +++
>  board/gdsys/intip/intip.c |  289 +++
>  board/gdsys/intip/u-boot.lds  |  144 ++
>  include/configs/compactcenter.h   |  437 
> -
>  include/configs/intip.h   |  437 
> +
>  17 files changed, 1158 insertions(+), 1158 deletions(-)
>  delete mode 100644 board/gdsys/compactcenter/Makefile
>  delete mode 100644 board/gdsys/compactcenter/chip_config.c
>  delete mode 100644 board/gdsys/compactcenter/compactcenter.c
>  delete mode 100644 board/gdsys/compactcenter/config.mk
>  delete mode 100644 board/gdsys/compactcenter/init.S
>  delete mode 100644 board/gdsys/compactcenter/u-boot.lds
>  create mode 100644 board/gdsys/intip/Makefile
>  create mode 100644 board/gdsys/intip/chip_config.c
>  create mode 100644 board/gdsys/intip/config.mk
>  create mode 100644 board/gdsys/intip/init.S
>  create mode 100644 board/gdsys/intip/intip.c
>  create mode 100644 board/gdsys/intip/u-boot.lds
>  delete mode 100644 include/configs/compactcenter.h
>  create mode 100644 include/configs/intip.h

NAK. Do not rename files by removing the old names and adding he new
ones.

Please use "-M -C" options with "git format-patch" so renames get detected.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"What if" is a trademark of Hewlett Packard, so stop using it in your
sentences without permission, or risk being sued.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-09 Thread Heiko Schocher
Hello Wolfgang,

Wolfgang Denk wrote:
> In message <4aa755d4.1020...@denx.de> you wrote:
>> Signed-off-by: Heiko Schocher 
>> ---
>>  board/mucmc52/mucmc52.c |   15 +++
>>  board/uc101/uc101.c |   15 +++
>>  2 files changed, 30 insertions(+), 0 deletions(-)
> 
> Hmm... that looks like duplicated identical code to me. Maybe we can
> move this into a central location instead?

Hmm.. you are right, maybe cpu/mpc5xxx/cpu.c ft_cpu_setup() is
a better place for it. And we can activate this through an
CONFIG_OF_IDE_FIXUP define.

Comments?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] at91: Update MEESC board support

2009-09-09 Thread Wolfgang Denk
Dear Daniel Gorsulowski,

In message <12524805241911-git-send-email-daniel.gorsulow...@esd.eu> you wrote:
> This patch implements several updates:
> -Disable CONFIG_ENV_OVERWRITE
> -Add new hardware style variants and set the arch numbers appropriate 
> (autodetect)
> -Pass the serial# and hardware revision to the kernel
> 
> Signed-off-by: Daniel Gorsulowski 
> ---

You should indicate that this is version 2 of an earlier patch, and
describe what has been changed compared to earlier versions.

And as it's a single patch, it makes no sense to number it, i. e.
please omit the "1/1" part.

> +static void meesc_set_arch_number(void)
> +{
> + /* read the "Type" register of the ET1100 controller */
> + hw_type = readb(CONFIG_ET1100_BASE);
> +
> + switch (hw_type) {
> + case 0x11:
> + case 0x3F:
> + /* ET1100 present,
> +arch number of MEESC-Board */
> + gd->bd->bi_arch_number = MACH_TYPE_MEESC;
> + break;
> + case 0xFF:
> + /* no ET1100 present,
> +arch number of EtherCAN/2-Board */
> + gd->bd->bi_arch_number = MACH_TYPE_ETHERCAN2;
> + break;
> + default:
> + /* assume, no ET1100 present,
> +arch number of EtherCAN/2-Board */
> + gd->bd->bi_arch_number = MACH_TYPE_ETHERCAN2;
> + break;
> + }

You have the same switch() in checkboard() - maybe you move this code
there, so you can avoid the whole function?

> +#ifdef CONFIG_SERIAL_TAG
> +void get_board_serial(struct tag_serialnr *serialnr)
> +{
> + char *str;
> +
> + str = strchr(getenv("serial#"), '_');
> + if (str) {
> + serialnr->high =(*(str + 1) << 8) | *(str + 2);
> + serialnr->low = simple_strtoul(str + 3, NULL, 16);

Hm... that looks dangerous to me. Who tells you that the value of the
"serial#" envrionment variable has that many characters?

>  int board_init(void)
>  {
>   /* Peripheral Clock Enable Register */
> @@ -174,8 +234,15 @@ int board_init(void)
>   1 << AT91SAM9263_ID_PIOB |
>   1 << AT91SAM9263_ID_PIOCDE);
>  
> - /* arch number of MEESC-Board */
> - gd->bd->bi_arch_number = MACH_TYPE_MEESC;
> + /* initialize ET1100 Controller */
> + meesc_ethercat_hw_init();

I thought we had agreed not to initialize the Ethernet hardware if it
not used by U-Boot?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
There is, however, a strange, musty smell in the air that reminds  me
of something...hmm...yes...I've got it...there's a VMS nearby, or I'm
a Blit.  - Larry Wall in Configure from the perl distribution
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message <4aa7716c.3000...@denx.de> you wrote:
> 
> > Hmm... that looks like duplicated identical code to me. Maybe we can
> > move this into a central location instead?
> 
> Hmm.. you are right, maybe cpu/mpc5xxx/cpu.c ft_cpu_setup() is
> a better place for it. And we can activate this through an
> CONFIG_OF_IDE_FIXUP define.

Sounds like a good idea to me, as I think that other boards may suffer
from the same problem. The suggested solution would keep the common
code unchanged and still allow all boards that need this to activate
it by a simple #define in the board config file.

The patch should then
- document the new CONFIG_ variable in the README,  and
- add a description of the problem that you are fixing to the commit
  message and the README, so others who look for solutions for the
  same problem can find it.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Der Horizont vieler Menschen ist ein Kreis mit Radius Null --
und das nennen sie ihren Standpunkt.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-09 Thread Joakim Tjernlund

I wonder if this hides another problem too.
if the timeout hits, -1 is returned.

Then in i2c_read()/i2c_write() you have:
if (i2c_wait4bus() >= 0
&& i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
&& __i2c_write(&a[4 - alen], alen) == alen)
i = 0; /* No error so far */
notice how the latter part, i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
 && __i2c_write(&a[4 - alen], alen) == alen)
is ignored(never called) when i2c_wait4bus()  returns -1

 Jocke

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v1] ppc/85xx: PIO Support for FSL eSDHC Controller Driver

2009-09-09 Thread Dipen Dudhat
PIO Mode Support for eSDHC Controller Driver on Freescale SoCs.

Signed-off-by: Dipen Dudhat 
---
- applies on git.denx.de/u-boot-mpc85xx.git branch->next
 drivers/mmc/fsl_esdhc.c |   80 +-
 include/fsl_esdhc.h |2 +
 2 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index c6e9e6e..f02fc8a 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -73,8 +73,10 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data 
*data)
uint xfertyp = 0;
 
if (data) {
-   xfertyp |= XFERTYP_DPSEL | XFERTYP_DMAEN;
-
+   xfertyp |= XFERTYP_DPSEL;
+#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO
+   xfertyp |= XFERTYP_DMAEN;
+#endif
if (data->blocks > 1) {
xfertyp |= XFERTYP_MSBSEL;
xfertyp |= XFERTYP_BCEN;
@@ -98,12 +100,80 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data 
*data)
return XFERTYP_CMD(cmd->cmdidx) | xfertyp;
 }
 
+#ifdef CONFIG_SYS_FSL_ESDHC_USE_PIO
+/*
+ * PIO Read/Write Mode reduce the performace as DMA is not used in this mode.
+ */
+static int
+esdhc_pio_read_write(struct mmc *mmc, struct mmc_data *data)
+{
+   struct fsl_esdhc *regs = mmc->priv;
+   uint blocks;
+   char *buffer;
+   uint databuf;
+   uint size;
+   uint irqstat;
+   uint timeout;
+
+   if (data->flags & MMC_DATA_READ) {
+   blocks = data->blocks;
+   buffer = data->dest;
+   while (blocks) {
+   size = data->blocksize;
+   while (size && (!(irqstat & IRQSTAT_TC))) {
+   udelay(1000);
+   irqstat = in_be32(®s->irqstat);
+   databuf = in_le32(®s->datport);
+   *((uint *)buffer) = databuf;
+   buffer += 4;
+   size -= 4;
+   }
+   blocks--;
+   }
+   } else {
+   blocks = data->blocks;
+   buffer = data->src;
+   while (blocks) {
+   timeout = MAX_TIMEOUT;
+   size = data->blocksize;
+   irqstat = in_be32(®s->irqstat);
+   while (!(in_be32(®s->prsstat) & PRSSTAT_BWEN) && 
--timeout);
+   if (timeout <= 0) {
+   printf("\nData Write Failed in PIO Mode.");
+   return TIMEOUT;
+   } else {
+   while (size && (!(irqstat & IRQSTAT_TC))) {
+   databuf = *((uint *)buffer);
+   buffer += 4;
+   size -= 4;
+   udelay(1000);
+   irqstat = in_be32(®s->irqstat);
+   out_le32(®s->datport, databuf);
+   }
+   }
+   blocks--;
+   }
+   }
+}
+#endif
+
 static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
 {
uint wml_value;
int timeout;
struct fsl_esdhc *regs = mmc->priv;
 
+#ifdef CONFIG_SYS_FSL_ESDHC_USE_PIO
+   if (!(data->flags & MMC_DATA_READ)) {
+   if ((in_be32(®s->prsstat) & PRSSTAT_WPSPL) == 0) {
+   printf("\nThe SD card is locked. "
+   "Can not write to a locked card.\n\n");
+   return TIMEOUT;
+   }
+   out_be32(®s->dsaddr, (u32)data->src);
+   } else
+   out_be32(®s->dsaddr, (u32)data->dest);
+#else
wml_value = data->blocksize/4;
 
if (data->flags & MMC_DATA_READ) {
@@ -125,6 +195,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct 
mmc_data *data)
}
 
out_be32(®s->wml, wml_value);
+#endif
 
out_be32(®s->blkattr, data->blocks << 16 | data->blocksize);
 
@@ -201,6 +272,7 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
return TIMEOUT;
 
/* Copy the response to the response buffer */
+   udelay(1000);
if (cmd->resp_type & MMC_RSP_136) {
u32 cmdrsp3, cmdrsp2, cmdrsp1, cmdrsp0;
 
@@ -217,6 +289,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
 
/* Wait until all of the blocks are transferred */
if (data) {
+#ifdef CONFIG_SYS_FSL_ESDHC_USE_PIO
+   esdhc_pio_read_write(mmc, data);
+#else
do {
irqstat = in_be32(®s->irqstat);
 
@@ -227,6 +302,7 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)

Re: [U-Boot] [PATCH v1] ppc/85xx: PIO Support for FSL eSDHC Controller Driver

2009-09-09 Thread Wolfgang Denk
Dear Dipen Dudhat,

In message <1252488547-26676-1-git-send-email-dipen.dud...@freescale.com> you 
wrote:
> PIO Mode Support for eSDHC Controller Driver on Freescale SoCs.

Please do not repeat the Subject: in the commit message.

You may want to add a little more of explanation, though.


...
> + if (data->flags & MMC_DATA_READ) {
> + blocks = data->blocks;
> + buffer = data->dest;
> + while (blocks) {
> + size = data->blocksize;
> + while (size && (!(irqstat & IRQSTAT_TC))) {
> + udelay(1000);
> + irqstat = in_be32(®s->irqstat);

Do you really need to wait for one millisecond here? This looks a bit
long to me. 

> + databuf = in_le32(®s->datport);
> + *((uint *)buffer) = databuf;
> + buffer += 4;
> + size -= 4;

Um... and I do not see any error checking or error handling here?

> + } else {
> + blocks = data->blocks;
> + buffer = data->src;
> + while (blocks) {
> + timeout = MAX_TIMEOUT;
> + size = data->blocksize;
> + irqstat = in_be32(®s->irqstat);
> + while (!(in_be32(®s->prsstat) & PRSSTAT_BWEN) && 
> --timeout);

Please at least move the ';' to a new line.

> + if (timeout <= 0) {
> + printf("\nData Write Failed in PIO Mode.");
> + return TIMEOUT;
> + } else {

Omit this "else", and unindent the following block.

> + while (size && (!(irqstat & IRQSTAT_TC))) {
> + databuf = *((uint *)buffer);
> + buffer += 4;
> + size -= 4;
> + udelay(1000);
> + irqstat = in_be32(®s->irqstat);
> + out_le32(®s->datport, databuf);

Again - is 1 millisecond ok, and don;t we need any error checking
here?

>  
> +#ifdef CONFIG_SYS_FSL_ESDHC_USE_PIO
> + if (!(data->flags & MMC_DATA_READ)) {
> + if ((in_be32(®s->prsstat) & PRSSTAT_WPSPL) == 0) {
> + printf("\nThe SD card is locked. "
> + "Can not write to a locked card.\n\n");
> + return TIMEOUT;
> + }

Indentation incorrect.

> + out_be32(®s->dsaddr, (u32)data->src);
> + } else
> + out_be32(®s->dsaddr, (u32)data->dest);

Indentation incorrect.

> @@ -201,6 +272,7 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, 
> struct mmc_data *data)
>   return TIMEOUT;
>  
>   /* Copy the response to the response buffer */
> + udelay(1000);

Why is this needed?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Your own mileage may vary.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4] ppc4xx: Rename compactcenter to intip

2009-09-09 Thread Dirk Eibach
Signed-off-by: Dirk Eibach 
---
Changes since v1:
- also changed config name

Changes since v2:
- also changed file- and directory-names

Changes since v3:
- used format-patch -M -C to detect renames properly

 MAINTAINERS|2 +-
 MAKEALL|2 +-
 Makefile   |   16 
 board/gdsys/{compactcenter => intip}/Makefile  |0 
 board/gdsys/{compactcenter => intip}/chip_config.c |0 
 board/gdsys/{compactcenter => intip}/config.mk |0 
 board/gdsys/{compactcenter => intip}/init.S|0 
 .../compactcenter.c => intip/intip.c}  |2 +-
 board/gdsys/{compactcenter => intip}/u-boot.lds|2 +-
 include/configs/{compactcenter.h => intip.h}   |8 
 10 files changed, 16 insertions(+), 16 deletions(-)
 rename board/gdsys/{compactcenter => intip}/Makefile (100%)
 rename board/gdsys/{compactcenter => intip}/chip_config.c (100%)
 rename board/gdsys/{compactcenter => intip}/config.mk (100%)
 rename board/gdsys/{compactcenter => intip}/init.S (100%)
 rename board/gdsys/{compactcenter/compactcenter.c => intip/intip.c} (99%)
 rename board/gdsys/{compactcenter => intip}/u-boot.lds (98%)
 rename include/configs/{compactcenter.h => intip.h} (98%)

diff --git a/MAINTAINERS b/MAINTAINERS
index e9db278..e0d4786 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -141,10 +141,10 @@ Jon Diekema 
 
 Dirk Eibach 
 
-   compactcenter   PPC460EX
devconcenterPPC460EX
dlvisionPPC405EP
gdppc440etx PPC440EP/GR
+   intip   PPC460EX
neo PPC405EP
 
 Dave Ellis 
diff --git a/MAKEALL b/MAKEALL
index f0ed8ea..b3d35ac 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -185,7 +185,6 @@ LIST_4xx="  \
canyonlands \
canyonlands_nand \
CMS700  \
-   compactcenter   \
CPCI2DP \
CPCI405 \
CPCI4052\
@@ -214,6 +213,7 @@ LIST_4xx="  \
hcu5\
HH405   \
HUB405  \
+   intip   \
JSE \
KAREF   \
katmai  \
diff --git a/Makefile b/Makefile
index 0449a5b..bb06d86 100644
--- a/Makefile
+++ b/Makefile
@@ -1304,14 +1304,6 @@ CATcenter_33_config: unconfig
 CMS700_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd
 
-# Compact-Center & DevCon-Center use different U-Boot images
-compactcenter_config \
-devconcenter_config:   unconfig
-   @mkdir -p $(obj)include
-   @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
-   tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
-   @$(MKCONFIG) -n $@ -a compactcenter ppc ppc4xx compactcenter gdsys
-
 CPCI2DP_config:unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd
 
@@ -1396,6 +1388,14 @@ HH405_config:unconfig
 HUB405_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx hub405 esd
 
+# Compact-Center(codename intip) & DevCon-Center use different U-Boot images
+intip_config \
+devconcenter_config:   unconfig
+   @mkdir -p $(obj)include
+   @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
+   tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
+   @$(MKCONFIG) -n $@ -a intip ppc ppc4xx intip gdsys
+
 JSE_config:unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx jse
 
diff --git a/board/gdsys/compactcenter/Makefile b/board/gdsys/intip/Makefile
similarity index 100%
rename from board/gdsys/compactcenter/Makefile
rename to board/gdsys/intip/Makefile
diff --git a/board/gdsys/compactcenter/chip_config.c 
b/board/gdsys/intip/chip_config.c
similarity index 100%
rename from board/gdsys/compactcenter/chip_config.c
rename to board/gdsys/intip/chip_config.c
diff --git a/board/gdsys/compactcenter/config.mk b/board/gdsys/intip/config.mk
similarity index 100%
rename from board/gdsys/compactcenter/config.mk
rename to board/gdsys/intip/config.mk
diff --git a/board/gdsys/compactcenter/init.S b/board/gdsys/intip/init.S
similarity index 100%
rename from board/gdsys/compactcenter/init.S
rename to board/gdsys/intip/init.S
diff --git a/board/gdsys/compactcenter/compactcenter.c 
b/board/gdsys/intip/intip.c
similarity index 99%
rename from board/gdsys/compactcenter/compactcenter.c
rename to board/gdsys/intip/intip.c
index f448ef9..e929c8b 100644
--- a/board/gdsys/compactcenter/compactcenter.c
+++ b/board/gdsys/intip/intip.c
@@ -129,7 +129,7 @@ int checkboard(void)
 #ifdef CONFIG_DEVCONCENTER
printf("Board: DevCon-Center");
 #else
-   printf("Board: CompactCenter");
+   printf("Board: Intip");
 #endif
 
if (s != NULL) {
diff --git a/board/gdsys/compactcenter/u-boot.lds b/board/gdsys/intip/u-boot.lds
similarity index 98%
rename from board/gdsys/compactcenter/u-boot.lds
rename to board/gdsys/intip/u-boot.lds
index 0c95d5c..c1cbd1c 

Re: [U-Boot] [PATCH] arm_cortexa8: support cache flush to other soc

2009-09-09 Thread Tom
Minkyu Kang wrote:
> Tom wrote:
>> Dirk Behme wrote:
>>> Tom wrote:
 Minkyu Kang wrote:
> Dear Dirk,
>
>
 

 I have lost track of this thread.
>>> Yes, and I'm currently trying to get the track back ;)
>>>
 When last I worked this, it seemed like the cache routines were going to
 be split.

 1. generic cache routines
 2. legacy soc cache routines.

 Are the generic cache routines in place and can you use them?
 Else can you handle your soc specific cache routines as part of a
 legacy cache routine ?

 The omap cache routines are dependent on omap rom code and fitting
 new routines in using the omap specifics may not be the best way to
 go.
>>> I'm sure this is not the perfect way, but it seems to me that
>>> splitting all this stuff into several small steps would be the easier
>>> for all. E.g.
>>>
>>> 1) From the previous discussion I think we should apply
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-August/058492.html
>>>
>>> Independent of any discussion if this code is needed at all, if it is
>>> generic or not etc. the main advantage I understood is that it frees
>>> the way for Samsung.
>>>
>>> 2a) Then, what I understood from Minkyu, we need an additional patch
>>> (discussion?) how to switch CONFIG_L2_OFF from compile time to run
>>> time selection (for Samsung's multi board support)
>>>
>>> 2b) Then, what I understood from Minkyu, we should discuss about
>>> removal of get_device_type() function
>>>
>>> 3) In parallel, we should discuss how to further improve the OMAP3
>>> cache stuff. What might be generic, what not, what isn't necessary etc.
>>>
>>> 4) Regarding (cache) code duplication, I vote for doing this
>>> duplication first. That is, have working Samsung and OMAP3 code
>>> applied in parallel. While Jean-Christophe might cry "code
>>> duplication", I learned from OMAP3 boards that is was easier to unify
>>> common code _after_ code duplication was done and therefore can be
>>> easily identified. Discussing about possible code duplication without
>>> being able to see (and test) the code is sometimes a little tricky ;)
>>>
>>> As mentioned, doing this in several, small steps I feel more
>>> comfortable with. If we would have done step (1) already, it's my
>>> feeling that we would have reached step 2 or 3 already. But now, we
>>> are still discussing about the 'one big perfect patch'.
>>>
>>> Best regards
>>>
>>> Dirk
>>>
>>>
>> I am making this workflow up as I go.. but it seems like the
>> way to resolve this is to work through the new sub-arm repo's
>>
>> #1 should go to u-boot-ti first and then I will will merge it to u-boot-arm
>> Then u-boot-samsung can sync to it and we will all be at a good
>> starting point for #2.
>> Can #1 go now to u-boot-ti ?
>> If there is a merge problem, kick it back to the developer ;)
>>
>> This patch moves the cache support out of A8 and into omap3 which is
>> the correct place for it.
>>
>> I assume the samsung changes are going to go first to u-boot-samsung
>> Correct ?
>>
>> For 2a) runtime cache enabling / disabling
>> New feature I don't think omap needs so it should be at some board or
>> soc level that does not impact omap.
>>
>> For 2b) get_device_type.  This is an omap-ism that goes away with #1
>>
>> The means though that samsung needs its own cache routines.
>> If they are going to do 2a) they will need them anyway.
>>
>> For 3) I don't think omap needs improving at this point.
>>
>> For 4) Lets see how much the samsung cache routines look like the
>> omap once they are done.  If it is a lot of cut-n-paste this is
>> not worth arguing about a common routine will be easier to manage.
>> If the cache code looks really different then it can live at the
>> board or soc layer.  As long as no one claims the cpu layer at the
>> very least everyone's board will work.
>>
>>
>> Tom
>>
> 
> Although I did not understand all of the cache routine..
> the s5pc100 soc doesn't need v7_flush_dcache_all function
> and other cache routines.
> But the s5pc110 soc needs this function,
> and it works fine without modification. (please see my patch)
> 

Please send me a link to your patch.

Tom


> I think.. v7_flush_decache_all function can share together.
> 
> If this function is not moved to soc layer,
> need to remove omap specific codes (checking device type)
> 

> Thanks.
> Minkyu Kang

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Merging u-boot-s3c24xx with u-boot-samsung

2009-09-09 Thread Harald Welte
Dear Wolfgang,

On Tue, Sep 08, 2009 at 02:45:18PM +0200, Wolfgang Denk wrote:
 
> in the context of splitting the ARM architecure into vendor-related
> sub-repositories an new "u-boot-samsung.git" repository has been
> created; it seems to make sense to merge the older u-boot-s3c24xx
> repository into this one.
> 
> As you're the custodian for the u-boot-s3c24xx repository I would like
> to hear your opinion about this.

I'm perfectly fine with this, as I have not really used my custodian status
much anyway.  I always assumed I would find more time to contribute patches
from the Openmoko times, but never got around doing that, too many other
projects.

-- 
- Harald Weltehttp://laforge.gnumonks.org/

"Privacy in residential applications is a desirable marketing option."
  (ETSI EN 300 175-7 Ch. A6)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] mpc52xx, mucmc52, uc101: config cleanup

2009-09-09 Thread Detlev Zundel
Hi Heiko,

> - as this boards are similiar, collect common config option
>   in manroland-common.h
> - add OF support
> - update default environment
>
> Signed-off-by: Heiko Schocher 
> ---
>  board/mucmc52/mucmc52.c|7 +
>  board/uc101/uc101.c|7 +
>  include/configs/manroland-common.h |  336 
> 
>  include/configs/mucmc52.h  |  256 +--
>  include/configs/uc101.h|  266 +---
>  5 files changed, 368 insertions(+), 504 deletions(-)
>  create mode 100644 include/configs/manroland-common.h

[...]

> + * High Level Configuration Options
> + * (easy to change)
> + */
> +#define CONFIG_MPC5xxx   1   /* This is an MPC5xxx CPU   
> */
> +#define CONFIG_MPC5200   1   /* (more precisely an MPC5200 
> CPU)  */
> +
> +#define CONFIG_SYS_MPC5XXX_CLKIN 3300 /* ... running at 33.00MHz 
> */

Are you sure that this is a good choice to put in a manufacturer common
header file?  Isn't the probability of this becoming incorrect nearly
100% for the next board from this manufacturer?

I'd advise to keep CPU stuff in the individual board config files -
maybe, if you really want, create a "manroland-mpc52xx-common.h". The
rest of the common configs should be re-evaluated in the same spirit.

Cheers
  Detlev

-- 
LISP has  jokingly been  described as  "the most  intelligent way to  misuse a
computer".  I think that  description a great  compliment because it transmits
the full  flavour of  liberation:  it has assisted a number of our most gifted
fellow humans in thinking previously impossible thoughts. - Edsger W. Dijkstra
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm_cortexa8: support cache flush to other soc

2009-09-09 Thread Minkyu Kang
Dear Tom,

2009/9/9 Tom :
> Minkyu Kang wrote:
>> Tom wrote:
>>> Dirk Behme wrote:
 Tom wrote:
> Minkyu Kang wrote:
>> Dear Dirk,
>>
>>
> 
>
> I have lost track of this thread.
 Yes, and I'm currently trying to get the track back ;)

> When last I worked this, it seemed like the cache routines were going to
> be split.
>
> 1. generic cache routines
> 2. legacy soc cache routines.
>
> Are the generic cache routines in place and can you use them?
> Else can you handle your soc specific cache routines as part of a
> legacy cache routine ?
>
> The omap cache routines are dependent on omap rom code and fitting
> new routines in using the omap specifics may not be the best way to
> go.
 I'm sure this is not the perfect way, but it seems to me that
 splitting all this stuff into several small steps would be the easier
 for all. E.g.

 1) From the previous discussion I think we should apply

 http://lists.denx.de/pipermail/u-boot/2009-August/058492.html

 Independent of any discussion if this code is needed at all, if it is
 generic or not etc. the main advantage I understood is that it frees
 the way for Samsung.

 2a) Then, what I understood from Minkyu, we need an additional patch
 (discussion?) how to switch CONFIG_L2_OFF from compile time to run
 time selection (for Samsung's multi board support)

 2b) Then, what I understood from Minkyu, we should discuss about
 removal of get_device_type() function

 3) In parallel, we should discuss how to further improve the OMAP3
 cache stuff. What might be generic, what not, what isn't necessary etc.

 4) Regarding (cache) code duplication, I vote for doing this
 duplication first. That is, have working Samsung and OMAP3 code
 applied in parallel. While Jean-Christophe might cry "code
 duplication", I learned from OMAP3 boards that is was easier to unify
 common code _after_ code duplication was done and therefore can be
 easily identified. Discussing about possible code duplication without
 being able to see (and test) the code is sometimes a little tricky ;)

 As mentioned, doing this in several, small steps I feel more
 comfortable with. If we would have done step (1) already, it's my
 feeling that we would have reached step 2 or 3 already. But now, we
 are still discussing about the 'one big perfect patch'.

 Best regards

 Dirk


>>> I am making this workflow up as I go.. but it seems like the
>>> way to resolve this is to work through the new sub-arm repo's
>>>
>>> #1 should go to u-boot-ti first and then I will will merge it to u-boot-arm
>>> Then u-boot-samsung can sync to it and we will all be at a good
>>> starting point for #2.
>>> Can #1 go now to u-boot-ti ?
>>> If there is a merge problem, kick it back to the developer ;)
>>>
>>> This patch moves the cache support out of A8 and into omap3 which is
>>> the correct place for it.
>>>
>>> I assume the samsung changes are going to go first to u-boot-samsung
>>> Correct ?
>>>
>>> For 2a) runtime cache enabling / disabling
>>> New feature I don't think omap needs so it should be at some board or
>>> soc level that does not impact omap.
>>>
>>> For 2b) get_device_type.  This is an omap-ism that goes away with #1
>>>
>>> The means though that samsung needs its own cache routines.
>>> If they are going to do 2a) they will need them anyway.
>>>
>>> For 3) I don't think omap needs improving at this point.
>>>
>>> For 4) Lets see how much the samsung cache routines look like the
>>> omap once they are done.  If it is a lot of cut-n-paste this is
>>> not worth arguing about a common routine will be easier to manage.
>>> If the cache code looks really different then it can live at the
>>> board or soc layer.  As long as no one claims the cpu layer at the
>>> very least everyone's board will work.
>>>
>>>
>>> Tom
>>>
>>
>> Although I did not understand all of the cache routine..
>> the s5pc100 soc doesn't need v7_flush_dcache_all function
>> and other cache routines.
>> But the s5pc110 soc needs this function,
>> and it works fine without modification. (please see my patch)
>>
>
> Please send me a link to your patch.
>
> Tom
>
>
>> I think.. v7_flush_decache_all function can share together.
>>
>> If this function is not moved to soc layer,
>> need to remove omap specific codes (checking device type)
>>
>
>> Thanks.
>> Minkyu Kang
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

http://lists.denx.de/pipermail/u-boot/2009-September/059889.html

top of this thread
thanks.

-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.

2009-09-09 Thread Marcel Ziswiler
Hi Heiko

Heiko Schocher  denx.de> writes:
> Yes, thats the kmsupx4 and mgsuvd boards. The generic memory fixup
> can be used (I tried this), but with the generic Ethernet fixup
> something goes wrong. If I find time, I take a look at it.

At the beginning I had issues as my device tree was missing an Ethernet alias as
that's what the generic Ethernet fixup requires to find the node.
On some CPU architectures (e.g. MPC8260) the fixup is gated by some defines
(e.g. CONFIG_HAS_ETHx) but on MPC8xx that should not be the case.

Cheers

Marcel

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] mpc52xx, mucmc52, uc101: config cleanup

2009-09-09 Thread Wolfgang Denk
Dear Detlev Zundel,

In message  you wrote:
> 
> > +#define CONFIG_MPC5xxx 1   /* This is an MPC5xxx CPU   
> > */
> > +#define CONFIG_MPC5200 1   /* (more precisely an MPC5200 
> > CPU)  */
> > +
> > +#define CONFIG_SYS_MPC5XXX_CLKIN   3300 /* ... running at 33.00MHz 
> > */
> 
> Are you sure that this is a good choice to put in a manufacturer common
> header file?  Isn't the probability of this becoming incorrect nearly
> 100% for the next board from this manufacturer?
> 
> I'd advise to keep CPU stuff in the individual board config files -
> maybe, if you really want, create a "manroland-mpc52xx-common.h". The
> rest of the common configs should be re-evaluated in the same spirit.

And right you are.  Thanks for pointing out.

Heiko, please rework. I haven't pushed the repo out yet, so I just
remove that commit again.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Every solution breeds new problems.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] mx27ads: add support for iMX27ADS board from Freescale

2009-09-09 Thread Alan Carvalho de Assis
This patch adds support to iMX27ADS development board. This board has
128MB RAM, 32MB NOR Flash and 128MB NAND Flash. Currently only
booting from NOR is supported.

Signed-off-by: Alan Carvalho de Assis 
---
 MAINTAINERS |3 +
 MAKEALL |1 +
 Makefile|3 +
 board/freescale/mx27ads/Makefile|   51 
 board/freescale/mx27ads/config.mk   |1 +
 board/freescale/mx27ads/lowlevel_init.S |  128 +++
 board/freescale/mx27ads/mx27ads.c   |   93 ++
 board/freescale/mx27ads/u-boot.lds  |   56 +
 include/configs/mx27ads.h   |  202 +++
 9 files changed, 538 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/mx27ads/Makefile
 create mode 100644 board/freescale/mx27ads/config.mk
 create mode 100644 board/freescale/mx27ads/lowlevel_init.S
 create mode 100644 board/freescale/mx27ads/mx27ads.c
 create mode 100644 board/freescale/mx27ads/u-boot.lds
 create mode 100644 include/configs/mx27ads.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e9db278..5b25188 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -550,6 +550,9 @@ Thomas Elste 

modnet50ARM720T (NET+50)

+Alan Carvalho de Assis 
+   mx27ads i.MX27
+
 Fabio Estevam 

mx31pdk i.MX31
diff --git a/MAKEALL b/MAKEALL
index f0ed8ea..8411eef 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -520,6 +520,7 @@ LIST_ARM9=" \
cp926ejs\
cp946es \
cp966   \
+   mx27ads \
imx27lite   \
lpd7a400\
mv88f6281gtw_ge \
diff --git a/Makefile b/Makefile
index 0449a5b..6fa4b28 100644
--- a/Makefile
+++ b/Makefile
@@ -2961,6 +2961,9 @@ davinci_dm365evm_config : unconfig
 imx27lite_config:  unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27

+mx27ads_config :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs mx27ads freescale mx27
+
 lpd7a400_config \
 lpd7a404_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
diff --git a/board/freescale/mx27ads/Makefile b/board/freescale/mx27ads/Makefile
new file mode 100644
index 000..d142a9e
--- /dev/null
+++ b/board/freescale/mx27ads/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000-2004
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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$(BOARD).a
+
+COBJS  := mx27ads.o
+SOBJS  := lowlevel_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
+
diff --git a/board/freescale/mx27ads/config.mk
b/board/freescale/mx27ads/config.mk
new file mode 100644
index 000..a2e7768
--- /dev/null
+++ b/board/freescale/mx27ads/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0xA7F0
diff --git a/board/freescale/mx27ads/lowlevel_init.S
b/board/freescale/mx27ads/lowlevel_init.S
new file mode 100644
index 000..a4e1191
--- /dev/null
+++ b/board/freescale/mx27ads/lowlevel_init.S
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2008, Guennadi Liakhovetski 
+ *
+ * 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 shoul

[U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Mike Frysinger
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless.  Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled.  And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
that only enables the envcrc utility.

Signed-off-by: Mike Frysinger 
---
v2
- change logic from "always builds" to "build only when needed"

 common/Makefile   |5 +
 common/env_embedded.c |7 ---
 include/common.h  |5 +
 tools/Makefile|   11 +++
 tools/envcrc.c|   11 +--
 5 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index 3781738..e3a1591 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -49,12 +49,9 @@ COBJS-y += cmd_nvedit.o
 
 # environment
 COBJS-y += env_common.o
+COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
-COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
diff --git a/common/env_embedded.c b/common/env_embedded.c
index ae6cac4..e27e1cd 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -41,11 +41,6 @@
 #endif
 
 /*
- * Generate embedded environment table
- * inside U-Boot image, if needed.
- */
-#if defined(ENV_IS_EMBEDDED)
-/*
  * Only put the environment in it's own section when we are building
  * U-Boot proper.  The host based program "tools/envcrc" does not need
  * a seperate section.  Note that ENV_CRC is only defined when building
@@ -210,5 +205,3 @@ unsigned long env_size __PPCTEXT__ = sizeof(env_t);
  * Add in absolutes.
  */
 GEN_ABS(env_offset, CONFIG_ENV_OFFSET);
-
-#endif /* ENV_IS_EMBEDDED */
diff --git a/include/common.h b/include/common.h
index 35f12c0..edfc687 100644
--- a/include/common.h
+++ b/include/common.h
@@ -721,4 +721,9 @@ int cpu_release(int nr, int argc, char *argv[]);
 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
 #define __ALIGN_MASK(x,mask)   (((x)+(mask))&~(mask))
 
+/* Pull in stuff for the build system */
+#ifdef DO_DEPS_ONLY
+# include 
+#endif
+
 #endif /* __COMMON_H_ */
diff --git a/tools/Makefile b/tools/Makefile
index b5a1e39..603a6c1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -69,13 +69,7 @@ include $(TOPDIR)/config.mk
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_DATAFLASH) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_EEPROM) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_FLASH) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_ONENAND) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_NAND) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_NVRAM) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_SPI_FLASH) += envcrc$(SFX)
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED_CUSTOM) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
@@ -93,7 +87,8 @@ EXT_OBJ_FILES-y += common/image.o
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
-OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED_CUSTOM) += envcrc.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 5b0f7cd..d02a7db 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -50,10 +50,6 @@
 # if defined(CONFIG_ENV_ADDR_REDUND) && !defined(CONFIG_ENV_SIZE_REDUND)
 #  define CONFIG_ENV_SIZE_REDUND   CONFIG_ENV_SIZE
 # endif
-# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
- ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + 
CONFIG_SYS_MONITOR_LEN))
-#  define ENV_IS_EMBEDDED  1
-# endif
 # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
 #  define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1
 # endif
@@ -70,14 +66,11 @@
 
 extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int);
 
-#ifdef ENV_IS_EMBEDDED
 extern unsigned int env_size;
 extern unsigned char environment;
-#endif /* ENV_IS_EMBEDDED */
 
 int main (int argc, char **argv)
 {
-#ifdef ENV_IS_EMBEDDED
unsigned char pad = 0x00;
uint32_t crc;
unsigned char *envptr = &environ

Re: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible

2009-09-09 Thread Mike Frysinger
On Friday 09 January 2009 04:38:22 Mike Frysinger wrote:
> The netcat utility likes to exit when it receives an empty packet (as it
> thinks this means EOF).  This can easily occur when working with command
> line editing as this behavior will be triggered when using backspace.  Or
> with tabs and command line completion.  Since the local ncb util does not
> have this "feature" and it supports broadcast udp, default to using that
> rather than netcat.

ping ... afaik, it should still apply fine
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] move default bootm config options to config_cmd_default.h

2009-09-09 Thread Mike Frysinger
Rather than declare default bootm OS support options in cmd_bootm.c where
boards cannot override it, move the options to config_cmd_default.h.  Now
boards that want to disable certain default OS's can do just that.

Signed-off-by: Mike Frysinger 
---
 common/cmd_bootm.c   |4 
 include/config_cmd_default.h |4 
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 365ceeb..a2e8456 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -102,10 +102,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
bootm_headers_t *images); /* pointers to os/initrd/fdt 
*/
 
-#define CONFIG_BOOTM_LINUX 1
-#define CONFIG_BOOTM_NETBSD 1
-#define CONFIG_BOOTM_RTEMS 1
-
 #ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 #endif
diff --git a/include/config_cmd_default.h b/include/config_cmd_default.h
index a5d87a6..a28ad4d 100644
--- a/include/config_cmd_default.h
+++ b/include/config_cmd_default.h
@@ -39,4 +39,8 @@
 #define CONFIG_CMD_SOURCE  /* "source" command support */
 #define CONFIG_CMD_XIMG/* Load part of Multi Image */
 
+#define CONFIG_BOOTM_LINUX
+#define CONFIG_BOOTM_NETBSD
+#define CONFIG_BOOTM_RTEMS
+
 #endif /* _CONFIG_CMD_DEFAULT_H */
-- 
1.6.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] move default bootm config options to config_cmd_default.h

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <1252500954-31428-1-git-send-email-vap...@gentoo.org> you wrote:
> Rather than declare default bootm OS support options in cmd_bootm.c where
> boards cannot override it, move the options to config_cmd_default.h.  Now
> boards that want to disable certain default OS's can do just that.

While I agree with your intention (i. e. I also think it wouldbe
better if this could be more easily changed), I disagree with the
implementation:  config_cmd_default.h is intended to select which
commands are enabled by default; it is not the right place to add any
default settings for any commands.

We need to find a better place for that.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"No problem is so formidable that you can't walk away from it."
- C. Schulz
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc/85xx: Set CONFIG_SYS_MONITOR_LEN correctly

2009-09-09 Thread Kumar Gala
A number of boards didn't have CONFIG_SYS_MONITOR_LEN set properly based
on how TEXT_BASE was set.

Signed-off-by: Kumar Gala 
---

This patch is cleaning up things so we can use CONFIG_SYS_MONITOR_LEN in
the linker script.  I would appreciate ACKs via various board maintainers.

- k

 include/configs/ATUM8548.h|2 +-
 include/configs/MPC8536DS.h   |2 +-
 include/configs/MPC8540ADS.h  |2 +-
 include/configs/MPC8540EVAL.h |2 +-
 include/configs/MPC8541CDS.h  |2 +-
 include/configs/MPC8544DS.h   |2 +-
 include/configs/MPC8548CDS.h  |2 +-
 include/configs/MPC8555CDS.h  |2 +-
 include/configs/MPC8560ADS.h  |2 +-
 include/configs/MPC8568MDS.h  |2 +-
 include/configs/MPC8569MDS.h  |2 +-
 include/configs/MPC8572DS.h   |2 +-
 include/configs/P1_P2_RDB.h   |2 +-
 include/configs/P2020DS.h |2 +-
 include/configs/TQM85xx.h |6 +-
 include/configs/sbc8548.h |2 +-
 include/configs/socrates.h|2 +-
 include/configs/stxgp3.h  |2 +-
 18 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/include/configs/ATUM8548.h b/include/configs/ATUM8548.h
index 91369a7..9027d82 100644
--- a/include/configs/ATUM8548.h
+++ b/include/configs/ATUM8548.h
@@ -198,7 +198,7 @@
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon 
*/
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon 
*/
 #define CONFIG_SYS_MALLOC_LEN  (128 * 1024)/* Reserved for malloc 
*/

 /* Serial Port */
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 4746e2e..d454bfa 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -273,7 +273,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon 
*/
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon 
*/
 #define CONFIG_SYS_MALLOC_LEN  (1024 * 1024)   /* Reserved for malloc 
*/

 #define CONFIG_SYS_NAND_BASE   0xffa0
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index 4af599b..e483eed 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -232,7 +232,7 @@
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for 
Mon */
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024)/* Reserve 512 kB for 
Mon */
 #define CONFIG_SYS_MALLOC_LEN  (128 * 1024)/* Reserved for malloc 
*/

 /* Serial Port */
diff --git a/include/configs/MPC8540EVAL.h b/include/configs/MPC8540EVAL.h
index 95ea275..808a34d 100644
--- a/include/configs/MPC8540EVAL.h
+++ b/include/configs/MPC8540EVAL.h
@@ -168,7 +168,7 @@
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for 
Mon */
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024)/* Reserve 512 kB for 
Mon */
 #define CONFIG_SYS_MALLOC_LEN  (128 * 1024)/* Reserved for malloc 
*/

 /* Serial Port */
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index a8f206f..319b74c 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -265,7 +265,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon 
*/
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon 
*/
 #define CONFIG_SYS_MALLOC_LEN  (128 * 1024)/* Reserved for malloc 
*/

 /* Serial Port */
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 0caf456..f992458 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -218,7 +218,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_GBL_DATA_OFFSET

-#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon 
*/
+#define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon 
*/
 #define CONFIG_SYS_MALLOC_LEN  (1024 * 1024)   /* Reserved for malloc 

Re: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909090846.33499.vap...@gentoo.org> you wrote:
>
> On Friday 09 January 2009 04:38:22 Mike Frysinger wrote:
> > The netcat utility likes to exit when it receives an empty packet (as it
> > thinks this means EOF).  This can easily occur when working with command
> > line editing as this behavior will be triggered when using backspace.  Or
> > with tabs and command line completion.  Since the local ncb util does not
> > have this "feature" and it supports broadcast udp, default to using that
> > rather than netcat.
> 
> ping ... afaik, it should still apply fine

Maybe. But I still don't like the patch. Now, with the distance of a
few months, I think it should be split into two parts:

1) "make a bit more robust"

I agree that this is kind of a bug fix; I think it can go in.

2) "use ncb when possible"

Here I really dislike the implementation of "when possible", which
makes silent and undocumented assumptions about from which directory
the script has to be run. I guess the "when possible" would almost
always turn out to be false, so we might omit the patch alltogether,
especially since it's also documented in "doc/README.NetConsole".

If we add it, we should follow standard UNIX philosophy and assume
that you set your PATH accordingly to reach the tools you want to use.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
While money can't buy happiness, it certainly lets  you  choose  your
own form of misery.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script

2009-09-09 Thread Kumar Gala
Now that we set CONFIG_SYS_MONITOR_LEN properly we can use it and
TEXT_BASE to ensure that the boot page and reset vector are placed at
the proper location in the u-boot image.

We needed to cleanup the use of a C++ comment in P1_P2_RDB.h to allow
use of config.h in u-boot.lds.

Signed-off-by: Kumar Gala 
---
 cpu/mpc85xx/u-boot.lds  |8 +---
 include/configs/P1_P2_RDB.h |1 -
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds
index d6e22a7..e0de0d1 100644
--- a/cpu/mpc85xx/u-boot.lds
+++ b/cpu/mpc85xx/u-boot.lds
@@ -20,6 +20,8 @@
  * MA 02111-1307 USA
  */
 
+#include 
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
__DYNAMIC = 0;*/
@@ -116,17 +118,17 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
-  .bootpg ADDR(.text) + 0x7f000 :
+  .bootpg ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x1000 :
   {
 cpu/mpc85xx/start.o(.bootpg)
   } :text = 0x
 
-  .resetvec ADDR(.text) + 0x7fffc :
+  .resetvec ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x4 :
   {
 *(.resetvec)
   } :text = 0x
 
-  . = ADDR(.text) + 0x8;
+  . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
 
   __bss_start = .;
   .bss (NOLOAD)   :
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index fb46d2b..e18547b 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -208,7 +208,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  * shorted - index 1
  */
 #define CONFIG_CONS_INDEX  1
-//#define CONFIG_CONS_INDEX2
 #undef CONFIG_SERIAL_SOFTWARE_FIFO
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
-- 
1.6.0.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <1252498455-28276-1-git-send-email-vap...@gentoo.org> you wrote:
> The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
> compile the code when this isn't defined is pointless.  Now that the env
> headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
> system to only build the env objects when this is enabled.  And now that
> the env code is conditionally compiled, we can drop the source code checks.
> 
> For people who want to extract the environment manually, add a new option
> that only enables the envcrc utility.

Add a new option...?

I guess this is CONFIG_ENV_IS_EMBEDDED_CUSTOM then?

Hm... but I see no users of this variable, nobody is setting it?

Also, I see no documentation for it?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Of course there's no reason for it, it's just our policy.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc/85xx: Set CONFIG_SYS_MONITOR_LEN correctly

2009-09-09 Thread Wolfgang Denk
Dear Kumar Gala,

In message  you wrote:
> A number of boards didn't have CONFIG_SYS_MONITOR_LEN set properly based
> on how TEXT_BASE was set.
> 
> Signed-off-by: Kumar Gala 
> ---
> 
> This patch is cleaning up things so we can use CONFIG_SYS_MONITOR_LEN in
> the linker script.  I would appreciate ACKs via various board maintainers.

Thsi makes no sense to me. The linker script should use the
information that is intensded for the linker script, i. e. TEXT_BASE;
using CONFIG_SYS_MONITOR_LEN seems to be wrong here.

Actually I consider this a change to the worse. See for example The
TQM85xx boards below.


> --- a/include/configs/ATUM8548.h
> +++ b/include/configs/ATUM8548.h
> @@ -198,7 +198,7 @@
>  #define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - 
> CONFIG_SYS_GBL_DATA_SIZE)
>  #define CONFIG_SYS_INIT_SP_OFFSETCONFIG_SYS_GBL_DATA_OFFSET
> 
> -#define CONFIG_SYS_MONITOR_LEN   (256 * 1024) /* Reserve 256 kB 
> for Mon */
> +#define CONFIG_SYS_MONITOR_LEN   (512 * 1024) /* Reserve 512 kB 
> for Mon */

Why is this changing here and in other places?



> diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
> index 1fbf4bf..1c50743 100644
> --- a/include/configs/TQM85xx.h
> +++ b/include/configs/TQM85xx.h
> @@ -247,7 +247,11 @@
>  #define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - 
> CONFIG_SYS_GBL_DATA_SIZE)
>  #define CONFIG_SYS_INIT_SP_OFFSETCONFIG_SYS_GBL_DATA_OFFSET
> 
> -#define CONFIG_SYS_MONITOR_LEN   (~TEXT_BASE + 1)/* Reserved for 
> Monitor */
> +#ifdef CONFIG_TQM8548_BE
> +#define CONFIG_SYS_MONITOR_LEN   (512 * 1024)/* Reserve 512 
> kB for Mon */
> +#else
> +#define CONFIG_SYS_MONITOR_LEN   (256 * 1024)/* Reserve 256 
> kB for Mon */
> +#endif
>  #define CONFIG_SYS_MALLOC_LEN(384 * 1024)/* Reserved for 
> malloc  */


Without your change, we just had one knob to twiddle (TEXT_BASE), now
we suddenly have two, which must be kept in sync. And we have a lot of
additional #ifdef's.


> diff --git a/include/configs/socrates.h b/include/configs/socrates.h
> index 35feed0..e7c09fe 100644
> --- a/include/configs/socrates.h
> +++ b/include/configs/socrates.h
> @@ -174,7 +174,7 @@
>  #define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END - 
> CONFIG_SYS_GBL_DATA_SIZE)
>  #define CONFIG_SYS_INIT_SP_OFFSETCONFIG_SYS_GBL_DATA_OFFSET
> 
> -#define CONFIG_SYS_MONITOR_LEN   (256 * 1024)/* Reserve 
> 256kB for Mon */
> +#define CONFIG_SYS_MONITOR_LEN   (384 * 1024)/* Reserve 
> 284kB for Mon */

Typo. s/284/384/


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You have the capacity to learn from  mistakes.  You'll  learn  a  lot
today.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script

2009-09-09 Thread Wolfgang Denk
Dear Kumar Gala,

In message <1252503014-3651-1-git-send-email-ga...@kernel.crashing.org> you 
wrote:
> Now that we set CONFIG_SYS_MONITOR_LEN properly we can use it and
> TEXT_BASE to ensure that the boot page and reset vector are placed at
> the proper location in the u-boot image.
> 
> We needed to cleanup the use of a C++ comment in P1_P2_RDB.h to allow
> use of config.h in u-boot.lds.

I think this is bound to be a continuous source of trouble, as you
suddenly have two different config items (TEXT_BASE and
CONFIG_SYS_MONITOR_LEN) which must be kept in sync. This is
definitely not good.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"Look! There! Evil!.. pure and simple, total  evil  from  the  Eighth
Dimension!" - Buckaroo Banzai
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 09:33:20 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
> > compile the code when this isn't defined is pointless.  Now that the env
> > headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
> > system to only build the env objects when this is enabled.  And now that
> > the env code is conditionally compiled, we can drop the source code
> > checks.
> >
> > For people who want to extract the environment manually, add a new option
> > that only enables the envcrc utility.
> 
> Add a new option...?
> 
> I guess this is CONFIG_ENV_IS_EMBEDDED_CUSTOM then?
> 
> Hm... but I see no users of this variable, nobody is setting it?

Blackfin has been using ENV_IS_EMBEDDED_CUSTOM.  i have a patch to update it 
to CONFIG_xxx, but was waiting for this to be accepted first.

> Also, I see no documentation for it?

guessing you want it added to the top level README ?
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] move default bootm config options to config_cmd_default.h

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 09:06:21 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > Rather than declare default bootm OS support options in cmd_bootm.c where
> > boards cannot override it, move the options to config_cmd_default.h.  Now
> > boards that want to disable certain default OS's can do just that.
> 
> While I agree with your intention (i. e. I also think it wouldbe
> better if this could be more easily changed), I disagree with the
> implementation:  config_cmd_default.h is intended to select which
> commands are enabled by default; it is not the right place to add any
> default settings for any commands.
> 
> We need to find a better place for that.

i'm not familiar enough with the nest of includes to locate a better place.  a 
quick grep starting at common.h indicates a new header would have to be made.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 09:28:42 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > On Friday 09 January 2009 04:38:22 Mike Frysinger wrote:
> > > The netcat utility likes to exit when it receives an empty packet (as
> > > it thinks this means EOF).  This can easily occur when working with
> > > command line editing as this behavior will be triggered when using
> > > backspace.  Or with tabs and command line completion.  Since the local
> > > ncb util does not have this "feature" and it supports broadcast udp,
> > > default to using that rather than netcat.
> >
> > ping ... afaik, it should still apply fine
> 
> Maybe. But I still don't like the patch. Now, with the distance of a
> few months, I think it should be split into two parts:
> 
> 1) "make a bit more robust"
> 
> I agree that this is kind of a bug fix; I think it can go in.

np

> 2) "use ncb when possible"
> 
> Here I really dislike the implementation of "when possible", which
> makes silent and undocumented assumptions about from which directory
> the script has to be run. I guess the "when possible" would almost
> always turn out to be false, so we might omit the patch alltogether,
> especially since it's also documented in "doc/README.NetConsole".
> 
> If we add it, we should follow standard UNIX philosophy and assume
> that you set your PATH accordingly to reach the tools you want to use.

since ncb is compiled whenever netconsole is enabled, and people typically use 
this script with netconsole enabled, "when possible" tends to be line up 
fairly often.  also, the broadcast aspect is pretty useful.  i guess i could 
make it search PATH, but the idea was to have things "just work" rather than 
forcing people to install random utils into their PATH.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc/85xx: Set CONFIG_SYS_MONITOR_LEN correctly

2009-09-09 Thread Kumar Gala

On Sep 9, 2009, at 8:42 AM, Wolfgang Denk wrote:

>>
>> --- a/include/configs/ATUM8548.h
>> +++ b/include/configs/ATUM8548.h
>> @@ -198,7 +198,7 @@
>> #define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END -  
>> CONFIG_SYS_GBL_DATA_SIZE)
>> #define CONFIG_SYS_INIT_SP_OFFSETCONFIG_SYS_GBL_DATA_OFFSET
>>
>> -#define CONFIG_SYS_MONITOR_LEN  (256 * 1024) /* Reserve 256 kB 
>> for  
>> Mon */
>> +#define CONFIG_SYS_MONITOR_LEN  (512 * 1024) /* Reserve 512 kB 
>> for  
>> Mon */
>
> Why is this changing here and in other places?
>

Beyond the other issues this patch raises, there is technically a bug  
a number of config.h's in which CONFIG_SYS_MONITOR_LEN has been  
wrong.  I agree that setting it like TQM85xx does for most of these  
would be a better option.

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-09 Thread Timur Tabi
On Wed, Sep 9, 2009 at 4:19 AM, Joakim
Tjernlund wrote:
>
> I wonder if this hides another problem too.
> if the timeout hits, -1 is returned.
>
> Then in i2c_read()/i2c_write() you have:
>        if (i2c_wait4bus() >= 0
>            && i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
>            && __i2c_write(&a[4 - alen], alen) == alen)
>                i = 0; /* No error so far */
> notice how the latter part, i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
>  && __i2c_write(&a[4 - alen], alen) == alen)
> is ignored(never called) when i2c_wait4bus()  returns -1

Yeah, that is a bit odd.  It looks like it was supposed to be some
short-cut way to avoid multiple if-then-else clauses.

I wouldn't say my patch is *hiding* another problem -- that code looks
broken either way.

Someone should probably fix it to look like this:

if (i2c_wait4bus() < 0)
return -1;

if (!i2c_write_addr(dev, I2C_WRITE_BIT, 0))
return -1;

if (__i2c_write(&a[4 - alen], alen) != alen)
return -1;

and so on.
i = 0; /* No error so far */

-- 
Timur Tabi
Linux kernel developer at Freescale
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909091002.40958.vap...@gentoo.org> you wrote:
>
> > I guess this is CONFIG_ENV_IS_EMBEDDED_CUSTOM then?
> > 
> > Hm... but I see no users of this variable, nobody is setting it?
>
> Blackfin has been using ENV_IS_EMBEDDED_CUSTOM.  i have a patch to update it 
> to CONFIG_xxx, but was waiting for this to be accepted first.

Hm.. normally we don't add code without users...

> > Also, I see no documentation for it?
>
> guessing you want it added to the top level README ?

Indeed. What's the name supposed to mean? "The envrionment is
embedded custom" sounds strange to me.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
One essential to success is that you desire be an all-obsessing  one,
your thoughts and aims be co-ordinated, and your energy be concentra-
ted and applied without letup.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] move default bootm config options to config_cmd_default.h

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909091007.33776.vap...@gentoo.org> you wrote:
>
> i'm not familiar enough with the nest of includes to locate a better place.  
> a 
> quick grep starting at common.h indicates a new header would have to be made.

Probably. There are many areas where default settings would make
sense; environment variables, BOOTP / DHCP options, ...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"God is a comedian playing to an audience too afraid to laugh."
- Voltaire
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 10:26:20 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > I guess this is CONFIG_ENV_IS_EMBEDDED_CUSTOM then?
> > >
> > > Hm... but I see no users of this variable, nobody is setting it?
> >
> > Blackfin has been using ENV_IS_EMBEDDED_CUSTOM.  i have a patch to update
> > it to CONFIG_xxx, but was waiting for this to be accepted first.
> 
> Hm.. normally we don't add code without users...

it's already in use, i just need to basically run sed to change it from 
current name to the new one.

> > > Also, I see no documentation for it?
> >
> > guessing you want it added to the top level README ?
> 
> Indeed. What's the name supposed to mean? "The envrionment is
> embedded custom" sounds strange to me.

i saw it as "custom embedding of the environment".  the only thing it does is 
enable the envcrc binary.  i thought of using "CONFIG_ENVCRC", but it seemed a 
little too short.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible

2009-09-09 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909091015.05454.vap...@gentoo.org> you wrote:
>
> > 2) "use ncb when possible"
> > 
> > Here I really dislike the implementation of "when possible", which
> > makes silent and undocumented assumptions about from which directory
> > the script has to be run. I guess the "when possible" would almost
> > always turn out to be false, so we might omit the patch alltogether,
> > especially since it's also documented in "doc/README.NetConsole".
> > 
> > If we add it, we should follow standard UNIX philosophy and assume
> > that you set your PATH accordingly to reach the tools you want to use.
>
> since ncb is compiled whenever netconsole is enabled, and people typically 
> use 
> this script with netconsole enabled, "when possible" tends to be line up 
> fairly often.  also, the broadcast aspect is pretty useful.  i guess i could 

Agreed. But the code is based on the assumption that your current
directory when attaching to the console of a target is the U-Boot
source directory. For me, this is definitely not always the case. I
might as well have /tftpboot or solilar as cwd.

> make it search PATH, but the idea was to have things "just work" rather than 
> forcing people to install random utils into their PATH.

I rather have people intentionally install tools to some directory in
their PATH or set PATH intentionally to some tool directory rather
than have tools suddenly and mysteriously break just because I run
them from a different location.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You are in a maze of UUCP connections, all alike.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-09 Thread Joakim Tjernlund
timur.t...@gmail.com wrote on 09/09/2009 16:24:15:
>
> On Wed, Sep 9, 2009 at 4:19 AM, Joakim
> Tjernlund wrote:
> >
> > I wonder if this hides another problem too.
> > if the timeout hits, -1 is returned.
> >
> > Then in i2c_read()/i2c_write() you have:
> >        if (i2c_wait4bus() >= 0
> >            && i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
> >            && __i2c_write(&a[4 - alen], alen) == alen)
> >                i = 0; /* No error so far */
> > notice how the latter part, i2c_write_addr(dev, I2C_WRITE_BIT, 0) != 0
> >  && __i2c_write(&a[4 - alen], alen) == alen)
> > is ignored(never called) when i2c_wait4bus()  returns -1
>
> Yeah, that is a bit odd.  It looks like it was supposed to be some
> short-cut way to avoid multiple if-then-else clauses.
>
> I wouldn't say my patch is *hiding* another problem -- that code looks
> broken either way.

Yes, bad wording on my part.

>
> Someone should probably fix it to look like this:
>
> if (i2c_wait4bus() < 0)
> return -1;

I suspect that this won't work in the long run. If
i2c_wait4bus() times out, the bus is likely stuck and will
never recover. Probably best to ignore these errors and reset the controller
and try again or something ..

>
> if (!i2c_write_addr(dev, I2C_WRITE_BIT, 0))
> return -1;
>
> if (__i2c_write(&a[4 - alen], alen) != alen)
> return -1;
>
> and so on.
>   i = 0; /* No error so far */
>
> --
> Timur Tabi
> Linux kernel developer at Freescale
>

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tools/netconsole: make a bit more robust and use ncb when possible

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 10:32:44 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > 2) "use ncb when possible"
> > >
> > > Here I really dislike the implementation of "when possible", which
> > > makes silent and undocumented assumptions about from which directory
> > > the script has to be run. I guess the "when possible" would almost
> > > always turn out to be false, so we might omit the patch alltogether,
> > > especially since it's also documented in "doc/README.NetConsole".
> > >
> > > If we add it, we should follow standard UNIX philosophy and assume
> > > that you set your PATH accordingly to reach the tools you want to use.
> >
> > since ncb is compiled whenever netconsole is enabled, and people
> > typically use this script with netconsole enabled, "when possible" tends
> > to be line up fairly often.  also, the broadcast aspect is pretty useful.
> >  i guess i could
> 
> Agreed. But the code is based on the assumption that your current
> directory when attaching to the console of a target is the U-Boot
> source directory. For me, this is definitely not always the case. I
> might as well have /tftpboot or solilar as cwd.

it takes multiple steps.  first, the cwd and then based on argv0.  so even if 
you're in a different place, if the script lives in the source tree when you 
execute it, it'll work fine.

> > make it search PATH, but the idea was to have things "just work" rather
> > than forcing people to install random utils into their PATH.
> 
> I rather have people intentionally install tools to some directory in
> their PATH or set PATH intentionally to some tool directory rather
> than have tools suddenly and mysteriously break just because I run
> them from a different location.

if they're both installed into the same place, then it'll still work.  i can 
add a PATH search in place of the cwd one as the argv0+PATH should handle both 
cases fine.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] TI: OMAP3: Remove SZ_xx references

2009-09-09 Thread s-paulraj
From: Sandeep Paulraj 

This patch removes dependency on the sizes.h header file
and removes all references to SZ_xx.

Signed-off-by: Sandeep Paulraj 
---
Compiled all OMAP3 based boards.
 cpu/arm_cortexa8/omap3/mem.c  |6 +++---
 cpu/arm_cortexa8/omap3/sys_info.c |2 +-
 include/configs/devkit8000.h  |   15 +++
 include/configs/omap3_beagle.h|   15 +++
 include/configs/omap3_evm.h   |   15 +++
 include/configs/omap3_overo.h |   15 +++
 include/configs/omap3_pandora.h   |   15 +++
 include/configs/omap3_zoom1.h |   15 +++
 include/configs/omap3_zoom2.h |   15 +++
 9 files changed, 53 insertions(+), 60 deletions(-)

diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index 079c848..a269a17 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -92,7 +92,7 @@ void make_cs1_contiguous(void)
u32 size, a_add_low, a_add_high;
 
size = get_sdr_cs_size(CS0);
-   size /= SZ_32M; /* find size to offset CS1 */
+   size /= (32 << 20); /* find size to offset CS1 */
a_add_high = (size & 3) << 8;   /* set up low field */
a_add_low = (size & 0x3C) >> 2; /* set up high field */
writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
@@ -249,7 +249,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
 #if defined(CONFIG_ENV_IS_IN_NAND)
f_off = SMNAND_ENV_OFFSET;
-   f_sec = SZ_128K;
+   f_sec = (128 << 10);
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
@@ -265,7 +265,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
f_off = ONENAND_ENV_OFFSET;
-   f_sec = SZ_128K;
+   f_sec = (128 << 10);
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c 
b/cpu/arm_cortexa8/omap3/sys_info.c
index 765aaf2..95f588a 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -124,7 +124,7 @@ u32 get_sdr_cs_size(u32 cs)
/* get ram size field */
size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
size &= 0x3FF;  /* remove unwanted bits */
-   size *= SZ_2M;  /* find size in MB */
+   size *= (2 << 20);  /* find size in MB */
return size;
 }
 
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index cd40da6..af6b176 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -30,7 +30,6 @@
 
 #ifndef __CONFIG_H
 #define __CONFIG_H
-#include 
 
 /* High Level Configuration Options */
 #define CONFIG_ARMCORTEXA8 1   /* This is an ARM V7 CPU core */
@@ -59,9 +58,9 @@
 #define CONFIG_REVISION_TAG1
 
 /* Size of malloc() pool */
-#define CONFIG_ENV_SIZESZ_128K /* Total Size 
Environment */
+#define CONFIG_ENV_SIZE(128 << 10) /* 128 KiB */
/* Sector */
-#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + SZ_128K)
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (128 << 10))
 #define CONFIG_SYS_GBL_DATA_SIZE   128 /* bytes reserved for */
/* initial data */
 
@@ -270,16 +269,16 @@
 #define CONFIG_SYS_HZ  1000
 
 /* The stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE   SZ_128K /* regular stack */
+#define CONFIG_STACKSIZE   (128 << 10) /* regular stack 128 KiB */
 #ifdef CONFIG_USE_IRQ
-#define CONFIG_STACKSIZE_IRQ   SZ_4K   /* IRQ stack */
-#define CONFIG_STACKSIZE_FIQ   SZ_4K   /* FIQ stack */
+#define CONFIG_STACKSIZE_IRQ   (128 << 10) /* IRQ stack 4 KiB */
+#define CONFIG_STACKSIZE_FIQ   (128 << 10) /* FIQ stack 4 KiB */
 #endif
 
 /*  Physical Memory Map  */
 #define CONFIG_NR_DRAM_BANKS   2 /* CS1 may or may not be populated */
 #define PHYS_SDRAM_1   OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE  SZ_128M /* at least 128 meg */
+#define PHYS_SDRAM_1_SIZE  (128 << 20) /* at least 128 MiB */
 #define PHYS_SDRAM_2   OMAP34XX_SDRC_CS1
 
 /* SDRAM Bank Allocation method */
@@ -288,7 +287,7 @@
 /* NAND and environment organization  */
 #define PISMO1_NAND_SIZE   GPMC_SIZE_128M
 
-#define CONFIG_SYS_MONITOR_LEN SZ_256K /* Reserve 2 sectors */
+#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
 
 #define CONFIG_ENV_IS_IN_NAND  1
 #define SMNAND_ENV_OFFSET  0x26 /* environment starts here */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 

Re: [U-Boot] [PATCH] TI: OMAP3: Remove SZ_xx references

2009-09-09 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1252508154-28322-1-git-send-email-s-paul...@ti.com> you wrote:
> From: Sandeep Paulraj 
> 
> This patch removes dependency on the sizes.h header file
> and removes all references to SZ_xx.
...
> --- a/cpu/arm_cortexa8/omap3/mem.c
> +++ b/cpu/arm_cortexa8/omap3/mem.c
> @@ -92,7 +92,7 @@ void make_cs1_contiguous(void)
>   u32 size, a_add_low, a_add_high;
>  
>   size = get_sdr_cs_size(CS0);
> - size /= SZ_32M; /* find size to offset CS1 */
> + size /= (32 << 20); /* find size to offset CS1 */

I have to admit that I don;t understand what you are doing here. But
you can go one step further and write this as:

size >>= 25;

(whic does not make it any easier to unerstand, though).

...
>  #ifdef CONFIG_USE_IRQ
> -#define CONFIG_STACKSIZE_IRQ SZ_4K   /* IRQ stack */
> -#define CONFIG_STACKSIZE_FIQ SZ_4K   /* FIQ stack */
> +#define CONFIG_STACKSIZE_IRQ (128 << 10) /* IRQ stack 4 KiB */
> +#define CONFIG_STACKSIZE_FIQ (128 << 10) /* FIQ stack 4 KiB */

This looks like a copy & paste error to me? At least, the comment and
the code don't match. Please fix.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Genitiv ins Wasser, weil's Dativ ist!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc4xx: Big cleanup of PPC4xx defines

2009-09-09 Thread Stefan Roese
This patch cleans up multiple issues of the 4xx register (mostly
DCR, SDR, CPR, etc) definitions:

- Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
- Change the defines to better match the names from the
  user's manuals (e.g. cprpllc -> CPR0_PLLC)
- Removal of some unused defines

Please test this patch intensive on your PPC4xx platform. Even though
I tried not to break anything and tested successfully on multiple
4xx AMCC platforms, testing on custom platforms is recommended.

Signed-off-by: Stefan Roese 
---
 board/amcc/acadia/acadia.c |   12 +-
 board/amcc/acadia/memory.c |   18 +-
 board/amcc/acadia/pll.c|   52 ++--
 board/amcc/bamboo/bamboo.c |  104 
 board/amcc/bamboo/flash.c  |2 +-
 board/amcc/bubinga/bubinga.c   |4 +-
 board/amcc/bubinga/flash.c |   20 +-
 board/amcc/canyonlands/canyonlands.c   |4 +-
 board/amcc/ebony/ebony.c   |   32 +-
 board/amcc/katmai/katmai.c |6 +-
 board/amcc/luan/luan.c |   18 +-
 board/amcc/ocotea/ocotea.c |   48 ++--
 board/amcc/redwood/redwood.c   |   18 +-
 board/amcc/sequoia/sequoia.c   |   60 ++--
 board/amcc/taihu/taihu.c   |6 +-
 board/amcc/taishan/showinfo.c  |   70 +++---
 board/amcc/taishan/taishan.c   |   44 ++--
 board/amcc/walnut/flash.c  |   20 +-
 board/amcc/yosemite/yosemite.c |   58 ++--
 board/amcc/yucca/flash.c   |2 +-
 board/amcc/yucca/yucca.c   |   20 +-
 board/cray/L1/L1.c |   38 ++--
 board/cray/L1/init.S   |   24 +-
 board/csb272/csb272.c  |   18 +-
 board/csb272/init.S|   50 ++--
 board/csb472/csb472.c  |   18 +-
 board/csb472/init.S|   54 ++--
 board/dave/PPChameleonEVB/PPChameleonEVB.c |6 +-
 board/dave/PPChameleonEVB/flash.c  |8 +-
 board/eric/eric.c  |2 +-
 board/eric/flash.c |   20 +-
 board/eric/init.S  |  126 
 board/esd/apc405/apc405.c  |   26 +-
 board/esd/ar405/flash.c|8 +-
 board/esd/ash405/ash405.c  |2 +-
 board/esd/ash405/flash.c   |8 +-
 board/esd/canbt/canbt.c|8 +-
 board/esd/canbt/flash.c|   10 +-
 board/esd/cms700/cms700.c  |2 +-
 board/esd/cms700/flash.c   |8 +-
 board/esd/cpci2dp/cpci2dp.c|   12 +-
 board/esd/cpci2dp/flash.c  |   10 +-
 board/esd/cpci405/cpci405.c|   22 +-
 board/esd/cpci405/flash.c  |   20 +-
 board/esd/cpciiser4/flash.c|   10 +-
 board/esd/dp405/dp405.c|2 +-
 board/esd/dp405/flash.c|8 +-
 board/esd/du405/du405.c|8 +-
 board/esd/du405/flash.c|   20 +-
 board/esd/du440/du440.c|   56 ++--
 board/esd/hh405/flash.c|8 +-
 board/esd/hh405/hh405.c|2 +-
 board/esd/hub405/flash.c   |8 +-
 board/esd/hub405/hub405.c  |2 +-
 board/esd/ocrtc/flash.c|   20 +-
 board/esd/ocrtc/ocrtc.c|2 +-
 board/esd/pci405/flash.c   |8 +-
 board/esd/pci405/pci405.c  |   28 +-
 board/esd/plu405/flash.c   |8 +-
 board/esd/plu405/plu405.c  |2 +-
 board/esd/pmc405/pmc405.c  |6 +-
 board/esd/pmc405de/pmc405de.c  |2 +-
 board/esd/pmc440/pmc440.c  |   66 +++---
 board/esd/voh405/flash.c   |8 +-
 board/esd/voh405/voh405.c  |2 +-
 board/esd/vom405/flash.c   |8 +-
 board/esd/vom405/vom405.c  |2 +-
 board/esd/wuh405/flash.c   |8 +-
 board/esd/wuh405/wuh405.c  |2 +-
 board/exbitgen/exbitgen.c  |   16 +-
 board/exbitgen/init.S  |  104 
 board/g2000/g2000.c|   14 +-
 board/gdsys/compactcenter/compactcenter.c  |2 +-
 board/gdsys/dlvision/dlvision.c|2 +-
 board/gdsys/gdppc440etx/gdppc440etx.c  |   52 ++--
 board/gdsys/neo/neo.c  |2 +-
 board/jse/init.S   |   14 +-
 board/jse/jse.c|8 +-
 board/jse/sdram.c  |   80 +++---
 board/korat/korat.c|   64 ++--
 board/lwmon5/lwmon5.c  |   52 ++--
 board/mpl/common/flash.c 

Re: [U-Boot] [PATCH] move default bootm config options to config_cmd_default.h

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 10:28:23 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > i'm not familiar enough with the nest of includes to locate a better
> > place.  a quick grep starting at common.h indicates a new header would
> > have to be made.
> 
> Probably. There are many areas where default settings would make
> sense; environment variables, BOOTP / DHCP options, ...

presumably a new "config_defaults.h" that is added to the generated config.h 
before including the board config ?
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] Blackfin: tweak embedded env config option

2009-09-09 Thread Mike Frysinger
Use the common config option for extracting the environment for embedding
into LDR files.

Signed-off-by: Mike Frysinger 
---
 include/configs/bf518f-ezbrd.h   |2 +-
 include/configs/bf526-ezbrd.h|2 +-
 include/configs/bf527-ezkit.h|2 +-
 include/configs/bf533-stamp.h|2 +-
 include/configs/bf537-minotaur.h |2 +-
 include/configs/bf537-pnav.h |2 +-
 include/configs/bf537-srv1.h |2 +-
 include/configs/bf537-stamp.h|2 +-
 include/configs/bf538f-ezkit.h   |2 +-
 include/configs/bf548-ezkit.h|4 ++--
 include/configs/bf561-ezkit.h|2 +-
 include/configs/cm-bf527.h   |2 +-
 include/configs/cm-bf537e.h  |2 +-
 include/configs/cm-bf537u.h  |2 +-
 include/configs/cm-bf548.h   |2 +-
 include/configs/ibf-dsp561.h |2 +-
 include/configs/tcm-bf537.h  |2 +-
 lib_blackfin/config.mk   |5 ++---
 18 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h
index 3db8171..8c97ee4 100644
--- a/include/configs/bf518f-ezbrd.h
+++ b/include/configs/bf518f-ezbrd.h
@@ -109,7 +109,7 @@
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x2000
 #endif
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 
 
 /*
diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h
index 97853af..866e15a 100644
--- a/include/configs/bf526-ezbrd.h
+++ b/include/configs/bf526-ezbrd.h
@@ -126,7 +126,7 @@
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x2000
 #endif
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 
 
 /*
diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h
index 0d02354..fdada41 100644
--- a/include/configs/bf527-ezkit.h
+++ b/include/configs/bf527-ezkit.h
@@ -125,7 +125,7 @@
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x2000
 #endif
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 
 
 /*
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index 4be2a5c..33f3264 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -115,7 +115,7 @@
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
 #define ENV_IS_EMBEDDED
 #else
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 #endif
 #ifdef ENV_IS_EMBEDDED
 /* WARNING - the following is hand-optimized to fit within
diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h
index 463b7d0..0beae4b 100644
--- a/include/configs/bf537-minotaur.h
+++ b/include/configs/bf537-minotaur.h
@@ -115,7 +115,7 @@
 #define CONFIG_ENV_OFFSET  0x1
 #define CONFIG_ENV_SIZE0x1
 #define CONFIG_ENV_SECT_SIZE   0x1
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 
 
 /*
diff --git a/include/configs/bf537-pnav.h b/include/configs/bf537-pnav.h
index 0f908ef..bdf8b22 100644
--- a/include/configs/bf537-pnav.h
+++ b/include/configs/bf537-pnav.h
@@ -94,7 +94,7 @@
  * Env Storage Settings
  */
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_OFFSET  0x4000
 #else
diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h
index 7368629..f82753a 100644
--- a/include/configs/bf537-srv1.h
+++ b/include/configs/bf537-srv1.h
@@ -115,7 +115,7 @@
 #define CONFIG_ENV_OFFSET  0x1
 #define CONFIG_ENV_SIZE0x1
 #define CONFIG_ENV_SECT_SIZE   0x1
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 
 
 /*
diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h
index 74b9ecd..aedd230 100644
--- a/include/configs/bf537-stamp.h
+++ b/include/configs/bf537-stamp.h
@@ -113,7 +113,7 @@
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
 #define ENV_IS_EMBEDDED
 #else
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 #endif
 #ifdef ENV_IS_EMBEDDED
 /* WARNING - the following is hand-optimized to fit within
diff --git a/include/configs/bf538f-ezkit.h b/include/configs/bf538f-ezkit.h
index 535687f..fbda43c 100644
--- a/include/configs/bf538f-ezkit.h
+++ b/include/configs/bf538f-ezkit.h
@@ -109,7 +109,7 @@
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
 #define ENV_IS_EMBEDDED
 #else
-#define ENV_IS_EMBEDDED_CUSTOM
+#define CONFIG_ENV_IS_EMBEDDED_CUSTOM
 #endif
 #ifdef ENV_IS_EMBEDDED
 /* WARNING - the following is hand-optimized to fit within
diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h
index 5b9de16..16d7af2 100644
--- a/include/configs/bf548-ezkit.h
+++ b/include/configs/bf548-ezkit.h
@@ -107,7 +107,7 @@
 #define CONFIG_ENV_OFFSET  0x1
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x1
-#define ENV_I

[U-Boot] [PATCH 1/2 v3] env: only build env_embedded and envcrc when needed

2009-09-09 Thread Mike Frysinger
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless.  Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled.  And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
that only enables the envcrc utility (CONFIG_ENV_IS_EMBEDDED_CUSTOM).

Signed-off-by: Mike Frysinger 
---
v3
- add some documentation

 README|5 +
 common/Makefile   |5 +
 common/env_embedded.c |7 ---
 include/common.h  |5 +
 tools/Makefile|   11 +++
 tools/envcrc.c|   11 +--
 6 files changed, 15 insertions(+), 29 deletions(-)

diff --git a/README b/README
index ff4ed8b..05cf6b0 100644
--- a/README
+++ b/README
@@ -2473,6 +2473,11 @@ to save the current settings.
environment. If redundant environment is used, it will be copied to
CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.
 
+- CONFIG_ENV_IS_EMBEDDED_CUSTOM
+
+   Builds up envcrc with the target environment so that external utils
+   may easily extract it and embed it in final U-Boot images.
+
 - CONFIG_SYS_SPI_INIT_OFFSET
 
Defines offset to the initial SPI buffer area in DPRAM. The
diff --git a/common/Makefile b/common/Makefile
index 3781738..e3a1591 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -49,12 +49,9 @@ COBJS-y += cmd_nvedit.o
 
 # environment
 COBJS-y += env_common.o
+COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
-COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
diff --git a/common/env_embedded.c b/common/env_embedded.c
index ae6cac4..e27e1cd 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -41,11 +41,6 @@
 #endif
 
 /*
- * Generate embedded environment table
- * inside U-Boot image, if needed.
- */
-#if defined(ENV_IS_EMBEDDED)
-/*
  * Only put the environment in it's own section when we are building
  * U-Boot proper.  The host based program "tools/envcrc" does not need
  * a seperate section.  Note that ENV_CRC is only defined when building
@@ -210,5 +205,3 @@ unsigned long env_size __PPCTEXT__ = sizeof(env_t);
  * Add in absolutes.
  */
 GEN_ABS(env_offset, CONFIG_ENV_OFFSET);
-
-#endif /* ENV_IS_EMBEDDED */
diff --git a/include/common.h b/include/common.h
index 35f12c0..edfc687 100644
--- a/include/common.h
+++ b/include/common.h
@@ -721,4 +721,9 @@ int cpu_release(int nr, int argc, char *argv[]);
 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
 #define __ALIGN_MASK(x,mask)   (((x)+(mask))&~(mask))
 
+/* Pull in stuff for the build system */
+#ifdef DO_DEPS_ONLY
+# include 
+#endif
+
 #endif /* __COMMON_H_ */
diff --git a/tools/Makefile b/tools/Makefile
index b5a1e39..603a6c1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -69,13 +69,7 @@ include $(TOPDIR)/config.mk
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_DATAFLASH) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_EEPROM) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_FLASH) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_ONENAND) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_NAND) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_NVRAM) += envcrc$(SFX)
-BIN_FILES-$(CONFIG_ENV_IS_IN_SPI_FLASH) += envcrc$(SFX)
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED_CUSTOM) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
@@ -93,7 +87,8 @@ EXT_OBJ_FILES-y += common/image.o
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
-OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED_CUSTOM) += envcrc.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 5b0f7cd..d02a7db 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -50,10 +50,6 @@
 # if defined(CONFIG_ENV_ADDR_REDUND) && !defined(CONFIG_ENV_SIZE_REDUND)
 #  define CONFIG_ENV_SIZE_REDUND   CONFIG_ENV_SIZE
 # endif
-# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
- ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + 
CONFI

[U-Boot] [PATCH v2] TI: OMAP3: Remove SZ_xx references

2009-09-09 Thread s-paulraj
From: Sandeep Paulraj 

This patch removes dependency on the sizes.h header file
and removes all references to SZ_xx.

Signed-off-by: Sandeep Paulraj 
---
Changes since the initial version include fixing an error noticed by Wolfgang
and using shift operators in ARM CORTEX A8 code.
 cpu/arm_cortexa8/omap3/mem.c  |6 +++---
 cpu/arm_cortexa8/omap3/sys_info.c |2 +-
 include/configs/devkit8000.h  |   15 +++
 include/configs/omap3_beagle.h|   15 +++
 include/configs/omap3_evm.h   |   15 +++
 include/configs/omap3_overo.h |   15 +++
 include/configs/omap3_pandora.h   |   15 +++
 include/configs/omap3_zoom1.h |   15 +++
 include/configs/omap3_zoom2.h |   15 +++
 9 files changed, 53 insertions(+), 60 deletions(-)

diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index 079c848..b4dec39 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -92,7 +92,7 @@ void make_cs1_contiguous(void)
u32 size, a_add_low, a_add_high;
 
size = get_sdr_cs_size(CS0);
-   size /= SZ_32M; /* find size to offset CS1 */
+   size >>= 25;/* divide by 32 MiB to find size to offset CS1 */
a_add_high = (size & 3) << 8;   /* set up low field */
a_add_low = (size & 0x3C) >> 2; /* set up high field */
writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
@@ -249,7 +249,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
 #if defined(CONFIG_ENV_IS_IN_NAND)
f_off = SMNAND_ENV_OFFSET;
-   f_sec = SZ_128K;
+   f_sec = (128 << 10);/* 128 KiB */
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
@@ -265,7 +265,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
 #if defined(CONFIG_ENV_IS_IN_ONENAND)
f_off = ONENAND_ENV_OFFSET;
-   f_sec = SZ_128K;
+   f_sec = (128 << 10);/* 128 KiB */
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c 
b/cpu/arm_cortexa8/omap3/sys_info.c
index 765aaf2..31b2003 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -124,7 +124,7 @@ u32 get_sdr_cs_size(u32 cs)
/* get ram size field */
size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
size &= 0x3FF;  /* remove unwanted bits */
-   size *= SZ_2M;  /* find size in MB */
+   size <<= 21;/* multiply by 2 MiB to find size in MB */
return size;
 }
 
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index cd40da6..d2cfd8f 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -30,7 +30,6 @@
 
 #ifndef __CONFIG_H
 #define __CONFIG_H
-#include 
 
 /* High Level Configuration Options */
 #define CONFIG_ARMCORTEXA8 1   /* This is an ARM V7 CPU core */
@@ -59,9 +58,9 @@
 #define CONFIG_REVISION_TAG1
 
 /* Size of malloc() pool */
-#define CONFIG_ENV_SIZESZ_128K /* Total Size 
Environment */
+#define CONFIG_ENV_SIZE(128 << 10) /* 128 KiB */
/* Sector */
-#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + SZ_128K)
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (128 << 10))
 #define CONFIG_SYS_GBL_DATA_SIZE   128 /* bytes reserved for */
/* initial data */
 
@@ -270,16 +269,16 @@
 #define CONFIG_SYS_HZ  1000
 
 /* The stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE   SZ_128K /* regular stack */
+#define CONFIG_STACKSIZE   (128 << 10) /* regular stack 128 KiB */
 #ifdef CONFIG_USE_IRQ
-#define CONFIG_STACKSIZE_IRQ   SZ_4K   /* IRQ stack */
-#define CONFIG_STACKSIZE_FIQ   SZ_4K   /* FIQ stack */
+#define CONFIG_STACKSIZE_IRQ   (4 << 10)   /* IRQ stack 4 KiB */
+#define CONFIG_STACKSIZE_FIQ   (4 << 10)   /* FIQ stack 4 KiB */
 #endif
 
 /*  Physical Memory Map  */
 #define CONFIG_NR_DRAM_BANKS   2 /* CS1 may or may not be populated */
 #define PHYS_SDRAM_1   OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE  SZ_128M /* at least 128 meg */
+#define PHYS_SDRAM_1_SIZE  (128 << 20) /* at least 128 MiB */
 #define PHYS_SDRAM_2   OMAP34XX_SDRC_CS1
 
 /* SDRAM Bank Allocation method */
@@ -288,7 +287,7 @@
 /* NAND and environment organization  */
 #define PISMO1_NAND_SIZE   GPMC_SIZE_128M
 
-#define CONFIG_SYS_MONITOR_LEN SZ_256K /* Reserve 2 sectors */
+#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
 
 #define CONFIG_ENV_IS_IN_NAND  1
 #define 

[U-Boot] 答复: [PATCH 01/10] mkconfig: par se top level makefile target to multipl e config targets

2009-09-09 Thread Hu Mingkai-B21284
Hi All,
 
About this question, now we have two interim methods until we have kconfig:
 
1. As talked about with Wolfgang yesterday, just pass the board config name
to config.h, then leave the board config file to handle the different targets.
 
The patch can find through this link:
http://lists.denx.de/pipermail/u-boot/2009-September/060173.html
 
 
2. Add a '-t'option in mkconfig to split board config name to individual 
targets,
then put them to board config file.
 
I modified the patch over version 1 and sent it again:
http://lists.denx.de/pipermail/u-boot/2009-September/060268.html
 
Maybe the option 1 is a little clear than option 2, after all it just produces
one uncontrolled macro, but it'll make the board config file lengthy when there
are more orthogonal options as Scott pointed it. 
 
For me these two options both work - 8536 just have two orthognal options at 
most now :-)
For anyone else, I don't know, it looks like anyone else doesn't care about 
this issue.
 
Wolfgang, I think it'll be hlep to pick up one of these for multiple board 
config targets,
or else we have to go back to 'findstring' method on the top makefile. How do 
you think about it?
 
BTW, when can we get kconfig in U-Boot? :-)
 
Mang thanks,
Mingkai



From: Wood Scott-B07421
Sent: 2009-9-9 (星期三) 4:58
To: Wolfgang Denk
Cc: Hu Mingkai-B21284; Kumar Gala; U-Boot-Users ML; Mike Frysinger
Subject: Re: [PATCH 01/10] mkconfig: parse top level makefile target to 
multiple config targets



Wolfgang Denk wrote:
>> Would this still be a big problem if the auto-generated defines were put
>> in their own namespace (such as the CONFIG_MK_* that you suggested)?
>
> Probably not a big problem, and maybe not even a practical problem.
> But it is still ugly, and nothing I really like.

Well, yes -- the long term, less-ugly solution is kconfig.

> But as it seems that nobody else cares about this, and I don;t have
> any better ideas either, I guess I should not block this.

Thanks.

-Scott


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2 v2] tools/netconsole: make a bit more robust

2009-09-09 Thread Mike Frysinger
The netcat utility likes to exit when it receives an empty packet (as it
thinks this means EOF).  This can easily occur when working with command
line editing as this behavior will be triggered when using backspace.  Or
with tabs and command line completion.  So create two netcat processes -
one to only listen (and put it into a loop), and one to do the sending.
Once the user quits the transmitting netcat, the listening one will be
killed automatically.

Signed-off-by: Mike Frysinger 
---
v2
- split the changes (robust and ncb)

 tools/netconsole |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/netconsole b/tools/netconsole
index 09c8981..6ef2723 100755
--- a/tools/netconsole
+++ b/tools/netconsole
@@ -31,12 +31,18 @@ if [ -z "${ip}" ] || [ -n "$3" ] ; then
 fi
 
 for nc in netcat nc ; do
-   type ${nc} >/dev/null && break
+   type ${nc} >/dev/null 2>&1 && break
 done
 
 trap "stty icanon echo intr ^C" 0 2 3 5 10 13 15
 echo "NOTE: the interrupt signal (normally ^C) has been remapped to ^T"
 
 stty -icanon -echo intr ^T
-${nc} -u -l -p ${port} < /dev/null &
-exec ${nc} -u ${ip} ${port}
+(
+while ${nc} -u -l -p ${port} < /dev/null ; do
+   :
+done
+) &
+pid=$!
+${nc} -u ${ip} ${port}
+kill ${pid} 2>/dev/null
-- 
1.6.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2 v2] tools/netconsole: use ncb automatically if available

2009-09-09 Thread Mike Frysinger
The standard netcat, while ubiquitous, doesn't handle broadcast udp packets
properly.  The local ncb util does however.  So if ncb can be located in
the standard locations, automatically use that instead.

Signed-off-by: Mike Frysinger 
---
v2
- split the changes
- search PATH rather than CWD
- update docs

 doc/README.NetConsole |   24 +++-
 tools/netconsole  |   17 ++---
 2 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/doc/README.NetConsole b/doc/README.NetConsole
index 639cc12..c8bcb90 100644
--- a/doc/README.NetConsole
+++ b/doc/README.NetConsole
@@ -36,27 +36,9 @@ you can just remove the -p option from the script.
 It turns out that 'netcat' cannot be used to listen to broadcast
 packets. We developed our own tool 'ncb' (see tools directory) that
 listens to broadcast packets on a given port and dumps them to the
-standard output. use it as follows:
-
-+++
-#! /bin/bash
-
-[ $# = 1 ] || { echo "Usage: $0 target_ip" >&2 ; exit 1 ; }
-TARGET_IP=$1
-
-stty icanon echo intr ^T
-./ncb &
-nc -u ${TARGET_IP} 
-stty icanon echo intr ^C
-kill 0
-+++
-
-Again, this script takes exactly one argument, which is interpreted
-as the target IP address (or host name, assuming DNS is working). The
-script can be interrupted by pressing ^T (CTRL-T).
-
-The 'ncb' tool can be found in the tools directory; it will be built
-when compiling for a board which has CONFIG_NETCONSOLE defined.
+standard output.  It will be built when compiling for a board which
+has CONFIG_NETCONSOLE defined.  If the netconsole script can find it
+in PATH or in the same directory, it will be used instead.
 
 For Linux, the network-based console needs special configuration.
 Minimally, the host IP address needs to be specified. This can be
diff --git a/tools/netconsole b/tools/netconsole
index 6ef2723..c8109bb 100755
--- a/tools/netconsole
+++ b/tools/netconsole
@@ -39,9 +39,20 @@ echo "NOTE: the interrupt signal (normally ^C) has been 
remapped to ^T"
 
 stty -icanon -echo intr ^T
 (
-while ${nc} -u -l -p ${port} < /dev/null ; do
-   :
-done
+if type ncb 2>/dev/null ; then
+   # see if ncb is in $PATH
+   exec ncb ${port}
+
+elif [ -x ${0%/*}/ncb ] ; then
+   # maybe it's in the same dir as the netconsole script
+   exec ${0%/*}/ncb ${port}
+
+else
+   # blah, just use regular netcat
+   while ${nc} -u -l -p ${port} < /dev/null ; do
+   :
+   done
+fi
 ) &
 pid=$!
 ${nc} -u ${ip} ${port}
-- 
1.6.4.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

2009-09-09 Thread Kumar Gala
Some board ports place TEXT_BASE at a location that would cause the
RESET_VECTOR_ADDRESS not to be at 0xfffc when we link.  By default
we assume RESET_VECTOR_ADDRESS will be 0xfffc if the board doesn't
explicitly set it.

Signed-off-by: Kumar Gala 
---
 board/freescale/mpc8536ds/config.mk |2 ++
 board/freescale/mpc8572ds/config.mk |2 ++
 board/freescale/p1_p2_rdb/config.mk |2 ++
 board/freescale/p2020ds/config.mk   |2 ++
 cpu/mpc85xx/u-boot.lds  |   10 +++---
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mpc8536ds/config.mk 
b/board/freescale/mpc8536ds/config.mk
index f030876..c5fe1ba 100644
--- a/board/freescale/mpc8536ds/config.mk
+++ b/board/freescale/mpc8536ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffc
diff --git a/board/freescale/mpc8572ds/config.mk 
b/board/freescale/mpc8572ds/config.mk
index 08b61f0..b7c18ab 100644
--- a/board/freescale/mpc8572ds/config.mk
+++ b/board/freescale/mpc8572ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffc
diff --git a/board/freescale/p1_p2_rdb/config.mk 
b/board/freescale/p1_p2_rdb/config.mk
index abd64bb..674bdf0 100644
--- a/board/freescale/p1_p2_rdb/config.mk
+++ b/board/freescale/p1_p2_rdb/config.mk
@@ -27,3 +27,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffc
diff --git a/board/freescale/p2020ds/config.mk 
b/board/freescale/p2020ds/config.mk
index 439fa8f..297bed5 100644
--- a/board/freescale/p2020ds/config.mk
+++ b/board/freescale/p2020ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffc
diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds
index d6e22a7..17753c3 100644
--- a/cpu/mpc85xx/u-boot.lds
+++ b/cpu/mpc85xx/u-boot.lds
@@ -20,6 +20,10 @@
  * MA 02111-1307 USA
  */
 
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS (0xfffc)
+#endif
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
__DYNAMIC = 0;*/
@@ -116,17 +120,17 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
-  .bootpg ADDR(.text) + 0x7f000 :
+  .bootpg RESET_VECTOR_ADDRESS - 0xffc :
   {
 cpu/mpc85xx/start.o(.bootpg)
   } :text = 0x
 
-  .resetvec ADDR(.text) + 0x7fffc :
+  .resetvec RESET_VECTOR_ADDRESS :
   {
 *(.resetvec)
   } :text = 0x
 
-  . = ADDR(.text) + 0x8;
+  . = RESET_VECTOR_ADDRESS + 0x4;
 
   __bss_start = .;
   .bss (NOLOAD)   :
-- 
1.6.0.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] LZMA support

2009-09-09 Thread Prafulla Wadaskar
Hi all

Has anybody used LZMA compression with u-boot?
If yes, can you pls share your experience?

Regards..
Prafulla . .
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] How to burn new U-Boot over network

2009-09-09 Thread Scott Wood
On Mon, Sep 07, 2009 at 05:18:43AM -0700, alex889 wrote:
> 
> Thanks for your answer.
> I tried this before i posted the question, and it didn't work.
> 
> Do you know the exact address of the U-Boot on the NAND?

You need to use the "nand" command to erase and program NAND.  Typically
the boot image will be at offset zero within the NAND.

And be careful, if the new image doesn't work you'll need that JTAG.

> Is there an additional header before the U-Boot?

That's specific to your hardware and any pre-loader you may have.

If you're using nand_spl (U-boot's built-in NAND pre-loader), you'll
typically just stick u-boot-nand.bin at offset zero.

> Daniel Gorsulowski wrote:
> > 
> > alex889 wrote:
> >> Hi,
> >> I'm working on the DM365evm,
> >> and i was wondering if there is a way to burn new U-Boot version over
> >> network, instead of Code Composer and a JTAG?
> >>
> >> Thanks,
> >> Alex
> > 
> > Hi Alex,
> > 
> > of course it's possible!
> > But it depends on the location of your U-Boot.
> > 
> > I.e. your U-Boot is located in dataflash or NAND flash:

I assume you mean "*not* located in dataflash or NAND flash"...

-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] LZMA support

2009-09-09 Thread Mike Frysinger
On Wednesday 09 September 2009 13:44:24 Prafulla Wadaskar wrote:
> Has anybody used LZMA compression with u-boot?
> If yes, can you pls share your experience?

booting lzma compressed linux uimage kernels worked fine on my Blackfin boards 
provided the malloc region was increased appropriately (lzma takes more mem 
than gzip or bzip2)
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] document network driver framework

2009-09-09 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
v2
- drop CONFIG naming section
- fix MII documentation

 doc/README.drivers.eth |  177 
 1 files changed, 177 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.drivers.eth

diff --git a/doc/README.drivers.eth b/doc/README.drivers.eth
new file mode 100644
index 000..7f21909
--- /dev/null
+++ b/doc/README.drivers.eth
@@ -0,0 +1,177 @@
+---
+ Ethernet Driver Guide
+---
+
+The networking stack in Das U-Boot is designed for multiple network devices
+to be easily added and controlled at runtime.  This guide is meant for people
+who wish to review the net driver stack with an eye towards implementing your
+own ethernet device driver.  Here we will describe a new pseudo 'APE' driver.
+
+--
+ Driver Functions
+--
+
+All functions you will be implementing in this document have the return value
+meaning of 0 for success and non-zero for failure.
+
+ --
+  Register
+ --
+
+When U-Boot initializes, it will call the common function eth_initialize().
+This will in turn call the board-specific board_eth_init() (or if that fails,
+the cpu-specific cpu_eth_init()).  These board-specific functions can do random
+system handling, but ultimately they will call the driver-specific register
+function which in turn takes care of initializing that particular instance.
+
+Keep in mind that you should code the driver to avoid storing state in global
+data as someone might want to hook up two of the same devices to one board.  If
+the state is maintained as global data, it makes using both of those devices
+impossible.
+
+So the call graph at this stage would look something like:
+board_init()
+   eth_initialize()
+   board_eth_init() / cpu_eth_init()
+   driver_register()
+   initialize eth_device
+   eth_register()
+
+At this point in time, the only thing you need to worry about is the driver's
+register function.  The pseudo code would look something like:
+int ape_register(bd_t *bis, int iobase)
+{
+   struct ape_priv *priv;
+   struct eth_device *dev;
+
+   priv = malloc(sizeof(*priv));
+   if (priv == NULL)
+   return 1;
+
+   dev = malloc(sizeof(*dev));
+   if (dev == NULL) {
+   free(priv);
+   return 1;
+   }
+
+   /* setup whatever private state you need */
+
+   memset(dev, 0, sizeof(*dev));
+   sprintf(dev->name, "APE");
+
+   /* if your device has dedicated hardware storage for the
+* MAC, read it and initialize dev->enetaddr with it
+*/
+   ape_mac_read(dev->enetaddr);
+
+   dev->iobase = iobase;
+   dev->priv = priv;
+   dev->init = ape_init;
+   dev->halt = ape_halt;
+   dev->send = ape_send;
+   dev->recv = ape_recv;
+
+   eth_register(dev);
+
+#ifdef CONFIG_CMD_MII)
+   miiphy_register(dev->name, ape_mii_read, ape_mii_write);
+#endif
+
+   return 0;
+}
+
+The exact arguments needed to initialize your device are up to you.  If you
+need to pass more/less arguments, that's fine.  You should also add the
+prototype for your new register function to include/netdev.h.  You might notice
+that many drivers seem to use xxx_initialize() rather than xxx_register().
+This is the old naming convention and should be avoided as it causes confusion
+with the driver-specific init function.
+
+Other than locating the MAC address in dedicated hardware storage, you should
+not touch the hardware in anyway.  That step is handled in the driver-specific
+init function.  Remember that we are only registering the device here, we are
+not checking its state or doing random probing.
+
+ ---
+  Callbacks
+ ---
+
+Now that we've registered with the ethernet layer, we can start getting some
+real work done.  You will need four functions:
+   int ape_init(struct eth_device *dev, bd_t *bis);
+   int ape_send(struct eth_device *dev, volatile void *packet, int length);
+   int ape_recv(struct eth_device *dev);
+   int ape_halt(struct eth_device *dev);
+
+The init function checks the hardware (probing/identifying) and gets it ready
+for send/recv operations.  You often do things here such as resetting the MAC
+and/or PHY, and waiting for the link to autonegotiate.  You should also take
+the opportunity to program the device's MAC address with the dev->enetaddr
+member.  This allows the rest of U-Boot to dynamically change the MAC address
+and have the new settings be respected.
+
+The send function does what you think -- transmit the specified packet whose
+size is specified by length (in bytes).  You should not return until the
+transmission is complete, and you should leave the state such that the send
+function can be called multiple times in a row.
+
+The recv function should process packets

Re: [U-Boot] Why Cache flush required in some ARM Cortex boards to enable D cache?

2009-09-09 Thread Dirk Behme
akshay ts wrote:
> Hi,
> I ran into problems when i enabled D cache. But later i found out that cache 
> flush was required before enabling D Cache. 

Flush or invalidate? See below...

> What i dont understand is why is it required?. Since earlier D cache is never 
> enabled and so nothing should be present in the cache. 
> Flushing is only required during context switch/may be interrupts?. 
> I tried with omap3 board with Arm cortex A8 on it, it worked without a cache 
> flush. I tried with C110 with Arm cortex A8 on it, i had to do a cache flush 
> to make D cache work.

There was some info on this at Linux ARM kernel mailing list:

http://www.spinics.net/lists/arm-kernel/msg71406.html

Seems that it depends on how silicon (reset?) is implemented.

> Also if possible please tell me what is a GP device, OMAP3 (CONTROL_STATUS 
> register) seems to be a GP device and hence they are skipping cache flush. I 
> dont know what is this.

GP is "general purpose". Anybody might correct me, but I think these 
are OMAPs where (HW) security features you might need in mobile 
applications are disabled. So depending if you buy low quantity OMAPs 
for general purpose use (I think called "catalog products") or in 
large OEM quantities you might get OMAPs with different (security) 
features enabled in HW or not. BeagleBoard uses GP devices.

Best regards

Dirk
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] AT91: Problems with SD

2009-09-09 Thread Konrad Mattheis
Hi Albin,

so I describe you what I did.

Downloaded u-boot 2009.08

changed:
>#if defined(CONFIG_HAS_DATAFLASH)
to:
>#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)

applied Patch: 
http://lists.denx.de/pipermail/u-boot/2009-September/060053.html

then applied Patch V3: from mail

added to:include/config/at91sam9260ek.h

#define CONFIG_CMD_MMC 1
#define CONFIG_MMC 1
#define CONFIG_ATMEL_MCI

compiled and the on the at91sam9g20ek
I can start a normal kernel,...
but if I write mmc init I get the following error:
>mmc: clock 15 too low; setting CLKDIV to 255
>No MMC card found

After this I tried to download git://git.denx.de/u-boot.git and then I could 
not apply the patches.
I always got this message:
Reversed (or previously applied) patch detected!  Assume -R? [n]
Did you already applied the patches to the git repository?

bye Konrad

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Is there any full story about how to take advantage FDT function ?

2009-09-09 Thread Scott Wood
On Sat, Sep 05, 2009 at 02:41:19PM -0400, Jerry Van Baren wrote:
> I'm not up on 8xx, but it may not have been pulled forward into the 
> "powerpc" architecture (still "ppc").  The "powerpc" architecture switch 
> is where linux/u-boot started using the FDT.

8xx is supported in arch/powerpc.

-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] AT91: Problems with SD

2009-09-09 Thread Albin Tonnerre
On Wed, 09 Sep 2009 20:52 +0200, Konrad Mattheis wrote :
> Hi Albin,
> 
> so I describe you what I did.
> 
> Downloaded u-boot 2009.08
> 
> changed:
> >#if defined(CONFIG_HAS_DATAFLASH)
> to:
> >#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
> 
> applied Patch: 
> http://lists.denx.de/pipermail/u-boot/2009-September/060053.html
> 
> then applied Patch V3: from mail
> 
> added to:include/config/at91sam9260ek.h
> 
> #define CONFIG_CMD_MMC 1
> #define CONFIG_MMC 1
> #define CONFIG_ATMEL_MCI
> 
> compiled and the on the at91sam9g20ek
> I can start a normal kernel,...
> but if I write mmc init I get the following error:

Ok, so that's what I thought: you're missing a call to at91_mciX_hw_init in your
board init code. This function assigns the correst I/O pins to the MCI
controller and takes care of enabling the clock. Please have a look at 
at91_mciX_hw_init
cpu/arm926ejs/at91/at91sam9260_devices.c to see what arguments the function 
expects.


> >mmc: clock 15 too low; setting CLKDIV to 255
> >No MMC card found
> 
> After this I tried to download git://git.denx.de/u-boot.git and then I could 
> not apply the patches.
> I always got this message:
>   Reversed (or previously applied) patch detected!  Assume -R? [n]
> Did you already applied the patches to the git repository?

The CONFIG_ATMEL_SPI change is in mainline, yes. Other parts of the patch
aren't.

Regards,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v2] r7780mp: fix typo in Ethernet chip model number comment.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
---
Changes since v1:
- CC R7780MP maintainer Nobuhiro Iwamatsu

 include/configs/r7780mp.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h
index 7738a17..71c570e 100644
--- a/include/configs/r7780mp.h
+++ b/include/configs/r7780mp.h
@@ -154,7 +154,7 @@
 #define CONFIG_NET_MULTI
 #define CONFIG_RTL8169
 */
-/* AX88696L Support(NE2000 base chip) */
+/* AX88796L Support(NE2000 base chip) */
 #define CONFIG_DRIVER_NE2000
 #define CONFIG_DRIVER_AX88796L
 #define CONFIG_DRIVER_NE2000_BASE  0xA410
-- 
1.6.4.2



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v2] muas3001: remove BRG clock node fixup to use common mpc8260 code.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
Acked-by: Heiko Schocher 
---
Changes since v1:
- Added Heiko's ack

 board/muas3001/muas3001.c |   16 
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index 8f83dd9..bf4ccb6 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -310,7 +310,6 @@ void ft_blob_update (void *blob, bd_t *bd)
int ret, nodeoffset = 0;
ulong memory_data[2] = {0};
ulong flash_data[4] = {0};
-   ulong freq = 0;
ulong   speed = 0;
 
memory_data[0] = cpu_to_be32 (bd->bi_memstart);
@@ -359,21 +358,6 @@ void ft_blob_update (void *blob, bd_t *bd)
"err:%s\n", fdt_strerror (nodeoffset));
}
 
-   /* brg clock */
-   nodeoffset = fdt_path_offset (blob, "/soc/cpm/brg");
-   if (nodeoffset >= 0) {
-   freq = cpu_to_be32 (bd->bi_brgfreq);
-   ret = fdt_setprop (blob, nodeoffset, "clock-frequency", &freq,
-   sizeof (unsigned long));
-   if (ret < 0)
-   printf ("ft_blob_update): cannot set 
/soc/cpm/brg/clock-frequency "
-   "property err:%s\n", fdt_strerror (ret));
-   } else {
-   /* memory node is required in dts */
-   printf ("ft_blob_update(): cannot find 
/soc/cpm/brg/clock-frequency node "
-   "err:%s\n", fdt_strerror (nodeoffset));
-   }
-
/* baudrate */
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
if (nodeoffset >= 0) {
-- 
1.6.4.2



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v2] mpc8260: remove Ethernet node fixup to use generic FDT code.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
Tested-by: Heiko Schocher 
---
Changes since v1:
- Added Heiko's tested-by

 board/keymile/mgcoge/mgcoge.c |5 -
 board/muas3001/muas3001.c |   15 ---
 include/configs/mgcoge.h  |1 +
 include/configs/muas3001.h|1 +
 4 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index d24a4b5..b16a01c 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
@@ -373,10 +372,6 @@ void ft_blob_update (void *blob, bd_t *bd)
flash_reg[5] = cpu_to_be32 (info->size);
fdt_set_node_and_value (blob, "/localbus/fl...@5,0", "reg", flash_reg,
sizeof (flash_reg));
-
-   /* MAC addr */
-   fdt_set_node_and_value (blob, "/soc/cpm/ethernet", "mac-address",
-   bd->bi_enetaddr, sizeof (u8) * 6);
 }
 
 void ft_board_setup (void *blob, bd_t *bd)
diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index bf4ccb6..36caed8 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -342,21 +342,6 @@ void ft_blob_update (void *blob, bd_t *bd)
printf ("ft_blob_update(): cannot find /localbus node "
"err:%s\n", fdt_strerror (nodeoffset));
}
-   /* MAC Adresse */
-   nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
-   if (nodeoffset >= 0) {
-   uchar ethaddr[6];
-   eth_getenv_enetaddr("ethaddr", ethaddr);
-   ret = fdt_setprop (blob, nodeoffset, "mac-address", ethaddr,
-   sizeof (uchar) * 6);
-   if (ret < 0)
-   printf ("ft_blob_update): cannot set 
/soc/cpm/ethernet/mac-address "
-   "property err:%s\n", fdt_strerror (ret));
-   } else {
-   /* memory node is required in dts */
-   printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node "
-   "err:%s\n", fdt_strerror (nodeoffset));
-   }
 
/* baudrate */
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index ea14948..b955749 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -70,6 +70,7 @@
 #define CONFIG_NET_MULTI   1
 
 #define CONFIG_ETHER_INDEX 4
+#define CONFIG_HAS_ETH0
 #define CONFIG_SYS_SCC_TOUT_LOOP   1000
 
 # define CONFIG_SYS_CMXSCR_VALUE   (CMXSCR_RS4CS_CLK7 | CMXSCR_TS4CS_CLK8)
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index f031a17..ae033b2 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -74,6 +74,7 @@
 
 #define CONFIG_ETHER_INDEX 1
 #define CONFIG_ETHER_ON_FCC1
+#define CONFIG_HAS_ETH0
 #define FCC_ENET
 
 /*
-- 
1.6.4.2



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v2] FDT: remove obsolete OF_CPU and OF_SOC macros.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
---
Changes since v1:
- CC all respective board maintainers

 README|6 --
 include/configs/IDS8247.h |2 --
 include/configs/MPC8260ADS.h  |1 -
 include/configs/linkstation.h |2 --
 include/configs/mgcoge.h  |2 --
 include/configs/mpc7448hpc2.h |1 -
 include/configs/muas3001.h|2 --
 include/configs/stxxtc.h  |1 -
 8 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/README b/README
index ff4ed8b..3cb7786 100644
--- a/README
+++ b/README
@@ -368,8 +368,10 @@ The following options need to be configured:
 * Adds the "fdt" command
 * The bootm command automatically updates the fdt
 
-   OF_CPU - The proper name of the cpus node.
-   OF_SOC - The proper name of the soc node.
+   OF_CPU - The proper name of the cpus node (only required for
+   MPC512X and MPC5xxx based boards).
+   OF_SOC - The proper name of the soc node (only required for
+   MPC512X and MPC5xxx based boards).
OF_TBCLK - The timebase frequency.
OF_STDOUT_PATH - The path to the console device
 
diff --git a/include/configs/IDS8247.h b/include/configs/IDS8247.h
index 4c4af05..147a8b2 100644
--- a/include/configs/IDS8247.h
+++ b/include/configs/IDS8247.h
@@ -125,8 +125,6 @@
 #define CONFIG_OF_LIBFDT   1
 #define CONFIG_OF_BOARD_SETUP  1
 
-#define OF_CPU "PowerPC,8...@0"
-#define OF_SOC "s...@f000"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH "/s...@f000/serial8...@e0008000"
 
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index 942a4cc..677a143 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -209,7 +209,6 @@
 #define CONFIG_OF_LIBFDT   1
 #define CONFIG_OF_BOARD_SETUP  1
 #if defined(CONFIG_OF_LIBFDT)
-#define OF_CPU "c...@0"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #endif
 
diff --git a/include/configs/linkstation.h b/include/configs/linkstation.h
index 2feb3ae..16b464c 100644
--- a/include/configs/linkstation.h
+++ b/include/configs/linkstation.h
@@ -96,8 +96,6 @@
 
 #define CONFIG_OF_LIBFDT   1
 
-#define OF_CPU "PowerPC,603e"
-#define OF_SOC "soc...@8000"
 #define OF_STDOUT_PATH "/soc10x/ser...@80004600"
 
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index b955749..55d1fc9 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -347,8 +347,6 @@
 #define CONFIG_OF_LIBFDT   1
 #define CONFIG_OF_BOARD_SETUP  1
 
-#define OF_CPU "PowerPC,8...@0"
-#define OF_SOC "s...@f000"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH "/soc/cpm/ser...@11a90"
 
diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h
index 4f98ba4..be12186 100644
--- a/include/configs/mpc7448hpc2.h
+++ b/include/configs/mpc7448hpc2.h
@@ -79,7 +79,6 @@
 #define CONFIG_OF_LIBFDT   1
 #define CONFIG_OF_BOARD_SETUP  1
 
-#define OF_CPU "PowerPC,7...@0"
 #define OF_TSI "tsi...@c000"
 #define OF_TBCLK   (bd->bi_busfreq / 8)
 #define OF_STDOUT_PATH "/tsi...@c000/ser...@7808"
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index ae033b2..c94daa3 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -405,8 +405,6 @@
 #define CONFIG_OF_LIBFDT   1
 #define CONFIG_OF_BOARD_SETUP  1
 
-#define OF_CPU "PowerPC,8...@0"
-#define OF_SOC "s...@f000"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #if defined(CONFIG_MUAS_DEV_BOARD)
 #define OF_STDOUT_PATH "/soc/cpm/ser...@11a90"
diff --git a/include/configs/stxxtc.h b/include/configs/stxxtc.h
index d16262b..5854366 100644
--- a/include/configs/stxxtc.h
+++ b/include/configs/stxxtc.h
@@ -509,7 +509,6 @@ typedef unsigned int led_id_t;
 /* pass open firmware flattened device tree */
 #define CONFIG_OF_LIBFDT   1
 
-#define OF_CPU "PowerPC,mpc...@0"
 #define OF_TBCLK   (MPC8XX_HZ / 16)
 
 #endif /* __CONFIG_H */
-- 
1.6.4.2



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][v3] mpc8260: move FDT memory node fixup into common CPU code.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
Tested-by: Heiko Schocher 
---
Changes since v1:
- Added previously missed mgcoge board as pointed out by Peter Tyser and Heiko
- Moved the board-specific Ethernet modifications into separate patch
Changes since v2:
- Added Heiko's tested-by

 board/freescale/mpc8260ads/mpc8260ads.c |   13 -
 board/ids8247/ids8247.c |   16 
 board/keymile/mgcoge/mgcoge.c   |8 +---
 board/muas3001/muas3001.c   |   16 
 cpu/mpc8260/cpu.c   |1 +
 5 files changed, 2 insertions(+), 52 deletions(-)

diff --git a/board/freescale/mpc8260ads/mpc8260ads.c 
b/board/freescale/mpc8260ads/mpc8260ads.c
index 49a88bb..be55626 100644
--- a/board/freescale/mpc8260ads/mpc8260ads.c
+++ b/board/freescale/mpc8260ads/mpc8260ads.c
@@ -550,24 +550,11 @@ void pci_init_board(void)
 #endif
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_blob_update(void *blob, bd_t *bd)
-{
-   int ret;
-
-   ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
-
-   if (ret < 0) {
-   printf("ft_blob_update(): cannot set /memory/reg "
-   "property err:%s\n", fdt_strerror(ret));
-   }
-}
-
 void ft_board_setup(void *blob, bd_t *bd)
 {
ft_cpu_setup(blob, bd);
 #ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
 #endif
-   ft_blob_update(blob, bd);
 }
 #endif
diff --git a/board/ids8247/ids8247.c b/board/ids8247/ids8247.c
index 79fe9da..d621833 100644
--- a/board/ids8247/ids8247.c
+++ b/board/ids8247/ids8247.c
@@ -400,24 +400,8 @@ int board_nand_init(struct nand_chip *nand)
 #endif /* CONFIG_CMD_NAND */
 
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-/*
- * update "memory" property in the blob
- */
-void ft_blob_update(void *blob, bd_t *bd)
-{
-   int ret;
-
-   ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
-
-   if (ret < 0) {
-   printf("ft_blob_update(): cannot set /memory/reg "
-   "property err:%s\n", fdt_strerror(ret));
-   }
-}
-
 void ft_board_setup(void *blob, bd_t *bd)
 {
ft_cpu_setup( blob, bd);
-   ft_blob_update(blob, bd);
 }
 #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index b16a01c..932a805 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -312,11 +312,10 @@ int hush_init_var (void)
 
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
 /*
- * update "memory" property in the blob
+ * update "flash" property in the blob
  */
 void ft_blob_update (void *blob, bd_t *bd)
 {
-   ulong memory_data[2] = {0};
ulong *flash_data = NULL;
ulong   flash_reg[6] = {0};
flash_info_t*info;
@@ -324,11 +323,6 @@ void ft_blob_update (void *blob, bd_t *bd)
int size;
int i = 0;
 
-   memory_data[0] = cpu_to_be32 (bd->bi_memstart);
-   memory_data[1] = cpu_to_be32 (bd->bi_memsize);
-   fdt_set_node_and_value (blob, "/memory", "reg", memory_data,
-   sizeof (memory_data));
-
len = fdt_get_node_and_value (blob, "/localbus", "ranges",
(void *)&flash_data);
 
diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index 36caed8..e0a7f32 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -308,25 +308,9 @@ int board_early_init_r (void)
 void ft_blob_update (void *blob, bd_t *bd)
 {
int ret, nodeoffset = 0;
-   ulong memory_data[2] = {0};
ulong flash_data[4] = {0};
ulong   speed = 0;
 
-   memory_data[0] = cpu_to_be32 (bd->bi_memstart);
-   memory_data[1] = cpu_to_be32 (bd->bi_memsize);
-
-   nodeoffset = fdt_path_offset (blob, "/memory");
-   if (nodeoffset >= 0) {
-   ret = fdt_setprop (blob, nodeoffset, "reg", memory_data,
-   sizeof(memory_data));
-   if (ret < 0)
-   printf ("ft_blob_update): cannot set /memory/reg "
-   "property err:%s\n", fdt_strerror (ret));
-   } else {
-   /* memory node is required in dts */
-   printf ("ft_blob_update(): cannot find /memory node "
-   "err:%s\n", fdt_strerror(nodeoffset));
-   }
/* update Flash addr, size */
flash_data[2] = cpu_to_be32 (CONFIG_SYS_FLASH_BASE);
flash_data[3] = cpu_to_be32 (CONFIG_SYS_FLASH_SIZE);
diff --git a/cpu/mpc8260/cpu.c b/cpu/mpc8260/cpu.c
index 17e6248..aedbf29 100644
--- a/cpu/mpc8260/cpu.c
+++ b/cpu/mpc8260/cpu.c
@@ -318,6 +318,7 @@ void ft_cpu_setup (void *blob, bd_t *bd)
"timebase-frequency", OF_TBCLK, 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
"clock-frequency", bd->bi_intfreq, 1);
+   

[U-Boot] [PATCH][v4] ep8248: add support for device tree and secondary Ethernet interface.

2009-09-09 Thread Marcel Ziswiler
Signed-off-by: Marcel Ziswiler 
---
Changes since v1:
- Removed redundant commit message as pointed out by Peter Tyser
- Separate patch to move FDT memory node fixup into common CPU code as pointed 
out by Peter Tyser
Changes since v2:
- Fix patch line wrapping
Changes since v3:
- Removed copyright and change log entries as pointed out by Wolfgang Denk

 board/ep8248/ep8248.c|   12 +-
 include/configs/ep8248.h |   49 +
 2 files changed, 29 insertions(+), 32 deletions(-)

diff --git a/board/ep8248/ep8248.c b/board/ep8248/ep8248.c
index bc20ba7..57d39aa 100644
--- a/board/ep8248/ep8248.c
+++ b/board/ep8248/ep8248.c
@@ -35,8 +35,8 @@
  * according to the five values podr/pdir/ppar/psor/pdat for that entry
  */
 
-#define CONFIG_SYS_FCC1 (CONFIG_ETHER_INDEX == 1)
-#define CONFIG_SYS_FCC2 (CONFIG_ETHER_INDEX == 2)
+#define CONFIG_SYS_FCC1 (CONFIG_ETHER_ON_FCC1 == 1)
+#define CONFIG_SYS_FCC2 (CONFIG_ETHER_ON_FCC2 == 1)
 
 const iop_conf_t iop_conf_tab[4][32] = {
 
@@ -261,3 +261,11 @@ int checkboard(void)
 
return 0;
 }
+
+#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+   ft_cpu_setup( blob, bd);
+}
+#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
+
diff --git a/include/configs/ep8248.h b/include/configs/ep8248.h
index f7b3fde..cb4185a 100644
--- a/include/configs/ep8248.h
+++ b/include/configs/ep8248.h
@@ -50,50 +50,41 @@
 
 #define CONFIG_SYS_BCSR0xFA00
 
-/*
- * Select ethernet configuration
- *
- * If either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected,
- * then CONFIG_ETHER_INDEX must be set to the channel number (1-4 for
- * SCC, 1-3 for FCC)
- *
- * If CONFIG_ETHER_NONE is defined, then either the ethernet routines
- * must be defined elsewhere (as for the console), or CONFIG_CMD_NET
- * must be unset.
- */
+/* Pass open firmware flat device tree */
+#define CONFIG_OF_LIBFDT   1
+#define CONFIG_OF_BOARD_SETUP  1
+
+#define OF_TBCLK(bd->bi_busfreq / 4)
+#define OF_STDOUT_PATH  "/soc/cpm/serial  11a80"
+
+/* Select ethernet configuration */
 #undef CONFIG_ETHER_ON_SCC /* Ethernet is not on SCC */
 #define CONFIG_ETHER_ON_FCC/* Ethernet is on FCC */
 #undef CONFIG_ETHER_NONE   /* No external Ethernet   */
 
-#ifdef CONFIG_ETHER_ON_FCC
-
-#define CONFIG_ETHER_INDEX 1   /* FCC1 is used for Ethernet */
-
-#if   (CONFIG_ETHER_INDEX == 1)
+#define CONFIG_NET_MULTI
+#define CONFIG_SYS_CPMFCR_RAMTYPE  0
+#define CONFIG_SYS_FCC_PSMR(FCC_PSMR_FDE | FCC_PSMR_LPB)
 
+#define CONFIG_HAS_ETH0
+#define CONFIG_ETHER_ON_FCC1   1
 /* - Rx clock is CLK10
  * - Tx clock is CLK11
  * - BDs/buffers on 60x bus
  * - Full duplex
  */
-#define CONFIG_SYS_CMXFCR_MASK (CMXFCR_FC1 | CMXFCR_RF1CS_MSK | 
CMXFCR_TF1CS_MSK)
-#define CONFIG_SYS_CMXFCR_VALUE(CMXFCR_RF1CS_CLK10 | 
CMXFCR_TF1CS_CLK11)
-#define CONFIG_SYS_CPMFCR_RAMTYPE  0
-#define CONFIG_SYS_FCC_PSMR(FCC_PSMR_FDE | FCC_PSMR_LPB)
-
-#elif (CONFIG_ETHER_INDEX == 2)
+#define CONFIG_SYS_CMXFCR_MASK1(CMXFCR_FC1 | CMXFCR_RF1CS_MSK | 
CMXFCR_TF1CS_MSK)
+#define CONFIG_SYS_CMXFCR_VALUE1   (CMXFCR_RF1CS_CLK10 | 
CMXFCR_TF1CS_CLK11)
 
+#define CONFIG_HAS_ETH1
+#define CONFIG_ETHER_ON_FCC2   1
 /* - Rx clock is CLK13
  * - Tx clock is CLK14
  * - BDs/buffers on 60x bus
  * - Full duplex
  */
-#define CONFIG_SYS_CMXFCR_MASK (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | 
CMXFCR_TF2CS_MSK)
-#define CONFIG_SYS_CMXFCR_VALUE(CMXFCR_RF2CS_CLK13 | 
CMXFCR_TF2CS_CLK14)
-#define CONFIG_SYS_CPMFCR_RAMTYPE  0
-#define CONFIG_SYS_FCC_PSMR(FCC_PSMR_FDE | FCC_PSMR_LPB)
-
-#endif /* CONFIG_ETHER_INDEX */
+#define CONFIG_SYS_CMXFCR_MASK2(CMXFCR_FC2 | CMXFCR_RF2CS_MSK | 
CMXFCR_TF2CS_MSK)
+#define CONFIG_SYS_CMXFCR_VALUE2   (CMXFCR_RF2CS_CLK13 | 
CMXFCR_TF2CS_CLK14)
 
 #define CONFIG_MII /* MII PHY management*/
 #define CONFIG_BITBANGMII  /* Bit-banged MDIO interface */
@@ -113,8 +104,6 @@
 
 #define MIIDELAY   udelay(1)
 
-#endif /* CONFIG_ETHER_ON_FCC */
-
 #ifndef CONFIG_8260_CLKIN
 #define CONFIG_8260_CLKIN  6600/* in Hz */
 #endif
-- 
1.6.4.2



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] TI DaVinci: DM6446: Fix Compilation error in NAND mode

2009-09-09 Thread s-paulraj
From: Sandeep Paulraj 

The Default mode that is built for the Davinci DVEVM happens
to be the NOR mode.
When we want to build for the NAND mode, we get a compilation
error. This is overcome by defining the CONFIG_MTD_DEVICE
flag in the NAND mode.
The image built for NAND mode was successfully tested on the
DaVinci DM6446 EVM.


Signed-off-by: Sandeep Paulraj 
---
 include/configs/davinci_dvevm.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h
index af669bc..f7d2399 100644
--- a/include/configs/davinci_dvevm.h
+++ b/include/configs/davinci_dvevm.h
@@ -121,6 +121,7 @@
 #define CONFIG_ENV_SECT_SIZE   512 /* Env sector Size */
 #define CONFIG_ENV_SIZE(16 << 10)  /* 16 KiB */
 #define CONFIG_MTD_PARTITIONS
+#define CONFIG_MTD_DEVICE
 #define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT \
"nand0=davinci_nand.0"
-- 
1.6.0.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

2009-09-09 Thread Wolfgang Denk
Dear Kumar Gala,

In message <1252514873-7782-1-git-send-email-ga...@kernel.crashing.org> you 
wrote:
> Some board ports place TEXT_BASE at a location that would cause the
> RESET_VECTOR_ADDRESS not to be at 0xfffc when we link.  By default
> we assume RESET_VECTOR_ADDRESS will be 0xfffc if the board doesn't
> explicitly set it.
> 
> Signed-off-by: Kumar Gala 
> ---
>  board/freescale/mpc8536ds/config.mk |2 ++
>  board/freescale/mpc8572ds/config.mk |2 ++
>  board/freescale/p1_p2_rdb/config.mk |2 ++
>  board/freescale/p2020ds/config.mk   |2 ++
>  cpu/mpc85xx/u-boot.lds  |   10 +++---
>  5 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/board/freescale/mpc8536ds/config.mk 
> b/board/freescale/mpc8536ds/config.mk
> index f030876..c5fe1ba 100644
> --- a/board/freescale/mpc8536ds/config.mk
> +++ b/board/freescale/mpc8536ds/config.mk
> @@ -26,3 +26,5 @@
>  ifndef TEXT_BASE
>  TEXT_BASE = 0xeff8
>  endif
> +
> +PLATFORM_CPPFLAGS += -DRESET_VECTOR_ADDRESS=0xeffc

I suggest we handle this the same way as we do with TEXT_BASE, i. e.
only add a "RESET_VECTOR_ADDRESS=0xeffc" in the board config. The
auto-export it to the preprocessor in the toplevel config.mk as done
for TEXT_BASE.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"I believe the use of noise to make  music  will  increase  until  we
reach  a  music  produced  through  the aid of electrical instruments
which will make available for musical purposes  any  and  all  sounds
that can be heard."- composer John Cage, 1937
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

2009-09-09 Thread Kumar Gala
Some board ports place TEXT_BASE at a location that would cause the
RESET_VECTOR_ADDRESS not to be at 0xfffc when we link.  By default
we assume RESET_VECTOR_ADDRESS will be 0xfffc if the board doesn't
explicitly set it.

Signed-off-by: Kumar Gala 
---
* Updated to add RESET_VECTOR_ADDRESS to top level config.mk to match how we
  handle TEXT_BASE

 board/freescale/mpc8536ds/config.mk |2 ++
 board/freescale/mpc8572ds/config.mk |2 ++
 board/freescale/p1_p2_rdb/config.mk |2 ++
 board/freescale/p2020ds/config.mk   |2 ++
 config.mk   |4 
 cpu/mpc85xx/u-boot.lds  |   10 +++---
 6 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mpc8536ds/config.mk 
b/board/freescale/mpc8536ds/config.mk
index f030876..c1d0525 100644
--- a/board/freescale/mpc8536ds/config.mk
+++ b/board/freescale/mpc8536ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffc
diff --git a/board/freescale/mpc8572ds/config.mk 
b/board/freescale/mpc8572ds/config.mk
index 08b61f0..67394c9 100644
--- a/board/freescale/mpc8572ds/config.mk
+++ b/board/freescale/mpc8572ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffc
diff --git a/board/freescale/p1_p2_rdb/config.mk 
b/board/freescale/p1_p2_rdb/config.mk
index abd64bb..a56b536 100644
--- a/board/freescale/p1_p2_rdb/config.mk
+++ b/board/freescale/p1_p2_rdb/config.mk
@@ -27,3 +27,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffc
diff --git a/board/freescale/p2020ds/config.mk 
b/board/freescale/p2020ds/config.mk
index 439fa8f..4fcd69c 100644
--- a/board/freescale/p2020ds/config.mk
+++ b/board/freescale/p2020ds/config.mk
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff8
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffc
diff --git a/config.mk b/config.mk
index 8852157..8cfd60c 100644
--- a/config.mk
+++ b/config.mk
@@ -128,6 +128,10 @@ ifneq ($(TEXT_BASE),)
 CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
 endif
 
+ifneq ($(RESET_VECTOR_ADDRESS),)
+CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
+endif
+
 ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif
diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds
index d6e22a7..17753c3 100644
--- a/cpu/mpc85xx/u-boot.lds
+++ b/cpu/mpc85xx/u-boot.lds
@@ -20,6 +20,10 @@
  * MA 02111-1307 USA
  */
 
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS (0xfffc)
+#endif
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
__DYNAMIC = 0;*/
@@ -116,17 +120,17 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
-  .bootpg ADDR(.text) + 0x7f000 :
+  .bootpg RESET_VECTOR_ADDRESS - 0xffc :
   {
 cpu/mpc85xx/start.o(.bootpg)
   } :text = 0x
 
-  .resetvec ADDR(.text) + 0x7fffc :
+  .resetvec RESET_VECTOR_ADDRESS :
   {
 *(.resetvec)
   } :text = 0x
 
-  . = ADDR(.text) + 0x8;
+  . = RESET_VECTOR_ADDRESS + 0x4;
 
   __bss_start = .;
   .bss (NOLOAD)   :
-- 
1.6.0.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

2009-09-09 Thread Wolfgang Denk
Dear Kumar Gala,

In message <1252527755-14866-1-git-send-email-ga...@kernel.crashing.org> you 
wrote:
> Some board ports place TEXT_BASE at a location that would cause the
> RESET_VECTOR_ADDRESS not to be at 0xfffc when we link.  By default
> we assume RESET_VECTOR_ADDRESS will be 0xfffc if the board doesn't
> explicitly set it.

thanks.

Just some nitpicking:

> --- a/cpu/mpc85xx/u-boot.lds
> +++ b/cpu/mpc85xx/u-boot.lds
> @@ -20,6 +20,10 @@
>   * MA 02111-1307 USA
>   */
>  
> +#ifndef RESET_VECTOR_ADDRESS
> +#define RESET_VECTOR_ADDRESS (0xfffc)
> +#endif

No parens needed here.


Except from that:

Acked-by: Wolfgang Denk 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"I go on working for the same reason a hen goes on laying eggs."
- H. L. Mencken
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Getting pcmcia drivers builtin by default (bug?)

2009-09-09 Thread Kristoffer Ericson
Greetings,

Trying to get my arm board going when i noticed that it for some strange
reason tries to get two pcmcia drivers built in my binary.

Looking at the pcmcia makefile it seems like any image will
always include that. What am I missing?

/Kristoffer

#
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
#
# 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)libpcmcia.a

COBJS-$(CONFIG_I82365) += i82365.o
COBJS-$(CONFIG_8xx) += mpc8xx_pcmcia.o
COBJS-$(CONFIG_PXA_PCMCIA) += pxa_pcmcia.o
COBJS-y += rpx_pcmcia.o
COBJS-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o
COBJS-y += tqm8xx_pcmcia.o
COBJS-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o

COBJS   := $(COBJS-y)
SRCS:= $(COBJS:.o=.c)
OBJS:= $(addprefix $(obj),$(COBJS))

all:$(LIB)

$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)

#

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

sinclude $(obj).depend

#

Log:
make[1]: Leaving directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/net/sk98lin'
make -C drivers/pci/
make[1]: Entering directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/pci'
arm-linux-ar crv libpci.a
make[1]: Leaving directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/pci'
make -C drivers/pcmcia/
make[1]: Entering directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/pcmcia'
arm-linux-gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ 
-DTEXT_BASE=0xc100 -I/home/kristoffer/work/projects/u-boot.git/include 
-fno-builtin -ffreestanding -nostdinc -isystem 
/opt/crosstool/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork 
-march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes 
-fno-stack-protector   -o rpx_pcmcia.o rpx_pcmcia.c -c
arm-linux-gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ 
-DTEXT_BASE=0xc100 -I/home/kristoffer/work/projects/u-boot.git/include 
-fno-builtin -ffreestanding -nostdinc -isystem 
/opt/crosstool/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include 
-pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork 
-march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes 
-fno-stack-protector   -o tqm8xx_pcmcia.o tqm8xx_pcmcia.c -c
arm-linux-ar crv libpcmcia.a rpx_pcmcia.o tqm8xx_pcmcia.o
r - rpx_pcmcia.o
r - tqm8xx_pcmcia.o
make[1]: Leaving directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/pcmcia'
make -C drivers/power/
make[1]: Entering directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/power'
arm-linux-ar crv libpower.a
make[1]: Leaving directory 
`/home/kristoffer/work/projects/u-boot.git/drivers/power'
make -C drivers/spi/

My diffset:
diff --git a/MAKEALL b/MAKEALL
index f0ed8ea..8786581 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -485,6 +485,7 @@ LIST_SA="   \
gcplus  \
lart\
shannon \
+   jornada \
 "
 
 #
diff --git a/Makefile b/Makefile
index 0449a5b..4317cdc 100644
--- a/Makefile
+++ b/Makefile
@@ -2716,6 +2716,9 @@ lart_config   :   unconfig
 shannon_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm sa1100 shannon
 
+jornada_config :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm sa1100 jornada
+
 #
 ## ARM92xT Systems
 #
diff --git a/board/jornada/Makefile b/board/jornada/Makefile
new file mode 100644
index 000..1b4e192
--- /dev/null
+++ b/board/jornada/Makefile
@@ -0,0 +1,53 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 2004 (c) MontaVista Software, Inc.
+#
+# 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
+# pub

Re: [U-Boot] Getting pcmcia drivers builtin by default (bug?)

2009-09-09 Thread Wolfgang Denk
Dear Kristoffer Ericson,

In message <20090909225613.c202c176.kristoffer.eric...@gmail.com> you wrote:
> Greetings,
> 
> Trying to get my arm board going when i noticed that it for some strange
> reason tries to get two pcmcia drivers built in my binary.

That should be Mostly Harmless, as the object files are actually
empty.

> Looking at the pcmcia makefile it seems like any image will
> always include that. What am I missing?

Nothing, but it's not a problem either.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A failure will not appear until a unit has passed final inspection.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Is there any full story about how to take advantage FDT function ?

2009-09-09 Thread Gao Ya'nan
2009/9/10 Scott Wood :
> On Sat, Sep 05, 2009 at 02:41:19PM -0400, Jerry Van Baren wrote:
>> I'm not up on 8xx, but it may not have been pulled forward into the
>> "powerpc" architecture (still "ppc").  The "powerpc" architecture switch
>> is where linux/u-boot started using the FDT.
>
> 8xx is supported in arch/powerpc.

Yes, I have add CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP for the FDT
support which is missing in U-Boot-v2009.08, and it works well, but I
found none complete document on how to write a dts file and add
special device in it.

Any tips? Thanks

Gao Ya'nan

>
> -Scott
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Is there any full story about how to take advantage FDT function ?

2009-09-09 Thread Scott Wood
Gao Ya'nan wrote:
> 2009/9/10 Scott Wood :
>> On Sat, Sep 05, 2009 at 02:41:19PM -0400, Jerry Van Baren wrote:
>>> I'm not up on 8xx, but it may not have been pulled forward into the
>>> "powerpc" architecture (still "ppc").  The "powerpc" architecture switch
>>> is where linux/u-boot started using the FDT.
>> 8xx is supported in arch/powerpc.
> 
> Yes, I have add CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP for the FDT
> support which is missing in U-Boot-v2009.08, and it works well, but I
> found none complete document on how to write a dts file and add
> special device in it.
> 
> Any tips? Thanks

See Documentation/powerpc/booting-without-of.txt, 
Documentation/powerpc/dts-bindings, and the ePAPR specification for 
information on the content of device trees.

-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Is there any full story about how to take advantage FDT function ?

2009-09-09 Thread Gao Ya'nan
2009/9/10 Scott Wood :
> Gao Ya'nan wrote:
>>
>> 2009/9/10 Scott Wood :
>>>
>>> On Sat, Sep 05, 2009 at 02:41:19PM -0400, Jerry Van Baren wrote:

 I'm not up on 8xx, but it may not have been pulled forward into the
 "powerpc" architecture (still "ppc").  The "powerpc" architecture switch
 is where linux/u-boot started using the FDT.
>>>
>>> 8xx is supported in arch/powerpc.
>>
>> Yes, I have add CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP for the FDT
>> support which is missing in U-Boot-v2009.08, and it works well, but I
>> found none complete document on how to write a dts file and add
>> special device in it.
>>
>> Any tips? Thanks
>
> See Documentation/powerpc/booting-without-of.txt,
> Documentation/powerpc/dts-bindings, and the ePAPR specification for
> information on the content of device trees.

I miss the later two, thanks for your tips.

Gao.

>
> -Scott
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address

2009-09-09 Thread Kumar Gala

On Sep 9, 2009, at 3:47 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
>
> In message <1252527755-14866-1-git-send-email-ga...@kernel.crashing.org 
> > you wrote:
>> Some board ports place TEXT_BASE at a location that would cause the
>> RESET_VECTOR_ADDRESS not to be at 0xfffc when we link.  By  
>> default
>> we assume RESET_VECTOR_ADDRESS will be 0xfffc if the board  
>> doesn't
>> explicitly set it.
>
> thanks.
>
> Just some nitpicking:
>
>> --- a/cpu/mpc85xx/u-boot.lds
>> +++ b/cpu/mpc85xx/u-boot.lds
>> @@ -20,6 +20,10 @@
>>  * MA 02111-1307 USA
>>  */
>>
>> +#ifndef RESET_VECTOR_ADDRESS
>> +#define RESET_VECTOR_ADDRESS (0xfffc)
>> +#endif
>
> No parens needed here.

Fixed in my commit :)

> Except from that:
>
> Acked-by: Wolfgang Denk 
>
> Best regards,
>
> Wolfgang Denk

- k

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] TQM85xx: enable partition support, sort commands

2009-09-09 Thread Kumar Gala

On Sep 8, 2009, at 3:29 PM, Wolfgang Denk wrote:

> Signed-off-by: Wolfgang Denk 
>
> ---
> v2: Fix building for TQM8548_BE
>
>On TQM8548_BE, building failed like that:
>   Configuring for TQM85xx board...
>   common/libcommon.a(cmd_mtdparts.o): In function  
> `part_validate_eraseblock':
>   /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined  
> reference to `get_mtd_device_nm'
>   common/libcommon.a(cmd_mtdparts.o): In function  
> `mtd_device_validate':
>   /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined  
> reference to `get_mtd_device_nm'
>   make: *** [u-boot] Error 1
>
>This was because CONFIG_CMD_MTDPARTS was defined after it was
>used. Move the part that uses it after the #define.
> v3: Fix "undefined reference to `get_mtd_device_nm'" errors for
>non-8548 boards; build-tested with ELDK 4.2 on TQM8540, TQM8541,
>TQM8548, TQM8548_AG, TQM8548_BE, TQM8555 and TQM8560
>
> include/configs/TQM85xx.h |   51 +++ 
> +
> 1 files changed, 28 insertions(+), 23 deletions(-)

Did this build ok w/o any warnings on TQM8540?

I'm seeing:

[ga...@komodo u-boot-85xx]$ ./MAKEALL TQM8540
... TQM8540 (MPC8540)
Configuring for TQM85xx board...
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .text lma 0xfffc overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .rodata lma 0x13a4 overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .reloc lma 0xc400 overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .data lma 0xdc30 overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .data.rel.ro.local lma 0xe964 overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .data.rel lma 0xe9e4 overlaps previous sections
/opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot:  
section .data.rel.local lma 0xf380 overlaps previous sections
text   data bss dec hex filename
  247104  16992   35304  299400   49188 ./u-boot

Which effective says to me we've run out of space in the image.

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCHv2 1/2] mpc52xx, mucmc52, uc101: config cleanup

2009-09-09 Thread Heiko Schocher
- as this boards are similiar, collect common config option
  in manroland-common.h and manroland-mpc52xx-common.h
  for mpc52xx specific common options for this manufacturer.
- add OF support
- update default environment

Signed-off-by: Heiko Schocher 
---

- changes since v1:
  added suggestion from Detlev Zundel, to collect mpc52xx specific
  config options in manroland-mpc52xx-common.h

 board/mucmc52/mucmc52.c|7 +
 board/uc101/uc101.c|7 +
 include/configs/manroland-common.h |  139 +++
 include/configs/manroland-mpc52xx-common.h |  230 
 include/configs/mucmc52.h  |  257 +--
 include/configs/uc101.h|  267 ++--
 6 files changed, 403 insertions(+), 504 deletions(-)
 create mode 100644 include/configs/manroland-common.h
 create mode 100644 include/configs/manroland-mpc52xx-common.h

diff --git a/board/mucmc52/mucmc52.c b/board/mucmc52/mucmc52.c
index 7181bd8..bac49be 100644
--- a/board/mucmc52/mucmc52.c
+++ b/board/mucmc52/mucmc52.c
@@ -398,3 +398,10 @@ void pci_init_board (void)
pci_mpc5xxx_init (&hose);
 }
 #endif
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+   ft_cpu_setup(blob, bd);
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
diff --git a/board/uc101/uc101.c b/board/uc101/uc101.c
index 7df349f..4030b9d 100644
--- a/board/uc101/uc101.c
+++ b/board/uc101/uc101.c
@@ -371,3 +371,10 @@ void hw_watchdog_reset(void)
*(vu_long *)MPC5XXX_GPT0_ENABLE = GPT_OUT_0;
 }
 #endif
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+   ft_cpu_setup(blob, bd);
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
diff --git a/include/configs/manroland-common.h 
b/include/configs/manroland-common.h
new file mode 100644
index 000..ffc94e1
--- /dev/null
+++ b/include/configs/manroland-common.h
@@ -0,0 +1,139 @@
+/*
+ * (C) Copyright 2009
+ * Heiko Schocher, DENX Software Engineering, h...@denx.de.
+ *
+ * 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
+ */
+
+#ifndef __MANROLAND_COMMON_H
+#define __MANROLAND_COMMON_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+
+#define BOOTFLAG_COLD  0x01/* Normal Power-On: Boot from FLASH 
*/
+#define BOOTFLAG_WARM  0x02/* Software reboot  
*/
+
+#define CONFIG_BOARD_EARLY_INIT_R
+
+/* Partitions */
+#define CONFIG_DOS_PARTITION
+
+/*
+ * Command line configuration.
+ */
+#include 
+
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DISPLAY
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_NFS
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_SNTP
+
+#defineCONFIG_TIMESTAMP1   /* Print image info with 
timestamp */
+
+/*
+ * Autobooting
+ */
+#define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */
+
+#define CONFIG_PREBOOT "echo;" \
+   "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
+   "echo"
+
+#undef CONFIG_BOOTARGS
+
+#define xstr(s)str(s)
+#define str(s) #s
+
+#define CONFIG_EXTRA_ENV_SETTINGS  \
+   "netdev=eth0\0" \
+   "nfsargs=setenv bootargs root=/dev/nfs rw " \
+   "nfsroot=${serverip}:${rootpath}\0" \
+   "ramargs=setenv bootargs root=/dev/ram rw\0"\
+   "addwdt=setenv bootargs ${bootargs} wdt=off\0"  \
+   "addip=setenv bootargs ${bootargs} "\
+   "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"  \
+   ":${hostname}:${netdev}:off panic=1\0"  \
+   "kernel_addr=ff81\0"\
+   "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0"  \
+   "flas

[U-Boot] [PATCHv2 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-09 Thread Heiko Schocher
U-Boot can detect, if a ide device is present or not.
If not and this new config option is activated, u-boot
removes the ata node from the DTS before booting Linux,
so the Linux IDE driver didn;t crashs, when probing the
device. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

Signed-off-by: Heiko Schocher 
---
changes since v1:
- added comment from Wolfgang Denk, to move this to a more
  common place, so others can also use it, and made it
  therefore per CONFIG_OF_IDE_FIXUP selectable.

 README|9 +
 cpu/mpc5xxx/cpu.c |   18 ++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/README b/README
index ff4ed8b..b9364bf 100644
--- a/README
+++ b/README
@@ -386,6 +386,15 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.

+   CONFIG_OF_IDE_FIXUP
+
+   U-Boot can detect, if a ide device is present or not.
+   If not and this config option is activated, u-boot
+   removes the ata node from the DTS before booting Linux,
+   so the Linux IDE driver didn;t crashs, when probing the
+   device. This is needed for buggy hardware (uc101) where
+   no pull down resistor is connected to the signal IDE5V_DD7.
+
 - vxWorks boot parameters:

bootvx constructs a valid bootline using the following
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index f6258c7..a2fc323 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
uchar enetaddr[6];
char * eth_path = "/" OF_SOC "/ether...@3000";
 #endif
+#if defined(CONFIG_OF_IDE_FIXUP)
+   extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
+#endif

do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
1);
@@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
 #endif
+#if defined(CONFIG_OF_IDE_FIXUP)
+   if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
+   /* NO CF card detected -> delete ata node in DTS */
+   int nodeoffset = 0;
+   char nodename[] = "/soc5...@f000/a...@3a00";
+
+   nodeoffset = fdt_path_offset (blob, nodename);
+   if (nodeoffset >= 0) {
+   fdt_del_node(blob, nodeoffset);
+   } else
+   printf("%s: cannot find %s node err:%s\n",
+   __func__, nodename, fdt_strerror(nodeoffset));
+   }
+
+#endif
 }
 #endif

-- 
1.6.0.6
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-09 Thread Roy Zang
From: Roy Zang 

Enable usb ehci support for p2020ds board
Signed-off-by: Roy Zang 

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

diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h
index 46af7b9..2a2b9ac 100644
--- a/include/configs/P2020DS.h
+++ b/include/configs/P2020DS.h
@@ -618,6 +618,15 @@ extern unsigned long calculate_board_ddr_clk(unsigned long 
dummy);
 #define CONFIG_CMD_EXT2
 #endif
 
+/*
+ * USB
+ */
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+
 #undef CONFIG_WATCHDOG /* watchdog disabled */
 
 /*
-- 
1.5.6.5



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot