Re: [U-Boot] [U-BOOT][PATCH]mmc: modify setting tran_speed and change csd's instead of response value

2010-06-17 Thread Minkyu Kang
On 18 June 2010 15:13, Jaehoon Chung  wrote:
> This patch do the following
> 1. we need not use cmd.response, because we assinged cmd.response value to 
> mmc->csd.
> 2. mmc_set_clock() is hard setting, that is not good solution
>   and if mmc is not MMC_MODE_HS, mmc will set card's tran_speed.
>
>  Signed-off-by: Jaehoon Chung 
>
> ---
>  drivers/mmc/mmc.c |   19 ++-
>  1 files changed, 10 insertions(+), 9 deletions(-)
>

Acked-by: Minkyu Kang 

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


[U-Boot] [U-BOOT][PATCH]mmc: modify setting tran_speed and change csd's instead of response value

2010-06-17 Thread Jaehoon Chung
This patch do the following
1. we need not use cmd.response, because we assinged cmd.response value to 
mmc->csd.
2. mmc_set_clock() is hard setting, that is not good solution
   and if mmc is not MMC_MODE_HS, mmc will set card's tran_speed.

 Signed-off-by: Jaehoon Chung 

---
 drivers/mmc/mmc.c |   19 ++-
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index cf4ea16..fd80a27 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -666,7 +666,7 @@ int mmc_startup(struct mmc *mmc)
mmc->csd[3] = cmd.response[3];
 
if (mmc->version == MMC_VERSION_UNKNOWN) {
-   int version = (cmd.response[0] >> 26) & 0xf;
+   int version = (mmc->csd[0] >> 26) & 0xf;
 
switch (version) {
case 0:
@@ -691,17 +691,17 @@ int mmc_startup(struct mmc *mmc)
}
 
/* divide frequency by 10, since the mults are 10x bigger */
-   freq = fbase[(cmd.response[0] & 0x7)];
-   mult = multipliers[((cmd.response[0] >> 3) & 0xf)];
+   freq = fbase[(mmc->csd[0] & 0x7)];
+   mult = multipliers[((mmc->csd[0] >> 3) & 0xf)];
 
mmc->tran_speed = freq * mult;
 
-   mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
+   mmc->read_bl_len = 1 << ((mmc->csd[1] >> 16) & 0xf);
 
if (IS_SD(mmc))
mmc->write_bl_len = mmc->read_bl_len;
else
-   mmc->write_bl_len = 1 << ((cmd.response[3] >> 22) & 0xf);
+   mmc->write_bl_len = 1 << ((mmc->csd[3] >> 22) & 0xf);
 
if (mmc->high_capacity) {
csize = (mmc->csd[1] & 0x3f) << 16
@@ -794,11 +794,12 @@ int mmc_startup(struct mmc *mmc)
 
if (mmc->card_caps & MMC_MODE_HS) {
if (mmc->card_caps & MMC_MODE_HS_52MHz)
-   mmc_set_clock(mmc, 5200);
+   mmc->tran_speed = 5200;
else
-   mmc_set_clock(mmc, 2600);
-   } else
-   mmc_set_clock(mmc, 2000);
+   mmc->tran_speed = 2600;
+   }
+
+   mmc_set_clock(mmc, mmc->tran_speed);
}
 
/* fill in device description */
-- 
1.6.0.4

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


Re: [U-Boot] Whose responsibility is it to enable FPU?

2010-06-17 Thread Aggrwal Poonam-B10812


> -Original Message-
> From: u-boot-boun...@lists.denx.de
[mailto:u-boot-boun...@lists.denx.de]
> On Behalf Of gne...@gmail.com
> Sent: Tuesday, June 15, 2010 12:32 AM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] Whose responsibility is it to enable FPU?
> 
> I built u-boot for a 440EPx board derived from the sequoia
configuration.
> 
> I am using an FPU-enabled gcc cross compiler.
> 
> U-Boot runs fine and successfully boots my operating system (Linux and
> uClibc-based root filesystem).
> 
> However, I was having a problem running busybox that I traced to
errors
> occurring executing setjmp, which attempts to save floating point
> registers.
> 
> Then I realized that the FPU was not enabled in the MSR or in the ccr0
> register.
> 
> Have I misconfigured something, or should I go ahead and add code to
u-
> boot to enable the FPU?
Ideally this must be done in kernel somewhere.
> 
> Thanks,
> 
> Gregg
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 00/10] Add support for TI OMAP4 SDP and Panda

2010-06-17 Thread Wolfgang Denk
Dear Steve Sakoman,

In message  you 
wrote:
>
> > Wrong base, sorry. Please make sure to rebase against the "next"
> > branch as this contains the Makefile reorganization patches.
> 
> Hmm . . . I'm a bit confused!

Don't worry, that means everything is normal :-)

> I see that you merged some u-boot-ti branch changes into master a
> couple of hours ago that will definitely affect my patches (a few more
> files to move/rename).  However when I look in next I don't see some
> of those files that were just added to master.

Yes, I ain't _that_ fast.

> So it seems that patches based on next won't catch some of the renames
> that now need to be done because of changes in master.  Or maybe I am
> just missing something!
> 
> So I guess I just want to check that you really do want me to rebase on next 
> :-)

In the meantime I also pulled the lastest version of the maste rbranch
into next, so you should really be able to use 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
"Probably the best operating system in the world  is  the  [operating
system] made for the PDP-11 by Bell Laboratories."
   - Ted Nelson, October 1977
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 00/10] Add support for TI OMAP4 SDP and Panda

2010-06-17 Thread Steve Sakoman
On Thu, Jun 17, 2010 at 3:25 PM, Wolfgang Denk  wrote:
> Dear Steve Sakoman,
>
> In message <1276813053-27518-1-git-send-email-st...@sakoman.com> you wrote:
>> Note: I am taking over patch submission for OMAP4 from Aneesh.
>>
>> This is version 2, which takes into account all feedback to date, and has
>> been rebased on top of tree (v2010.06-rc2)
>
> Wrong base, sorry. Please make sure to rebase against the "next"
> branch as this contains the Makefile reorganization patches.

Hmm . . . I'm a bit confused!

I see that you merged some u-boot-ti branch changes into master a
couple of hours ago that will definitely affect my patches (a few more
files to move/rename).  However when I look in next I don't see some
of those files that were just added to master.

So it seems that patches based on next won't catch some of the renames
that now need to be done because of changes in master.  Or maybe I am
just missing something!

So I guess I just want to check that you really do want me to rebase on next :-)

Thanks!

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


Re: [U-Boot] [PATCH v2 00/10] Add support for TI OMAP4 SDP and Panda

2010-06-17 Thread Paulraj, Sandeep

> 
> Note: I am taking over patch submission for OMAP4 from Aneesh.
> 
> This is version 2, which takes into account all feedback to date, and has
> been rebased on top of tree (v2010.06-rc2)

I think this patch set might not apply clean because some OMAP3 patches just 
made it to Wolfgang's tree. You may have to rebase.

> 
> The folowing series adds support for two boards based upon the TI
> OMAP4430.  The OMAP4430 is a Cortex-A9 based SOC from TI.
> 
> The first patch in this series renames the cpu arm_cortexa8 to armv7 so
> that the existing cortex A8 code can be shared with cortex A9. Both A8 and
> A9 are based on ARMV7 architecture.
> 
> The 2nd patch adds basic OMAP4 architecture support.
> 
> The 3rd and 4th patches add minimal board support for the Panda and SDP.
> 
> The 5th patch restructures the OMAP mmc driver code so that it can be
> shared by both OMAP3 and OMAP4 boards.  This patch depends on a previously
> submitted patch (OMAP: mmc: add support for second and third mmc channel):
> 
> http://www.mail-archive.com/u-boot@lists.denx.de/msg31765.html

Do you know what happened to this patch? Its not in Wolfgang's tree despite an 
ACK from Andy.

> 
> The 6th and 7th patches add mmc support for Panda and SDP.
> 
> The 8th patch restructures the OMAP i2c code so that it can be shared by
> both OMAP3 and OMAP4 boards.
> 
> And, finally, the 9th and 10th patches add i2c support for Panda and SDP.
> 
> ---
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 00/10] Add support for TI OMAP4 SDP and Panda

2010-06-17 Thread Wolfgang Denk
Dear Steve Sakoman,

In message <1276813053-27518-1-git-send-email-st...@sakoman.com> you wrote:
> Note: I am taking over patch submission for OMAP4 from Aneesh.
> 
> This is version 2, which takes into account all feedback to date, and has
> been rebased on top of tree (v2010.06-rc2)

Wrong base, sorry. Please make sure to rebase against the "next"
branch as this contains the Makefile reorganization patches.

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
Prof:So the American government went to IBM to come up with a
 data encryption standard and they came up with ...
Student: EBCDIC!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 08/10] ARMV7: Restructure OMAP i2c driver to allow code sharing between OMAP3 and OMAP4

2010-06-17 Thread Steve Sakoman
This patch modifies the omap24xx driver so that it will also work with OMAP4.

Signed-off-by: Steve Sakoman 
---

Changes in this version include:
 - copyright changed to 2010
 - name change from _I2C_H_ since it was already in use
 - common header info moved to drivers/i2c/omap24xx_i2c.h to 
   eliminate redundancy
 

 arch/arm/include/asm/arch-omap3/i2c.h  |  149 +---
 arch/arm/include/asm/arch-omap4/i2c.h  |   74 ++
 drivers/i2c/omap24xx_i2c.c |   17 ++-
 .../arch-omap3/i2c.h => drivers/i2c/omap24xx_i2c.h |   45 +--
 4 files changed, 96 insertions(+), 189 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap4/i2c.h
 copy arch/arm/include/asm/arch-omap3/i2c.h => drivers/i2c/omap24xx_i2c.h (85%)

diff --git a/arch/arm/include/asm/arch-omap3/i2c.h 
b/arch/arm/include/asm/arch-omap3/i2c.h
index 490e03b..7a4a73a 100644
--- a/arch/arm/include/asm/arch-omap3/i2c.h
+++ b/arch/arm/include/asm/arch-omap3/i2c.h
@@ -20,9 +20,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
-#ifndef _I2C_H_
-#define _I2C_H_
+#ifndef _OMAP3_I2C_H_
+#define _OMAP3_I2C_H_
 
+#define I2C_BUS_MAX3
 #define I2C_DEFAULT_BASE   I2C_BASE1
 
 struct i2c {
@@ -58,146 +59,4 @@ struct i2c {
unsigned short res15;
 };
 
-#define I2C_BUS_MAX3
-
-/* I2C masks */
-
-/* I2C Interrupt Enable Register (I2C_IE): */
-#define I2C_IE_GC_IE   (1 << 5)
-#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */
-#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */
-#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */
-#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */
-#define I2C_IE_AL_IE   (1 << 0) /* Arbitration lost interrupt enable */
-
-/* I2C Status Register (I2C_STAT): */
-
-#define I2C_STAT_SBD   (1 << 15) /* Single byte data */
-#define I2C_STAT_BB(1 << 12) /* Bus busy */
-#define I2C_STAT_ROVR  (1 << 11) /* Receive overrun */
-#define I2C_STAT_XUDF  (1 << 10) /* Transmit underflow */
-#define I2C_STAT_AAS   (1 << 9)  /* Address as slave */
-#define I2C_STAT_GC(1 << 5)
-#define I2C_STAT_XRDY  (1 << 4)  /* Transmit data ready */
-#define I2C_STAT_RRDY  (1 << 3)  /* Receive data ready */
-#define I2C_STAT_ARDY  (1 << 2)  /* Register access ready */
-#define I2C_STAT_NACK  (1 << 1)  /* No acknowledgment interrupt enable */
-#define I2C_STAT_AL(1 << 0)  /* Arbitration lost interrupt enable */
-
-/* I2C Interrupt Code Register (I2C_INTCODE): */
-
-#define I2C_INTCODE_MASK   7
-#define I2C_INTCODE_NONE   0
-#define I2C_INTCODE_AL 1   /* Arbitration lost */
-#define I2C_INTCODE_NAK2   /* No acknowledgement/general 
call */
-#define I2C_INTCODE_ARDY   3   /* Register access ready */
-#define I2C_INTCODE_RRDY   4   /* Rcv data ready */
-#define I2C_INTCODE_XRDY   5   /* Xmit data ready */
-
-/* I2C Buffer Configuration Register (I2C_BUF): */
-
-#define I2C_BUF_RDMA_EN(1 << 15) /* Receive DMA channel enable 
*/
-#define I2C_BUF_XDMA_EN(1 << 7)  /* Transmit DMA channel 
enable */
-
-/* I2C Configuration Register (I2C_CON): */
-
-#define I2C_CON_EN (1 << 15)  /* I2C module enable */
-#define I2C_CON_BE (1 << 14)  /* Big endian mode */
-#define I2C_CON_STB(1 << 11)  /* Start byte mode (master mode only) */
-#define I2C_CON_MST(1 << 10)  /* Master/slave mode */
-#define I2C_CON_TRX(1 << 9)   /* Transmitter/receiver mode */
-  /* (master mode only) */
-#define I2C_CON_XA (1 << 8)   /* Expand address */
-#define I2C_CON_STP(1 << 1)   /* Stop condition (master mode only) */
-#define I2C_CON_STT(1 << 0)   /* Start condition (master mode only) */
-
-/* I2C System Test Register (I2C_SYSTEST): */
-
-#define I2C_SYSTEST_ST_EN  (1 << 15) /* System test enable */
-#define I2C_SYSTEST_FREE   (1 << 14) /* Free running mode, on brkpoint) */
-#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */
-#define I2C_SYSTEST_TMODE_SHIFT(12)  /* Test mode select */
-#define I2C_SYSTEST_SCL_I  (1 << 3)  /* SCL line sense input value */
-#define I2C_SYSTEST_SCL_O  (1 << 2)  /* SCL line drive output value */
-#define I2C_SYSTEST_SDA_I  (1 << 1)  /* SDA line sense input value */
-#define I2C_SYSTEST_SDA_O  (1 << 0)  /* SDA line drive output value */
-
-#define I2C_SCLL_SCLL  0
-#define I2C_SCLL_SCLL_M0xFF
-#define I2C_SCLL_HSSCLL8
-#define I2C_SCLH_HSSCLL_M  0xFF
-#define I2C_SCLH_SCLH  0
-#define I2C_SCLH_SCLH_M0xFF
-#define I2C_SCLH_HSSCLH8
-#define I2C_SCLH_HSSCLH_M  0xFF
-
-#define OMAP_I2C_STANDARD  10
-#define OMAP_I2C_FAST_MODE 40
-#define OMAP_I2C_HIGH_SPEED340
-
-#define SYSTEM_CLOCK_121200
-#define SYSTEM_CLOCK

[U-Boot] [PATCH v2 09/10] ARMV7: Enable i2c support on TI OMAP4 SDP

2010-06-17 Thread Steve Sakoman
This patch enables the i2c driver, i2c commands, and i2c multi-bus support

Signed-off-by: Steve Sakoman
Acked-by: Heiko Schocher
---

Changes in this version include:
 - Acked-by from Heiko

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

diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 3a14d34..8121554 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -94,6 +94,15 @@
 #define CONFIG_SYS_BAUDRATE_TABLE  {4800, 9600, 19200, 38400, 57600,\
115200}
 
+/* I2C  */
+#define CONFIG_HARD_I2C1
+#define CONFIG_SYS_I2C_SPEED   10
+#define CONFIG_SYS_I2C_SLAVE   1
+#define CONFIG_SYS_I2C_BUS 0
+#define CONFIG_SYS_I2C_BUS_SELECT  1
+#define CONFIG_DRIVER_OMAP34XX_I2C 1
+#define CONFIG_I2C_MULTI_BUS   1
+
 /* MMC */
 #define CONFIG_MMC 1
 #define CONFIG_OMAP3_MMC   1
@@ -109,6 +118,7 @@
 /* Enabled commands */
 #define CONFIG_CMD_EXT2/* EXT2 Support */
 #define CONFIG_CMD_FAT /* FAT support  */
+#define CONFIG_CMD_I2C /* I2C serial bus support   */
 #define CONFIG_CMD_MMC /* MMC support  */
 
 /* Disabled commands */
-- 
1.7.0.4

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


[U-Boot] [PATCH v2 10/10] ARMV7: Enable i2c support on TI OMAP4 Panda

2010-06-17 Thread Steve Sakoman
This patch enables the i2c driver, i2c commands, and i2c multi-bus support

Signed-off-by: Steve Sakoman 
Acked-by: Heiko Schocher
---

Changes in this version include:
 - Acked-by from Heiko

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

diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 9302ecb..a15c5f5 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -93,6 +93,15 @@
 #define CONFIG_SYS_BAUDRATE_TABLE  {4800, 9600, 19200, 38400, 57600,\
115200}
 
+/* I2C  */
+#define CONFIG_HARD_I2C1
+#define CONFIG_SYS_I2C_SPEED   10
+#define CONFIG_SYS_I2C_SLAVE   1
+#define CONFIG_SYS_I2C_BUS 0
+#define CONFIG_SYS_I2C_BUS_SELECT  1
+#define CONFIG_DRIVER_OMAP34XX_I2C 1
+#define CONFIG_I2C_MULTI_BUS   1
+
 /* MMC */
 #define CONFIG_MMC 1
 #define CONFIG_OMAP3_MMC   1
@@ -108,6 +117,7 @@
 /* Enabled commands */
 #define CONFIG_CMD_EXT2/* EXT2 Support */
 #define CONFIG_CMD_FAT /* FAT support  */
+#define CONFIG_CMD_I2C /* I2C serial bus support   */
 #define CONFIG_CMD_MMC /* MMC support  */
 
 /* Disabled commands */
-- 
1.7.0.4

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


[U-Boot] [PATCH v2 05/10] ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4

2010-06-17 Thread Steve Sakoman
The architecture independent header is moved to drivers/mmc, and the 
architecture
dependent headers reside in asm/arch-omap3 and asm/arch-omap4

Signed-off-by: Steve Sakoman 
---
 arch/arm/include/asm/arch-omap4/mmc_host_def.h |  171 
 drivers/mmc/omap3_mmc.c|   13 +-
 .../arch-omap3/mmc.h => drivers/mmc/omap3_mmc.h|2 +-
 3 files changed, 181 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap4/mmc_host_def.h
 rename arch/arm/include/asm/arch-omap3/mmc.h => drivers/mmc/omap3_mmc.h (99%)

diff --git a/arch/arm/include/asm/arch-omap4/mmc_host_def.h 
b/arch/arm/include/asm/arch-omap4/mmc_host_def.h
new file mode 100644
index 000..e5d8b53
--- /dev/null
+++ b/arch/arm/include/asm/arch-omap4/mmc_host_def.h
@@ -0,0 +1,171 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, 
+ * Syed Mohammed Khasim 
+ *
+ * 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's version 2 of
+ * the License.
+ *
+ * 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 MMC_HOST_DEF_H
+#define MMC_HOST_DEF_H
+
+/*
+ * OMAP HSMMC register definitions
+ */
+
+#define OMAP_HSMMC1_BASE   0x4809C100
+#define OMAP_HSMMC2_BASE   0x480B4100
+#define OMAP_HSMMC3_BASE   0x480AD100
+
+typedef struct hsmmc {
+   unsigned char res1[0x10];
+   unsigned int sysconfig; /* 0x10 */
+   unsigned int sysstatus; /* 0x14 */
+   unsigned char res2[0x14];
+   unsigned int con;   /* 0x2C */
+   unsigned char res3[0xD4];
+   unsigned int blk;   /* 0x104 */
+   unsigned int arg;   /* 0x108 */
+   unsigned int cmd;   /* 0x10C */
+   unsigned int rsp10; /* 0x110 */
+   unsigned int rsp32; /* 0x114 */
+   unsigned int rsp54; /* 0x118 */
+   unsigned int rsp76; /* 0x11C */
+   unsigned int data;  /* 0x120 */
+   unsigned int pstate;/* 0x124 */
+   unsigned int hctl;  /* 0x128 */
+   unsigned int sysctl;/* 0x12C */
+   unsigned int stat;  /* 0x130 */
+   unsigned int ie;/* 0x134 */
+   unsigned char res4[0x8];
+   unsigned int capa;  /* 0x140 */
+} hsmmc_t;
+
+/*
+ * OMAP HS MMC Bit definitions
+ */
+#define MMC_SOFTRESET  (0x1 << 1)
+#define RESETDONE  (0x1 << 0)
+#define NOOPENDRAIN(0x0 << 0)
+#define OPENDRAIN  (0x1 << 0)
+#define OD (0x1 << 0)
+#define INIT_NOINIT(0x0 << 1)
+#define INIT_INITSTREAM(0x1 << 1)
+#define HR_NOHOSTRESP  (0x0 << 2)
+#define STR_BLOCK  (0x0 << 3)
+#define MODE_FUNC  (0x0 << 4)
+#define DW8_1_4BITMODE (0x0 << 5)
+#define MIT_CTO(0x0 << 6)
+#define CDP_ACTIVEHIGH (0x0 << 7)
+#define WPP_ACTIVEHIGH (0x0 << 8)
+#define RESERVED_MASK  (0x3 << 9)
+#define CTPL_MMC_SD(0x0 << 11)
+#define BLEN_512BYTESLEN   (0x200 << 0)
+#define NBLK_STPCNT(0x0 << 16)
+#define DE_DISABLE (0x0 << 0)
+#define BCE_DISABLE(0x0 << 1)
+#define ACEN_DISABLE   (0x0 << 2)
+#define DDIR_OFFSET(4)
+#define DDIR_MASK  (0x1 << 4)
+#define DDIR_WRITE (0x0 << 4)
+#define DDIR_READ  (0x1 << 4)
+#define MSBS_SGLEBLK   (0x0 << 5)
+#define RSP_TYPE_OFFSET(16)
+#define RSP_TYPE_MASK  (0x3 << 16)
+#define RSP_TYPE_NORSP (0x0 << 16)
+#define RSP_TYPE_LGHT136   (0x1 << 16)
+#define RSP_TYPE_LGHT48(0x2 << 16)
+#define RSP_TYPE_LGHT48B   (0x3 << 16)
+#define CCCE_NOCHECK   (0x0 << 19)
+#define CCCE_CHECK (0x1 << 19)
+#define CICE_NOCHECK   (0x0 << 20)
+#define CICE_CHECK (0x1 << 20)
+#define DP_OFFSET  (21)
+#define DP_MASK(0x1 << 21)
+#define DP_NO_DATA   

[U-Boot] [PATCH v2 07/10] ARMV7: Enable mmc support on TI OMAP4 Panda

2010-06-17 Thread Steve Sakoman
This patch enables the mmc driver as well as support for FAT and ext2.

It also sets up environment settings to facilitate booting from mmc.

Signed-off-by: Steve Sakoman 
---
 include/configs/omap4_panda.h |   36 
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 5b96b2e..9302ecb 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -93,12 +93,23 @@
 #define CONFIG_SYS_BAUDRATE_TABLE  {4800, 9600, 19200, 38400, 57600,\
115200}
 
+/* MMC */
+#define CONFIG_MMC 1
+#define CONFIG_OMAP3_MMC   1
+#define CONFIG_SYS_MMC_SET_DEV 1
+#define CONFIG_DOS_PARTITION   1
+
 /* Flash */
 #define CONFIG_SYS_NO_FLASH1
 
 /* commands to include */
 #include 
 
+/* Enabled commands */
+#define CONFIG_CMD_EXT2/* EXT2 Support */
+#define CONFIG_CMD_FAT /* FAT support  */
+#define CONFIG_CMD_MMC /* MMC support  */
+
 /* Disabled commands */
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_FPGA /* FPGA configuration Support   */
@@ -120,6 +131,31 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x8200\0" \
"console=ttyS2,115200n8\0" \
+   "mmcdev=1\0" \
+   "mmcroot=/dev/mmcblk0p2 rw\0" \
+   "mmcrootfstype=ext3 rootwait\0" \
+   "mmcargs=setenv bootargs console=${console} " \
+   "root=${mmcroot} " \
+   "rootfstype=${mmcrootfstype}\0" \
+   "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+   "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+   "source ${loadaddr}\0" \
+   "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+   "mmcboot=echo Booting from mmc${mmcdev} ...; " \
+   "run mmcargs; " \
+   "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+   "if mmc init ${mmcdev}; then " \
+   "if run loadbootscript; then " \
+   "run bootscript; " \
+   "else " \
+   "if run loaduimage; then " \
+   "run mmcboot; " \
+   "else run nandboot; " \
+   "fi; " \
+   "fi; " \
+   "fi"
 
 #define CONFIG_AUTO_COMPLETE   1
 
-- 
1.7.0.4

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


[U-Boot] [PATCH v2 06/10] ARMV7: Enable mmc support on TI OMAP4430 SDP

2010-06-17 Thread Steve Sakoman
This patch enables the mmc driver as well as support for FAT and ext2.

It also sets up environment settings to facilitate booting from mmc

Signed-off-by: Steve Sakoman 
---
 include/configs/omap4_sdp4430.h |   36 
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 07ab93f..3a14d34 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -94,12 +94,23 @@
 #define CONFIG_SYS_BAUDRATE_TABLE  {4800, 9600, 19200, 38400, 57600,\
115200}
 
+/* MMC */
+#define CONFIG_MMC 1
+#define CONFIG_OMAP3_MMC   1
+#define CONFIG_SYS_MMC_SET_DEV 1
+#define CONFIG_DOS_PARTITION   1
+
 /* Flash */
 #define CONFIG_SYS_NO_FLASH1
 
 /* commands to include */
 #include 
 
+/* Enabled commands */
+#define CONFIG_CMD_EXT2/* EXT2 Support */
+#define CONFIG_CMD_FAT /* FAT support  */
+#define CONFIG_CMD_MMC /* MMC support  */
+
 /* Disabled commands */
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_FPGA /* FPGA configuration Support   */
@@ -121,6 +132,31 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x8200\0" \
"console=ttyS2,115200n8\0" \
+   "mmcdev=1\0" \
+   "mmcroot=/dev/mmcblk0p2 rw\0" \
+   "mmcrootfstype=ext3 rootwait\0" \
+   "mmcargs=setenv bootargs console=${console} " \
+   "root=${mmcroot} " \
+   "rootfstype=${mmcrootfstype}\0" \
+   "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
+   "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
+   "source ${loadaddr}\0" \
+   "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+   "mmcboot=echo Booting from mmc${mmcdev} ...; " \
+   "run mmcargs; " \
+   "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+   "if mmc init ${mmcdev}; then " \
+   "if run loadbootscript; then " \
+   "run bootscript; " \
+   "else " \
+   "if run loaduimage; then " \
+   "run mmcboot; " \
+   "else run nandboot; " \
+   "fi; " \
+   "fi; " \
+   "fi"
 
 #define CONFIG_AUTO_COMPLETE   1
 
-- 
1.7.0.4

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


[U-Boot] [PATCH v2 03/10] ARMV7: Add support for TI OMAP4430 SDP

2010-06-17 Thread Steve Sakoman
OMAP4430 SDP is a reference board based on OMAP4430, an ARMV7 Cortex A9 CPU

This patch adds minimum support for booting the board. It assumes U-boot
is loaded to SDRAM with the help of another small bootloader (x-load)
running from SRAM. U-boot currently relies on x-load for clock, mux, and
SDRAM initialization

Signed-off-by: Aneesh V 
Signed-off-by: Steve Sakoman 
---

Changes in this version include:
 - moving DECLARE_GLOBAL_DATA_PTR outside function call
 
 MAINTAINERS |1 +
 MAKEALL |1 +
 Makefile|3 +
 board/ti/sdp4430/Makefile   |   49 +++
 board/ti/sdp4430/config.mk  |   32 +++
 board/ti/sdp4430/sdp.c  |   62 ++
 include/configs/omap4_sdp4430.h |  175 +++
 7 files changed, 323 insertions(+), 0 deletions(-)
 create mode 100644 board/ti/sdp4430/Makefile
 create mode 100644 board/ti/sdp4430/config.mk
 create mode 100644 board/ti/sdp4430/sdp.c
 create mode 100644 include/configs/omap4_sdp4430.h

diff --git a/MAINTAINERS b/MAINTAINERS
index b9c6af2..41951d1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -738,6 +738,7 @@ Nomadik Linux Team 
 Steve Sakoman 
 
omap3_overo ARM ARMV7 (OMAP3xx SoC)
+   omap4_sdp4430   ARM ARMV7 (OMAP4xx SoC)
 
 Jens Scharsig 
 
diff --git a/MAKEALL b/MAKEALL
index 1ebcb65..09c6f53 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -650,6 +650,7 @@ LIST_ARMV7="\
omap3_sdp3430   \
omap3_zoom1 \
omap3_zoom2 \
+   omap4_sdp4430   \
smdkc100\
 "
 
diff --git a/Makefile b/Makefile
index 34482f9..7e462cd 100644
--- a/Makefile
+++ b/Makefile
@@ -3186,6 +3186,9 @@ omap3_zoom1_config :  unconfig
 omap3_zoom2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm armv7 zoom2 logicpd omap3
 
+omap4_sdp4430_config : unconfig
+   @$(MKCONFIG) $(@:_config=) arm armv7 sdp4430 ti omap4
+
 smdkc100_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm armv7 smdkc100 samsung s5pc1xx
 
diff --git a/board/ti/sdp4430/Makefile b/board/ti/sdp4430/Makefile
new file mode 100644
index 000..2554c7b
--- /dev/null
+++ b/board/ti/sdp4430/Makefile
@@ -0,0 +1,49 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# 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  := sdp.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/ti/sdp4430/config.mk b/board/ti/sdp4430/config.mk
new file mode 100644
index 000..7382263
--- /dev/null
+++ b/board/ti/sdp4430/config.mk
@@ -0,0 +1,32 @@
+#
+# (C) Copyright 2006-2009
+# Texas Instruments Incorporated, 
+#
+# OMAP 4430 SDP
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# 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
+#
+# SDRAM Address Space:
+# 8000' - 9fff' (512 MB)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'800

[U-Boot] [PATCH v2 04/10] ARMV7: Add support for TI OMAP4 Panda

2010-06-17 Thread Steve Sakoman
OMAP4 Panda is a reference board based on OMAP4430, an ARMV7 Cortex A9 CPU

This patch adds minimum support for booting the board. It assumes U-boot
is loaded to SDRAM with the help of another small bootloader (x-load)
running from SRAM. U-boot currently relies on x-load for clock, mux, and
SDRAM initialization

Signed-off-by: Steve Sakoman 
---

Changes in this version include:
 - moving DECLARE_GLOBAL_DATA_PTR outside function call

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/ti/panda/Makefile   |   49 
 board/ti/panda/config.mk  |   32 
 board/ti/panda/panda.c|   61 ++
 include/configs/omap4_panda.h |  174 +
 7 files changed, 321 insertions(+), 0 deletions(-)
 create mode 100644 board/ti/panda/Makefile
 create mode 100644 board/ti/panda/config.mk
 create mode 100644 board/ti/panda/panda.c
 create mode 100644 include/configs/omap4_panda.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 41951d1..41e62f4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -738,6 +738,7 @@ Nomadik Linux Team 
 Steve Sakoman 
 
omap3_overo ARM ARMV7 (OMAP3xx SoC)
+   omap4_panda ARM ARMV7 (OMAP4xx SoC)
omap4_sdp4430   ARM ARMV7 (OMAP4xx SoC)
 
 Jens Scharsig 
diff --git a/MAKEALL b/MAKEALL
index 09c6f53..8a30df1 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -650,6 +650,7 @@ LIST_ARMV7="\
omap3_sdp3430   \
omap3_zoom1 \
omap3_zoom2 \
+   omap4_panda \
omap4_sdp4430   \
smdkc100\
 "
diff --git a/Makefile b/Makefile
index 7e462cd..77a565a 100644
--- a/Makefile
+++ b/Makefile
@@ -3186,6 +3186,9 @@ omap3_zoom1_config :  unconfig
 omap3_zoom2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm armv7 zoom2 logicpd omap3
 
+omap4_panda_config :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm armv7 panda ti omap4
+
 omap4_sdp4430_config : unconfig
@$(MKCONFIG) $(@:_config=) arm armv7 sdp4430 ti omap4
 
diff --git a/board/ti/panda/Makefile b/board/ti/panda/Makefile
new file mode 100644
index 000..81e5469
--- /dev/null
+++ b/board/ti/panda/Makefile
@@ -0,0 +1,49 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# 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  := panda.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/ti/panda/config.mk b/board/ti/panda/config.mk
new file mode 100644
index 000..7382263
--- /dev/null
+++ b/board/ti/panda/config.mk
@@ -0,0 +1,32 @@
+#
+# (C) Copyright 2006-2009
+# Texas Instruments Incorporated, 
+#
+# OMAP 4430 SDP
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# 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
+#
+# SDRAM Address Space:
+# 8000' - 9fff' (512 MB)
+# Linux-Kernel is expected to be at 8000'8000,

[U-Boot] [PATCH v2 02/10] ARMV7: Add basic support for TI OMAP4

2010-06-17 Thread Steve Sakoman
This patch adds minimum support for OMAP4. Code which can be shared
between OMAP3 and OMAP4 is placed in arch/arm/cpu/armv7/omap-common

Signed-off-by: Aneesh V 
Signed-off-by: Steve Sakoman 
---

Changes in this version include:
 - white space removal
 - removal of extra / in copyright notice

 Makefile   |7 +
 arch/arm/cpu/armv7/{omap3 => omap-common}/Makefile |   19 +---
 .../{omap3/Makefile => omap-common/config.mk}  |   46 ++--
 arch/arm/cpu/armv7/{omap3 => omap-common}/reset.S  |0
 arch/arm/cpu/armv7/{omap3 => omap-common}/timer.c  |5 +
 arch/arm/cpu/armv7/omap3/Makefile  |2 -
 arch/arm/cpu/armv7/{omap3 => omap4}/Makefile   |   11 +--
 arch/arm/cpu/armv7/omap4/board.c   |   90 +++
 .../armv7/{omap3/reset.S => omap4/lowlevel_init.S} |   40 +---
 .../cpu/armv7/{omap3/reset.S => omap4/sys_info.c}  |   50 ++---
 arch/arm/include/asm/arch-omap4/cpu.h  |   94 
 arch/arm/include/asm/arch-omap4/omap4.h|  118 
 .../reset.S => include/asm/arch-omap4/sys_proto.h} |   35 +++---
 13 files changed, 411 insertions(+), 106 deletions(-)
 copy arch/arm/cpu/armv7/{omap3 => omap-common}/Makefile (81%)
 copy arch/arm/cpu/armv7/{omap3/Makefile => omap-common/config.mk} (52%)
 copy arch/arm/cpu/armv7/{omap3 => omap-common}/reset.S (100%)
 rename arch/arm/cpu/armv7/{omap3 => omap-common}/timer.c (96%)
 copy arch/arm/cpu/armv7/{omap3 => omap4}/Makefile (88%)
 create mode 100644 arch/arm/cpu/armv7/omap4/board.c
 copy arch/arm/cpu/armv7/{omap3/reset.S => omap4/lowlevel_init.S} (65%)
 copy arch/arm/cpu/armv7/{omap3/reset.S => omap4/sys_info.c} (60%)
 create mode 100644 arch/arm/include/asm/arch-omap4/cpu.h
 create mode 100644 arch/arm/include/asm/arch-omap4/omap4.h
 rename arch/arm/{cpu/armv7/omap3/reset.S => 
include/asm/arch-omap4/sys_proto.h} (64%)

diff --git a/Makefile b/Makefile
index 45254e2..34482f9 100644
--- a/Makefile
+++ b/Makefile
@@ -244,6 +244,13 @@ LIBS += lib/libfdt/libfdt.a
 LIBS += api/libapi.a
 LIBS += post/libpost.a
 
+ifeq ($(SOC),omap3)
+LIBS += $(CPUDIR)/omap-common/libomap-common.a
+endif
+ifeq ($(SOC),omap4)
+LIBS += $(CPUDIR)/omap-common/libomap-common.a
+endif
+
 LIBS := $(addprefix $(obj),$(LIBS))
 .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
 
diff --git a/arch/arm/cpu/armv7/omap3/Makefile 
b/arch/arm/cpu/armv7/omap-common/Makefile
similarity index 81%
copy from arch/arm/cpu/armv7/omap3/Makefile
copy to arch/arm/cpu/armv7/omap-common/Makefile
index 136b163..3a4a304 100644
--- a/arch/arm/cpu/armv7/omap3/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -23,24 +23,15 @@
 
 include $(TOPDIR)/config.mk
 
-LIB=  $(obj)lib$(SOC).a
+LIB= $(obj)libomap-common.a
 
-SOBJS  := lowlevel_init.o
-SOBJS  += cache.o
-SOBJS  += reset.o
-
-COBJS  += board.o
-COBJS  += clock.o
-COBJS  += gpio.o
-COBJS  += mem.o
-COBJS  += syslib.o
-COBJS  += sys_info.o
-COBJS  += timer.o
+SOBJS  := reset.o
+COBJS  := timer.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
 
-all:$(obj).depend $(LIB)
+all:   $(obj).depend $(LIB)
 
 $(LIB):$(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
diff --git a/arch/arm/cpu/armv7/omap3/Makefile 
b/arch/arm/cpu/armv7/omap-common/config.mk
similarity index 52%
copy from arch/arm/cpu/armv7/omap3/Makefile
copy to arch/arm/cpu/armv7/omap-common/config.mk
index 136b163..49ac9c7 100644
--- a/arch/arm/cpu/armv7/omap3/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/config.mk
@@ -1,6 +1,6 @@
 #
-# (C) Copyright 2000-2003
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, 
 #
 # See file CREDITS for list of people who contributed to this
 # project.
@@ -20,36 +20,14 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
-include $(TOPDIR)/config.mk
-
-LIB=  $(obj)lib$(SOC).a
-
-SOBJS  := lowlevel_init.o
-SOBJS  += cache.o
-SOBJS  += reset.o
-
-COBJS  += board.o
-COBJS  += clock.o
-COBJS  += gpio.o
-COBJS  += mem.o
-COBJS  += syslib.o
-COBJS  += sys_info.o
-COBJS  += timer.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
-
-all:$(obj).depend $(LIB)
-
-$(LIB):$(OBJS)
-   $(AR) $(ARFLAGS) $@ $(OBJS)
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
+# Make ARMv5 to allow more compilers to work, even though its v7a.
+PLATFORM_CPPFLAGS += -march=armv5
+# =
+#
+# Supply options according to compiler version
+#
+# 

[U-Boot] [PATCH v2 01/10] ARM: Rename arch/arm/cpu/arm_cortexa8 to armv7

2010-06-17 Thread Steve Sakoman
The purpose of this patch is to prepare for adding the OMAP4 architecture, 
which is Cortex A9

Cortex A8 and A9 both belong to the armv7 architecture, hence the name change.

The two architectures are similar enough that substantial code can be shared.

Signed-off-by: Aneesh V 
Signed-off-by: Steve Sakoman 
---
 MAINTAINERS|   18 
 MAKEALL|8 +++---
 Makefile   |   22 ++--
 arch/arm/cpu/{arm_cortexa8 => armv7}/Makefile  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/config.mk |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/cpu.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/Makefile |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/clock.c  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/iomux.c  |0
 .../{arm_cortexa8 => armv7}/mx51/lowlevel_init.S   |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/soc.c|0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/speed.c  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/timer.c  |0
 .../cpu/{arm_cortexa8 => armv7}/mx51/u-boot.lds|2 +-
 .../arm/cpu/{arm_cortexa8 => armv7}/omap3/Makefile |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/board.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/cache.S |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/clock.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/gpio.c  |0
 .../{arm_cortexa8 => armv7}/omap3/lowlevel_init.S  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/mem.c   |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/reset.S |0
 .../cpu/{arm_cortexa8 => armv7}/omap3/sys_info.c   |0
 .../arm/cpu/{arm_cortexa8 => armv7}/omap3/syslib.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/timer.c |0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/Makefile   |0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/cache.S|2 +-
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/clock.c|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/cpu_info.c |0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/reset.S|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/sromc.c|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/timer.c|0
 arch/arm/cpu/{arm_cortexa8 => armv7}/start.S   |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/u-boot.lds|2 +-
 arch/arm/include/asm/arch-mx51/asm-offsets.h   |2 +-
 board/logicpd/zoom2/zoom2.c|2 +-
 include/configs/devkit8000.h   |2 +-
 include/configs/omap3_beagle.h |2 +-
 include/configs/omap3_evm.h|2 +-
 include/configs/omap3_overo.h  |2 +-
 include/configs/omap3_pandora.h|2 +-
 include/configs/omap3_sdp3430.h|2 +-
 include/configs/omap3_zoom1.h  |2 +-
 include/configs/omap3_zoom2.h  |2 +-
 include/configs/smdkc100.h |2 +-
 45 files changed, 38 insertions(+), 38 deletions(-)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/Makefile (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/config.mk (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/cpu.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/Makefile (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/clock.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/iomux.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/lowlevel_init.S (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/soc.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/speed.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/timer.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/u-boot.lds (97%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/Makefile (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/board.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/cache.S (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/clock.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/gpio.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/lowlevel_init.S (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/mem.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/reset.S (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/sys_info.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/syslib.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/timer.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/Makefile (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/cache.S (98%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/clock.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/cpu_info.c (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/reset.S (100%)
 rename arch/arm/cpu/{arm_cortexa8 => armv7}/s5pc1xx/sromc.c (100%)
 rename arch/arm/cpu/{arm_cortexa

[U-Boot] [PATCH v2 00/10] Add support for TI OMAP4 SDP and Panda

2010-06-17 Thread Steve Sakoman
Note: I am taking over patch submission for OMAP4 from Aneesh.

This is version 2, which takes into account all feedback to date, and has
been rebased on top of tree (v2010.06-rc2)
 
The folowing series adds support for two boards based upon the TI
OMAP4430.  The OMAP4430 is a Cortex-A9 based SOC from TI.

The first patch in this series renames the cpu arm_cortexa8 to armv7 so
that the existing cortex A8 code can be shared with cortex A9. Both A8 and
A9 are based on ARMV7 architecture.

The 2nd patch adds basic OMAP4 architecture support.

The 3rd and 4th patches add minimal board support for the Panda and SDP.

The 5th patch restructures the OMAP mmc driver code so that it can be
shared by both OMAP3 and OMAP4 boards.  This patch depends on a previously
submitted patch (OMAP: mmc: add support for second and third mmc channel):

http://www.mail-archive.com/u-boot@lists.denx.de/msg31765.html

The 6th and 7th patches add mmc support for Panda and SDP.

The 8th patch restructures the OMAP i2c code so that it can be shared by
both OMAP3 and OMAP4 boards.

And, finally, the 9th and 10th patches add i2c support for Panda and SDP.

---

Steve Sakoman (10):
  ARM: Rename arch/arm/cpu/arm_cortexa8 to armv7
  ARMV7: Add basic support for TI OMAP4
  ARMV7: Add support for TI OMAP4430 SDP
  ARMV7: Add support for TI OMAP4 Panda
  ARMV7: Restructure OMAP mmc driver to allow code sharing between
OMAP3 and OMAP4
  ARMV7: Enable mmc support on TI OMAP4430 SDP
  ARMV7: Enable mmc support on TI OMAP4 Panda
  ARMV7: Restructure OMAP i2c driver to allow code sharing between
OMAP3 and OMAP4
  ARMV7: Enable i2c support on TI OMAP4 SDP
  ARMV7: Enable i2c support on TI OMAP4 Panda

 MAINTAINERS|   20 +-
 MAKEALL|   10 +-
 Makefile   |   35 ++-
 arch/arm/cpu/{arm_cortexa8 => armv7}/Makefile  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/config.mk |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/cpu.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/Makefile |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/clock.c  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/iomux.c  |0
 .../{arm_cortexa8 => armv7}/mx51/lowlevel_init.S   |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/soc.c|0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/speed.c  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/mx51/timer.c  |0
 .../cpu/{arm_cortexa8 => armv7}/mx51/u-boot.lds|2 +-
 .../mx51 => armv7/omap-common}/Makefile|   10 +-
 .../{arm_cortexa8 => armv7/omap-common}/config.mk  |0
 .../omap3 => armv7/omap-common}/reset.S|0
 .../omap3 => armv7/omap-common}/timer.c|5 +
 .../arm/cpu/{arm_cortexa8 => armv7}/omap3/Makefile |2 -
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/board.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/cache.S |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/clock.c |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/gpio.c  |0
 .../{arm_cortexa8 => armv7}/omap3/lowlevel_init.S  |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/omap3/mem.c   |0
 .../cpu/{arm_cortexa8 => armv7}/omap3/sys_info.c   |0
 .../arm/cpu/{arm_cortexa8 => armv7}/omap3/syslib.c |0
 .../{arm_cortexa8/omap3 => armv7/omap4}/Makefile   |   11 +-
 arch/arm/cpu/armv7/omap4/board.c   |   90 
 .../omap3/reset.S => armv7/omap4/lowlevel_init.S}  |   40 +++--
 .../omap3/reset.S => armv7/omap4/sys_info.c}   |   50 +++--
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/Makefile   |0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/cache.S|2 +-
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/clock.c|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/cpu_info.c |0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/reset.S|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/sromc.c|0
 .../cpu/{arm_cortexa8 => armv7}/s5pc1xx/timer.c|0
 arch/arm/cpu/{arm_cortexa8 => armv7}/start.S   |0
 arch/arm/cpu/{arm_cortexa8 => armv7}/u-boot.lds|2 +-
 arch/arm/include/asm/arch-mx51/asm-offsets.h   |2 +-
 arch/arm/include/asm/arch-omap3/i2c.h  |  149 +-
 arch/arm/include/asm/arch-omap4/cpu.h  |   94 +
 arch/arm/include/asm/arch-omap4/i2c.h  |   74 +++
 arch/arm/include/asm/arch-omap4/mmc_host_def.h |  171 +++
 arch/arm/include/asm/arch-omap4/omap4.h|  118 +++
 .../reset.S => include/asm/arch-omap4/sys_proto.h} |   35 ++--
 board/logicpd/zoom2/zoom2.c|2 +-
 .../cpu/arm_cortexa8 => board/ti/panda}/Makefile   |   24 ++-
 .../cpu/arm_cortexa8 => board/ti/panda}/config.mk  |   25 +--
 .../u-boot.lds => board/ti/panda/panda.c   |   65 +++---
 .../cpu/arm_cortexa8 => board/ti/sdp4430}/Makefile |   24 ++-
 .../arm_cortexa8 => board/ti/sdp4430}/config.mk|   25 +--
 .../u-boot.lds => board/ti/sdp

Re: [U-Boot] [PATCH 3/3] ppc4xx: icon: add support for SM502 chip

2010-06-17 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message <1274863139-3434-4-git-send-email-ag...@denx.de> you wrote:
> Adds initialization code for SM502 graphics controller
> and NL6448BC20-21D LCD panel.
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Stefan Roese 
> ---
>  board/mosaixtech/icon/icon.c |   69 
> ++
>  include/configs/icon.h   |   23 ++
>  2 files changed, 92 insertions(+), 0 deletions(-)

As Stefan is on vacation, I jump in and apply this to "next".

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
Prediction is very difficult, especially of the future.  - Niels Bohr
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-video/next

2010-06-17 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message <20100614222902.6e23f...@wker> you wrote:
> Dear Wolfgang,
> 
> The following changes since commit a6862bc123a9e6c93583879973679b0c5941a418:
>   Wolfgang Denk (1):
> Makefile/mkconfig: read simple board configurations from boards.cfg
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-video.git next
> 
> Anatolij Gustschin (3):
>   video: cfb_console: add weak default video_set_lut()
>   video: sm501: add support for SM501 chips on PCI bus
>   video: sm501.c: add weak default functions
> 
>  arch/powerpc/cpu/mpc512x/diu.c|   14 ---
>  board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |9 --
>  drivers/video/cfb_console.c   |   12 +++
>  drivers/video/sm501.c |  130 
> +
>  include/pci_ids.h |1 +
>  5 files changed, 125 insertions(+), 41 deletions(-)

Applied to "next" branch, 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
"Plan to throw one away. You will anyway."
  - Fred Brooks, "The Mythical Man Month"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PULL REQUEST] PXA next

2010-06-17 Thread Wolfgang Denk
Dear Marek Vasut,

In message <201006141938.12462.marek.va...@gmail.com> you wrote:
> ok, for about fourth time, hope it won't be ignored this time:

Well, it would certainly help if you stated against which branch these
patches should be applied. I can only guess that you might want to see
these applied to the "next" branch?

> The following changes since commit f986325dd569faeaec4186f678d113505c5c4828:
> 
>   Update SICRL_USBDR to reflect 4 different settings (2010-06-04 10:42:59 
> -0500)
> 
> are available in the git repository at:
>   git://git.denx.de/u-boot-pxa next
> 
> Marek Vasut (4):
>   PXA: PXAMMC: Drop different delays for PXA27X
>   PXA: PXAMMC: Add Monahans support
>   PXA: Add UP2OCR register bit definitions
>   PXA: Add missing MDREFR bits
> 
>  arch/arm/include/asm/arch-pxa/pxa-regs.h |   25 +
>  drivers/mmc/pxa_mmc.c|   17 ++---
>  2 files changed, 27 insertions(+), 15 deletions(-)

Pulled into "next" branch. 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
Dear Lord: I just want *one* one-armed manager so  I  never  have  to
hear "On the other hand", again.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PULL REQUEST] PXA fix

2010-06-17 Thread Wolfgang Denk
Dear Marek Vasut,

In message <201006141938.45708.marek.va...@gmail.com> you wrote:
> The following changes since commit f986325dd569faeaec4186f678d113505c5c4828:
> 
>   Update SICRL_USBDR to reflect 4 different settings (2010-06-04 10:42:59 
> -0500)
> 
> are available in the git repository at:
>   git://git.denx.de/u-boot-pxa fix
> 
> Marek Vasut (1):
>   PXA: Align stack to 8 bytes
> 
>  arch/arm/cpu/pxa/start.S |5 -
>  1 files changed, 4 insertions(+), 1 deletions(-)

Pulled (into "master"). 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
That's their goal, remember, a goal that's really contrary to that of
the programmer or administrator. We just want to get our  jobs  done.
$Bill  just  wants  to  become  $$Bill. These aren't even marginallly
congruent.
 -- Tom Christiansen in <6jhtqk$ql...@csnews.cs.colorado.edu>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request u-boot-marvell.git

2010-06-17 Thread Wolfgang Denk
Dear Prafulla,

In message  
you wrote:
> 
> The following changes since commit 376e7fadbad3285231e390c6534feb5af86d594b:
>   Minkyu Kang (1):
> SAMSUNG: goni: add the GPL licence
> 
> are available in the git repository at:
> 
>   u-boot-marvrell.git .. Master branch..

s/rvr/rv/ ?

> Albert Aribaud (3):
>   Initial support for Marvell Orion5x SoC
>   Add Orion5x support to 16550 device driver
>   Add support for the LaCie ED Mini V2 board
> 
>  MAINTAINERS|4 +
>  MAKEALL|1 +
>  Makefile   |3 +
>  arch/arm/cpu/arm926ejs/orion5x/Makefile|   55 +
>  arch/arm/cpu/arm926ejs/orion5x/cpu.c   |  270 ++
>  arch/arm/cpu/arm926ejs/orion5x/dram.c  |   64 +
>  arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S |  293 
> 
>  arch/arm/cpu/arm926ejs/orion5x/timer.c |  181 +++
>  arch/arm/include/asm/arch-orion5x/cpu.h|  203 
>  arch/arm/include/asm/arch-orion5x/mv88f5182.h  |   40 
>  arch/arm/include/asm/arch-orion5x/orion5x.h|   69 ++
>  board/LaCie/edminiv2/Makefile  |   53 +
>  board/LaCie/edminiv2/config.mk |   27 +++
>  board/LaCie/edminiv2/edminiv2.c|   92 
>  drivers/serial/serial.c|3 +
>  include/configs/edminiv2.h |  172 ++
>  16 files changed, 1530 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/Makefile
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/cpu.c
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/dram.c
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/timer.c
>  create mode 100644 arch/arm/include/asm/arch-orion5x/cpu.h
>  create mode 100644 arch/arm/include/asm/arch-orion5x/mv88f5182.h
>  create mode 100644 arch/arm/include/asm/arch-orion5x/orion5x.h
>  create mode 100644 board/LaCie/edminiv2/Makefile
>  create mode 100644 board/LaCie/edminiv2/config.mk
>  create mode 100644 board/LaCie/edminiv2/edminiv2.c
>  create mode 100644 include/configs/edminiv2.h

Applied, 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
Cigarette, n.: A fire at one end, a fool at the other, and a  bit  of
tobacco in between.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please Pull u-boot-ti/master

2010-06-17 Thread Paulraj, Sandeep


> 
> Dear s-paul...@ti.com,
> 
> In message <1276186363-13822-1-git-send-email-s-paul...@ti.com> you wrote:
> >
> > Please pull u-boot-ti/master.
> > This set consists of a patch set from Sudhkar which earlier broke other
> > DaVinci boards. I verified that all DaVinci boards built fine.
> >
> > Thanks,
> > Sandeep
> >
> > The following changes since commit
> 23911740486c59851df57521c49bfd81ce1865ec:
> >   Delio Brignoli (1):
> > DaVinci: Improve DaVinci SPI speed.
> >
> > are available in the git repository at:
> >
> >   git://git.denx.de/u-boot-ti.git master
> >
> > Grazvydas Ignotas (1):
> >   OMAP3: pandora: enable battery backup capacitor
> >
> > Sudhakar Rajashekhara (3):
> >   da830: Move common code out of da830evm.c file
> >   TI: DaVinci: Prepare for da850 support
> >   TI: DaVinci: Add board specific code for da850 EVM
> >
> >  MAINTAINERS |4 +
> >  MAKEALL |1 +
> >  Makefile|5 +-
> >  arch/arm/include/asm/arch-davinci/hardware.h|1 +
> >  board/davinci/{da830evm => da8xxevm}/Makefile   |6 +-
> >  board/davinci/da8xxevm/common.c |   55 +
> >  board/davinci/da8xxevm/common.h |   30 +
> >  board/davinci/{da830evm => da8xxevm}/config.mk  |0
> >  board/davinci/{da830evm => da8xxevm}/da830evm.c |   29 ++---
> >  board/davinci/da8xxevm/da850evm.c   |  111
> ++
> >  board/pandora/pandora.c |9 ++
> >  include/configs/da850evm.h  |  140
> +++
> >  12 files changed, 371 insertions(+), 20 deletions(-)
> >  rename board/davinci/{da830evm => da8xxevm}/Makefile (90%)
> >  create mode 100644 board/davinci/da8xxevm/common.c
> >  create mode 100644 board/davinci/da8xxevm/common.h
> >  rename board/davinci/{da830evm => da8xxevm}/config.mk (100%)
> >  rename board/davinci/{da830evm => da8xxevm}/da830evm.c (90%)
> >  create mode 100644 board/davinci/da8xxevm/da850evm.c
> >  create mode 100644 include/configs/da850evm.h
> 
> I think I got all of these.

Yes, since you accepted my updated pull request 
> 
> Best regards,
> 
> Wolfgang Denk

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


Re: [U-Boot] Please Pull u-boot-ti/master

2010-06-17 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1276186363-13822-1-git-send-email-s-paul...@ti.com> you wrote:
> 
> Please pull u-boot-ti/master.
> This set consists of a patch set from Sudhkar which earlier broke other
> DaVinci boards. I verified that all DaVinci boards built fine.
> 
> Thanks,
> Sandeep
> 
> The following changes since commit 23911740486c59851df57521c49bfd81ce1865ec:
>   Delio Brignoli (1):
> DaVinci: Improve DaVinci SPI speed.
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-ti.git master
> 
> Grazvydas Ignotas (1):
>   OMAP3: pandora: enable battery backup capacitor
> 
> Sudhakar Rajashekhara (3):
>   da830: Move common code out of da830evm.c file
>   TI: DaVinci: Prepare for da850 support
>   TI: DaVinci: Add board specific code for da850 EVM
> 
>  MAINTAINERS |4 +
>  MAKEALL |1 +
>  Makefile|5 +-
>  arch/arm/include/asm/arch-davinci/hardware.h|1 +
>  board/davinci/{da830evm => da8xxevm}/Makefile   |6 +-
>  board/davinci/da8xxevm/common.c |   55 +
>  board/davinci/da8xxevm/common.h |   30 +
>  board/davinci/{da830evm => da8xxevm}/config.mk  |0
>  board/davinci/{da830evm => da8xxevm}/da830evm.c |   29 ++---
>  board/davinci/da8xxevm/da850evm.c   |  111 ++
>  board/pandora/pandora.c |9 ++
>  include/configs/da850evm.h  |  140 
> +++
>  12 files changed, 371 insertions(+), 20 deletions(-)
>  rename board/davinci/{da830evm => da8xxevm}/Makefile (90%)
>  create mode 100644 board/davinci/da8xxevm/common.c
>  create mode 100644 board/davinci/da8xxevm/common.h
>  rename board/davinci/{da830evm => da8xxevm}/config.mk (100%)
>  rename board/davinci/{da830evm => da8xxevm}/da830evm.c (90%)
>  create mode 100644 board/davinci/da8xxevm/da850evm.c
>  create mode 100644 include/configs/da850evm.h

I think I got all of these.

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
"My name is Linus Torvalds, you messed with my kernel, prepare to die"
  - Linus Torvalds in
  
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Please Pull u-boot-ti/master

2010-06-17 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1276723529-17603-1-git-send-email-s-paul...@ti.com> you wrote:
> Wolfgang,
> 
> Please pull this from my master branch. If you pull all all of these,
> you will not have to pull some of these patches from Tom's master and some
> patches from my master branch. I think this would be the most simple.
> Do let me know if this is acceptable
> 
> Thanks,
> Sandeep
> 
> The following changes since commit 9bb3b3d4406c1e388a99f6fb189147d6a06cc2cf:
>   Wolfgang Denk (1):
> Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-ti.git master
> 
> Cyril Chemparathy (3):
>   ARM1176: Coexist with other ARM1176 platforms
>   ARM1176: TI: TNETV107X soc initial support
>   TI: TNETV107X EVM initial support
> 
> Delio Brignoli (1):
>   DaVinci: Improve DaVinci SPI speed.
> 
> Grazvydas Ignotas (1):
>   OMAP3: pandora: enable battery backup capacitor
> 
> Sudhakar Rajashekhara (3):
>   da830: Move common code out of da830evm.c file
>   TI: DaVinci: Prepare for da850 support
>   TI: DaVinci: Add board specific code for da850 EVM
> 
> Vaibhav Hiremath (5):
>   OMAP3EVM: Added NAND support
>   omap3: Calculate CS1 size only when SDRC is
>   omap3: Consolidate SDRC related operations
>   AM35x: Add support for AM3517EVM
>   AM35x: Add support for EMIF4

Applied, 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
A person with one watch knows what time it  is;  a  person  with  two
watches is never sure.   Proverb
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/10] ARMV7: Add basic support for TI OMAP4

2010-06-17 Thread Steve Sakoman
On Mon, Jun 14, 2010 at 10:48 PM, Vaibhav Bedia  wrote:
> On Tue, Jun 15, 2010 at 10:09 AM, Steve Sakoman  wrote:
>
>> +
>>
> [...]
>
>> +/* Declare the global data pointer - gd */
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>>
> Once the declaration in /board/ti/sdp4430/sdp.c is made global this won't be
> needed.

It still seems to be needed to avoid a compile time error, even with
the global declaration
in /board/ti/sdp4430/sdp.c.

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


[U-Boot] [PATCH] Fix console_buffer size conflict error.

2010-06-17 Thread Remy Bohmer
The console_buffer size is declared in common/main.c as
   -- char console_buffer[CONFIG_SYS_CBSIZE + 1];
so this extern definition is wrong.

Signed-off-by: Remy Bohmer 
---
 common/hush.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/hush.c b/common/hush.c
index 06c5ff8..9eea90f 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1018,7 +1018,7 @@ static void get_user_input(struct in_str *i)
fflush(stdout);
i->p = the_command;
 #else
-   extern char console_buffer[CONFIG_SYS_CBSIZE];
+   extern char console_buffer[];
int n;
static char the_command[CONFIG_SYS_CBSIZE];
 
-- 
1.7.0.4

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


Re: [U-Boot] ns16550.c compile problem

2010-06-17 Thread Wolfgang Denk
Dear sergej.stepa...@ids.de,

In message <4206182445660643b9aeb8d4e55bbd0a1061c6a...@hermes2> you wrote:
> 
> Trying to update u-boot(1.3.3) to u-boot2010 we got the following compile 
> problem:
...
> In file included from ns16550.c:9:
> /home/ste/Develop/u-boot/include/watchdog.h:75: warning: type defaults to 
> 'int' in declaration of 'immap_t'
> /home/ste/Develop/u-boot/include/watchdog.h:75: error: expected ';', ',' or 
> ')' before '*' token
> make[1]: *** [ns16550.o] Fehler 1

Seems your subject line is misleading. This has little to do with
ns16550.c, but more with include/watchdog.h - or more precisely with
incorrect or missing definitions in your board config file.

> It could be fixed with the patch:

NAK.

> Is there are any other way?
> All other serial drivers have the "common.h"-include.

None of the boards that build with this driver have problems - they
all build cleanly.  Why do you think a global file needs changes when
the problem is visible only with a single board, i. e. yours?

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
If you want strict real-time behavior, run in the real  time  schedu-
ling class.  But there are no seatbelts or airbags;  main(){for(;;);}
can hard hang your system.  -- Bart Smaalders
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Configuring U-Boot for MPC8349E in little endian mode

2010-06-17 Thread Wolfgang Denk
Dear Troy Laramy,

In message  you 
wrote:
>
> I have very much the same issue...a lib I need to link to that is only
> available as built in little-endian (don't have the src, sadly).  So I am

You want to link U-Boot (on a Power Architecture system) against a
closed source, little-endian library?

YOu are aware that U-Boot is covered by the GPL, and linking against
closed-source code results in a license clash?

> trying to build u-boot for powerpc in LE.  I have added the -mlittle-endian
> and -EL to the build, but now it is failing when trying to link libgcc.a, as
> libgcc.a is built in the toolchain in BE and I'm trying to link it as LE.

The Power Architecture has a naturan byte order, and this is big
endian. I consider all attempts to make them run in LE mode a waste of
time and resources.

> Did you find some nice way around this?  All I can see is trying to build my
> own toolchainI am using a prebuilt toolchain from EP that came, at some
> point, from the ELDKbut I'm pretty sure I don't have the src. to these
> libs.  Just hoping there is some other way.

No source to this LE lib, no source to the tools. I would not like to
be in your position.

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
The evolution of the human race will not be accomplished in  the  ten
thousand  years  of  tame  animals,  but in the million years of wild
animals, because man is and will always be a wild animal.
  - Charles Galton Darwin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH]ppc4xx/Canyonlands added USB board callbacks

2010-06-17 Thread Rupjyoti Sarmah
Thanks for your inputs. I will do the necessary changes are resubmit.

Regards,
Rup

-Original Message-
From: Wolfgang Denk [mailto:w...@denx.de]
Sent: Thursday, June 17, 2010 1:24 AM
To: Rupjyoti Sarmah
Cc: u-boot@lists.denx.de; rupjyoti.sar...@gmail.com; s...@denx.de;
rsar...@apm.com
Subject: Re: [U-Boot] [PATCH]ppc4xx/Canyonlands added USB board callbacks

Dear Rupjyoti Sarmah,

In message <201006161734.o5ghya6i014...@amcc.com> you wrote:
>
> Functions added to support board callbacks for USB init. This
> isolates USB manipulations such that it is only touched if USB is
> used by U-Boot.
>
> Signed-off-by: Dave Mitchell 
> Signed-off-by: Rupjyoti Sarmah 
> ---
>  board/amcc/canyonlands/canyonlands.c |   79
+++---
>  include/configs/canyonlands.h|1 +
>  2 files changed, 64 insertions(+), 16 deletions(-)
>
> diff --git a/board/amcc/canyonlands/canyonlands.c
b/board/amcc/canyonlands/canyonlands.c
> index 23874d2..2e30a32 100644
> --- a/board/amcc/canyonlands/canyonlands.c
> +++ b/board/amcc/canyonlands/canyonlands.c
> @@ -34,6 +34,18 @@ extern flash_info_t
flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH ch
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> +
> +struct ep460c_bcsr {
> + u8 cpld_rev,
> + led_user,
> + board_status,
> + reset_ctrl,
> + flash_ctrl,
> + eth_ctrl,
> + usb_ctrl,
> + irq_ctrl;
> +};

Please use standard style to describe structs, and mind indetation, i. e.
write:

struct ep460c_bcsr {
u8  cpld_rev,
u8  led_user,
u8  board_status,
...
u8  irq_ctrl,
};

>  #define CONFIG_SYS_BCSR3_PCIE0x10

CONFIG_SYS_* variable sshould not be defined in board code; they are
intended to be used in board config files only.

> +#define BCSR_CPLDREV 0x00
> +#define BCSR_BRDSTS  0x03
> +#define BCSR_FLASHCTRL   0x05
> +#define BCSR_ETHCTRL 0x06
> +#define BCSR_USBCTRL 0x07
> +#define BCSR_USBCTRL_OTG_RST 0x32
> +#define BCSR_USBCTRL_HOST_RST0x01

Please add comments what these magic numbers do.

>  #if !defined(CONFIG_ARCHES)
>   /* Enable ethernet and take out of reset */
> +
>   out_8((void *)CONFIG_SYS_BCSR_BASE + 6, 0);

Remove this blank line, please.

>   /* Remove NOR-FLASH, NAND-FLASH & EEPROM hardware write protection
*/
> - out_8((void *)CONFIG_SYS_BCSR_BASE + 5, 0);
> -
> - /* Enable USB host & USB-OTG */
> - out_8((void *)CONFIG_SYS_BCSR_BASE + 7, 0);
> + bcsr_data->flash_ctrl = 0;

NAK. Please always use proper I/O accessors to access device
registers.

> - if (pvr_460ex()) {
> - /*
> -  * Configure USB-STP pins as alternate and not GPIO
> -  * It seems to be neccessary to configure the STP pins as
GPIO
> -  * input at powerup (perhaps while USB reset is asserted).
So
> -  * we configure those pins to their "real" function now.
> -  */
> - gpio_config(16, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
> - gpio_config(19, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
> - }

I am not sure if this is really a good idea to remove this code here.

> + /* Enable USB host & USB-OTG */
> + bcsr_data->usb_ctrl &= ~(BCSR_USBCTRL_OTG_RST |
BCSR_USBCTRL_HOST_RST);

Please always use proper I/O accessors! Fix globally!

> + /*
> +  * Configure USB-STP pins as alternate and not GPIO.
> +  */
> + gpio_config(16, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
> + gpio_config(19, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);

Isn't this too late? And maybe you want to keep the comment that
explains what is being done, and why?

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
"Well I don't see why I have to make one man  miserable  when  I  can
make so many men happy."  - Ellyn Mustard, about marriage
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] DaVinci: Improve DaVinci SPI speed.

2010-06-17 Thread Delio Brignoli
Hello Nick,

On 17/06/2010, at 17:02, Nick Thompson wrote:
> On 01/06/10 12:36, Delio Brignoli wrote:
>> I have updated this patch based on the comments [1] by Wolfgang Denk and 
>> removed unused variables.
>> [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]
[...]
> I have an alternative patch that tries to be even quicker, but I
> don't have the same platform as Delio, so can't compare like with
> like.

I will test your patch on my L138 and let you know.

> In essence, it splits up read and write operations to avoid testing
> pointers in every loop iteration. It also unrolls the last iteration
> so that it doesn't have to test for loop ending twice each time
> round. Finally it avoids bit setting/clearing on each iteration when
> the results would only turn out to be the same anyway.

I am wondering if it is OK to split reading and writing: when I wrote
the patch I assumed that spi_xfer() was supposed to be able to read and
write to two distinct buffers at the same time. As I understand it, your
patch allows spi_xfer() to be either a read or a write operation but not both 
and I do not know if this semantic change is acceptable. Maybe Sekhar or 
Sandeep can clarify this.

Thanks
--
Delio


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


[U-Boot] [PATCH V6 10/10] MAKEALL: Add missing powerpc 36-bit targets

2010-06-17 Thread Becky Bruce
We were missing 8641HPCN_36BIT and MPC8536DS_36BIT.

Signed-off-by: Becky Bruce 
---
 MAKEALL |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 2527352..a82c93c 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -393,6 +393,7 @@ LIST_85xx=" \
MPC8536DS_NAND  \
MPC8536DS_SDCARD\
MPC8536DS_SPIFLASH  \
+   MPC8536DS_36BIT \
MPC8540ADS  \
MPC8540EVAL \
MPC8541CDS  \
@@ -453,6 +454,7 @@ LIST_85xx=" \
 
 LIST_86xx="\
MPC8610HPCD \
+   MPC8641HPCN_36BIT \
MPC8641HPCN \
sbc8641d\
XPEDITE5170 \
-- 
1.6.0.6

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


[U-Boot] [PATCH V6 09/10] powerpc 83xx/85xx: Merge lbc upmconfig code

2010-06-17 Thread Becky Bruce
Each platform had its own version of the upmconfig, despite the
init process being identical.  Now that we have a spot for common
lbc code, create a common upmconfig() there.

Signed-off-by: Becky Bruce 
Acked-by: Kim Phillips 
---
 arch/powerpc/cpu/mpc83xx/cpu.c |   66 
 arch/powerpc/cpu/mpc85xx/cpu.c |   61 -
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c |   50 +++
 arch/powerpc/include/asm/fsl_lbc.h |3 ++
 4 files changed, 53 insertions(+), 127 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 24193ce..d37fc80 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -125,72 +125,6 @@ int checkcpu(void)
return 0;
 }
 
-
-/*
- * Program a UPM with the code supplied in the table.
- *
- * The 'dummy' variable is used to increment the MAD. 'dummy' is
- * supposed to be a pointer to the memory of the device being
- * programmed by the UPM.  The data in the MDR is written into
- * memory and the MAD is incremented every time there's a write
- * to 'dummy'. Unfortunately, the current prototype for this
- * function doesn't allow for passing the address of this
- * device, and changing the prototype will break a number lots
- * of other code, so we need to use a round-about way of finding
- * the value for 'dummy'.
- *
- * The value can be extracted from the base address bits of the
- * Base Register (BR) associated with the specific UPM.  To find
- * that BR, we need to scan all 8 BRs until we find the one that
- * has its MSEL bits matching the UPM we want.  Once we know the
- * right BR, we can extract the base address bits from it.
- *
- * The MxMR and the BR and OR of the chosen bank should all be
- * configured before calling this function.
- *
- * Parameters:
- * upm: 0=UPMA, 1=UPMB, 2=UPMC
- * table: Pointer to an array of values to program
- * size: Number of elements in the array.  Must be 64 or less.
- */
-void upmconfig (uint upm, uint *table, uint size)
-{
-   volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
-   volatile fsl_lbc_t *lbc = &immap->im_lbc;
-   volatile uchar *dummy = NULL;
-   const u32 msel = (upm + 4) << BR_MSEL_SHIFT;/* What the MSEL field 
in BRn should be */
-   volatile u32 *mxmr = &lbc->mamr + upm;  /* ptr to mamr, mbmr, or mcmr */
-   uint i;
-
-   /* Find the address for the dummy write transaction */
-   for (i = 0; i < 8; i++) {
-   if ((get_lbc_br(i) & BR_MSEL) == msel) {
-   dummy = (uchar *) (get_lbc_br(i) & BR_BA);
-   break;
-   }
-   }
-
-   if (!dummy) {
-   printf("Error: %s() could not find matching BR\n", 
__FUNCTION__);
-   hang();
-   }
-
-   /* Set the OP field in the MxMR to "write" and the MAD field to 00 
*/
-   *mxmr = (*mxmr & 0xCFC0) | 0x1000;
-
-   for (i = 0; i < size; i++) {
-   lbc->mdr = table[i];
-   __asm__ __volatile__ ("sync");
-   *dummy = 0; /* Write the value to memory and increment MAD 
*/
-   __asm__ __volatile__ ("sync");
-   while(((*mxmr & 0x3f) != ((i + 1) & 0x3f)));
-   }
-
-   /* Set the OP field in the MxMR to "normal" and the MAD field to 00 
*/
-   *mxmr &= 0xCFC0;
-}
-
-
 int
 do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 7ab4a2a..987eae4 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -252,67 +252,6 @@ reset_85xx_watchdog(void)
 #endif /* CONFIG_WATCHDOG */
 
 /*
- * Configures a UPM. The function requires the respective MxMR to be set
- * before calling this function. "size" is the number or entries, not a sizeof.
- */
-void upmconfig (uint upm, uint * table, uint size)
-{
-   int i, mdr, mad, old_mad = 0;
-   volatile u32 *mxmr;
-   volatile fsl_lbc_t *lbc = LBC_BASE_ADDR;
-   volatile u8* dummy = NULL;
-   int upmmask;
-
-   switch (upm) {
-   case UPMA:
-   mxmr = &lbc->mamr;
-   upmmask = BR_MS_UPMA;
-   break;
-   case UPMB:
-   mxmr = &lbc->mbmr;
-   upmmask = BR_MS_UPMB;
-   break;
-   case UPMC:
-   mxmr = &lbc->mcmr;
-   upmmask = BR_MS_UPMC;
-   break;
-   default:
-   printf("%s: Bad UPM index %d to configure\n", __FUNCTION__, 
upm);
-   hang();
-   }
-
-   /* Find the address for the dummy write transaction */
-   for (i = 0; i < 8; i++) {
-   if ((get_lbc_br(i) & (BR_V | BR_MSEL)) == (BR_V | upmmask)) {
-   dummy = (volatile u8 *)(get_lbc_br(i) & BR_BA);
-   break;
-   }
-   }
-
-   if (i == 8) {
-   

[U-Boot] [PATCH V6 08/10] mpc85xx: Add reginfo command

2010-06-17 Thread Becky Bruce
The new command dumps the TLBCAM, the LAWs, and the BR/OR regs.
Add CONFIG_CMD_REGINFO to the config for all MPC85xx parts.

Signed-off-by: Becky Bruce 
---
 arch/powerpc/cpu/mpc85xx/cpu.c |   13 +
 common/cmd_reginfo.c   |5 +
 include/configs/MPC8536DS.h|1 +
 include/configs/MPC8540EVAL.h  |1 +
 include/configs/MPC8541CDS.h   |1 +
 include/configs/MPC8544DS.h|1 +
 include/configs/MPC8548CDS.h   |1 +
 include/configs/MPC8555CDS.h   |1 +
 include/configs/MPC8560ADS.h   |1 +
 include/configs/MPC8568MDS.h   |1 +
 include/configs/MPC8569MDS.h   |1 +
 include/configs/MPC8572DS.h|1 +
 include/configs/P1_P2_RDB.h|1 +
 include/configs/P2020DS.h  |1 +
 include/configs/PM854.h|1 +
 include/configs/PM856.h|1 +
 include/configs/SBC8540.h  |1 +
 include/configs/TQM85xx.h  |1 +
 include/configs/XPEDITE5200.h  |1 +
 include/configs/XPEDITE5370.h  |1 +
 include/configs/sbc8548.h  |1 +
 include/configs/sbc8560.h  |1 +
 include/configs/socrates.h |1 +
 include/configs/stxgp3.h   |1 +
 include/configs/stxssa.h   |1 +
 25 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 4160b60..7ab4a2a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -32,6 +32,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -322,3 +324,14 @@ int cpu_mmc_init(bd_t *bis)
return 0;
 #endif
 }
+
+/*
+ * Print out the state of various machine registers.
+ * Currently prints out LAWs, BR0/OR0, and TLBs
+ */
+void mpc85xx_reginfo(void)
+{
+   print_tlbcam();
+   print_laws();
+   print_lbc_regs();
+}
diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c
index 89fd9ec..0fbe0b2 100644
--- a/common/cmd_reginfo.c
+++ b/common/cmd_reginfo.c
@@ -33,6 +33,8 @@ extern void ppc4xx_reginfo(void);
 #include 
 #elif defined (CONFIG_MPC86xx)
 extern void mpc86xx_reginfo(void);
+#elif defined(CONFIG_MPC85xx)
+extern void mpc85xx_reginfo(void);
 #endif
 
 int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -183,6 +185,9 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 #elif defined(CONFIG_MPC86xx)
mpc86xx_reginfo();
 
+#elif defined(CONFIG_MPC85xx)
+   mpc85xx_reginfo();
+
 #elif defined(CONFIG_BLACKFIN)
puts("\nSystem Configuration registers\n");
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index da4313a..9c46d3e 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -669,6 +669,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8540EVAL.h b/include/configs/MPC8540EVAL.h
index 95ea275..7daf934 100644
--- a/include/configs/MPC8540EVAL.h
+++ b/include/configs/MPC8540EVAL.h
@@ -294,6 +294,7 @@
 
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index e945da2..ae4fba8 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -403,6 +403,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 799d946..faba353 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -420,6 +420,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 3eb0049..fdd3597 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -462,6 +462,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index 07a8e61..5011e5a 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -401,6 +401,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 4a4a9ed..98677e5 100644
--- a/include/config

[U-Boot] [PATCH V6 07/10] fsl_law.c: Add print_laws() for FSL_CORENET platforms.

2010-06-17 Thread Becky Bruce
Add printing of LAWBARH/LAWBARL for FSL_CORENET platforms.

Signed-off-by: Becky Bruce 
---
 drivers/misc/fsl_law.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 968..628bd59 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -193,7 +193,13 @@ void print_laws(void)
printf("\nLocal Access Window Configuration\n");
for (i = 0; i < FSL_HW_NUM_LAWS; i++) {
lawar = in_be32(LAWAR_ADDR(i));
+#ifdef CONFIG_FSL_CORENET
+   printf("LAWBARH%02d: 0x%08x LAWBARL%02d: 0x%08x",
+  i, in_be32(LAWBARH_ADDR(i)),
+  i, in_be32(LAWBARL_ADDR(i)));
+#else
printf("LAWBAR%02d: 0x%08x", i, in_be32(LAWBAR_ADDR(i)));
+#endif
printf(" LAWAR0x%02d: 0x%08x\n", i, lawar);
printf("\t(EN: %d TGT: 0x%02x SIZE: ",
   (lawar & LAW_EN) ? 1 : 0, (lawar >> 20) & 0xff);
-- 
1.6.0.6

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


[U-Boot] [PATCH V6 06/10] drivers/misc/fsl_law.c: Rearrange code to avoid duplication

2010-06-17 Thread Becky Bruce
The current code redefines functions based on FSL_CORENET_ vs not -
create macros/inlines instead that hide the differences.

Signed-off-by: Becky Bruce 
---
 arch/powerpc/include/asm/fsl_law.h |1 +
 drivers/misc/fsl_law.c |  125 ++--
 2 files changed, 49 insertions(+), 77 deletions(-)

diff --git a/arch/powerpc/include/asm/fsl_law.h 
b/arch/powerpc/include/asm/fsl_law.h
index 34c56a2..12ba1a6 100644
--- a/arch/powerpc/include/asm/fsl_law.h
+++ b/arch/powerpc/include/asm/fsl_law.h
@@ -47,6 +47,7 @@ enum law_size {
 };
 
 #define law_size_bits(sz)  (__ilog2_u64(sz) - 1)
+#define lawar_size(x)  (1ULL << ((x & 0x3f) + 1))
 
 #ifdef CONFIG_FSL_CORENET
 enum law_trgt_if {
diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 8255175..968 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -50,86 +50,61 @@ DECLARE_GLOBAL_DATA_PTR;
 #endif
 
 #ifdef CONFIG_FSL_CORENET
-void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
-{
-   volatile ccsr_local_t *ccm = (void *)(CONFIG_SYS_FSL_CORENET_CCM_ADDR);
-
-   gd->used_laws |= (1 << idx);
-
-   out_be32(&ccm->law[idx].lawar, 0);
-   out_be32(&ccm->law[idx].lawbarh, ((u64)addr >> 32));
-   out_be32(&ccm->law[idx].lawbarl, addr & 0x);
-   out_be32(&ccm->law[idx].lawar, LAW_EN | ((u32)id << 20) | (u32)sz);
+#define LAW_BASE (CONFIG_SYS_FSL_CORENET_CCM_ADDR)
+#define LAWAR_ADDR(x) (&((ccsr_local_t *)LAW_BASE)->law[x].lawar)
+#define LAWBARH_ADDR(x) (&((ccsr_local_t *)LAW_BASE)->law[x].lawbarh)
+#define LAWBARL_ADDR(x) (&((ccsr_local_t *)LAW_BASE)->law[x].lawbarl)
+#define LAWBAR_SHIFT 0
+#else
+#define LAW_BASE (CONFIG_SYS_IMMR + 0xc08)
+#define LAWAR_ADDR(x) ((u32 *)LAW_BASE + 8 * x + 2)
+#define LAWBAR_ADDR(x) ((u32 *)LAW_BASE + 8 * x)
+#define LAWBAR_SHIFT 12
+#endif
 
-   /* Read back so that we sync the writes */
-   in_be32(&ccm->law[idx].lawar);
-}
 
-void disable_law(u8 idx)
+static inline phys_addr_t get_law_base_addr(int idx)
 {
-   volatile ccsr_local_t *ccm = (void *)(CONFIG_SYS_FSL_CORENET_CCM_ADDR);
-
-   gd->used_laws &= ~(1 << idx);
-
-   out_be32(&ccm->law[idx].lawar, 0);
-   out_be32(&ccm->law[idx].lawbarh, 0);
-   out_be32(&ccm->law[idx].lawbarl, 0);
-
-   /* Read back so that we sync the writes */
-   in_be32(&ccm->law[idx].lawar);
-
-   return;
+#ifdef CONFIG_FSL_CORENET
+   return (phys_addr_t)
+   ((u64)in_be32(LAWBARH_ADDR(idx)) << 32) |
+   in_be32(LAWBARL_ADDR(idx));
+#else
+   return (phys_addr_t)in_be32(LAWBAR_ADDR(idx)) << LAWBAR_SHIFT;
+#endif
 }
 
-#ifndef CONFIG_NAND_SPL
-static int get_law_entry(u8 i, struct law_entry *e)
+static inline void set_law_base_addr(int idx, phys_addr_t addr)
 {
-   volatile ccsr_local_t *ccm = (void *)(CONFIG_SYS_FSL_CORENET_CCM_ADDR);
-   u32 lawar;
-
-   lawar = in_be32(&ccm->law[i].lawar);
-
-   if (!(lawar & LAW_EN))
-   return 0;
-
-   e->addr = ((u64)in_be32(&ccm->law[i].lawbarh) << 32) |
-   in_be32(&ccm->law[i].lawbarl);
-   e->size = lawar & 0x3f;
-   e->trgt_id = (lawar >> 20) & 0xff;
-
-   return 1;
-}
-#endif
+#ifdef CONFIG_FSL_CORENET
+   out_be32(LAWBARL_ADDR(idx), addr & 0x);
+   out_be32(LAWBARH_ADDR(idx), (u64)addr >> 32);
 #else
+   out_be32(LAWBAR_ADDR(idx), addr >> LAWBAR_SHIFT);
+#endif
+}
+
 void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 {
-   volatile u32 *base = (volatile u32 *)(CONFIG_SYS_IMMR + 0xc08);
-   volatile u32 *lawbar = base + 8 * idx;
-   volatile u32 *lawar = base + 8 * idx + 2;
-
gd->used_laws |= (1 << idx);
 
-   out_be32(lawar, 0);
-   out_be32(lawbar, addr >> 12);
-   out_be32(lawar, LAW_EN | ((u32)id << 20) | (u32)sz);
+   out_be32(LAWAR_ADDR(idx), 0);
+   set_law_base_addr(idx, addr);
+   out_be32(LAWAR_ADDR(idx), LAW_EN | ((u32)id << 20) | (u32)sz);
 
/* Read back so that we sync the writes */
-   in_be32(lawar);
+   in_be32(LAWAR_ADDR(idx));
 }
 
 void disable_law(u8 idx)
 {
-   volatile u32 *base = (volatile u32 *)(CONFIG_SYS_IMMR + 0xc08);
-   volatile u32 *lawbar = base + 8 * idx;
-   volatile u32 *lawar = base + 8 * idx + 2;
-
gd->used_laws &= ~(1 << idx);
 
-   out_be32(lawar, 0);
-   out_be32(lawbar, 0);
+   out_be32(LAWAR_ADDR(idx), 0);
+   set_law_base_addr(idx, 0);
 
/* Read back so that we sync the writes */
-   in_be32(lawar);
+   in_be32(LAWAR_ADDR(idx));
 
return;
 }
@@ -137,24 +112,20 @@ void disable_law(u8 idx)
 #ifndef CONFIG_NAND_SPL
 static int get_law_entry(u8 i, struct law_entry *e)
 {
-   volatile u32 *base = (volatile u32 *)(CONFIG_SYS_IMMR + 0xc08);
-   volatile u32 *lawbar = base + 8 * i;
-   volatile u32 *lawar = base + 8 * i + 2;
-   u32 temp;
+   u32 lawar;
 
-   temp = in_be32

[U-Boot] [PATCH V6 04/10] mpc85xx: tlb.c cleanups

2010-06-17 Thread Becky Bruce
Extract the operation to read a tlb into a function - we will need
this later to print out the tlbs, and there's no point in duplicating
the code.  Create a TSIZE_TO_BYTES macro to deal with the conversion
from the MAS field to an actual size instead of duplicating this in code.
There are a few misc other minor cleanups.

Signed-off-by: Becky Bruce 
---
 arch/powerpc/cpu/mpc85xx/tlb.c |   50 +++
 arch/powerpc/include/asm/mmu.h |1 +
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index b3037ac..eebb6ae 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -55,6 +55,24 @@ void init_tlbs(void)
return ;
 }
 
+void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
+  phys_addr_t *rpn)
+{
+   u32 _mas1;
+
+   mtspr(MAS0, FSL_BOOKE_MAS0(1, idx, 0));
+   asm volatile("tlbre;isync");
+   _mas1 = mfspr(MAS1);
+
+   *valid = (_mas1 & MAS1_VALID);
+   *tsize = (_mas1 >> 8) & 0xf;
+   *epn = mfspr(MAS2) & MAS2_EPN;
+   *rpn = mfspr(MAS3) & MAS3_RPN;
+#ifdef CONFIG_ENABLE_36BIT_PHYS
+   *rpn |= ((u64)mfspr(MAS7)) << 32;
+#endif
+}
+
 #ifndef CONFIG_NAND_SPL
 static inline void use_tlb_cam(u8 idx)
 {
@@ -82,15 +100,9 @@ void init_used_tlb_cams(void)
 
/* walk all the entries */
for (i = 0; i < num_cam; i++) {
-   u32 _mas1;
-
mtspr(MAS0, FSL_BOOKE_MAS0(1, i, 0));
-
asm volatile("tlbre;isync");
-   _mas1 = mfspr(MAS1);
-
-   /* if the entry isn't valid skip it */
-   if ((_mas1 & MAS1_VALID))
+   if (mfspr(MAS1) & MAS1_VALID)
use_tlb_cam(i);
}
 }
@@ -134,7 +146,7 @@ void set_tlb(u8 tlb, u32 epn, u64 rpn,
 
 #ifdef CONFIG_ADDR_MAP
if ((tlb == 1) && (gd->flags & GD_FLG_RELOC))
-   addrmap_set_entry(epn, rpn, (1UL << ((tsize * 2) + 10)), esel);
+   addrmap_set_entry(epn, rpn, TSIZE_TO_BYTES(tsize), esel);
 #endif
 }
 
@@ -201,26 +213,12 @@ void init_addr_map(void)
/* walk all the entries */
for (i = 0; i < num_cam; i++) {
unsigned long epn;
-   u32 tsize, _mas1;
+   u32 tsize, valid;
phys_addr_t rpn;
 
-   mtspr(MAS0, FSL_BOOKE_MAS0(1, i, 0));
-
-   asm volatile("tlbre;isync");
-   _mas1 = mfspr(MAS1);
-
-   /* if the entry isn't valid skip it */
-   if (!(_mas1 & MAS1_VALID))
-   continue;
-
-   tsize = (_mas1 >> 8) & 0xf;
-   epn = mfspr(MAS2) & MAS2_EPN;
-   rpn = mfspr(MAS3) & MAS3_RPN;
-#ifdef CONFIG_ENABLE_36BIT_PHYS
-   rpn |= ((phys_addr_t)mfspr(MAS7)) << 32;
-#endif
-
-   addrmap_set_entry(epn, rpn, (1UL << ((tsize * 2) + 10)), i);
+   read_tlbcam_entry(i, &valid, &tsize, &epn, &rpn);
+   if (valid & MAS1_VALID)
+   addrmap_set_entry(epn, rpn, TSIZE_TO_BYTES(tsize), i);
}
 
return ;
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 5166507..d4c7b75 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -402,6 +402,7 @@ extern void print_bats(void);
 #define MAS1_TID(x)((x << 16) & 0x3FFF)
 #define MAS1_TS0x1000
 #define MAS1_TSIZE(x)  ((x << 8) & 0x0F00)
+#define TSIZE_TO_BYTES(x) ((phys_addr_t)(1UL << ((tsize * 2) + 10)))
 
 #define MAS2_EPN   0xF000
 #define MAS2_X00x0040
-- 
1.6.0.6

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


[U-Boot] [PATCH V6 05/10] mpc85xx: Add print_tlbcam() function

2010-06-17 Thread Becky Bruce
This dumps out the contents of TLB1 on 85xx-based systems.

Signed-off-by: Becky Bruce 
---
 arch/powerpc/cpu/mpc85xx/tlb.c |   20 
 arch/powerpc/include/asm/mmu.h |1 +
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index eebb6ae..f2833a5 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -74,6 +74,26 @@ void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, 
unsigned long *epn,
 }
 
 #ifndef CONFIG_NAND_SPL
+void print_tlbcam(void)
+{
+   int i;
+   unsigned int num_cam = mfspr(SPRN_TLB1CFG) & 0xfff;
+
+   /* walk all the entries */
+   printf("TLBCAM entries\n");
+   for (i = 0; i < num_cam; i++) {
+   unsigned long epn;
+   u32 tsize, valid;
+   phys_addr_t rpn;
+
+   read_tlbcam_entry(i, &valid, &tsize, &epn, &rpn);
+   printf("entry %02d: V: %d EPN 0x%08x RPN 0x%08llx size:",
+   i, (valid == 0) ? 0 : 1, (unsigned int)epn,
+   (unsigned long long)rpn);
+   print_size(TSIZE_TO_BYTES(tsize), "\n");
+   }
+}
+
 static inline void use_tlb_cam(u8 idx)
 {
int i = idx / 32;
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index d4c7b75..c01c85f 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -486,6 +486,7 @@ extern void init_tlbs(void);
 extern int find_tlb_idx(void *addr, u8 tlbsel);
 extern void init_used_tlb_cams(void);
 extern int find_free_tlbcam(void);
+extern void print_tlbcam(void);
 
 extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg);
 
-- 
1.6.0.6

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


[U-Boot] [PATCH V6 02/10] drivers/usb/host/ohci-hcd: undef readl/writel before redefining

2010-06-17 Thread Becky Bruce
This avoids a build warning that you see if anyone in the
header chain has included io.h (which is coming shortly).  I
also move this to the "ohci.h" header file in the same dir,
which is cleaner.

Signed-off-by: Becky Bruce 
---
 drivers/usb/host/ohci-hcd.c |   11 ---
 drivers/usb/host/ohci.h |   13 +
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index b03a600..3ffdc9d 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -83,17 +83,6 @@
 #define OHCI_CONTROL_INIT \
(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
 
-/*
- * e.g. PCI controllers need this
- */
-#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-# define readl(a) __swap_32(*((volatile u32 *)(a)))
-# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))
-#else
-# define readl(a) (*((volatile u32 *)(a)))
-# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
-#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
-
 #define min_t(type, x, y) \
({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
 
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 79aa79d..fa4ecc8 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -7,6 +7,19 @@
  * usb-ohci.h
  */
 
+/*
+ * e.g. PCI controllers need this
+ */
+#undef readl
+#undef writel
+#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
+# define readl(a) __swap_32(*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))
+#else
+# define readl(a) (*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
+#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
+
 /* functions for doing board or CPU specific setup/cleanup */
 extern int usb_board_init(void);
 extern int usb_board_stop(void);
-- 
1.6.0.6

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


[U-Boot] [PATCH v6 0/10] PPC LBC/TLB cleanups; reginfo command for 85xx

2010-06-17 Thread Becky Bruce
This somewhat random patch series got its start when I was asked to
create a reginfo command for 85xx by one of the internal teams here at
FSL to dump the BR/ORs, LAWs, and the TLBCAM entries.  As I started doing
that, I began to notice that there was a lot of duplicated and inconsistent
code for manipulating the TLBs and LBC registers, which, in some cases, 
would have caused me to have to write extra code to make reginfo useful
on multiple platforms.  So I decided to clean this up.  The bulk of
these patches are just merges of duplicated code and renames of things
to get to a consistent naming scheme.

These really need to be picked up by a single maintainer, as there's
a definite dependency chain here; I'll let Kumar and Wolfgang decide
who wants it.

Changes from last rev: Fix whitespace, missing signoff, added Kim's Acks.

Diffstat below.

Cheers,
Becky

 MAKEALL|2 +
 Makefile   |1 +
 arch/powerpc/cpu/mpc83xx/cpu.c |   66 
 arch/powerpc/cpu/mpc83xx/cpu_init.c|   53 ++
 arch/powerpc/cpu/mpc83xx/nand_init.c   |4 +-
 arch/powerpc/cpu/mpc83xx/speed.c   |2 +-
 arch/powerpc/cpu/mpc85xx/cpu.c |   78 +++
 arch/powerpc/cpu/mpc85xx/cpu_init.c|   58 +--
 arch/powerpc/cpu/mpc85xx/cpu_init_nand.c   |6 +-
 arch/powerpc/cpu/mpc85xx/speed.c   |5 +-
 arch/powerpc/cpu/mpc85xx/tlb.c |   70 -
 arch/powerpc/cpu/mpc86xx/cpu.c |   15 +---
 arch/powerpc/cpu/mpc86xx/cpu_init.c|   55 +--
 arch/powerpc/cpu/mpc86xx/speed.c   |5 +-
 arch/powerpc/cpu/mpc8xxx/Makefile  |3 +
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c |  134 
 arch/powerpc/include/asm/config.h  |6 +
 arch/powerpc/include/asm/fsl_law.h |1 +
 arch/powerpc/include/asm/fsl_lbc.h |  112 
 arch/powerpc/include/asm/immap_83xx.h  |   13 ++-
 arch/powerpc/include/asm/immap_85xx.h  |   46 +
 arch/powerpc/include/asm/immap_86xx.h  |   49 +
 arch/powerpc/include/asm/mmu.h |2 +
 board/atum8548/atum8548.c  |2 +-
 board/esd/vme8349/vme8349.c|2 +-
 board/freescale/mpc8313erdb/sdram.c|2 +-
 board/freescale/mpc8349emds/mpc8349emds.c  |2 +-
 board/freescale/mpc8349itx/mpc8349itx.c|7 +-
 board/freescale/mpc8360emds/mpc8360emds.c  |6 +-
 board/freescale/mpc8360erdk/nand.c |6 +-
 board/freescale/mpc8540ads/mpc8540ads.c|8 +-
 board/freescale/mpc8541cds/mpc8541cds.c|   13 +--
 board/freescale/mpc8544ds/mpc8544ds.c  |2 +-
 board/freescale/mpc8548cds/mpc8548cds.c|   13 +--
 board/freescale/mpc8555cds/mpc8555cds.c|   12 +--
 board/freescale/mpc8560ads/mpc8560ads.c|8 +-
 board/freescale/mpc8568mds/mpc8568mds.c|   11 +--
 board/freescale/mpc8569mds/mpc8569mds.c|2 +-
 board/mpc8540eval/mpc8540eval.c|6 +-
 board/pm854/pm854.c|2 +-
 board/pm856/pm856.c|2 +-
 board/sbc8349/sbc8349.c|2 +-
 board/sbc8548/sbc8548.c|   20 +---
 board/sbc8560/sbc8560.c|6 +-
 board/sheldon/simpc8313/sdram.c|2 +-
 board/sheldon/simpc8313/simpc8313.c|2 +-
 board/socrates/socrates.c  |   31 +++---
 board/tqc/tqm834x/tqm834x.c|8 +-
 board/tqc/tqm85xx/nand.c   |   12 +-
 board/tqc/tqm85xx/tqm85xx.c|   35 +++---
 board/xes/xpedite5170/xpedite5170.c|   10 +-
 board/xes/xpedite5200/xpedite5200.c|   11 +-
 board/xes/xpedite5370/xpedite5370.c|9 +-
 common/cmd_reginfo.c   |5 +
 drivers/misc/fsl_law.c |  131 ++--
 drivers/mtd/nand/fsl_elbc_nand.c   |   18 ++--
 drivers/usb/host/ohci-hcd.c|   11 --
 drivers/usb/host/ohci.h|   13 +++
 include/configs/MPC8313ERDB.h  |1 +
 include/configs/MPC8315ERDB.h  |1 +
 include/configs/MPC837XEMDS.h  |1 +
 include/configs/MPC837XERDB.h  |1 +
 include/configs/MPC8536DS.h|1 +
 include/configs/MPC8540EVAL.h  |1 +
 include/configs/MPC8541CDS.h   |1 +
 include/configs/MPC8544DS.h|1 +
 include/configs/MPC8548CDS.h   |1 +
 include/configs/MPC8555CDS.h   |1 +
 include/configs/MPC8560ADS.h   

[U-Boot] [PATCH V6 01/10] powerpc: Update configs to properly set FSL_ELBC

2010-06-17 Thread Becky Bruce
Some parts that have an Enhanced Local Bus Controller weren't
setting CONFIG_FSL_ELBC.  Fix this so we can use this define
properly going forward (currently it's only used if PHYS_64BIT is
set, which meant not all platforms needed to have it set correctly).

Signed-off-by: Becky Bruce 
Acked-by: Kim Phillips 
---
 include/configs/MPC8313ERDB.h |1 +
 include/configs/MPC8315ERDB.h |1 +
 include/configs/MPC837XEMDS.h |1 +
 include/configs/MPC837XERDB.h |1 +
 include/configs/SIMPC8313.h   |1 +
 include/configs/XPEDITE5370.h |1 +
 6 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 9a40adc..524afa5 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -36,6 +36,7 @@
 #define CONFIG_MPC8313ERDB 1
 
 #define CONFIG_PCI
+#define CONFIG_FSL_ELBC 1
 
 #define CONFIG_MISC_INIT_R
 
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 6972fe8..f1b110b 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -197,6 +197,7 @@
 #define CONFIG_SYS_LCRR_DBYP   LCRR_DBYP
 #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_2
 #define CONFIG_SYS_LBC_LBCR0x0004
+#define CONFIG_FSL_ELBC1
 
 /*
  * FLASH on the Local Bus
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index b30d0e3..9092755 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -223,6 +223,7 @@
 #define CONFIG_SYS_LCRR_DBYP   LCRR_DBYP
 #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_8
 #define CONFIG_SYS_LBC_LBCR0x
+#define CONFIG_FSL_ELBC1
 
 /*
  * FLASH on the Local Bus
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 1654f46..79dadc4 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -246,6 +246,7 @@
 #define CONFIG_SYS_LCRR_DBYP   LCRR_DBYP
 #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_8
 #define CONFIG_SYS_LBC_LBCR0x
+#define CONFIG_FSL_ELBC1
 
 /*
  * FLASH on the Local Bus
diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h
index eb8657b..70b7489 100644
--- a/include/configs/SIMPC8313.h
+++ b/include/configs/SIMPC8313.h
@@ -37,6 +37,7 @@
 #define CONFIG_MPC8313 1
 
 #define CONFIG_PCI
+#define CONFIG_FSL_ELBC1
 
 #define CONFIG_MISC_INIT_R
 
diff --git a/include/configs/XPEDITE5370.h b/include/configs/XPEDITE5370.h
index 7fd3668..20a6753 100644
--- a/include/configs/XPEDITE5370.h
+++ b/include/configs/XPEDITE5370.h
@@ -47,6 +47,7 @@
 #define CONFIG_SYS_PCI_64BIT   1   /* enable 64-bit PCI resources */
 #define CONFIG_FSL_PCIE_RESET  1   /* need PCIe reset errata */
 #define CONFIG_FSL_LAW 1   /* Use common FSL init code */
+#define CONFIG_FSL_ELBC1
 
 /*
  * Multicore config
-- 
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] DaVinci: Improve DaVinci SPI speed.

2010-06-17 Thread Nick Thompson
On 17/06/10 16:10, Paulraj, Sandeep wrote:
> 
> 
>>
>> On 01/06/10 12:36, Delio Brignoli wrote:
>>> I have updated this patch based on the comments [1] by Wolfgang Denk and
>>> removed unused variables.
>>> [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]
>>>
>>> Reduce the number of reads per byte transferred on the BUF register from
>> 2 to 1 and
>>> take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138
>> EVM,
>>> SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with
>> a 2Mbyte image file.
>>> Remove unused variables in the spi_xfer() function.
>>>
>>> Signed-off-by: Delio Brignoli 
>>> Tested-by: Ben Gardiner 
>>
>> Sorry, I'm a bit late to the party on this.
> 
> It is late. Pull request already sent to Wolfgang
>>
>> I have an alternative patch that tries to be even quicker, but I
>> don't have the same platform as Delio, so can't compare like with
>> like.
> 
> Compare it on your platform. I believe you have the OMAP L137.
> And post the results.

I don't have a scope to get an accurate measure. The best I can do
right now is use a serial snooper to time between me pressing return
and the next prompt turning up.

To try and drown out inaccuracies and delays, I ran:

sf read 0xc0008000 0 0x80

So 8MiB in a reasonably consistent 5.62 - 5.63 seconds, which is about
1.49MiB/s by my reckoning. A bit faster, but way short of 6.25MiB/s.

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


[U-Boot] Does SATA Sil3114 driver works for Sil3132?

2010-06-17 Thread Alam, Muhammad
Hi Folks,

 

Has anyone tried using the Sil3114 driver for Sil3132?

If yes, can someone point me the changes required in the Sil 3114 driver
to make it to work for 3132.

 

Or perhaps is there a Sil3132 driver available for U-Boot?

 

Thanks,

 

Alam


___
This e-mail and any files transmitted with it are proprietary and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have reason to believe that you have received this e-mail in error, please 
notify the sender and destroy this email and any attached files. Please note 
that any views or opinions presented in this e-mail are solely those of the 
author and do not necessarily represent those of the Curtiss-Wright Corporation 
or any of its subsidiaries.  Documents attached hereto may contain technology 
subject to government export regulations. Recipient is solely responsible for 
ensuring that any re-export, transfer or disclosure of this information is in 
accordance with applicable government export regulations.  The recipient should 
check this e-mail and any attachments for the presence of viruses. 
Curtiss-Wright Corporation and its subsidiaries accept no liability for any 
damage caused by any virus transmitted by this e-mail.___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] ns16550.c compile problem

2010-06-17 Thread Sergej.Stepanov
Hi All!

Trying to update u-boot(1.3.3) to u-boot2010 we got the following compile 
problem:

ppc_8xx-gcc  -g  -Os   -mrelocatable -fPIC -meabi -D__KERNEL__ 
-DTEXT_BASE=0x4070 -I/home/ste/Develop/u-boot/include -fno-builtin 
-ffreestanding -nostdinc -isystem 
/opt/eldk-4.2/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include -pipe  
-DCONFIG_PPC -D__powerpc__ -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 
-msoft-float -Wall -Wstrict-prototypes -fno-stack-protector   \
-o ns16550.o ns16550.c -c
In file included from ns16550.c:9:
/home/ste/Develop/u-boot/include/watchdog.h:75: warning: type defaults to 'int' 
in declaration of 'immap_t'
/home/ste/Develop/u-boot/include/watchdog.h:75: error: expected ';', ',' or ')' 
before '*' token
make[1]: *** [ns16550.o] Fehler 1

We use ELDK-4.2.

It could be fixed with the patch:

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 7e833fd..f951f05 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -4,6 +4,7 @@
  * modified to use CONFIG_SYS_ISA_MEM and new defines
  */
 
+#include 
 #include 
 #include 
 #include 


Is there are any other way?
All other serial drivers have the "common.h"-include.

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


Re: [U-Boot] Configuring U-Boot for MPC8349E in little endian mode

2010-06-17 Thread Troy Laramy
Hi Vivek (et al)

I have very much the same issue...a lib I need to link to that is only
available as built in little-endian (don't have the src, sadly).  So I am
trying to build u-boot for powerpc in LE.  I have added the -mlittle-endian
and -EL to the build, but now it is failing when trying to link libgcc.a, as
libgcc.a is built in the toolchain in BE and I'm trying to link it as LE.
Did you find some nice way around this?  All I can see is trying to build my
own toolchainI am using a prebuilt toolchain from EP that came, at some
point, from the ELDKbut I'm pretty sure I don't have the src. to these
libs.  Just hoping there is some other way.

Any help/advice would by VERY much appreciated!

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


[U-Boot] Does SATA 3114 driver works for SAT

2010-06-17 Thread Alam, Muhammad
 

 

Muhammad F. Alam

Software Designer

 
+ 333 Palladium Drive, Ottawa, 

   Ontario K2V 1A6 
'(613) 599-9199 Extn: 5516 
* muhammad.a...@curtisswright.com
 

8 http://www.cwcembedded.com  

 


___
This e-mail and any files transmitted with it are proprietary and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have reason to believe that you have received this e-mail in error, please 
notify the sender and destroy this email and any attached files. Please note 
that any views or opinions presented in this e-mail are solely those of the 
author and do not necessarily represent those of the Curtiss-Wright Corporation 
or any of its subsidiaries.  Documents attached hereto may contain technology 
subject to government export regulations. Recipient is solely responsible for 
ensuring that any re-export, transfer or disclosure of this information is in 
accordance with applicable government export regulations.  The recipient should 
check this e-mail and any attachments for the presence of viruses. 
Curtiss-Wright Corporation and its subsidiaries accept no liability for any 
damage caused by any virus transmitted by this e-mail.<>___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Recall: Does SATA 3114 driver works for SAT

2010-06-17 Thread Alam, Muhammad
Alam, Muhammad would like to recall the message, "Does SATA 3114 driver works 
for SAT".

___
This e-mail and any files transmitted with it are proprietary and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have reason to believe that you have received this e-mail in error, please 
notify the sender and destroy this email and any attached files. Please note 
that any views or opinions presented in this e-mail are solely those of the 
author and do not necessarily represent those of the Curtiss-Wright Corporation 
or any of its subsidiaries.  Documents attached hereto may contain technology 
subject to government export regulations. Recipient is solely responsible for 
ensuring that any re-export, transfer or disclosure of this information is in 
accordance with applicable government export regulations.  The recipient should 
check this e-mail and any attachments for the presence of viruses. 
Curtiss-Wright Corporation and its subsidiaries accept no liability for any 
damage caused by any virus transmitted by this e-mail.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] DaVinci: Improve DaVinci SPI speed.

2010-06-17 Thread Paulraj, Sandeep


> 
> On 01/06/10 12:36, Delio Brignoli wrote:
> > I have updated this patch based on the comments [1] by Wolfgang Denk and
> > removed unused variables.
> > [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]
> >
> > Reduce the number of reads per byte transferred on the BUF register from
> 2 to 1 and
> > take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138
> EVM,
> > SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with
> a 2Mbyte image file.
> > Remove unused variables in the spi_xfer() function.
> >
> > Signed-off-by: Delio Brignoli 
> > Tested-by: Ben Gardiner 
> 
> Sorry, I'm a bit late to the party on this.

It is late. Pull request already sent to Wolfgang
> 
> I have an alternative patch that tries to be even quicker, but I
> don't have the same platform as Delio, so can't compare like with
> like.

Compare it on your platform. I believe you have the OMAP L137.
And post the results.

> 
> This diff applies before Delio's patch. If it is any faster I am
> prepared to create a proper patch. If nobody can test it for speed
> I'll probably just drop it, since it produces a slightly bigger
> executable and I don't know that it is actually any faster...
> 
> In essence, it splits up read and write operations to avoid testing
> pointers in every loop iteration. It also unrolls the last iteration
> so that it doesn't have to test for loop ending twice each time
> round. Finally it avoids bit setting/clearing on each iteration when
> the results would only turn out to be the same anyway.
> 
> Here's the diff:
> 
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> index 60ba007..a90d2f4 100644
> --- a/drivers/spi/davinci_spi.c
> +++ b/drivers/spi/davinci_spi.c
> @@ -126,16 +126,98 @@ void spi_release_bus(struct spi_slave *slave)
>   writel(SPIGCR0_SPIRST_MASK, &ds->regs->gcr0);
>  }
> 
> -int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
> - const void *dout, void *din, unsigned long flags)
> +static inline u8 davinci_spi_read_data(struct davinci_spi_slave *ds, u32
> data)
> +{
> + unsigned intbuf_reg_val;
> + /* wait till TXFULL is deasserted */
> + while (readl(&ds->regs->buf) & SPIBUF_TXFULL_MASK)
> + ;
> + writel(data, &ds->regs->dat1);
> +
> + /* read the data - wait for data availability */
> + while ((buf_reg_val = readl(&ds->regs->buf)) & SPIBUF_RXEMPTY_MASK)
> + ;
> + return buf_reg_val & 0xFF;
> +}
> +
> +static int davinci_spi_read(struct spi_slave *slave, unsigned int len,
> + u8 *rxp, unsigned long flags)
>  {
>   struct davinci_spi_slave *ds = to_davinci_spi(slave);
> - unsigned intlen, data1_reg_val = readl(&ds->regs->dat1);
> - int ret, i;
> - const u8*txp = dout; /* dout can be NULL for read operation */
> - u8  *rxp = din;  /* din can be NULL for write operation */
> + unsigned int data1_reg_val = readl(&ds->regs->dat1);
> +
> + /* do an empty read to clear the current contents */
> + (void)readl(&ds->regs->buf);
> +
> + /* enable CS hold */
> + data1_reg_val |= ((1 << SPIDAT1_CSHOLD_SHIFT) |
> + (slave->cs << SPIDAT1_CSNR_SHIFT));
> + data1_reg_val &= ~0x;
> +
> + /* keep writing and reading 1 byte until only 1 byte left to read */
> + while ((len--) > 1) {
> + *rxp++ = davinci_spi_read_data(ds, data1_reg_val);
> + }
> 
> - ret = 0;
> + /*
> +  * clear CS hold when we reach the end.
> +  */
> + if (flags & SPI_XFER_END)
> + data1_reg_val &= ~(1 << SPIDAT1_CSHOLD_SHIFT);
> +
> + *rxp = davinci_spi_read_data(ds, data1_reg_val);
> +
> + return 0;
> +}
> +
> +static inline void davinci_spi_write_data(struct davinci_spi_slave *ds,
> u32 data)
> +{
> + /* wait till TXFULL is deasserted */
> + while (readl(&ds->regs->buf) & SPIBUF_TXFULL_MASK)
> + ;
> + writel(data, &ds->regs->dat1);
> +
> + /* wait for read data availability */
> + while (readl(&ds->regs->buf) & SPIBUF_RXEMPTY_MASK)
> + ;
> +}
> +
> +static int davinci_spi_write(struct spi_slave *slave, unsigned int len,
> + const u8 *txp, unsigned long flags)
> +{
> + struct davinci_spi_slave *ds = to_davinci_spi(slave);
> + unsigned int data1_reg_val = readl(&ds->regs->dat1);
> +
> + /* do an empty read to clear the current contents */
> + (void)readl(&ds->regs->buf);
> +
> + /* enable CS hold */
> + data1_reg_val |= ((1 << SPIDAT1_CSHOLD_SHIFT) |
> + (slave->cs << SPIDAT1_CSNR_SHIFT));
> + data1_reg_val &= ~0x;
> +
> + /* keep writing and reading 1 byte until only 1 byte left to write
> */
> + while ((len--) > 1) {
> + /* write the data */
> + davinci_spi_write_data(ds, data1_reg_val | *txp++);
> + }
> +
> + /*
> +  * clear CS hold when we reach the end.
>

Re: [U-Boot] [PATCH] DaVinci: Improve DaVinci SPI speed.

2010-06-17 Thread Nick Thompson
On 01/06/10 12:36, Delio Brignoli wrote:
> I have updated this patch based on the comments [1] by Wolfgang Denk and 
> removed unused variables.
> [1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]
> 
> Reduce the number of reads per byte transferred on the BUF register from 2 to 
> 1 and
> take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138 EVM, 
> SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with a 
> 2Mbyte image file.
> Remove unused variables in the spi_xfer() function.
> 
> Signed-off-by: Delio Brignoli 
> Tested-by: Ben Gardiner 

Sorry, I'm a bit late to the party on this.

I have an alternative patch that tries to be even quicker, but I
don't have the same platform as Delio, so can't compare like with
like.

This diff applies before Delio's patch. If it is any faster I am
prepared to create a proper patch. If nobody can test it for speed
I'll probably just drop it, since it produces a slightly bigger
executable and I don't know that it is actually any faster...

In essence, it splits up read and write operations to avoid testing
pointers in every loop iteration. It also unrolls the last iteration
so that it doesn't have to test for loop ending twice each time
round. Finally it avoids bit setting/clearing on each iteration when
the results would only turn out to be the same anyway.

Here's the diff:

diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 60ba007..a90d2f4 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -126,16 +126,98 @@ void spi_release_bus(struct spi_slave *slave)
writel(SPIGCR0_SPIRST_MASK, &ds->regs->gcr0);
 }
 
-int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
-   const void *dout, void *din, unsigned long flags)
+static inline u8 davinci_spi_read_data(struct davinci_spi_slave *ds, u32 data)
+{
+   unsigned intbuf_reg_val;
+   /* wait till TXFULL is deasserted */
+   while (readl(&ds->regs->buf) & SPIBUF_TXFULL_MASK)
+   ;
+   writel(data, &ds->regs->dat1);
+
+   /* read the data - wait for data availability */
+   while ((buf_reg_val = readl(&ds->regs->buf)) & SPIBUF_RXEMPTY_MASK)
+   ;
+   return buf_reg_val & 0xFF;
+}
+
+static int davinci_spi_read(struct spi_slave *slave, unsigned int len,
+   u8 *rxp, unsigned long flags)
 {
struct davinci_spi_slave *ds = to_davinci_spi(slave);
-   unsigned intlen, data1_reg_val = readl(&ds->regs->dat1);
-   int ret, i;
-   const u8*txp = dout; /* dout can be NULL for read operation */
-   u8  *rxp = din;  /* din can be NULL for write operation */
+   unsigned int data1_reg_val = readl(&ds->regs->dat1);
+
+   /* do an empty read to clear the current contents */
+   (void)readl(&ds->regs->buf);
+
+   /* enable CS hold */
+   data1_reg_val |= ((1 << SPIDAT1_CSHOLD_SHIFT) |
+   (slave->cs << SPIDAT1_CSNR_SHIFT));
+   data1_reg_val &= ~0x;
+
+   /* keep writing and reading 1 byte until only 1 byte left to read */
+   while ((len--) > 1) {
+   *rxp++ = davinci_spi_read_data(ds, data1_reg_val);
+   }
 
-   ret = 0;
+   /*
+* clear CS hold when we reach the end.
+*/
+   if (flags & SPI_XFER_END)
+   data1_reg_val &= ~(1 << SPIDAT1_CSHOLD_SHIFT);
+
+   *rxp = davinci_spi_read_data(ds, data1_reg_val);
+
+   return 0;
+}
+
+static inline void davinci_spi_write_data(struct davinci_spi_slave *ds, u32 
data)
+{
+   /* wait till TXFULL is deasserted */
+   while (readl(&ds->regs->buf) & SPIBUF_TXFULL_MASK)
+   ;
+   writel(data, &ds->regs->dat1);
+
+   /* wait for read data availability */
+   while (readl(&ds->regs->buf) & SPIBUF_RXEMPTY_MASK)
+   ;
+}
+
+static int davinci_spi_write(struct spi_slave *slave, unsigned int len,
+   const u8 *txp, unsigned long flags)
+{
+   struct davinci_spi_slave *ds = to_davinci_spi(slave);
+   unsigned int data1_reg_val = readl(&ds->regs->dat1);
+
+   /* do an empty read to clear the current contents */
+   (void)readl(&ds->regs->buf);
+
+   /* enable CS hold */
+   data1_reg_val |= ((1 << SPIDAT1_CSHOLD_SHIFT) |
+   (slave->cs << SPIDAT1_CSNR_SHIFT));
+   data1_reg_val &= ~0x;
+
+   /* keep writing and reading 1 byte until only 1 byte left to write */
+   while ((len--) > 1) {
+   /* write the data */
+   davinci_spi_write_data(ds, data1_reg_val | *txp++);
+   }
+
+   /*
+* clear CS hold when we reach the end.
+*/
+   if (flags & SPI_XFER_END)
+   data1_reg_val &= ~(1 << SPIDAT1_CSHOLD_SHIFT);
+
+   /* write the data */
+   davinci_spi_write_data(ds, data1_reg_val | *txp);
+
+   return 0;
+}
+
+int spi_xfer(struct spi_slave *slave, unsigned int 

Re: [U-Boot] Linux kernel hang with FDT changes

2010-06-17 Thread Ronny D
Thanks jerry i verified the fdt fixup code and found problem with my DTB 
creation.
By adding fixup for timebase-frequency in DTB kernel works fine.
 
-Ronny


--- On Wed, 16/6/10, Jerry Van Baren  wrote:


From: Jerry Van Baren 
Subject: Re: [U-Boot] Linux kernel hang with FDT changes
To: "Ronny D" 
Cc: "Stefan Roese" , "U-boot" 
Date: Wednesday, 16 June, 2010, 3:01 AM


Hi Ronny,

Just adding to Stefan's comments...

On Mon, 2010-06-14 at 13:27 +0200, Stefan Roese wrote:
> Hi Ronny,
> 
> On Monday 14 June 2010 12:00:38 Ronny D wrote:
> > I am using customized ppc440 based board.
> 
> BTW: Do you plan to send the U-Boot changes to the mailing list and some time?
>   
> > We have created a .dtb file, u-boot should not update the file because of
> > that we have added following macro in config file 
> > #define CONFIG_OF_LIBFDT                 1
> > #undef CONFIG_OF_BOARD_SETUP  

Is there a reason you *don't* want the board setup to run?
  
> > With the above change kernel code gets hang with following log:

Without the fixup, linux hangs.

[snip]

> > When we debug the u-boot code by added the following flag
> > #define CONFIG_OF_BOARD_SETUP   1
> > Kernel works fine.
> >  
> > Is there any dependency of CONFIG_OF_BOARD_SETUP flag for .dtb file?

With the fixup, it works.

In all cases I'm aware of, the fixup is a *good* thing.  Check the
source to see what is being fixed up.  The evidence is pretty clear that
you want the fixup. 

> With CONFIG_OF_BOARD_SETUP defined, the function ft_board_setup() will be 
> called to modify the dtb before passing it to the Linux kernel. I suggest you 
> check the code to see, what exactly gets changed/patched by this routine.

...and it is a good thing to run unless you have specific reasons not to
run it.  If you really don't want to run the fixup, it is indicating you
have a problem with your DTB (DTS) that you will have to figure out.  As
Stefan points out, the answer lies in the fixup code vs. your DTB.

> Cheers,
> Stefan

Best regards,
gvb




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


Re: [U-Boot] Linux kernel hang with FDT changes

2010-06-17 Thread Ronny D
I compared ft_board_setup() body with my .dts file for missing parameters, 
difference was timebase-frequency.
I have updated .dts file with the timebase-frequency parameter.
Now working fine
 
Thanks.
Ronny

--- On Mon, 14/6/10, Stefan Roese  wrote:


From: Stefan Roese 
Subject: Re: Linux kernel hang with FDT changes
To: "Ronny D" 
Cc: "U-boot" 
Date: Monday, 14 June, 2010, 11:27 AM


Hi Ronny,

On Monday 14 June 2010 12:00:38 Ronny D wrote:
> I am using customized ppc440 based board.

BTW: Do you plan to send the U-Boot changes to the mailing list and some time?
  
> We have created a .dtb file, u-boot should not update the file because of
> that we have added following macro in config file 
> #define CONFIG_OF_LIBFDT                 1
> #undef CONFIG_OF_BOARD_SETUP  
>  
> With the above change kernel code gets hang with following log:
> 
>  
> Movable zone start PFN for each node
> early_node_map[1] active PFN ranges
>     0: 0x -> 0x0003
> MMU: Allocated 1088 bytes of context maps for 255 contexts
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 195072
> Kernel command line:
> PID hash table entries: 4096 (order: 12, 16384 bytes)
> Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
> Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
> Memory: 755584k/786432k available (1860k kernel code, 30508k reserved, 112k
> data , 60k bss, 116k init)
> Kernel virtual memory layout:
>   * 0xe000..0xf000  : fixmap
>   * 0xfde0..0xfe00  : consistent mem
>   * 0xfddfe000..0xfde0  : early ioremap
>   * 0xf100..0xfddfe000  : vmalloc & ioremap
> SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> NR_IRQS:512
> UIC0 (32 IRQ sources) at DCR 0x20
> UIC1 (32 IRQ sources) at DCR 0x30
> UIC1 (32 IRQ sources) at DCR 0x60
> 
>  
>  
>  
> When we debug the u-boot code by added the following flag
> #define CONFIG_OF_BOARD_SETUP   1
> Kernel works fine.
>  
> Is there any dependency of CONFIG_OF_BOARD_SETUP flag for .dtb file?

With CONFIG_OF_BOARD_SETUP defined, the function ft_board_setup() will be 
called to modify the dtb before passing it to the Linux kernel. I suggest you 
check the code to see, what exactly gets changed/patched by this routine.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de


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


[U-Boot] Quick linker script questions - Assigning Values to Symbols outside the script

2010-06-17 Thread Graeme Russ
Hi All,

I'm messing around with consolidating the linker scripts for x86 so I have
a common platform script in the arch directory. x86 uses some fancy
offset calculations to place the Reset Vector and Reset Handler code at the
end of the Boot ROM. Currently this is done on a per-board basis.

Currently I have in the linker script:

. = 0xfe00;
.start32 : AT (TEXT_BASE + 0x3fe00) { KEEP(*(.start32)); }

. = 0xf800;
.start16 : AT (TEXT_BASE + 0x3f800) { KEEP(*(.start16)); }

. = 0xfff0;
.resetvec : AT (TEXT_BASE + 0x3fff0) { KEEP(*(.resetvec)); }

I want to replace this with:

FLASH_SIZE  = 0x4;
START_32= 0xfe00;
START_16= 0xf800;
RESET_SEG_START = 0x;
RESET_SEG_SIZE  = 0x1;
RESET_VEC_LOC   = 0xfff0;

. = RESET_SEG_START + START_32;
.start32 : AT (TEXT_BASE + (FLASH_SIZE - RESET_SEG_SIZE + START_32))
{KEEP(*(.start32)); }

. = START_16;
.start16 : AT (TEXT_BASE + (FLASH_SIZE - RESET_SEG_SIZE + START_16))
{KEEP(*(.start16)); }

. = RESET_VEC_LOC;
.resetvec : AT (TEXT_BASE + (FLASH_SIZE - RESET_SEG_SIZE + RESET_VEC_LOC))
{ KEEP(*(.resetvec)); }

Now that looks far more complicated, but it allows the Boot ROM size to be
defined without having to calculate, by hand, where these sections need to
be placed. It also allows the location of (and therefore the size allocated
to) the 16-bit and 32-bit boot-strap code (which always runs from the Boot
ROM) to be adjusted to maximise that amount of space for the main U-Boot
binary.

FLASH_SIZE, START_32, and START_16 are really the only board specific
definitions (and even then, for the majority of use-cases only FLASH_SIZE
would need adjusting). So I would like to move the bulk of the linker
script to $(SRCTREE)/arch/x86/cpu/u-boot.lds and have these three defined
in something like $(SRCTREE)/board/$(BOARDDIR)/board_defs.lds

But things are not working the way I want them to. The following works...

$(SRCTREE)/board/$(BOARDDIR)/board_defs.lds
FLASH_SIZE  = 0x4;
START_32= 0xfa00;
START_16= 0xff00;

$(SRCTREE)/arch/x86/cpu/u-boot.lds
RESET_SEG_START = 0x;
RESET_SEG_SIZE  = 0x1;
RESET_VEC_LOC   = 0xfff0;

INCLUDE /home/graeme/Source/U-Boot/x86/board/eNET/board_defs.lds
SECTIONS
{
. = TEXT_BASE;  /* Location of bootcode in flash */
_i386boot_text_start = .;
.text  : { *(.text); }
etc...

But the following will not...

$(SRCTREE)/board/$(BOARDDIR)/board_defs.lds
FLASH_SIZE  = 0x4;
START_32= 0xfa00;
START_16= 0xff00;

$(SRCTREE)/board/$(BOARDDIR)/config.mk
PLATFORM_LIBS += -L $(SRCTREE)/board/$(BOARDDIR)

$(SRCTREE)/arch/x86/cpu/u-boot.lds
RESET_SEG_START = 0x;
RESET_SEG_SIZE  = 0x1;
RESET_VEC_LOC   = 0xfff0;

INCLUDE board_defs.lds
SECTIONS
{
. = TEXT_BASE;  /* Location of bootcode in flash */
_i386boot_text_start = .;
.text  : { *(.text); }
etc...

>From the binutils documentation:

INCLUDE filename
Include the linker script filename at this point. The file will be
searched for in the current directory, and in any directory specified with
the -L option. You can nest calls to INCLUDE up to 10 levels deep.

and the additional PLATFORM_LIBS does add -L
/home/graeme/Source/U-Boot/x86/board/eNET to the link command. I even tried
PLATFORM_LDFLAGS += -L $(SRCTREE)/board/$(BOARDDIR) which changes the
location of the addition -L in the link command with no luck.

Back to binutils documentation:

-T scriptfile
--script=scriptfile
Use scriptfile as the linker script. This script replaces ld's default
linker script (rather than adding to it), so commandfile must specify
everything necessary to describe the output file. See Scripts. If
scriptfile does not exist in the current directory, ld looks for it in the
directories specified by any preceding `-L' options. Multiple `-T' options
accumulate.

Note the last sentence "Multiple `-T' options accumulate."

Now if I change $(SRCTREE)/config.mk slightly at around line 205 to add an
Implicit Linker Script...

AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
LDFLAGS += -T $(SRCTREE)/board/$(BOARDDIR)/board_defs.lds
LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
ifneq ($(TEXT_BASE),)
LDFLAGS += -Ttext $(TEXT_BASE)
endif

Everything works perfectly fine. But this is a horrible hack. Alas, there
is no mechanism right now to add ld flags before the ones explicitly
defined in config.mk.

Unless I can find out why -L is not working, I'm thinking of adding a new
$(PLATFORM_PRE_LDFLAGS) and changing $(SRCTREE)/config.mk to:

LDFLAGS += $(PLATFORM_PRE_LDFLAGS) -Bstatic -T $(obj)u-boot.lds
$(PLATFORM_LDFLAGS)

I could also but some hacks into the $(BOARD)_config in the Makefile to
patch the linker script but I think that is a bad idea.

Or maybe there is an easier way?

Anyone have any thoughts on this?

Regards,

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


[U-Boot] Pull request u-boot-marvell.git

2010-06-17 Thread Prafulla Wadaskar
Hi Tom

Pls pull

The following changes since commit 376e7fadbad3285231e390c6534feb5af86d594b:
  Minkyu Kang (1):
SAMSUNG: goni: add the GPL licence

are available in the git repository at:

  u-boot-marvrell.git .. Master branch..

Albert Aribaud (3):
  Initial support for Marvell Orion5x SoC
  Add Orion5x support to 16550 device driver
  Add support for the LaCie ED Mini V2 board

 MAINTAINERS|4 +
 MAKEALL|1 +
 Makefile   |3 +
 arch/arm/cpu/arm926ejs/orion5x/Makefile|   55 +
 arch/arm/cpu/arm926ejs/orion5x/cpu.c   |  270 ++
 arch/arm/cpu/arm926ejs/orion5x/dram.c  |   64 +
 arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S |  293 
 arch/arm/cpu/arm926ejs/orion5x/timer.c |  181 +++
 arch/arm/include/asm/arch-orion5x/cpu.h|  203 
 arch/arm/include/asm/arch-orion5x/mv88f5182.h  |   40 
 arch/arm/include/asm/arch-orion5x/orion5x.h|   69 ++
 board/LaCie/edminiv2/Makefile  |   53 +
 board/LaCie/edminiv2/config.mk |   27 +++
 board/LaCie/edminiv2/edminiv2.c|   92 
 drivers/serial/serial.c|3 +
 include/configs/edminiv2.h |  172 ++
 16 files changed, 1530 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/orion5x/Makefile
 create mode 100644 arch/arm/cpu/arm926ejs/orion5x/cpu.c
 create mode 100644 arch/arm/cpu/arm926ejs/orion5x/dram.c
 create mode 100644 arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S
 create mode 100644 arch/arm/cpu/arm926ejs/orion5x/timer.c
 create mode 100644 arch/arm/include/asm/arch-orion5x/cpu.h
 create mode 100644 arch/arm/include/asm/arch-orion5x/mv88f5182.h
 create mode 100644 arch/arm/include/asm/arch-orion5x/orion5x.h
 create mode 100644 board/LaCie/edminiv2/Makefile
 create mode 100644 board/LaCie/edminiv2/config.mk
 create mode 100644 board/LaCie/edminiv2/edminiv2.c
 create mode 100644 include/configs/edminiv2.h

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


Re: [U-Boot] [PATCH V8 1/3] Initial support for Marvell Orion5x SoC

2010-06-17 Thread Albert ARIBAUD
Le 17/06/2010 12:16, Prafulla Wadaskar a écrit :

> Applied to u-boot-marvell.git master branch
>
> Regards..
> Prafulla . .

Thanks!

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


Re: [U-Boot] [PATCH V8 3/3] Add support for the LaCie ED Mini V2 board

2010-06-17 Thread Prafulla Wadaskar
 

> -Original Message-
> From: u-boot-boun...@lists.denx.de 
> [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Monday, June 14, 2010 2:14 PM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] [PATCH V8 3/3] Add support for the LaCie ED 
> Mini V2 board
> 
> This patch adds support for the LaCie ED Mini V2 product
> which is based on the Marvell Orion5x SoC.
> 
> Signed-off-by: Albert Aribaud 
> ---
>  MAINTAINERS |4 +
>  MAKEALL |1 +
>  Makefile|3 +
>  board/LaCie/edminiv2/Makefile   |   53 
>  board/LaCie/edminiv2/config.mk  |   27 ++
>  board/LaCie/edminiv2/edminiv2.c |   92 +
>  include/configs/edminiv2.h  |  172 
> +++
>  7 files changed, 352 insertions(+), 0 deletions(-)
>  create mode 100644 board/LaCie/edminiv2/Makefile
>  create mode 100644 board/LaCie/edminiv2/config.mk
>  create mode 100644 board/LaCie/edminiv2/edminiv2.c
>  create mode 100644 include/configs/edminiv2.h
>

Applied to u-boot-marvell.git master branch

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


Re: [U-Boot] [PATCH V8 2/3] Add Orion5x support to 16550 device driver

2010-06-17 Thread Prafulla Wadaskar
 

> -Original Message-
> From: u-boot-boun...@lists.denx.de 
> [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Monday, June 14, 2010 2:14 PM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] [PATCH V8 2/3] Add Orion5x support to 16550 
> device driver
> 
> This patch provides access to the 16550-compatible
> serial device of the Orion5x SoC.
> 
> Signed-off-by: Albert Aribaud 
> ---
>  drivers/serial/serial.c |3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
> index 8eda95c..1073ac0 100644
> --- a/drivers/serial/serial.c
> +++ b/drivers/serial/serial.c
> @@ -30,6 +30,9 @@
>  #ifdef CONFIG_KIRKWOOD
>  #include 
>  #endif
> +#ifdef CONFIG_ORION5X
> +#include 
> +#endif
>  
>  #if defined (CONFIG_SERIAL_MULTI)
>  #include 
> -- 
> 1.6.4.4

Applied to u-boot-marvell.git master branch

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


Re: [U-Boot] [PATCH V8 1/3] Initial support for Marvell Orion5x SoC

2010-06-17 Thread Prafulla Wadaskar
 

> -Original Message-
> From: u-boot-boun...@lists.denx.de 
> [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Monday, June 14, 2010 2:14 PM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] [PATCH V8 1/3] Initial support for Marvell 
> Orion5x SoC
> 
> This patch adds support for the Marvell Orion5x SoC.
> It has no use alone, and must be followed by a patch
> to add Orion5x support for serial, then support for
> the ED Mini V2, an Orion5x-based product from LaCie.
> 
> Signed-off-by: Albert Aribaud 
> ---
> Patchset history
> 
> V1: Initial monolithic patch.
> V2: split in three patches : orion, serial, edmini;
> checkpatch'ed, with only 6 errors, in patch 1/3,
> all 6 errors being false positives.
> V3: useless GPIO and MPP programming support removed;
> low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
> V4: all files licensed GPLv2-only removed;
> RAM bank size detection now uses get_ram_size().
> V5: Replaced macros by C structs in dram code.
> Removed compilation warnings in dram code.
> Added comments to legacy flash definitions.
> Split low level init code into SoC- and Chip-specifics.
> V6: Set copyright dates to 2010, and put standard GPL notice
> mentioning Marvell's copyright on *_lowlevel_init.S files.
> V7: Moved GPIO and MPP init code in SoC arch_misc_init() in C.
> lowlevel_init.S now only contains DRAM init code.
> V8: Removed comments around GPIO/MPP initialization code.
> 
> Patch 1 checkpatched with 0 errors and 1 spurious warning.
> Patches 2 and 3 checkpatched with 0 errors and 0 warnings.
> 
>  arch/arm/cpu/arm926ejs/orion5x/Makefile|   55 +
>  arch/arm/cpu/arm926ejs/orion5x/cpu.c   |  270 
> ++
>  arch/arm/cpu/arm926ejs/orion5x/dram.c  |   64 +
>  arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S |  293 
> 
>  arch/arm/cpu/arm926ejs/orion5x/timer.c |  181 +++
>  arch/arm/include/asm/arch-orion5x/cpu.h|  203 
> 
>  arch/arm/include/asm/arch-orion5x/mv88f5182.h  |   40 
>  arch/arm/include/asm/arch-orion5x/orion5x.h|   69 ++
>  8 files changed, 1175 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/Makefile
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/cpu.c
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/dram.c
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S
>  create mode 100644 arch/arm/cpu/arm926ejs/orion5x/timer.c
>  create mode 100644 arch/arm/include/asm/arch-orion5x/cpu.h
>  create mode 100644 arch/arm/include/asm/arch-orion5x/mv88f5182.h
>  create mode 100644 arch/arm/include/asm/arch-orion5x/orion5x.h
> 

Applied to u-boot-marvell.git master branch

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


Re: [U-Boot] random exception on ppc based board

2010-06-17 Thread Thirumalai
- Original Message - 
From: "Thirumalai" 
To: ; 
Sent: Saturday, June 12, 2010 10:40 AM
Subject: [U-Boot] random exception on ppc based board


> Hi,
>I am having a ppc based target on which linux-2.4.20 kernel is running
> with u-boot 1.3.4 as boot loader. The target is having MPC7410 as 
> processor
> and MPC107 as system controller. Regarding memory it is having 128 MB of 
> ram
> and 16 MB of Flash memory. Also the kernel is patched with RTLinux-3.2 for
> realtime performance. I am getting a random Program and DSI exception on 
> the
> target. Normally the exeption occurs during loading of rtl_time.o. The 
> panic
> message is given below.
>
> ==
> Using /usr/rtlinux/modules/rtl_time.okernel BUG at page_alloc.c:221!
> Oops: Exception in kernel mode, sig: 4
> NIP: C0032980 XER:  LR: C0032980 SP: C7CEDBA0 REGS: c7cedaf0 TRAP:
> 0700Not tainted
> MSR: 00089032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> TASK = c7cec000[366] 'exe' Last syscall: 3
> last math c7cec000 last altivec 
> GPR00: C0032980 C7CEDBA0 C7CEC000 0020 0001 0001 1137
> 
> GPR08: 0002  CD879EC0 C7CEDAB0 CD876108 C0011934 
> 
> GPR16: 0004 0001 C002A0E8 C789E840 9032 07CEDD90 C01A2C70
> C01A2C70
> GPR24: 0001  C016E080  C79966E0  C016E0B8
> C016E0C4
> Call backtrace:
> C0032980 C0033020 C0032C4C C0025A18 C0025B58 C0025D8C C000EF88
> C0005D48 C03A8B28 C0029B28 C002A258 C003A99C C0005AFC 
> 0FF15DBC 0FF175DC 0FF09894 10012190 100127D0 100356AC 100352A4
> 0FEBCF6C 
>
> Oops: kernel access of bad area, sig: 11
> NIP: C00326DC XER:  LR: C0032588 SP: C7CED880 REGS: c7ced7d0 TRAP:
> 0300Not tainted
> MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: , DSISR: 4200
> TASK = c7cec000[366] 'exe' Last syscall: 3
> last math c7cec000 last altivec 
> GPR00:  C7CED880 C7CEC000 C7CED888  30026000 C0388250
> 
> GPR08: 8000  00155210  CD876CD4 C0032588 
> 
> GPR16: 0004 0001 C002A0E8 C789E840 9032 C01A2C70 C01A2C70
> C016E130
> GPR24: C0233024 C0388234 3E06 7C0C C016E080 FFFE C016E0B8
> C0388260
> Call backtrace:
> C003249C C0033398 C0033B18 C00243D8 C0026234 C00246D0 C0027A70
> C001326C C00187D4 C0005ED4 C0005F44 C00062B0 C0005D48 C0032980
> C0033020 C0032C4C C0025A18 C0025B58 C0025D8C C000EF88 C0005D48
> C03A8B28 C0029B28 C002A258 C003A99C C0005AFC  0FF15DBC
> 0FF175DC 0FF09894 10012190 100127D0 100356AC
> Illegal instruction
> 
> Sometimes i am getting the following panic message.
> ===
> Oops: kernel access of bad area, sig: 11
> NIP: C0033360 XER: 2000 LR: C00DE9A8 SP: C016C0D0 REGS: c016c020 TRAP:
> 0300Tainted: P
> MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 03910018, DSISR: 4000
> TASK = c016a480[0] 'swapper' Last syscall: 120
> last math c505c000 last altivec 
> GPR00: C00DE9A8 C016C0D0 C016A480 0391   C5A469DC
> 
> GPR08: 0001 03910014 0043 C5A2FE20 2490C022 C0030A04 07FF0D00
> 
> GPR16: 00044008    1032 0003 
> 0A050393
> GPR24: C5A46980 C5A2F842 0040  C5A2F842 C01C C5A46980
> 0001
> Call backtrace:
> 0040 C00DE9A8 C00DE9DC C00DEB28 C01163D4 C01166EC C00F4898
> C00F44E4 C00F4AC8 C00F468C C00E3664 C00E3810 C00E397C C001A200
> C0007620 CD876CAC C0005D40 C000744C C0007460 C0003918 C01815E0
> 35F0
> Kernel panic: Aiee, killing interrupt handler!
> In interrupt handler - not syncing
> <0>Rebooting in 180 seconds..
> 
>
>
> How to debug this???
>
> -Thirumalai
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Hi all,
We fixed this problem. When we ran e2fsck -f ramdisk.img it shown me 
0.9% non-contiguos block. So we tried to defragment the ramdisk image using 
e2defrag utility. After this the problem disappeared. But i don't know how 
an ext2 file system is getting fragmented ? Also how this particular file 
(rtl_time.o) is getting fragmented?

Any clue?
-Thirumalai 

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