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

2011-08-21 Thread Albert ARIBAUD
Hi Prafulla,

Le 21/08/2011 15:00, Prafulla Wadaskar a écrit :
>
>
>> -Original Message-
>> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
>> Sent: Sunday, August 21, 2011 3:46 PM
>> To: Prafulla Wadaskar
>> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
>> Subject: Re: Pull request u-boot-marvell.git
>>
>> Hi Prafulla,
>>
>> Le 21/08/2011 10:15, Prafulla Wadaskar a écrit :
>>>
>>>
 -Original Message-
 From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
 Sent: Sunday, August 21, 2011 1:36 PM
 To: Prafulla Wadaskar
 Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
 Subject: Re: Pull request u-boot-marvell.git

 Hi Prafulla,

 Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> Hi Albert
>
> Please kindly pull
> The following changes since commit
 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
>  Prafulla Wadaskar (1):
>Merge branch 'master' of
 git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
>
> are available in the git repository at:
>
>  u-boot-marvell.git master branch.
>
> Ajay Bhargav (2):
>  gpio: Add GPIO driver framework for Marvell SoCs
>  gpio: Add GPIO driver for Marvell SoC Armada100
>
> arch/arm/include/asm/arch-armada100/gpio.h |   48 
> drivers/gpio/Makefile  |1 +
> drivers/gpio/mvgpio.c  |  115
 
> drivers/gpio/mvgpio.h  |   74
>> ++
> 4 files changed, 238 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
> create mode 100644 drivers/gpio/mvgpio.c
> create mode 100644 drivers/gpio/mvgpio.h
>
> Regards..
> Prafulla . .

 One question, to you, and one note, to all ARM custodians:

 The question, about the patches:

 These were submitted on 2011/07/21, after the merge window close of
 2011/07/16, and are not a bugfix, right? If so they should only go to
 master after the september release -- I can pull them into
 u-boot-arm/next if you want then out of your plate, though.
>>>
>>> Hi Albert,
>>> You are right, you may pull them to your next branch.
>>> I am sorry, it's my mistake I should have pulled and requested on next
>> branch.
>>
>> Ok. To avoid any issue, I'll cherry-pick these two onto utboo-arm/next.
>>
>> Maybe you'll want to roll back your own master and move them to your own
>> next, too.
>
> If you have not cherry picked. I will move them to next and will provide a 
> fresh pull request. With suggested rollbacks.

Please do, thanks in advance!

> Regards..
> Prafulla . .

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


Re: [U-Boot] Urgent : Regd. Cortex A9 quad core versatile express ca9x4_ct_vxp support in U-Boot..

2011-08-21 Thread Sandeep Kumar
Hi Matt,

We are in a process of developing a SoC around cortex a9 quad core
versatile express. For that we made changes in the U-Boot. Is there any
way (like any simulator/emulator which supports this board) to validate
the changes before getting the arm board itself.

Any kind of help is highly appreciated.

-- 
Thanks and Regards,
Sandeep Kumar 

On Sun, 2011-08-21 at 22:17 -0600, Matt Waddel wrote:

> Hi Sandeep,
> 
> On 08/21/2011 12:37 AM, Sandeep Kumar wrote:
> > Hi all,
> > 
> > I am trying to use U-Boot for cortex A9 quad core versatile express board. 
> > I saw that the support is already added
> > for that board but i am not able to find out the DDR initialization code
> > anywhere before using the stack. In fact i didn't find the DDR
> > initialization code anywhere for this board. This board also comes along
> > with a CLCD (color LCD) controller which is also not initialized
> > anywhere for this board. Is the support for this board is tested as
> > without initializing the DDR how the code relocation and execution from
> > DDR is possible.
> 
> Sorry for not responding sooner.
> 
> Currently the DDR setup is handled by the ARM boot monitor code
> and u-boot runs as the 2nd stage bootloader. So DDR setup is
> not done in u-boot.
> 
> Also, the CLCD is not setup in u-boot.
> 
> --Matt
> 
> > 
> > Any kind of pointers will be very helpful.
> > 
> > 
> > 
> > 
> > ___
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Congratulations Dear Beneficiary

2011-08-21 Thread United Nations Compensation Board
United Nations Compensation Board

Congratulations dear beneficiary,

Your email has been selected by the United Nations Compensation Board
For a cash grant award of Nine hundred and Fifty Thousand United States 
Dollars,($950,000.00 USD) for this year 2011 New year Grant Award. Your email 
address was selected during our random email balloting for the cash grant and 
if you received this notification, it means that you are a lucky beneficiary of 
this cash grant award.

The United Nations authorities have decided to give this award to 15 
beneficiaries from all over the world to help facilitate and improve the 
standard of living to the Commission.

This also includes SCAM VICTIMS, EVERY FOREIGN CONTRACTOR that may have not 
received their contract sum, and people that have had an unfinished transaction 
or international businesses that failed due to Government problems etc. We 
found your contact in our list as one of the lucky beneficiary of the cash 
grant of Nine hundred and Fifty Thousand United States Dollars, ($950,000.00 
USD).

This grant is been aided by the United Nations development programme and the 
United Nations trust funds for human security. Your cash grant pin number is 
(UNO-154/4456/011).

This meeting was first held on the 8th of April 2003. You can view this page for
Your perusal: http://www.un.org/News/Press/docs/2003/ik344.doc.htm
Assess Code: 8911-89-QDR

You are kindly obliged to contact our corresponding UN Payment office (United 
Nations Trust Funds) in West Africa and they will give details on how your 
funds would be remitted to you. Do contact our payment office:

Payment Officer: Mr. Mark Steven
Email: unitednationscompensat...@live.com

Immediately with the following information, below for proper verification and 
documentation.

1. FULL NAMES OF BENEFICIARY: ..
2. RESIDENTIAL ADDRESS: .
3. DATE OF BIRTH: .
4. PIN NUMBER: ...
5. PHONE/FAX NUMBERS: ...
6. SEX: .
7. OCCUPATION: ..
8. MARITAL STATUS:. .
9. COUNTRY:. ...
10. NATIONALITY: .

Note: PLEASE DO NOT RESPOND IF YOU DON'T WISH TO BE COMPENSATED, AS ONLY 
SERIOUS PERSON'S WILL BE ATTENDED TO YOU AND PAID FULLY.

Thank you for your co-operation
Regards,
Mr. Kofi Anan
Former secretary to
The UnitedNation. and
Mr. Ban Ki-moon.
THE NEW UNITED NATIONS SECRETARY GENERAL
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] net: Adds Fast Ethernet Controller driver for Armada100

2011-08-21 Thread Ajay Bhargav
This patch adds support for Fast Ethernet Controller driver for
Armada100 series.

Signed-off-by: Ajay Bhargav 
---
 arch/arm/include/asm/arch-armada100/armada100.h |1 +
 drivers/net/Makefile|1 +
 drivers/net/armada100_fec.c |  802 +++
 drivers/net/armada100_fec.h |  225 +++
 include/netdev.h|1 +
 5 files changed, 1030 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/armada100_fec.c
 create mode 100644 drivers/net/armada100_fec.h

diff --git a/arch/arm/include/asm/arch-armada100/armada100.h 
b/arch/arm/include/asm/arch-armada100/armada100.h
index d5d125a..3d567eb 100644
--- a/arch/arm/include/asm/arch-armada100/armada100.h
+++ b/arch/arm/include/asm/arch-armada100/armada100.h
@@ -59,6 +59,7 @@
 #define ARMD1_MPMU_BASE0xD405
 #define ARMD1_APMU_BASE0xD4282800
 #define ARMD1_CPU_BASE 0xD4282C00
+#define ARMD1_FEC_BASE 0xC080
 
 /*
  * Main Power Management (MPMU) Registers
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 819b197..34b4322 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -28,6 +28,7 @@ LIB   := $(obj)libnet.o
 COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o
 COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o
+COBJS-$(CONFIG_ARMADA100_FEC) += armada100_fec.o
 COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o
 COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o
 COBJS-$(CONFIG_BCM570x) += bcm570x.o
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
new file mode 100644
index 000..67fd73d
--- /dev/null
+++ b/drivers/net/armada100_fec.c
@@ -0,0 +1,802 @@
+/*
+ * (C) Copyright 2011
+ * eInfochips Ltd. 
+ * Written-by: Ajay Bhargav 
+ *
+ * (C) Copyright 2010
+ * Marvell Semiconductor 
+ * Contributor: Mahavir Jain 
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "armada100_fec.h"
+
+#define  PHY_ADR_REQ 0xFF  /* Magic number to read/write PHY address */
+
+#ifdef ETH_DUMP_REGS
+static int eth_dump_regs(struct eth_device *dev)
+{
+   struct armdfec_device *darmdfec = to_darmdfec(dev);
+   struct armdfec_reg *regs = darmdfec->regs;
+   unsigned int i = 0;
+
+   printf("\noffset: phy_adr, value: 0x%x\n", readl(®s->phyadr));
+   printf("offset: smi, value: 0x%x\n", readl(®s->smi));
+   for (i = 0x400; i <= 0x4e4; i += 4)
+   printf("offset: 0x%x, value: 0x%x\n",
+   i, readl(ARMD1_FEC_BASE + i));
+   return 0;
+}
+#endif
+
+static u8 get_random_byte(u8 seed)
+{
+   udelay(seed * 1000);
+   return (u8)(read_timer());
+}
+
+static int smi_reg_read(const char *devname, u8 phy_addr, u8 phy_reg,
+   u16 *value)
+{
+   struct eth_device *dev = eth_get_dev_by_name(devname);
+   struct armdfec_device *darmdfec = to_darmdfec(dev);
+   struct armdfec_reg *regs = darmdfec->regs;
+   u32 val, reg_data;
+   int i = 0;
+
+   if (phy_addr == PHY_ADR_REQ && phy_reg == PHY_ADR_REQ) {
+   reg_data = readl(®s->phyadr);
+   *value = (u16) (reg_data & 0x1f);
+   return 0;
+   }
+
+   /* check parameters */
+   if (phy_addr > PHY_MASK) {
+   printf("Err..(%s) Invalid phy address: 0x%X\n",
+   __func__, phy_addr);
+   return -EINVAL;
+   }
+   if (phy_reg > PHY_MASK) {
+   printf("Err..(%s) Invalid register offset: 0x%X\n",
+   __func__, phy_reg);
+   return -EINVAL;
+   }
+
+   /* wait for the SMI register to become available */
+   for (i = 0; (val = readl(®s->smi)) & SMI_BUSY; i++) {
+
+   if (i == PHY_WAIT_ITERATIONS) {
+   printf("Error (%s) PHY busy timeout\n",
+   __func__);
+   return -1;
+   }
+   udelay(PHY_WAIT_MICRO_SECONDS);
+   }
+
+   writel(((phy_addr << 16) | (phy_reg << 21

[U-Boot] [PATCH 2/3] Armada100: Enable Ethernet support for GplugD

2011-08-21 Thread Ajay Bhargav
This patch enables ethernet support for Marvell GplugD board. Network
related commands works.

Signed-off-by: Ajay Bhargav 
---
 arch/arm/include/asm/arch-armada100/armada100.h |   57 +++
 arch/arm/include/asm/arch-armada100/mfp.h   |   19 
 board/Marvell/gplugd/gplugd.c   |   39 +++
 include/configs/gplugd.h|   20 +++-
 4 files changed, 133 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-armada100/armada100.h 
b/arch/arm/include/asm/arch-armada100/armada100.h
index 3d567eb..849638d 100644
--- a/arch/arm/include/asm/arch-armada100/armada100.h
+++ b/arch/arm/include/asm/arch-armada100/armada100.h
@@ -41,6 +41,10 @@
 /* Functional Clock Selection Mask */
 #define APBC_FNCLKSEL(x)(((x) & 0xf) << 4)
 
+/* Fast Ethernet Controller Clock register definition */
+#define FE_CLK_RST 0x1
+#define FE_CLK_ENA 0x8
+
 /* Register Base Addresses */
 #define ARMD1_DRAM_BASE0xB000
 #define ARMD1_TIMER_BASE   0xD4014000
@@ -85,6 +89,59 @@ struct armd1mpmu_registers {
 };
 
 /*
+ * Application Subsystem Power Management
+ * Refer Datasheet Appendix A.9
+ */
+struct armd1apmu_registers {
+   u32 pcr;/* 0x000 */
+   u32 ccr;/* 0x004 */
+   u32 pad1;
+   u32 ccsr;   /* 0x00C */
+   u32 fc_timer;   /* 0x010 */
+   u32 pad2;
+   u32 ideal_cfg;  /* 0x018 */
+   u8 pad3[0x04C - 0x018 - 4];
+   u32 lcdcrc; /* 0x04C */
+   u32 cciccrc;/* 0x050 */
+   u32 sd1crc; /* 0x054 */
+   u32 sd2crc; /* 0x058 */
+   u32 usbcrc; /* 0x05C */
+   u32 nfccrc; /* 0x060 */
+   u32 dmacrc; /* 0x064 */
+   u32 pad4;
+   u32 buscrc; /* 0x06C */
+   u8 pad5[0x07C - 0x06C - 4];
+   u32 wake_clr;   /* 0x07C */
+   u8 pad6[0x090 - 0x07C - 4];
+   u32 core_status;/* 0x090 */
+   u32 rfsc;   /* 0x094 */
+   u32 imr;/* 0x098 */
+   u32 irwc;   /* 0x09C */
+   u32 isr;/* 0x0A0 */
+   u8 pad7[0x0B0 - 0x0A0 - 4];
+   u32 mhst;   /* 0x0B0 */
+   u32 msr;/* 0x0B4 */
+   u8 pad8[0x0C0 - 0x0B4 - 4];
+   u32 msst;   /* 0x0C0 */
+   u32 pllss;  /* 0x0C4 */
+   u32 smb;/* 0x0C8 */
+   u32 gccrc;  /* 0x0CC */
+   u8 pad9[0x0D4 - 0x0CC - 4];
+   u32 smccrc; /* 0x0D4 */
+   u32 pad10;
+   u32 xdcrc;  /* 0x0DC */
+   u32 sd3crc; /* 0x0E0 */
+   u32 sd4crc; /* 0x0E4 */
+   u8 pad11[0x0F0 - 0x0E4 - 4];
+   u32 cfcrc;  /* 0x0F0 */
+   u32 mspcrc; /* 0x0F4 */
+   u32 cmucrc; /* 0x0F8 */
+   u32 fecrc;  /* 0x0FC */
+   u32 pciecrc;/* 0x100 */
+   u32 epdcrc; /* 0x104 */
+};
+
+/*
  * APB1 Clock Reset/Control Registers
  * Refer Datasheet Appendix A.10
  */
diff --git a/arch/arm/include/asm/arch-armada100/mfp.h 
b/arch/arm/include/asm/arch-armada100/mfp.h
index d6e0494..da76b58 100644
--- a/arch/arm/include/asm/arch-armada100/mfp.h
+++ b/arch/arm/include/asm/arch-armada100/mfp.h
@@ -64,6 +64,25 @@
 #define MFP105_CI2C_SDA(MFP_REG(0x1a4) | MFP_AF1 | 
MFP_DRIVE_MEDIUM)
 #define MFP106_CI2C_SCL(MFP_REG(0x1a8) | MFP_AF1 | 
MFP_DRIVE_MEDIUM)
 
+/* Fast Ethernet */
+#define MFP086_ETH_TXCLK   (MFP_REG(0x158) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP087_ETH_TXEN(MFP_REG(0x15C) | MFP_AF5 | 
MFP_DRIVE_MEDIUM)
+#define MFP088_ETH_TXDQ3   (MFP_REG(0x160) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP089_ETH_TXDQ2   (MFP_REG(0x164) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP090_ETH_TXDQ1   (MFP_REG(0x168) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP091_ETH_TXDQ0   (MFP_REG(0x16C) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP092_ETH_CRS (MFP_REG(0x170) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP093_ETH_COL (MFP_REG(0x174) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP094_ETH_RXCLK   (MFP_REG(0x178) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP095_ETH_RXER(MFP_REG(0x17C) | MFP_AF5 | 
MFP_DRIVE_MEDIUM)
+#define MFP096_ETH_RXDQ3   (MFP_REG(0x180) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP097_ETH_RXDQ2   (MFP_REG(0x184) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP098_ETH_RXDQ1   (MFP_REG(0x188) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP099_ETH_RXDQ0   (MFP_REG(0x18C) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP100_ETH_MDC (MFP_REG(0x190) | MFP_AF5 | MFP_DRIVE_MEDIUM)
+#define MFP101_ETH_MDIO(MFP_REG(0x194) | MFP_AF5 | 
MFP_DRIVE_MEDIUM)
+#define MFP103_ETH_RXDV(MFP_REG(0x19C) | MFP_AF5 | 
MFP_DRIV

[U-Boot] [PATCH 3/3] Armada100: Enable 88E3015 PHY support for GplugD

2011-08-21 Thread Ajay Bhargav
This patch adds support for 88E3015 PHY for Marvell GplugD board.
This patch depends on series of patch which adds support for Marvell
GuruPlug-Display.

Signed-off-by: Ajay Bhargav 
---
 board/Marvell/gplugd/gplugd.c |   34 +-
 include/configs/gplugd.h  |   15 ++-
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index ac5e35f..fd2e574 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -32,6 +32,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #ifdef CONFIG_ARMADA100_FEC
 #include 
@@ -83,6 +85,11 @@ int board_init(void)
gd->bd->bi_arch_number = MACH_TYPE_SHEEVAD;
/* adress of boot parameters */
gd->bd->bi_boot_params = armd1_sdram_base(0) + 0x100;
+   /* Assert PHY_RST# */
+   gpio_direction_output(CONFIG_SYS_GPIO_PHY_RST, GPIO_LOW);
+   udelay(10);
+   /* Deassert PHY_RST# */
+   gpio_set_value(CONFIG_SYS_GPIO_PHY_RST, GPIO_HIGH);
return 0;
 }
 
@@ -97,5 +104,30 @@ int board_eth_init(bd_t *bis)
 
return armada100_fec_initialize();
 }
-#endif /* CONFIG_ARMADA100_FEC */
+#ifdef CONFIG_RESET_PHY_R
+/* Configure and initialize PHY chip 88E3015 */
+void reset_phy(void)
+{
+   u16 phy_adr;
+   const char *name = "armd-fec0";
+
+   if (miiphy_set_current_dev(name))
+   return;
+
+   /* command to read PHY dev address */
+   if (miiphy_read(name, 0xff, 0xff, (u16 *) &phy_adr)) {
+   printf("Err..%s could not read PHY dev address\n",
+   __func__);
+   return;
+   }
 
+   /* Set Ethernet LED in TX blink mode */
+   miiphy_write(name, phy_adr, PHY_LED_MAN_REG, 0x00);
+   miiphy_write(name, phy_adr, PHY_LED_PAR_SEL_REG, PHY_LED_VAL);
+
+   /* reset the phy */
+   miiphy_reset(name, phy_adr);
+   printf("88E3015 Initialized on %s\n", name);
+}
+#endif /* CONFIG_RESET_PHY_R */
+#endif /* CONFIG_ARMADA100_FEC */
diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h
index 7fa3020..b63ffd5 100644
--- a/include/configs/gplugd.h
+++ b/include/configs/gplugd.h
@@ -80,6 +80,20 @@
 #define CONFIG_ROOTPATH"/tftpboot"
 #define CONFIG_SYS_IMG_NAME"uImage"
 
+/* GPIO Support */
+#define CONFIG_MARVELL_GPIO
+
+/* PHY configuration */
+#define CONFIG_MII
+#define CONFIG_CMD_MII
+#define CONFIG_RESET_PHY_R
+/* 88E3015 register definition */
+#define PHY_LED_PAR_SEL_REG22
+#define PHY_LED_MAN_REG25
+#define PHY_LED_VAL0x5b/* LINK LED1, ACT LED2 */
+/* GPIO Configuration for PHY */
+#define CONFIG_SYS_GPIO_PHY_RST104 /* GPIO104 */
+
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
@@ -100,4 +114,3 @@
 #define CONFIG_ENV_SIZE0x2 /* 64k */
 
 #endif /* __CONFIG_GPLUGD_H */
-
-- 
1.7.0.4

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


[U-Boot] Porting U-Boot to HP TouchPad

2011-08-21 Thread Graeme Russ
Hello All,

Well it looks like I'm getting my hands on the now defunct HP Touchpad

Any ideas how I could port U-Boot (and ultimately Linux) to it?

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-sh

2011-08-21 Thread Nobuhiro Iwamatsu
Dear Wolfgang Denk.

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

The following changes since commit fa82f871c8dbc9a15e8dc274b3f99dd5fa0da458:

  Convert ISO-8859 files to UTF-8 (2011-08-04 23:34:02 +0200)

are available in the git repository at:
  git://git.denx.de/u-boot-sh.git master

Nobuhiro Iwamatsu (2):
  sh: sh2a: Add sh2a optimize to config.mk
  usb: r8a66597: Fix argument mistake of inl

Phil Edworthy (4):
  sh: Add Renesas rsk7264 board
  sh: Add support for SH2A freestanding build
  sh: Fix rsk7203 alignment problem
  sh: Clean up rsk7264 board settings

Yoshihiro Shimoda (2):
  sh: sh7757lcr: Add KEEP order to start.o section
  sh: add calling mmc_initialize in board.c

 MAINTAINERS   |4 +
 arch/sh/cpu/sh2/config.mk |5 +
 arch/sh/cpu/sh2/cpu.c |7 +
 arch/sh/include/asm/cpu_sh2.h |2 +
 arch/sh/include/asm/cpu_sh7264.h  |   41 ++
 arch/sh/lib/Makefile  |   22 +++
 arch/sh/lib/ashiftlt.S|  192 ++
 arch/sh/lib/ashiftrt.S|  149 
 arch/sh/lib/ashldi3.c |   25 
 arch/sh/lib/board.c   |   12 ++
 arch/sh/lib/libgcc.h  |   25 
 arch/sh/lib/lshiftrt.S|  192 ++
 arch/sh/lib/lshrdi3.c |   25 
 arch/sh/lib/movmem.S  |  238 +
 board/renesas/rsk7203/lowlevel_init.S |1 +
 board/renesas/rsk7264/Makefile|   32 +
 board/renesas/rsk7264/lowlevel_init.S |  212 +
 board/renesas/rsk7264/rsk7264.c   |   72 ++
 board/renesas/sh7757lcr/u-boot.lds|2 +-
 boards.cfg|1 +
 drivers/serial/serial_sh.h|5 +-
 drivers/usb/host/r8a66597.h   |2 +-
 include/configs/rsk7264.h |   78 +++
 23 files changed, 1341 insertions(+), 3 deletions(-)
 create mode 100644 arch/sh/include/asm/cpu_sh7264.h
 create mode 100644 arch/sh/lib/ashiftlt.S
 create mode 100644 arch/sh/lib/ashiftrt.S
 create mode 100644 arch/sh/lib/ashldi3.c
 create mode 100644 arch/sh/lib/libgcc.h
 create mode 100644 arch/sh/lib/lshiftrt.S
 create mode 100644 arch/sh/lib/lshrdi3.c
 create mode 100644 arch/sh/lib/movmem.S
 create mode 100644 board/renesas/rsk7264/Makefile
 create mode 100644 board/renesas/rsk7264/lowlevel_init.S
 create mode 100644 board/renesas/rsk7264/rsk7264.c
 create mode 100644 include/configs/rsk7264.h


-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Urgent : Regd. Cortex A9 quad core versatile express ca9x4_ct_vxp support in U-Boot..

2011-08-21 Thread Matt Waddel
Hi Sandeep,

On 08/21/2011 12:37 AM, Sandeep Kumar wrote:
> Hi all,
> 
> I am trying to use U-Boot for cortex A9 quad core versatile express board. I 
> saw that the support is already added
> for that board but i am not able to find out the DDR initialization code
> anywhere before using the stack. In fact i didn't find the DDR
> initialization code anywhere for this board. This board also comes along
> with a CLCD (color LCD) controller which is also not initialized
> anywhere for this board. Is the support for this board is tested as
> without initializing the DDR how the code relocation and execution from
> DDR is possible.

Sorry for not responding sooner.

Currently the DDR setup is handled by the ARM boot monitor code
and u-boot runs as the 2nd stage bootloader. So DDR setup is
not done in u-boot.

Also, the CLCD is not setup in u-boot.

--Matt

> 
> Any kind of pointers will be very helpful.
> 
> 
> 
> 
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1 V2] add support for mcf5307 cpu

2011-08-21 Thread Jin Zhengxiong-R64188
> -Original Message-
> From: Angelo Dureghello [mailto:angel...@gmail.com]
> Sent: Friday, August 12, 2011 5:20 AM
> To: U-Boot@lists.denx.de
> Cc: Jin Zhengxiong-R64188
> Subject: [PATCH 1/1 V2] add support for mcf5307 cpu
> 
> Add cpu related files and memory map includes. Apply the related
> minor changes to general coldfire architecture include files.
> 
> Signed-off-by: Angelo Dureghello 
> ---
>  arch/m68k/cpu/mcf530x/Makefile |   48 +++
>  arch/m68k/cpu/mcf530x/config.mk|   25 
>  arch/m68k/cpu/mcf530x/cpu.c|   48 +++
>  arch/m68k/cpu/mcf530x/cpu.h|   33 +
>  arch/m68k/cpu/mcf530x/cpu_init.c   |  164 +++
>  arch/m68k/cpu/mcf530x/interrupts.c |   42 ++
>  arch/m68k/cpu/mcf530x/speed.c  |   36 +
>  arch/m68k/cpu/mcf530x/start.S  |  253 
> 
>  arch/m68k/include/asm/immap_5307.h |   78 +++
>  arch/m68k/include/asm/m5307.h  |  119 +
>  10 files changed, 846 insertions(+), 0 deletions(-)
>  create mode 100644 arch/m68k/cpu/mcf530x/Makefile
>  create mode 100644 arch/m68k/cpu/mcf530x/config.mk
>  create mode 100644 arch/m68k/cpu/mcf530x/cpu.c
>  create mode 100644 arch/m68k/cpu/mcf530x/cpu.h
>  create mode 100644 arch/m68k/cpu/mcf530x/cpu_init.c
>  create mode 100644 arch/m68k/cpu/mcf530x/interrupts.c
>  create mode 100644 arch/m68k/cpu/mcf530x/speed.c
>  create mode 100644 arch/m68k/cpu/mcf530x/start.S
>  create mode 100644 arch/m68k/include/asm/immap_5307.h
>  create mode 100644 arch/m68k/include/asm/m5307.h

[Jin Zhengxiong-R64188] Could you please try to merge the 5307 cpu to mcf532x 
as we
already have two ColdFire V3 boards here(We can try to rename the mcf532x to 
such as 
mcf53xx later for less confuse). You can keep the immap_5307.h and m5307.h
for the 5307 cpu. All the other files are similar with the files for the two V3 
boards
 except the cpu_init.c file.  

Thanks.

Jason

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


Re: [U-Boot] [PATCH 3/3 v2] ARM: ARM926EJS - Add cache operations

2011-08-21 Thread V, Aneesh
Hi Eric,

On Mon, Aug 22, 2011 at 7:44 AM, Hong Xu  wrote:
> Hi Aneesh,
>
> On 08/19/2011 10:20 PM, Aneesh V wrote:
>>
>> Hi Hong,
>>
>> On Friday 19 August 2011 02:53 PM, Hong Xu wrote:
>>>
>>> Add a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations
>>> into this file.
>>>
>>> Signed-off-by: Hong Xu
>>> Tested-by: Elen Song
>>> CC: Albert Aribaud
>>> ---
>>> Since V1
>>>     Modified copyright line
>>>     Fix for compiling warnings
>>>     Changed the way to use CONFIG_SYS_CACHELINE_SIZE
>>>     When unaligned buffer detected, emit ERROR instead of WARNING
>>>
>>>     Do not make a common v5,v6 cache file. It seems arm946 is lack of
>>>     Test-and-Clean DCache operation. And maybe more differents...
>>>
>>>  arch/arm/cpu/arm926ejs/Makefile |    2 +-
>>>  arch/arm/cpu/arm926ejs/cache.c  |  135
>>> +++
>>>  2 files changed, 136 insertions(+), 1 deletions(-)
>>>  create mode 100644 arch/arm/cpu/arm926ejs/cache.c
>>>
>
> [...]
>
>>> +
>>> +/*
>>> + * The buffer range to be flushed is [start, stop)
>>> + */
>>> +void flush_dcache_range(unsigned long start, unsigned long stop)
>>> +{
>>> +       cache_range_op(start, stop, FLUSH_CACHE_OP);
>>> +}
>>> +
>>> +void flush_dcache_all(void)
>>> +{
>>> +       /*
>>> +        * ARM926EJ-S Technical Reference Manual, Chap 2.3.8
>>> +        * Clean&  Invalidate the entire DCache
>>> +        */
>>> +       asm("0: mrc p15, 0, r15, c7, c14, 3\n\t" "bne 0b\n" : : :
>>> "memory");
>>> +       /* Drain WB */
>>> +       asm("mcr p15, 0, %0, c7, c10, 4\n" : : "r" (0));
>>
>> While looking at the manuals for the armv5 compatibility I stumbled
>> upon the following in Chapter 2.3.8. Are you sure your flush_dcache_all
>> implementation is correct? I suspect the above is flushing only one
>> line?
>>
>> "The test, clean, and invalidate DCache instruction is the same as test
>> and clean DCache,
>> except that when the entire cache has been cleaned, it is invalidated.
>> This means that
>> you can use the following loop to clean and invalidate the entire
>> DCache:
>>
>> tci_loop:     MRC p15, 0, r15, c7, c14, 3
>>               BNE tci_loop
>> "
>
> As stated in the manual, we can use a loop to clean and invalidate the
> entire DCache.
>
> The "asm" statement above is a loop, isn't it? ;-)

Oops! I didn't notice that. Sorry for the noise. But, maybe, it could be made
two separate lines to make it more readable.

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


[U-Boot] [PATCH 7/9] DM9000:Add a byte swap macro for dm9000 io operation.

2011-08-21 Thread Jason Jin
commit a45dde2293c816138e53c26eca6fd0322583f9a6 changed the dm9000
direct register access to standard IO. This should work
on the ColdFire platform as there are corresponding macros for
the LE devices. But the hardware settings on some ColdFire boards had
swapped the byte order which make the original macros such as out_le16
cannot work. To avoid changing the common io access code on ColdFire
platform, the DM9000_BYTE_SWAPPED define was added to make the dm9000 use
__raw* IO access on some ColdFire boards.

Signed-off-by: Jason Jin 
---
Changes for V2: Remove the 'volatile' in the macro.
Changes for V3: Seperate the dm9000 code support and the platform
code to two patches so that it can be accepted by different custodian.

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

diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index b5c5573..05cd8eb 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -116,13 +116,21 @@ static u8 DM9000_ior(int);
 static void DM9000_iow(int reg, u8 value);
 
 /* DM9000 network board routine  */
-
+#ifndef DM9000_BYTE_SWAPPED
 #define DM9000_outb(d,r) writeb(d, (volatile u8 *)(r))
 #define DM9000_outw(d,r) writew(d, (volatile u16 *)(r))
 #define DM9000_outl(d,r) writel(d, (volatile u32 *)(r))
 #define DM9000_inb(r) readb((volatile u8 *)(r))
 #define DM9000_inw(r) readw((volatile u16 *)(r))
 #define DM9000_inl(r) readl((volatile u32 *)(r))
+#else
+#define DM9000_outb(d, r) __raw_writeb(d, r)
+#define DM9000_outw(d, r) __raw_writew(d, r)
+#define DM9000_outl(d, r) __raw_writel(d, r)
+#define DM9000_inb(r) __raw_readb(r)
+#define DM9000_inw(r) __raw_readw(r)
+#define DM9000_inl(r) __raw_readl(r)
+#endif
 
 #ifdef CONFIG_DM9000_DEBUG
 static void
-- 
1.6.4


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


[U-Boot] [PATCH 8/9] ColdFire:Define the DM9000 byteswap for M5253 board.

2011-08-21 Thread Jason Jin
The M5253DEMO board swapped the io pins which make
the standard IO function did not work for dm9000.
Define the byte swap to use raw io for dm9000.

Signed-off-by: Jason Jin 
---
 include/configs/M5253DEMO.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index f2f3159..8120b68 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -95,6 +95,7 @@
 #  define DM9000_IOCONFIG_DM9000_BASE
 #  define DM9000_DATA  (CONFIG_DM9000_BASE + 4)
 #  undef CONFIG_DM9000_DEBUG
+#  define DM9000_BYTE_SWAPPED
 
 #  define CONFIG_OVERWRITE_ETHADDR_ONCE
 
-- 
1.6.4


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


[U-Boot] [RESEND PATCH 9/9] ColdFire:Add mb for 5253 dram initialization

2011-08-21 Thread Jason Jin
The dram initialization sequence should be in order.
This patch add mb for the dram intialization code to make
sure the compiler do not disorder the code.

Signed-off-by: Jason Jin 
---
 arch/m68k/include/asm/io.h|2 ++
 board/freescale/m5253demo/m5253demo.c |4 
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h
index 531f420..d86eaf9 100644
--- a/arch/m68k/include/asm/io.h
+++ b/arch/m68k/include/asm/io.h
@@ -81,6 +81,8 @@
 #define outl(val, port)out_le32((u32 *)((port)+_IO_BASE), 
(val))
 #endif
 
+#define mb() __asm__ __volatile__ ("" : : : "memory")
+
 extern inline void _insb(volatile u8 * port, void *buf, int ns)
 {
u8 *data = (u8 *) buf;
diff --git a/board/freescale/m5253demo/m5253demo.c 
b/board/freescale/m5253demo/m5253demo.c
index 4772074..8ffb2cc 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 int checkboard(void)
 {
@@ -63,10 +64,12 @@ phys_size_t initdram(int board_type)
__asm__("nop");
 
mbar_writeLong(MCFSIM_DACR0, 0x322c);
+   mb();
__asm__("nop");
 
/* Write to this block to initiate precharge */
*(u32 *) (CONFIG_SYS_SDRAM_BASE) = 0xa5a5a5a5;
+   mb();
__asm__("nop");
 
/* Set RE bit in DACR */
@@ -83,6 +86,7 @@ phys_size_t initdram(int board_type)
__asm__("nop");
 
*(u32 *) (CONFIG_SYS_SDRAM_BASE + 0x800) = 0xa5a5a5a5;
+   mb();
}
 
return dramsize;
-- 
1.6.4


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


[U-Boot] [PATCH 6/9] ColdFire:Update the env settings for several boards.

2011-08-21 Thread Jason Jin
Move the environment outside the u-boot for some boards
and enlarge the u-boot size in some env settings.

Signed-off-by: Jason Jin 
---
 include/configs/M5329EVB.h  |4 ++--
 include/configs/M5373EVB.h  |4 ++--
 include/configs/M54451EVB.h |   13 -
 include/configs/M54455EVB.h |   15 ++-
 include/configs/M5475EVB.h  |   13 -
 include/configs/M5485EVB.h  |   12 +++-
 6 files changed, 37 insertions(+), 24 deletions(-)

diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 7ae0fad..3adcf4d 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -124,8 +124,8 @@
"u-boot=u-boot.bin\0"   \
"load=tftp ${loadaddr) ${u-boot}\0" \
"upd=run load; run prog\0"  \
-   "prog=prot off 0 2;"\
-   "era 0 2;"  \
+   "prog=prot off 0 3;"\
+   "era 0 3;"  \
"cp.b ${loadaddr} 0 ${filesize};"   \
"save\0"\
""
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 7086a1b..71b5af6 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -124,8 +124,8 @@
"u-boot=u-boot.bin\0"   \
"load=tftp ${loadaddr) ${u-boot}\0" \
"upd=run load; run prog\0"  \
-   "prog=prot off 0 2;"\
-   "era 0 2;"  \
+   "prog=prot off 0 3;"\
+   "era 0 3;"  \
"cp.b ${loadaddr} 0 ${filesize};"   \
"save\0"\
""
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 37715c5..de88383 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -127,7 +127,7 @@
"load=tftp ${loadaddr} ${sbfhdr};"  \
"tftp " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"\
"upd=run load; run prog\0"  \
-   "prog=sf probe 0:1 1 1;"\
+   "prog=sf probe 0:1 100 3;"  \
"sf erase 0 3;" \
"sf write ${loadaddr} 0 3;" \
"save\0"\
@@ -244,14 +244,16 @@
 #define CONFIG_SYS_MEMTEST_END ((CONFIG_SYS_SDRAM_SIZE - 3) << 20)
 
 #ifdef CONFIG_CF_SBF
+#  define CONFIG_SERIAL_BOOT
 #  define CONFIG_SYS_MONITOR_BASE  (CONFIG_SYS_TEXT_BASE + 0x400)
 #else
 #  define CONFIG_SYS_MONITOR_BASE  (CONFIG_SYS_FLASH_BASE + 0x400)
 #endif
 #define CONFIG_SYS_BOOTPARAMS_LEN  64*1024
 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for 
Monitor */
-#define CONFIG_SYS_MALLOC_LEN  (128 << 10) /* Reserve 128 kB for 
malloc() */
 
+/* Reserve 256 kB for malloc() */
+#define CONFIG_SYS_MALLOC_LEN  (256 << 10)
 /*
  * For booting Linux, the board info and command line data
  * have to be in the first 8 MB of memory, since this is
@@ -261,7 +263,8 @@
 #define CONFIG_SYS_BOOTMAPSZ   (CONFIG_SYS_SDRAM_BASE + 
(CONFIG_SYS_SDRAM_SIZE << 20))
 
 /* Configuration for environment
- * Environment is embedded in u-boot in the second sector of the flash
+ * Environment is not embedded in u-boot. First time runing may have env
+ * crc error warning if there is no correct environment on the flash.
  */
 #if defined(CONFIG_SYS_STMICRO_BOOT)
 #  define CONFIG_ENV_IS_IN_SPI_FLASH   1
@@ -271,9 +274,9 @@
 #  define CONFIG_ENV_SECT_SIZE 0x1
 #else
 #  define CONFIG_ENV_IS_IN_FLASH   1
-#  define CONFIG_ENV_ADDR  (CONFIG_SYS_FLASH_BASE + 0x8000)
+#  define CONFIG_ENV_ADDR  (CONFIG_SYS_FLASH_BASE + 0x4)
 #  define CONFIG_ENV_SIZE  0x2000
-#  define CONFIG_ENV_SECT_SIZE 0x8000
+#  define CONFIG_ENV_SECT_SIZE 0x2
 #endif
 #undef CONFIG_ENV_OVERWRITE
 
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 86faa3d..2662b35 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -134,7 +134,7 @@
"load=tftp ${loadaddr} ${sbfhdr};"  \
"tftp " MK_STR(CONFIG_SYS_LOAD_ADDR2) " ${uboot} \0"\
"upd=run load; run prog\0"  \
-   "prog=sf probe 0:1 1 1;"\
+   "prog=sf probe 0:1 100 3;"  \
"sf erase 0 3;" \
"sf write ${loadaddr} 0 0x3;"   \
"save\0"\
@@ -304,13 +304,16 @@
 #define CONFIG_SYS_MEMTEST_END ((CONFIG_SYS_SDRAM_SIZE - 3) << 20)
 
 #ifdef CONFIG_CF_SBF
+#  define CONFIG_SERIAL_BOOT
 #  define CONFIG_SYS_MONITOR_BASE  (CONFIG_SYS_TEXT_BASE + 0x400)
 #else
 #  define CONFIG_SYS_MONITOR_BASE  (CONFIG_SYS_FLASH_BASE + 0x400)
 #endif
 #define CONFIG_SYS_BOOTPARAMS_LEN  64*1024
 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for 
Monitor */
-#define CONFIG_SYS_MALLOC_LEN  (128 << 10) /* Reserve 128 kB for 
malloc() */
+
+/* Reserve 256 kB for malloc() */
+#defi

[U-Boot] [RESEND PATCH 5/9] ColdFire:disable the NFS define for 52277 board.

2011-08-21 Thread Jason Jin
There is no network device on ColdFire 52277EVB board.But the default
cmd include NFS define which make the build error.

Signed-off-by: Jason Jin 
---
 include/configs/M52277EVB.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index bb3b474..5722544 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -69,6 +69,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_MISC
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #define CONFIG_CMD_REGINFO
 #undef CONFIG_CMD_USB
 #undef CONFIG_CMD_BMP
-- 
1.6.4


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


[U-Boot] [PATCH V3 3/9] ColdFire: Cleanup for partial linking and --gc-sections

2011-08-21 Thread Jason Jin
Signed-off-by: TsiChung Liew 
Signed-off-by: Jason Jin 
---
Changes for V2: Add clean up for more boards.

Changes for V3: Seperate the env settings to another patch. Merge the
nommu board clean up into this patch. Add more clean up work to the lds
files.

 board/freescale/m5208evbe/u-boot.lds |   66 +
 board/freescale/m52277evb/u-boot.spa |   72 +++-
 board/freescale/m5253demo/u-boot.lds |   65 +
 board/freescale/m53017evb/u-boot.lds |   66 ++---
 board/freescale/m5329evb/u-boot.lds  |   64 +---
 board/freescale/m5373evb/u-boot.lds  |   64 +---
 board/freescale/m54451evb/u-boot.spa |   73 +---
 board/freescale/m54451evb/u-boot.stm |   76 +
 board/freescale/m54455evb/u-boot.atm |   70 +--
 board/freescale/m54455evb/u-boot.int |   67 +
 board/freescale/m547xevb/u-boot.lds  |   66 +
 board/freescale/m548xevb/u-boot.lds  |   68 +-
 12 files changed, 144 insertions(+), 673 deletions(-)

diff --git a/board/freescale/m5208evbe/u-boot.lds 
b/board/freescale/m5208evbe/u-boot.lds
index e5011a6..6e39be1 100644
--- a/board/freescale/m5208evbe/u-boot.lds
+++ b/board/freescale/m5208evbe/u-boot.lds
@@ -22,61 +22,25 @@
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;*/
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp: { *(.interp)}
-  .hash  : { *(.hash)  }
-  .dynsym: { *(.dynsym)}
-  .dynstr: { *(.dynstr)}
-  .rel.text  : { *(.rel.text)  }
-  .rela.text : { *(.rela.text) }
-  .rel.data  : { *(.rel.data)  }
-  .rela.data : { *(.rela.data) }
-  .rel.rodata: { *(.rel.rodata)}
-  .rela.rodata   : { *(.rela.rodata)   }
-  .rel.got   : { *(.rel.got)   }
-  .rela.got  : { *(.rela.got)  }
-  .rel.ctors : { *(.rel.ctors) }
-  .rela.ctors: { *(.rela.ctors)}
-  .rel.dtors : { *(.rel.dtors) }
-  .rela.dtors: { *(.rela.dtors)}
-  .rel.bss   : { *(.rel.bss)   }
-  .rela.bss  : { *(.rela.bss)  }
-  .rel.plt   : { *(.rel.plt)   }
-  .rela.plt  : { *(.rela.plt)  }
-  .init  : { *(.init)  }
-  .plt   : { *(.plt)   }
   .text  :
   {
-/* WARNING - the following is hand-optimized to fit within */
-/* the sector layout of our flash chips!   XXX FIXME XXX   */
-
-arch/m68k/cpu/mcf52x2/start.o  (.text)
-arch/m68k/cpu/mcf52x2/libmcf52x2.o (.text)
-arch/m68k/lib/libm68k.o(.text)
-common/dlmalloc.o  (.text)
+arch/m68k/cpu/mcf52x2/start.o  (.text*)
 
 . = DEFINED(env_offset) ? env_offset : .;
-common/env_embedded.o  (.text)
+common/env_embedded.o  (.text*)
 
-*(.text)
-*(.fixup)
-*(.got1)
+*(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata:
   {
-*(.rodata)
-*(.rodata1)
+*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini  : { *(.fini)} =0
-  .ctors : { *(.ctors)   }
-  .dtors : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFF00;
@@ -86,24 +50,20 @@ SECTIONS
   .reloc   :
   {
 __got_start = .;
-*(.got)
+KEEP(*(.got))
 __got_end = .;
 _GOT2_TABLE_ = .;
-*(.got2)
+KEEP(*(.got2))
 _FIXUP_TABLE_ = .;
-*(.fixup)
+KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data:
   {
-*(.data)
-*(.data1)
-*(.sdata)
-*(.sdata2)
-*(.dynamic)
-CONSTRUCTORS
+*(.data*)
+*(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -113,7 +73,6 @@ SECTIONS
   .u_boot_cmd : { *(.u_boot_cmd) }
   __u_boot_cmd_end = .;
 
-
   . = .;
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
@@ -130,9 +89,8 @@ SECTIONS
   .bss (NOLOAD)   :
   {
_sbss = .;
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.sbss*)
+   *(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
diff --git a/board/freescale/m52277evb/u-boot.spa 
b/board/freescale/m52277evb/u-boot.spa
index 4b710be..e7b22e3 100644
--- a/board/freescale/m52277evb/u-boot.spa
+++ b/board/freescale/m52277evb/u-boot.spa
@@ -22,63 +22,27 @@
  */
 
 OUTPUT_ARCH(m68k)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;*/
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash  : { *(.hash)  }
-  .dynsym: { *(.dynsym)}
-  .dynstr: { *(.dynstr)}

[U-Boot] [PATCH V3 2/9] ColdFire: Update compile flags for each CPUs

2011-08-21 Thread Jason Jin
Remove compiler version check for gcc 4.1 in config.mk.

Signed-off-by: TsiChung Liew 
Signed-off-by: Jason Jin 
---
Changes for V2:
use the cc-option to set different cppflags for different gcc version.

Changes for V3:
Remove the old gcc version support.

 arch/m68k/cpu/mcf5227x/config.mk   |4 
 arch/m68k/cpu/mcf523x/config.mk|4 
 arch/m68k/cpu/mcf52x2/config.mk|7 ---
 arch/m68k/cpu/mcf532x/config.mk|6 --
 arch/m68k/cpu/mcf5445x/config.mk   |4 
 arch/m68k/cpu/mcf547x_8x/config.mk |4 
 6 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk
index 8eab49d..f7ee76a 100644
--- a/arch/m68k/cpu/mcf5227x/config.mk
+++ b/arch/m68k/cpu/mcf5227x/config.mk
@@ -24,8 +24,4 @@
 #
 
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
 PLATFORM_CPPFLAGS += -mcpu=52277 -fPIC
-else
-PLATFORM_CPPFLAGS += -m5307 -fPIC
-endif
diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk
index fc79454..a5adcee 100644
--- a/arch/m68k/cpu/mcf523x/config.mk
+++ b/arch/m68k/cpu/mcf523x/config.mk
@@ -24,8 +24,4 @@
 #
 
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
 PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC
-else
-PLATFORM_CPPFLAGS += -m5307 -fPIC
-endif
diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk
index 52751be..22a8462 100644
--- a/arch/m68k/cpu/mcf52x2/config.mk
+++ b/arch/m68k/cpu/mcf52x2/config.mk
@@ -34,9 +34,6 @@ is5272:=$(shell grep CONFIG_M5272 $(TOPDIR)/include/$(cfg))
 is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg))
 is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
 
-
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
-
 ifneq (,$(findstring CONFIG_M5208,$(is5208)))
 PLATFORM_CPPFLAGS += -mcpu=5208
 endif
@@ -58,7 +55,3 @@ endif
 ifneq (,$(findstring CONFIG_M5282,$(is5282)))
 PLATFORM_CPPFLAGS += -mcpu=5282
 endif
-
-else
-PLATFORM_CPPFLAGS += -m5307
-endif
diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk
index b783444..cd6466a 100644
--- a/arch/m68k/cpu/mcf532x/config.mk
+++ b/arch/m68k/cpu/mcf532x/config.mk
@@ -29,15 +29,9 @@ cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 
's/.*<\(configs.*\)>/
 is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg))
 is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg))
 
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
-
 ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x)))
 PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC
 endif
 ifneq (,$(findstring CONFIG_MCF532x,$(is532x)))
 PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
 endif
-
-else
-PLATFORM_CPPFLAGS += -m5307 -fPIC
-endif
diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk
index b0b49f7..61a731e 100644
--- a/arch/m68k/cpu/mcf5445x/config.mk
+++ b/arch/m68k/cpu/mcf5445x/config.mk
@@ -24,11 +24,7 @@
 #
 
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
 PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
-else
-PLATFORM_CPPFLAGS += -m5407 -fPIC
-endif
 
 ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
 ifneq (,$(findstring GOT,$(shell $(LD) --help)))
diff --git a/arch/m68k/cpu/mcf547x_8x/config.mk 
b/arch/m68k/cpu/mcf547x_8x/config.mk
index 83102ab..02fce5d 100644
--- a/arch/m68k/cpu/mcf547x_8x/config.mk
+++ b/arch/m68k/cpu/mcf547x_8x/config.mk
@@ -24,11 +24,7 @@
 #
 
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-ifneq ($(findstring 4.1,$(shell $(CC) --version)),4.1)
 PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
-else
-PLATFORM_CPPFLAGS += -m5407 -fPIC
-endif
 
 ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
 ifneq (,$(findstring GOT,$(shell $(LD) --help)))
-- 
1.6.4


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


[U-Boot] [RESEND PATCH 1/9] ColdFire:Fix the configuration broken for some boards.

2011-08-21 Thread Jason Jin
Some typoes in Makefile and boards.cfg make the M54455 board
and M53017 board configuration broken.

Signed-off-by: Jason Jin 
---
 Makefile   |1 +
 boards.cfg |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 03d80b7..960c046 100644
--- a/Makefile
+++ b/Makefile
@@ -724,6 +724,7 @@ M54455EVB_stm33_config :unconfig
cp $(obj)board/freescale/m54455evb/u-boot.stm 
$(obj)board/freescale/m54455evb/u-boot.lds ; \
fi; \
echo "#define CONFIG_SYS_INPUT_CLKSRC $${FREQ}" >> 
$(obj)include/config.h ; \
+   $(XECHO) "... with $${FREQ}Hz input clock"
@$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale
 
 M5475AFE_config \
diff --git a/boards.cfg b/boards.cfg
index 6827cf3..8d5076e 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -279,7 +279,7 @@ M5271EVB m68kmcf52x2 
m5271evbfreesca
 M5272C3  m68kmcf52x2 m5272c3 
freescale
 M5275EVB m68kmcf52x2 m5275evb
freescale
 M5282EVB m68kmcf52x2 m5282evb
freescale
-M53017EVBm68kmcf52x2 m53017evb   
freescale
+M53017EVBm68kmcf532x m53017evb   
freescale
 EP2500   m68kmcf52x2 ep2500  
Mercury
 microblaze-generic   microblaze  microblaze  microblaze-generic  xilinx
 dbau1000 mipsmips32  dbau1x00- 
 au1x00  dbau1x00:DBAU1000
-- 
1.6.4


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


[U-Boot] [PATCH 00/09] ColdFire: patches for coldfire to work with current base.

2011-08-21 Thread Jin Zhengxiong-R64188
The following patches update some ColdFire boards to work with
latest u-boot. Those update were tested on following Freescale boards:
M54455EVB, M54451EVB, M5475EVB(M5475CFE_config), M5485EVB(M5485HFE_conifg),
M5208EVB, M5253DEMO, M52277EVB, M53017EVB, M5373EVB, M5329EVB(M5329BFEE_config)

0001-ColdFire-Fix-the-configuration-broken-for-some-board.patch
0002-ColdFire-Update-compile-flags-for-each-CPUs.patch
0003-ColdFire-Cleanup-for-partial-linking-and-gc-sections.patch
0004-ColdFire-Update-the-timer_init-since-it-was-unified.patch
0005-ColdFire-disable-the-NFS-define-for-52277-board.patch
0006-ColdFire-Update-the-env-settings-for-several-boards.patch
0007-DM9000-Add-a-byte-swap-macro-for-dm9000-io-operation.patch
0008-ColdFire-Define-the-DM9000-byteswap-for-M5253-board.patch
0009-ColdFire-Add-mb-for-5253-dram-initialization.patch

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


Re: [U-Boot] [PATCH 13/14] MX5: mx53loco: make use of GPIO framework

2011-08-21 Thread Jason Liu
2011/8/21 Stefano Babic :
> Signed-off-by: Stefano Babic 
> CC: Jason Liu 
> ---
>  board/freescale/mx53loco/mx53loco.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/freescale/mx53loco/mx53loco.c 
> b/board/freescale/mx53loco/mx53loco.c
> index 18b388e..ade1006 100644
> --- a/board/freescale/mx53loco/mx53loco.c
> +++ b/board/freescale/mx53loco/mx53loco.c
> @@ -34,7 +34,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -146,9 +146,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
>        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
>
>        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
> -               *cd = mxc_gpio_get(77); /*GPIO3_13*/
> +               *cd = gpio_get_value(77); /*GPIO3_13*/
>        else
> -               *cd = mxc_gpio_get(75); /*GPIO3_11*/
> +               *cd = gpio_get_value(75); /*GPIO3_11*/
>
>        return 0;
>  }

Acked-by: Jason Liu 
Tested-by: Jason Liu 

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


[U-Boot] [PATCH 4/9] ColdFire:Update the timer_init since it was unified.

2011-08-21 Thread Jason Jin
Signed-off-by: Jason Jin 
---
 arch/m68k/cpu/mcf547x_8x/slicetimer.c |3 ++-
 arch/m68k/lib/board.c |2 --
 arch/m68k/lib/time.c  |6 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c 
b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 467a807..ee2e35b 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -72,7 +72,7 @@ void dtimer_interrupt(void *not_used)
}
 }
 
-void timer_init(void)
+int timer_init(void)
 {
volatile slt_t *timerp = (slt_t *) (CONFIG_SYS_TMR_BASE);
 
@@ -93,6 +93,7 @@ void timer_init(void)
/* set a period of 1us, set timer mode to restart and
   enable timer and interrupt */
timerp->cr = SLT_CR_RUN | SLT_CR_IEN | SLT_CR_TEN;
+   return 0;
 }
 
 ulong get_timer(ulong base)
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 945ab66..1df50f1 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -78,8 +78,6 @@ static char *failed = "*** failed ***\n";
 extern ulong __init_end;
 extern ulong __bss_end__;
 
-extern void timer_init(void);
-
 #if defined(CONFIG_WATCHDOG)
 # define INIT_FUNC_WATCHDOG_INIT   watchdog_init,
 # define WATCHDOG_DISABLE  watchdog_disable
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index a316cdf..a0e2441 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -91,7 +91,7 @@ void dtimer_interrupt(void *not_used)
}
 }
 
-void timer_init(void)
+int timer_init(void)
 {
volatile dtmr_t *timerp = (dtmr_t *) (CONFIG_SYS_TMR_BASE);
 
@@ -114,6 +114,8 @@ void timer_init(void)
/* set a period of 1us, set timer mode to restart and enable timer and 
interrupt */
timerp->tmr = CONFIG_SYS_TIMER_PRESCALER | DTIM_DTMR_CLK_DIV1 |
DTIM_DTMR_FRR | DTIM_DTMR_ORRI | DTIM_DTMR_RST_EN;
+
+   return 0;
 }
 
 ulong get_timer(ulong base)
@@ -162,6 +164,8 @@ void timer_init(void)
timerp->pcsr = PIT_PCSR_OVW;
timerp->pmr = lastinc = 0;
timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN;
+
+   return 0;
 }
 
 ulong get_timer(ulong base)
-- 
1.6.4


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


Re: [U-Boot] [PATCH 3/3 v2] ARM: ARM926EJS - Add cache operations

2011-08-21 Thread Hong Xu
Hi Aneesh,

On 08/19/2011 10:20 PM, Aneesh V wrote:
> Hi Hong,
>
> On Friday 19 August 2011 02:53 PM, Hong Xu wrote:
>> Add a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations
>> into this file.
>>
>> Signed-off-by: Hong Xu
>> Tested-by: Elen Song
>> CC: Albert Aribaud
>> ---
>> Since V1
>>  Modified copyright line
>>  Fix for compiling warnings
>>  Changed the way to use CONFIG_SYS_CACHELINE_SIZE
>>  When unaligned buffer detected, emit ERROR instead of WARNING
>>
>>  Do not make a common v5,v6 cache file. It seems arm946 is lack of
>>  Test-and-Clean DCache operation. And maybe more differents...
>>
>>   arch/arm/cpu/arm926ejs/Makefile |2 +-
>>   arch/arm/cpu/arm926ejs/cache.c  |  135 
>> +++
>>   2 files changed, 136 insertions(+), 1 deletions(-)
>>   create mode 100644 arch/arm/cpu/arm926ejs/cache.c
>>

[...]

>> +
>> +/*
>> + * The buffer range to be flushed is [start, stop)
>> + */
>> +void flush_dcache_range(unsigned long start, unsigned long stop)
>> +{
>> +cache_range_op(start, stop, FLUSH_CACHE_OP);
>> +}
>> +
>> +void flush_dcache_all(void)
>> +{
>> +/*
>> + * ARM926EJ-S Technical Reference Manual, Chap 2.3.8
>> + * Clean&  Invalidate the entire DCache
>> + */
>> +asm("0: mrc p15, 0, r15, c7, c14, 3\n\t" "bne 0b\n" : : : "memory");
>> +/* Drain WB */
>> +asm("mcr p15, 0, %0, c7, c10, 4\n" : : "r" (0));
>
> While looking at the manuals for the armv5 compatibility I stumbled
> upon the following in Chapter 2.3.8. Are you sure your flush_dcache_all
> implementation is correct? I suspect the above is flushing only one
> line?
>
> "The test, clean, and invalidate DCache instruction is the same as test
> and clean DCache,
> except that when the entire cache has been cleaned, it is invalidated.
> This means that
> you can use the following loop to clean and invalidate the entire
> DCache:
>
> tci_loop: MRC p15, 0, r15, c7, c14, 3
>BNE tci_loop
> "

As stated in the manual, we can use a loop to clean and invalidate the 
entire DCache.

The "asm" statement above is a loop, isn't it? ;-)

BR,
Eric

> best regards,
> Aneesh

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


Re: [U-Boot] [PATCH 3/3 v2] ARM: ARM926EJS - Add cache operations

2011-08-21 Thread Hong Xu
Hi Lei,

On 08/19/2011 06:31 PM, Lei Wen wrote:
> Hi Hong,
>
> On Fri, Aug 19, 2011 at 5:23 PM, Hong Xu  wrote:
>> Add a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations
>> into this file.
>>
>> Signed-off-by: Hong Xu
>> Tested-by: Elen Song
>> CC: Albert Aribaud
>> ---
>> Since V1
>> Modified copyright line
>> Fix for compiling warnings
>> Changed the way to use CONFIG_SYS_CACHELINE_SIZE
>> When unaligned buffer detected, emit ERROR instead of WARNING
>>
>> Do not make a common v5,v6 cache file. It seems arm946 is lack of
>> Test-and-Clean DCache operation. And maybe more differents...
>>
>>   arch/arm/cpu/arm926ejs/Makefile |2 +-
>>   arch/arm/cpu/arm926ejs/cache.c  |  135 
>> +++

[..]

>> +#include
>> +
>> +#define FLUSH_CACHE_OP 0
>> +#define INVALIDATE_CACHE_OP1
>> +
>> +#ifndef CONFIG_SYS_CACHELINE_SIZE
>> +/*
>> + * ARM926EJ-S Technical Reference Manual, Chap 2.3.1 Table 2-9
>> + * only b'10, aka. 32 bytes cache line len is valid
>> + */
>> +#define CONFIG_SYS_CACHELINE_SIZE 32
>
> I think we shouldn't make such assumption here.
> You could refer to Lukasz's patch over armv7:
> http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/105772
> And you also should export one method as: get_dcache_line_size(), so
> that we could malloc cache aligned buffer in mmc.c.

There was a long loop about this, see
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/105113/focus=105137

I agree we may need something like get_dcache_line_size(). This will 
make driver sane if CONFIG_SYS_CACHELINE_SIZE is not defined.

BR,
Eric


> Best regards,
> Lei

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


Re: [U-Boot] [PATCH] new tool mkenvimage: generates an env image from an arbitrary config file

2011-08-21 Thread Mike Frysinger
On Tuesday, August 09, 2011 06:31:29 David Wagner wrote:
> +extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int);

does including u-boot/crc.h work ?

> +static void usage(char *exec_name)

const char *exec_name

> + char *txt_filename = NULL, *bin_filename = NULL;

mark them both const ?

> + dataptr = calloc(datasize, sizeof(*dataptr));

you zero-ed it out here ...

> + /* Pad the environnment with the padding byte */
> + memset(envptr, padbyte, envsize);

... then manually filled it with a byte.  just use malloc() instead of 
calloc() and avoid that zero.

> + memcpy((uint32_t*) dataptr, &targetendian_crc, sizeof(uint32_t));

i dont think that cast is necessary.  just punt it.
-mike


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


Re: [U-Boot] [PATCH v5] ARM: Add Calxeda Highbank platform

2011-08-21 Thread Rob Herring
On 08/21/2011 09:40 AM, Albert ARIBAUD wrote:
> Hi Rob,
> 
> Le 21/08/2011 15:16, Rob Herring a écrit :
>> From: Rob Herring
>>
>> Add basic support for Calxeda Highbank platform. Only minimal support
>> with
>> serial and SATA are included.
>>
>> Signed-off-by: Jason Hobbs
>> Signed-off-by: Rob Herring
>> Cc: Albert ARIBAUD
>> ---
> 
> This applies to u-boot-arm/master, with three empty lines at end of new
> files removed, but the compilation with ELDK 4.2 fails with:
> 
> uboot@lilith:~/src/u-boot-arm$ ./MAKEALL highbank
> Configuring for highbank board...
> include/common.h:0: error: bad value (armv7-a) for -march= switch
> include/common.h:0: error: bad value (armv7-a) for -march= switch
> lib/asm-offsets.c:1: error: bad value (armv7-a) for -march= switch
> make: *** [lib/asm-offsets.s] Erreur 1
> arm-linux-size: './u-boot': No such file
> 
> - SUMMARY 
> Boards compiled: 1
> Boards with warnings or errors: 1 ( highbank )
> --
> 
> Seems like ELDK 4.2 does not know armv7-a. Is it a requirement that this
> board build with this march flag?
> 

With device tree, there are lots of endian conversions. With v7, those
conversions are a single inline "rev" instruction vs. 10-20 assembly
instructions. Since there is no state maintained in the fdt code, the
conversions are done over and over.

So there's not a hard requirement, but it is something I will always set
and I imagine others with v7 platforms will want to also. I think Tegra
prevents doing this change globally.

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


Re: [U-Boot] [PATCH 01/14] IMX: uniform GPIO interface using GPIO framework

2011-08-21 Thread Fabio Estevam
Hi Stefano,

On Sun, Aug 21, 2011 at 7:28 AM, Stefano Babic  wrote:
> IMX processors has a slightly different interface
> to access GPIOs and do not make use of the provided GPIO
> framework. The patch substitutes mxc_ specific
> functions and make use of the API in asm/gpio.h

This is a nice series. I am wondering if mx51evk is missing.

Regards,

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


Re: [U-Boot] [PATCH v4] cmd_sf: add "update" subcommand to do smart SPI flash update

2011-08-21 Thread Mike Frysinger
On Sunday, August 21, 2011 06:37:30 Simon Glass wrote:
> On Sat, Aug 20, 2011 at 5:04 PM, Marek Vasut wrote:
> > On Sunday, August 21, 2011 12:35:51 AM Mike Frysinger wrote:
> >> +{
> >> + debug("offset=%#x, sector_size=%#x, len=%#x\n",
> >> + offset, flash->sector_size, len);
> >> + if (spi_flash_read(flash, offset, len, cmp_buf))
> >> + return "read";
> >> + if (memcmp(cmp_buf, buf, len) == 0) {
> >> + debug("Skip region %x size %x: no change\n",
> >> + offset, len);
> >> + *skipped += len;
> >> + return NULL;
> >> + }
> >> + if (spi_flash_erase(flash, offset, len))
> >> + return "erase";
> >> + if (spi_flash_write(flash, offset, len, buf))
> >> + return "write";
> > 
> > Numeric value won't be ok ? You can have these in the calling function
> > instead of returning a char *.
> 
> Yes it's a bit odd, but the alternative is quite a bit more verbose:
> 
> enum {
>OPER_MALLOC,
>OPER_READ,
>OPER_ERASE,
>...
> };
> 
> static const char *names[OPER...] = {

static const char * const names[] = {

>"malloc",
>"read",
>"erase"
> ...
> };
> 
> Is that better?

only if the code size is smaller ;)
-mike


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


Re: [U-Boot] [PATCH v4] cmd_sf: add "update" subcommand to do smart SPI flash update

2011-08-21 Thread Mike Frysinger
On Sunday, August 21, 2011 06:27:16 Simon Glass wrote:
> On Sat, Aug 20, 2011 at 4:35 PM, Mike Frysinger wrote:
> > +static int spi_flash_update(struct spi_flash *flash, u32 offset,
> > +   size_t len, const char *buf)
> > +{
> > +   const char *err_oper = NULL;
> > +   char *cmp_buf;
> > +   const char *end = buf + len;
> > +   size_t todo;/* number of bytes to do in this pass */
> > +   size_t skipped; /* statistics */
> > +
> > +   cmp_buf = malloc(flash->sector_size);
> > +   if (cmp_buf) {
> > +   for (skipped = 0; buf < end; buf += todo, offset += todo)
> > {
> 
> Oops I got this wrong:
> 
> for (skipped = 0; buf < end && !err_oper; buf += todo, offset += todo) {
> 
> (or if (err_oper) break in the loop)

you can send a v5 and i'll just replace it in my tree :)

or a diff and i'll just merge it locally ...
-mike


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


Re: [U-Boot] [PATCH v5] ARM: Add Calxeda Highbank platform

2011-08-21 Thread Albert ARIBAUD
Hi Rob,

Le 21/08/2011 15:16, Rob Herring a écrit :
> From: Rob Herring
>
> Add basic support for Calxeda Highbank platform. Only minimal support with
> serial and SATA are included.
>
> Signed-off-by: Jason Hobbs
> Signed-off-by: Rob Herring
> Cc: Albert ARIBAUD
> ---

This applies to u-boot-arm/master, with three empty lines at end of new 
files removed, but the compilation with ELDK 4.2 fails with:

uboot@lilith:~/src/u-boot-arm$ ./MAKEALL highbank
Configuring for highbank board...
include/common.h:0: error: bad value (armv7-a) for -march= switch
include/common.h:0: error: bad value (armv7-a) for -march= switch
lib/asm-offsets.c:1: error: bad value (armv7-a) for -march= switch
make: *** [lib/asm-offsets.s] Erreur 1
arm-linux-size: './u-boot': No such file

- SUMMARY 
Boards compiled: 1
Boards with warnings or errors: 1 ( highbank )
--

Seems like ELDK 4.2 does not know armv7-a. Is it a requirement that this 
board build with this march flag?

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


[U-Boot] [PATCH v5] ARM: Add Calxeda Highbank platform

2011-08-21 Thread Rob Herring
From: Rob Herring 

Add basic support for Calxeda Highbank platform. Only minimal support with
serial and SATA are included.

Signed-off-by: Jason Hobbs 
Signed-off-by: Rob Herring 
Cc: Albert ARIBAUD 
---
changes in v5:
 - Rebase to current u-boot-arm/master 
(5557e86bb0793012057d5462976c2a902bc629ac)

changes in v4:
 - Rebase to current mainline (d50a8f45c9a640b3bcbd0ede91f83c8646cca018)
 - Add back SATA support to inital patch as dependencies are all in mainline

changes in v3:
 - Add hignbank to MAINTAINERS

changes in v2:
 - Set DRAM size to correct value
 - split SATA and SD enabling to separate patches

 MAINTAINERS   |4 +
 arch/arm/cpu/armv7/highbank/Makefile  |   46 
 arch/arm/cpu/armv7/highbank/config.mk |4 +
 arch/arm/cpu/armv7/highbank/timer.c   |  124 +
 board/highbank/Makefile   |   49 +
 board/highbank/highbank.c |   58 +++
 boards.cfg|1 +
 include/configs/highbank.h|  113 ++
 8 files changed, 399 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/highbank/Makefile
 create mode 100644 arch/arm/cpu/armv7/highbank/config.mk
 create mode 100644 arch/arm/cpu/armv7/highbank/timer.c
 create mode 100644 board/highbank/Makefile
 create mode 100644 board/highbank/highbank.c
 create mode 100644 include/configs/highbank.h

diff --git a/MAINTAINERS b/MAINTAINERS
index f895e9a..c383f6d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -219,6 +219,10 @@ Wolfgang Grandegger 
IPHASE4539  MPC8260
SCM MPC8260
 
+Rob Herring 
+
+   highbankhighbank
+
 Klaus Heydeck 
 
KUP4K   MPC855
diff --git a/arch/arm/cpu/armv7/highbank/Makefile 
b/arch/arm/cpu/armv7/highbank/Makefile
new file mode 100644
index 000..76faeb0
--- /dev/null
+++ b/arch/arm/cpu/armv7/highbank/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2000-2006
+# 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$(SOC).o
+
+COBJS  := timer.o
+SOBJS  :=
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/armv7/highbank/config.mk 
b/arch/arm/cpu/armv7/highbank/config.mk
new file mode 100644
index 000..5ed5c39
--- /dev/null
+++ b/arch/arm/cpu/armv7/highbank/config.mk
@@ -0,0 +1,4 @@
+STANDALONE_LOAD_ADDR = 0x10
+
+PLATFORM_CPPFLAGS += -march=armv7-a
+
diff --git a/arch/arm/cpu/armv7/highbank/timer.c 
b/arch/arm/cpu/armv7/highbank/timer.c
new file mode 100644
index 000..263f11a
--- /dev/null
+++ b/arch/arm/cpu/armv7/highbank/timer.c
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ *
+ * Based on arm926ejs/mx27/timer.c
+ *
+ * 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 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, see .
+ */
+
+#include 
+#include 
+#include /* for size_t */
+#include/* for NULL */
+#include 
+#include 
+
+#undef SYSTIMER_BASE
+#define SYSTIMER_BASE  0xFFF34000  /* Timer 0 and 1 base   */
+#define SYSTIMER_RATE  15000
+
+static ulong timestamp;
+static ulong lastinc;
+static struct systimer *systimer_base = (struct systimer *)SYST

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

2011-08-21 Thread Prafulla Wadaskar


> -Original Message-
> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
> Sent: Sunday, August 21, 2011 3:46 PM
> To: Prafulla Wadaskar
> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
> Subject: Re: Pull request u-boot-marvell.git
> 
> Hi Prafulla,
> 
> Le 21/08/2011 10:15, Prafulla Wadaskar a écrit :
> >
> >
> >> -Original Message-
> >> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
> >> Sent: Sunday, August 21, 2011 1:36 PM
> >> To: Prafulla Wadaskar
> >> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
> >> Subject: Re: Pull request u-boot-marvell.git
> >>
> >> Hi Prafulla,
> >>
> >> Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> >>> Hi Albert
> >>>
> >>> Please kindly pull
> >>> The following changes since commit
> >> 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
> >>> Prafulla Wadaskar (1):
> >>>   Merge branch 'master' of
> >> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
> >>>
> >>> are available in the git repository at:
> >>>
> >>> u-boot-marvell.git master branch.
> >>>
> >>> Ajay Bhargav (2):
> >>> gpio: Add GPIO driver framework for Marvell SoCs
> >>> gpio: Add GPIO driver for Marvell SoC Armada100
> >>>
> >>>arch/arm/include/asm/arch-armada100/gpio.h |   48 
> >>>drivers/gpio/Makefile  |1 +
> >>>drivers/gpio/mvgpio.c  |  115
> >> 
> >>>drivers/gpio/mvgpio.h  |   74
> ++
> >>>4 files changed, 238 insertions(+), 0 deletions(-)
> >>>create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
> >>>create mode 100644 drivers/gpio/mvgpio.c
> >>>create mode 100644 drivers/gpio/mvgpio.h
> >>>
> >>> Regards..
> >>> Prafulla . .
> >>
> >> One question, to you, and one note, to all ARM custodians:
> >>
> >> The question, about the patches:
> >>
> >> These were submitted on 2011/07/21, after the merge window close of
> >> 2011/07/16, and are not a bugfix, right? If so they should only go to
> >> master after the september release -- I can pull them into
> >> u-boot-arm/next if you want then out of your plate, though.
> >
> > Hi Albert,
> > You are right, you may pull them to your next branch.
> > I am sorry, it's my mistake I should have pulled and requested on next
> branch.
> 
> Ok. To avoid any issue, I'll cherry-pick these two onto utboo-arm/next.
> 
> Maybe you'll want to roll back your own master and move them to your own
> next, too.

If you have not cherry picked. I will move them to next and will provide a 
fresh pull request. With suggested rollbacks.

Regards..
Prafulla . .
___
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 -- watch out

2011-08-21 Thread Prafulla Wadaskar


> -Original Message-
> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
> Sent: Sunday, August 21, 2011 3:54 PM
> To: Prafulla Wadaskar
> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
> Subject: Re: Pull request u-boot-marvell.git -- watch out
> 
> Hi again Prafulla,
> 
> Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> > Hi Albert
> >
> > Please kindly pull
> > The following changes since commit
> 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
> >Prafulla Wadaskar (1):
> >  Merge branch 'master' of
> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
> >
> > are available in the git repository at:
> >
> >u-boot-marvell.git master branch.
> >
> > Ajay Bhargav (2):
> >gpio: Add GPIO driver framework for Marvell SoCs
> >gpio: Add GPIO driver for Marvell SoC Armada100
> >
> >   arch/arm/include/asm/arch-armada100/gpio.h |   48 
> >   drivers/gpio/Makefile  |1 +
> >   drivers/gpio/mvgpio.c  |  115
> 
> >   drivers/gpio/mvgpio.h  |   74 ++
> >   4 files changed, 238 insertions(+), 0 deletions(-)
> >   create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
> >   create mode 100644 drivers/gpio/mvgpio.c
> >   create mode 100644 drivers/gpio/mvgpio.h
> >
> > Regards..
> > Prafulla . .
> 
> In order to cherry-pick those two commits to my 'next' branch as agreed,
> I did fetch your u-boot-marvell/master, and then realized that not only
> does it a merge, but it even does it to a bad u-bot-arm branch that
> Wolfgang pointed out to me, so I'd rolled back and forced an update
> which did not reach you.
> 
> Namely, your master contains 28b7cbdd ("Don't compile in large memory
> test function by default") and 61cb36df ("Added documentation for
> CONFIG_SYS_TEXT_BASE").
> 
> Please roll back your master branch to just before merge commit
> 043a7639!

Okay, I will do the needful

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


Re: [U-Boot] [PATCH 12/14] MX5: mx53evk: make use of GPIO framework

2011-08-21 Thread Jason Liu
2011/8/21 Stefano Babic :
> Signed-off-by: Stefano Babic 
> CC: Jason Liu 
> ---
>  board/freescale/mx53evk/mx53evk.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/freescale/mx53evk/mx53evk.c 
> b/board/freescale/mx53evk/mx53evk.c
> index 88095dc..81857ff 100644
> --- a/board/freescale/mx53evk/mx53evk.c
> +++ b/board/freescale/mx53evk/mx53evk.c
> @@ -33,7 +33,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -213,9 +213,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
>        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
>
>        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
> -               *cd = mxc_gpio_get(77); /*GPIO3_13*/
> +               *cd = gpio_get_value(77); /*GPIO3_13*/
>        else
> -               *cd = mxc_gpio_get(75); /*GPIO3_11*/
> +               *cd = gpio_get_value(75); /*GPIO3_11*/
>
>        return 0;
>  }

Acked-by: Jason Liu 
Tested-by: Jason Liu 

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


Re: [U-Boot] [PATCH 07/14] MX5: efikamx: make use of GPIO framework

2011-08-21 Thread Marek Vasut
On Sunday, August 21, 2011 12:28:22 PM Stefano Babic wrote:
> Signed-off-by: Stefano Babic 
> CC: Marek Vasut 
> ---
>  board/efikamx/efikamx.c |   62
> ++ 1 files changed, 24
> insertions(+), 38 deletions(-)
> 
> diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
> index 4b36918..5be1f6c 100644
> --- a/board/efikamx/efikamx.c
> +++ b/board/efikamx/efikamx.c

[...]

> @@ -508,25 +495,24 @@ void setup_iomux_led(void)
>  {
>   /* Blue LED */
>   mxc_request_iomux(MX51_PIN_CSI1_D9, IOMUX_CONFIG_ALT3);
> - mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_CSI1_D9),
> - MXC_GPIO_DIRECTION_OUT);
> + gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSI1_D9), 0);
> +
>   /* Green LED */
>   mxc_request_iomux(MX51_PIN_CSI1_VSYNC, IOMUX_CONFIG_ALT3);
> - mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_CSI1_VSYNC),
> - MXC_GPIO_DIRECTION_OUT);
> + gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSI1_VSYNC), 0);
> +
>   /* Red LED */
>   mxc_request_iomux(MX51_PIN_CSI1_HSYNC, IOMUX_CONFIG_ALT3);
> - mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_CSI1_HSYNC),
> - MXC_GPIO_DIRECTION_OUT);
> + gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSI1_HSYNC), 0);

I'd be careful about the LEDs here. Anyway, I'll try to test it sometimes soon 
(begining of next week is ok?). If you won't get any feedback, you can have my 
Ack.

>  }
> 
>  void efikamx_toggle_led(uint32_t mask)
>  {
> - mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_CSI1_D9),
> + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_CSI1_D9),
>   mask & EFIKAMX_LED_BLUE);
> - mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_CSI1_VSYNC),
> + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_CSI1_VSYNC),
>   mask & EFIKAMX_LED_GREEN);
> - mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_CSI1_HSYNC),
> + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_CSI1_HSYNC),
>   mask & EFIKAMX_LED_RED);
>  }

Thanks Stefano, this really helps.

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


[U-Boot] Attn:

2011-08-21 Thread Douglas J. Flint.
Attn:


This proposal is addressed directly to you as a private obligation  
that required  you and should be treated as utmost Secret. I got your  
details from my private search after a careful review.

I am  Mr.Douglas J. Flint the Group Chairman of HSBC Holdings plc. I  
have a confidential brief for you, I am asking for your partnership in  
re- profiling some funds. Please get back to me for more information,  
if you are interested.

You can read more about my biography on this link below.

http://www.hsbc.com/1/PA_1_1_S5/content/assets/newsroom/media_kit/biogs/110201_douglas_flint.pdf

Regards,
Douglas J. Flint.
Group Chairman of HSBC Holdings plc.



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


Re: [U-Boot] [PATCH v4] cmd_sf: add "update" subcommand to do smart SPI flash update

2011-08-21 Thread Simon Glass
Hi Marek,

On Sat, Aug 20, 2011 at 5:04 PM, Marek Vasut  wrote:
> On Sunday, August 21, 2011 12:35:51 AM Mike Frysinger wrote:
>> From: Simon Glass 
>>
>> This adds a new SPI flash command which only rewrites blocks if the
>> contents need to change. This can speed up SPI flash programming when much
>> of the data is unchanged from what is already there.
>>
>> Signed-off-by: Simon Glass 
>> Signed-off-by: Mike Frysinger 
>> ---
>> v4
>>       - tweak summary
>>       - fix printf warnings with %d vs %zu
>>       - fix help string and missing/extra newlines
>>
>> TODO: it'd be nice if we supported +len like we do with erase ...
>>
>>  common/cmd_sf.c |   84
>> +-- 1 files changed,
>> 81 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/cmd_sf.c b/common/cmd_sf.c
>> index 11a491d..9b7d61b 100644
>> --- a/common/cmd_sf.c
>> +++ b/common/cmd_sf.c
>> @@ -6,6 +6,7 @@
>>   */
>>
>>  #include 
>> +#include 
>>  #include 
>>
>>  #include 
>> @@ -109,6 +110,78 @@ static int do_spi_flash_probe(int argc, char * const
>> argv[]) return 0;
>>  }
>>
>> +/**
>> + * Write a block of data to SPI flash, first checking if it is different
>> from + * what is already there.
>> + *
>> + * If the data being written is the same, then *skipped is incremented by
>> len. + *
>> + * @param flash              flash context pointer
>> + * @param offset     flash offset to write
>> + * @param len                number of bytes to write
>> + * @param buf                buffer to write from
>> + * @param cmp_buf    read buffer to use to compare data
>> + * @param skipped    Count of skipped data (incremented by this function)
>> + * @return NULL if OK, else a string containing the stage which failed
>> + */
>> +static const char *spi_flash_update_block(struct spi_flash *flash, u32
>> offset, +             size_t len, const char *buf, char *cmp_buf, size_t 
>> *skipped)
>
> Can't you just pass here a structure instead of this wicked pointer alchemy ?

Do you mean create a structure with the things that don't change in it
(flash, cmp_buf and skipped)? Is the problem too many parameters?

>
>> +{
>> +     debug("offset=%#x, sector_size=%#x, len=%#x\n",
>> +             offset, flash->sector_size, len);
>> +     if (spi_flash_read(flash, offset, len, cmp_buf))
>> +             return "read";
>> +     if (memcmp(cmp_buf, buf, len) == 0) {
>> +             debug("Skip region %x size %x: no change\n",
>> +                     offset, len);
>> +             *skipped += len;
>> +             return NULL;
>> +     }
>> +     if (spi_flash_erase(flash, offset, len))
>> +             return "erase";
>> +     if (spi_flash_write(flash, offset, len, buf))
>> +             return "write";
>
> Numeric value won't be ok ? You can have these in the calling function instead
> of returning a char *.

Yes it's a bit odd, but the alternative is quite a bit more verbose:

enum {
   OPER_MALLOC,
   OPER_READ,
   OPER_ERASE,
   ...
};

static const char *names[OPER...] = {
   "malloc",
   "read",
   "erase"
...
};

Is that better?

>
>> +     return NULL;
>> +}
>> +
>> +/**
>> + * Update an area of SPI flash by erasing and writing any blocks which
>> need + * to change. Existing blocks with the correct data are left
>> unchanged. + *
>> + * @param flash              flash context pointer
>> + * @param offset     flash offset to write
>> + * @param len                number of bytes to write
>> + * @param buf                buffer to write from
>> + * @return 0 if ok, 1 on error
>> + */
>> +static int spi_flash_update(struct spi_flash *flash, u32 offset,
>> +             size_t len, const char *buf)
>> +{
>> +     const char *err_oper = NULL;
>> +     char *cmp_buf;
>> +     const char *end = buf + len;
>> +     size_t todo;            /* number of bytes to do in this pass */
>> +     size_t skipped;         /* statistics */
>
> You can allocate a structure holding the internal state of the "update" 
> command,
> which I mentioned above, here, on stack.

Please see question above.

>
>> +
>> +     cmp_buf = malloc(flash->sector_size);
>> +     if (cmp_buf) {
>
> if (!cmp_buf)
>        goto err;
>
> ... rest of code ...
>
> Don't be afraid of goto and failpaths.

OK, will try.

>
> I like this patch!

Thanks!

Regards,
Simon

>
> Cheers
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
___
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 -- watch out

2011-08-21 Thread Albert ARIBAUD
Le 21/08/2011 12:24, Albert ARIBAUD a écrit :
> Hi again Prafulla,
>
> Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
>> Hi Albert
>>
>> Please kindly pull
>> The following changes since commit 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
>> Prafulla Wadaskar (1):
>>   Merge branch 'master' of 
>> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
>>
>> are available in the git repository at:
>>
>> u-boot-marvell.git master branch.
>>
>> Ajay Bhargav (2):
>> gpio: Add GPIO driver framework for Marvell SoCs
>> gpio: Add GPIO driver for Marvell SoC Armada100
>>
>>arch/arm/include/asm/arch-armada100/gpio.h |   48 
>>drivers/gpio/Makefile  |1 +
>>drivers/gpio/mvgpio.c  |  115 
>> 
>>drivers/gpio/mvgpio.h  |   74 ++
>>4 files changed, 238 insertions(+), 0 deletions(-)
>>create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
>>create mode 100644 drivers/gpio/mvgpio.c
>>create mode 100644 drivers/gpio/mvgpio.h
>>
>> Regards..
>> Prafulla . .
>
> In order to cherry-pick those two commits to my 'next' branch as agreed,
> I did fetch your u-boot-marvell/master, and then realized that not only
> does it a merge, but it even does it to a bad u-bot-arm branch that
> Wolfgang pointed out to me, so I'd rolled back and forced an update
> which did not reach you.
>
> Namely, your master contains 28b7cbdd ("Don't compile in large memory
> test function by default") and 61cb36df ("Added documentation for
> CONFIG_SYS_TEXT_BASE").
>
> Please roll back your master branch to just before merge commit 043a7639!

Make that "please roll back so that your master branch is fully rebased 
on u-boot-arm/master" -- sorry for the bad wording above.

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


[U-Boot] [PATCH 14/14] MX35: mx35pdk: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 board/freescale/mx35pdk/mx35pdk.c |5 ++---
 include/configs/mx35pdk.h |1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx35pdk/mx35pdk.c 
b/board/freescale/mx35pdk/mx35pdk.c
index a6b5a51..9eefe5e 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -34,7 +34,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -240,8 +240,7 @@ int board_late_init(void)
mxc_request_iomux(MX35_PIN_COMPARE, MUX_CONFIG_GPIO);
mxc_iomux_set_input(MUX_IN_GPIO1_IN_5, INPUT_CTL_PATH0);
 
-   mxc_gpio_direction(37, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(37, 1);
+   gpio_direction_output(37, 1);
}
 
val = mc9sdz60_reg_read(MC9SDZ60_REG_GPIO_1) | 0x04;
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 0d4b733..4e9022d 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -63,6 +63,7 @@
 #define CONFIG_SYS_I2C_SPEED   10
 #define CONFIG_SYS_I2C_SLAVE   0xfe
 #define CONFIG_MXC_SPI
+#define CONFIG_MXC_GPIO
 
 
 /*
-- 
1.7.1

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


[U-Boot] [PATCH 13/14] MX5: mx53loco: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Jason Liu 
---
 board/freescale/mx53loco/mx53loco.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx53loco/mx53loco.c 
b/board/freescale/mx53loco/mx53loco.c
index 18b388e..ade1006 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -34,7 +34,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -146,9 +146,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *cd = mxc_gpio_get(77); /*GPIO3_13*/
+   *cd = gpio_get_value(77); /*GPIO3_13*/
else
-   *cd = mxc_gpio_get(75); /*GPIO3_11*/
+   *cd = gpio_get_value(75); /*GPIO3_11*/
 
return 0;
 }
-- 
1.7.1

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


[U-Boot] [PATCH 12/14] MX5: mx53evk: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Jason Liu 
---
 board/freescale/mx53evk/mx53evk.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx53evk/mx53evk.c 
b/board/freescale/mx53evk/mx53evk.c
index 88095dc..81857ff 100644
--- a/board/freescale/mx53evk/mx53evk.c
+++ b/board/freescale/mx53evk/mx53evk.c
@@ -33,7 +33,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -213,9 +213,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *cd = mxc_gpio_get(77); /*GPIO3_13*/
+   *cd = gpio_get_value(77); /*GPIO3_13*/
else
-   *cd = mxc_gpio_get(75); /*GPIO3_11*/
+   *cd = gpio_get_value(75); /*GPIO3_11*/
 
return 0;
 }
-- 
1.7.1

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


[U-Boot] [PATCH 11/14] MX5: vision2: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 board/ttcontrol/vision2/vision2.c |   71 ++---
 1 files changed, 27 insertions(+), 44 deletions(-)

diff --git a/board/ttcontrol/vision2/vision2.c 
b/board/ttcontrol/vision2/vision2.c
index 565c4d0..17a2558 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -29,7 +29,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -69,9 +69,9 @@ void hw_watchdog_reset(void)
int val;
 
/* toggle watchdog trigger pin */
-   val = mxc_gpio_get(66);
+   val = gpio_get_value(66);
val = val ? 0 : 1;
-   mxc_gpio_set(66, val);
+   gpio_set_value(66, val);
 }
 #endif
 
@@ -233,30 +233,22 @@ static void reset_peripherals(int reset)
if (reset) {
 
/* reset_n is on NANDF_D15 */
-   mxc_gpio_set(89, 0);
-   mxc_gpio_direction(89, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(89, 0);
 
 #ifdef CONFIG_VISION2_HW_1_0
/*
 * set FEC Configuration lines
 * set levels of FEC config lines
 */
-   mxc_gpio_set(75, 0);
-   mxc_gpio_set(74, 1);
-   mxc_gpio_set(95, 1);
-   mxc_gpio_direction(75, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(74, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(95, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(75, 0);
+   gpio_direction_output(74, 1);
+   gpio_direction_output(95, 1);
 
/* set direction of FEC config lines */
-   mxc_gpio_set(59, 0);
-   mxc_gpio_set(60, 0);
-   mxc_gpio_set(61, 0);
-   mxc_gpio_set(55, 1);
-   mxc_gpio_direction(59, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(60, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(61, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(55, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(59, 0);
+   gpio_direction_output(60, 0);
+   gpio_direction_output(61, 0);
+   gpio_direction_output(55, 1);
 
/* FEC_RXD1 - sel GPIO (2-23) for configuration -> 1 */
mxc_request_iomux(MX51_PIN_EIM_EB3, IOMUX_CONFIG_ALT1);
@@ -283,7 +275,7 @@ static void reset_peripherals(int reset)
PAD_CTL_DRV_VOT_HIGH | PAD_CTL_DRV_MAX);
} else {
/* set FEC Control lines */
-   mxc_gpio_direction(89, MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(89);
udelay(500);
 
 #ifdef CONFIG_VISION2_HW_1_0
@@ -438,31 +430,23 @@ static void setup_gpios(void)
 * Set GPIO1_4 to high and output; it is used to reset
 * the system on reboot
 */
-   mxc_gpio_set(4, 1);
-   mxc_gpio_direction(4, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(4, 1);
 
-   mxc_gpio_set(7, 0);
-   mxc_gpio_direction(7, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(7, 0);
for (i = 65; i < 71; i++) {
-   mxc_gpio_set(i, 0);
-   mxc_gpio_direction(i, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(i, 0);
}
 
-   mxc_gpio_set(94, 0);
-   mxc_gpio_direction(94, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(94, 0);
 
/* Set POWER_OFF high */
-   mxc_gpio_set(91, 1);
-   mxc_gpio_direction(91, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(91, 1);
 
-   mxc_gpio_set(90, 0);
-   mxc_gpio_direction(90, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(90, 0);
 
-   mxc_gpio_set(122, 0);
-   mxc_gpio_direction(122, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(122, 0);
 
-   mxc_gpio_set(121, 1);
-   mxc_gpio_direction(121, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(121, 1);
 
WATCHDOG_RESET();
 }
@@ -551,7 +535,7 @@ int get_mmc_getcd(u8 *cd, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *cd = mxc_gpio_get(0);
+   *cd = gpio_get_value(0);
else
*cd = 0;
 
@@ -623,8 +607,7 @@ int board_early_init_f(void)
init_drive_strength();
 
/* Setup debug led */
-   mxc_gpio_set(6, 0);
-   mxc_gpio_direction(6, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(6, 0);
mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0);
mxc_iomux_set_pad(MX51_PIN_GPIO1_6, PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST);
 
@@ -644,12 +627,12 @@ int board_early_init_f(void)
 static void backlight(int on)
 {
if (on) {
-   mxc_gpio_set(65, 1);
+   gpio_set_value(65, 1);
udelay(1);
-   mxc_gpio_set(68, 1);
+

[U-Boot] [PATCH 10/14] MX5: mx53smd: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Fabio Estevam 
---
 board/freescale/mx53smd/mx53smd.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/freescale/mx53smd/mx53smd.c 
b/board/freescale/mx53smd/mx53smd.c
index 21b5d14..4a7ee55 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -139,7 +139,7 @@ struct fsl_esdhc_cfg esdhc_cfg[1] = {
 
 int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
-   *cd = mxc_gpio_get(77); /*GPIO3_13*/
+   *cd = gpio_get_value(77); /*GPIO3_13*/
 
return 0;
 }
-- 
1.7.1

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


[U-Boot] [PATCH 09/14] MX5: mx53ard: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Fabio Estevam 
---
 board/freescale/mx53ard/mx53ard.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/freescale/mx53ard/mx53ard.c 
b/board/freescale/mx53ard/mx53ard.c
index 134603a..6e3360b 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #define ETHERNET_INT   (1 * 32 + 31)  /* GPIO2_31 */
 
@@ -93,9 +93,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *cd = mxc_gpio_get(1); /*GPIO1_1*/
+   *cd = gpio_get_value(1); /*GPIO1_1*/
else
-   *cd = mxc_gpio_get(4); /*GPIO1_4*/
+   *cd = gpio_get_value(4); /*GPIO1_4*/
 
return 0;
 }
@@ -176,7 +176,7 @@ static void weim_smc911x_iomux(void)
 {
/* ETHERNET_INT as GPIO2_31 */
mxc_request_iomux(MX53_PIN_EIM_EB3, IOMUX_CONFIG_ALT1);
-   mxc_gpio_direction(ETHERNET_INT, MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(ETHERNET_INT);
 
/* Data bus */
mxc_request_iomux(MX53_PIN_EIM_D16, IOMUX_CONFIG_ALT0);
-- 
1.7.1

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


[U-Boot] [PATCH 08/14] MX25: zmx25: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Matthias Weisser 
---
 board/syteco/zmx25/zmx25.c |   35 ++-
 1 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index f055038..893adc6 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -29,7 +29,7 @@
  *
  */
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -56,8 +56,7 @@ int board_init()
 
/* Setup of core volatage selection pin to run at 1.4V */
writel(gpio_mux_mode5, &muxctl->pad_ext_armclk); /* VCORE GPIO3[15] */
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(3, 15), MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(3, 15), 1);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 15), 1);
 
/* Setup of input daisy chains for SD card pins*/
writel(gpio_mux_mode0_sion, &muxctl->pad_sd1_cmd);
@@ -69,11 +68,10 @@ int board_init()
 
/* Setup of digital output for USB power and OC */
writel(gpio_mux_mode5, &muxctl->pad_csi_d3); /* USB Power GPIO1[28] */
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(1, 28), MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(1, 28), 1);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(1, 28), 1);
 
writel(gpio_mux_mode5, &muxctl->pad_csi_d2); /* USB OC GPIO1[27] */
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(1, 18), MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(MXC_GPIO_PORT_TO_NUM(1, 18));
 
/* Setup of digital output control pins */
writel(gpio_mux_mode5, &muxctl->pad_csi_d8); /* Ouput 1 Ctrl GPIO1[7] */
@@ -85,25 +83,21 @@ int board_init()
writel(0, &padctl->pad_csi_d5); /* Ouput 2 Stat pull up off */
 
/* Switch both output drivers off */
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(1, 7), 0);
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(1, 7), MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(1, 6), 0);
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(1, 6), MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(1, 7), 0);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(1, 6), 0);
 
/* Setup of key input pin GPIO2[29]*/
writel(gpio_mux_mode5 | MX25_PIN_MUX_SION, &muxctl->pad_kpp_row0);
writel(0, &padctl->pad_kpp_row0); /* Key pull up off */
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(2, 29), MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(MXC_GPIO_PORT_TO_NUM(2, 29));
 
/* Setup of status LED outputs */
writel(gpio_mux_mode5, &muxctl->pad_csi_d9);/* GPIO4[21] */
writel(gpio_mux_mode5, &muxctl->pad_csi_d4);/* GPIO1[29] */
 
/* Switch both LEDs off */
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(4, 21), 0);
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(4, 21), MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(1, 29), 0);
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(1, 29), MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(4, 21), 0);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(1, 29), 0);
 
/* Setup of CAN1 and CAN2 signals */
writel(gpio_mux_mode6, &muxctl->pad_gpio_a);/* CAN1 TX */
@@ -158,13 +152,12 @@ int board_late_init(void)
writel(gpio_mux_mode2, &muxctl->pad_uart2_cts);
 
/* assert PHY reset (low) */
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(3, 16), 0);
-   mxc_gpio_direction(MXC_GPIO_PORT_TO_NUM(3, 16), MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(MXC_GPIO_PORT_TO_NUM(3, 16), 0);
 
udelay(5000);
 
/* deassert PHY reset */
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(3, 16), 1);
+   gpio_set_value(MXC_GPIO_PORT_TO_NUM(3, 16), 1);
 
udelay(5000);
 #endif
@@ -172,12 +165,12 @@ int board_late_init(void)
e = getenv("gs_base_board");
if (e != NULL) {
if (strcmp(e, "G283") == 0) {
-   int key = mxc_gpio_get(MXC_GPIO_PORT_TO_NUM(2, 29));
+   int key = gpio_get_value(MXC_GPIO_PORT_TO_NUM(2, 29));
 
if (key) {
/* Switch on both LEDs to inidcate boot mode */
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(1, 29), 0);
-   mxc_gpio_set(MXC_GPIO_PORT_TO_NUM(4, 21), 0);
+   gpio_set_value(MXC_GPIO_PORT_TO_NUM(1, 29), 0);
+   gpio_set_value(MXC_GPIO_PORT_TO_NUM(4, 21), 0);
 
setenv("preboot", "run gs_slow_boot");
} else
-- 
1.7.1

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


[U-Boot] [PATCH 07/14] MX5: efikamx: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Marek Vasut 
---
 board/efikamx/efikamx.c |   62 ++
 1 files changed, 24 insertions(+), 38 deletions(-)

diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
index 4b36918..5be1f6c 100644
--- a/board/efikamx/efikamx.c
+++ b/board/efikamx/efikamx.c
@@ -27,7 +27,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -76,28 +76,23 @@ u32 get_efika_rev(void)
 *  rev1.4: 1,0,0
 */
mxc_request_iomux(MX51_PIN_NANDF_CS0, IOMUX_CONFIG_GPIO);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0),
-   MXC_GPIO_DIRECTION_OUT);
/* set to 1 in order to get correct value on board rev1.1 */
-   mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0), 1);
+   gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0), 1);
 
mxc_request_iomux(MX51_PIN_NANDF_CS0, IOMUX_CONFIG_GPIO);
mxc_iomux_set_pad(MX51_PIN_NANDF_CS0, PAD_CTL_100K_PU);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0),
-   MXC_GPIO_DIRECTION_IN);
-   rev |= (!!mxc_gpio_get(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0))) << 0;
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0));
+   rev |= (!!gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS0))) << 0;
 
mxc_request_iomux(MX51_PIN_NANDF_CS1, IOMUX_CONFIG_GPIO);
mxc_iomux_set_pad(MX51_PIN_NANDF_CS1, PAD_CTL_100K_PU);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS1),
-   MXC_GPIO_DIRECTION_IN);
-   rev |= (!!mxc_gpio_get(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS1))) << 1;
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS1));
+   rev |= (!!gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_CS1))) << 1;
 
mxc_request_iomux(MX51_PIN_NANDF_RB3, IOMUX_CONFIG_GPIO);
mxc_iomux_set_pad(MX51_PIN_NANDF_RB3, PAD_CTL_100K_PU);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_NANDF_RB3),
-   MXC_GPIO_DIRECTION_IN);
-   rev |= (!!mxc_gpio_get(IOMUX_TO_GPIO(MX51_PIN_NANDF_RB3))) << 2;
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_NANDF_RB3));
+   rev |= (!!gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_NANDF_RB3))) << 2;
 
return (~rev & 0x7) + 1;
 }
@@ -154,15 +149,11 @@ static void setup_iomux_spi(void)
 
/* Configure SS0 as a GPIO */
mxc_request_iomux(MX51_PIN_CSPI1_SS0, IOMUX_CONFIG_GPIO);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0),
-   MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0), 0);
+   gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0), 0);
 
/* Configure SS1 as a GPIO */
mxc_request_iomux(MX51_PIN_CSPI1_SS1, IOMUX_CONFIG_GPIO);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1),
-   MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_set(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1), 1);
+   gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1), 1);
 
/* 000: Select mux mode: ALT0 mux port: SS2 of instance: ecspi1. */
mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT0);
@@ -282,9 +273,9 @@ int board_mmc_getcd(u8 *absent, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *absent = mxc_gpio_get(IOMUX_TO_GPIO(MX51_PIN_GPIO1_0));
+   *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_0));
else
-   *absent = mxc_gpio_get(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
+   *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
 
return 0;
 }
@@ -307,10 +298,8 @@ int board_mmc_init(bd_t *bis)
PAD_CTL_100K_PU | PAD_CTL_ODE_OPENDRAIN_NONE |
PAD_CTL_SRE_FAST);
 
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_GPIO1_0),
-   MXC_GPIO_DIRECTION_IN);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_GPIO1_1),
-   MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_GPIO1_0));
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_GPIO1_1));
 
/* Internal SDHC1 IOMUX + SDHC2 IOMUX on old boards */
if (get_efika_rev() < EFIKAMX_BOARD_REV_12) {
@@ -389,10 +378,8 @@ int board_mmc_init(bd_t *bis)
PAD_CTL_100K_PU | PAD_CTL_ODE_OPENDRAIN_NONE |
PAD_CTL_SRE_FAST);
 
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8),
-   MXC_GPIO_DIRECTION_IN);
-   mxc_gpio_direction(IOMUX_TO_GPIO(MX51_PIN_GPIO1_7),
-   MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
+   gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_GPIO1_7));
 
ret = fs

[U-Boot] [PATCH 03/14] MX31: make use of GPIO framework for MX31 processor

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-mx31/gpio.h |   35 +
 arch/arm/include/asm/arch-mx31/imx-regs.h |7 -
 2 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx31/gpio.h

diff --git a/arch/arm/include/asm/arch-mx31/gpio.h 
b/arch/arm/include/asm/arch-mx31/gpio.h
new file mode 100644
index 000..95b73bf
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx31/gpio.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011
+ * Stefano Babic, DENX Software Engineering, 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __ASM_ARCH_MX31_GPIO_H
+#define __ASM_ARCH_MX31_GPIO_H
+
+/* GPIO Registers */
+struct gpio_regs {
+   u32 gpio_dr;
+   u32 gpio_dir;
+   u32 gpio_psr;
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx31/imx-regs.h 
b/arch/arm/include/asm/arch-mx31/imx-regs.h
index 3c8d607..2064870 100644
--- a/arch/arm/include/asm/arch-mx31/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx31/imx-regs.h
@@ -57,13 +57,6 @@ struct clock_control_regs {
u32 pdr2;
 };
 
-/* GPIO Registers */
-struct gpio_regs {
-   u32 gpio_dr;
-   u32 gpio_dir;
-   u32 gpio_psr;
-};
-
 struct cspi_regs {
u32 rxdata;
u32 txdata;
-- 
1.7.1

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


[U-Boot] [PATCH 06/14] MX31: QONG: make use of GPIO framework

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 board/davedenx/qong/fpga.c |   10 +-
 board/davedenx/qong/qong.c |   36 +---
 2 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/board/davedenx/qong/fpga.c b/board/davedenx/qong/fpga.c
index 789acf0..6536a0b 100644
--- a/board/davedenx/qong/fpga.c
+++ b/board/davedenx/qong/fpga.c
@@ -25,7 +25,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include "qong_fpga.h"
@@ -41,22 +41,22 @@ static void qong_jtag_init(void)
 
 static void qong_fpga_jtag_set_tdi(int value)
 {
-   mxc_gpio_set(QONG_FPGA_TDI_PIN, value);
+   gpio_set_value(QONG_FPGA_TDI_PIN, value);
 }
 
 static void qong_fpga_jtag_set_tms(int value)
 {
-   mxc_gpio_set(QONG_FPGA_TMS_PIN, value);
+   gpio_set_value(QONG_FPGA_TMS_PIN, value);
 }
 
 static void qong_fpga_jtag_set_tck(int value)
 {
-   mxc_gpio_set(QONG_FPGA_TCK_PIN, value);
+   gpio_set_value(QONG_FPGA_TCK_PIN, value);
 }
 
 static int qong_fpga_jtag_get_tdo(void)
 {
-   return mxc_gpio_get(QONG_FPGA_TDO_PIN);
+   return gpio_get_value(QONG_FPGA_TDO_PIN);
 }
 
 lattice_board_specific_func qong_fpga_fns = {
diff --git a/board/davedenx/qong/qong.c b/board/davedenx/qong/qong.c
index ec22627..99432ed 100644
--- a/board/davedenx/qong/qong.c
+++ b/board/davedenx/qong/qong.c
@@ -28,7 +28,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include "qong_fpga.h"
 #include 
 
@@ -51,9 +51,9 @@ int dram_init (void)
 
 static void qong_fpga_reset(void)
 {
-   mxc_gpio_set(QONG_FPGA_RST_PIN, 0);
+   gpio_set_value(QONG_FPGA_RST_PIN, 0);
udelay(30);
-   mxc_gpio_set(QONG_FPGA_RST_PIN, 1);
+   gpio_set_value(QONG_FPGA_RST_PIN, 1);
 
udelay(300);
 }
@@ -76,21 +76,20 @@ int board_early_init_f (void)
 
/* FPGA reset  Pin */
/* rstn = 0 */
-   mxc_gpio_set(QONG_FPGA_RST_PIN, 0);
-   mxc_gpio_direction(QONG_FPGA_RST_PIN, MXC_GPIO_DIRECTION_OUT);
+   gpio_direction_output(QONG_FPGA_RST_PIN, 0);
 
/* set interrupt pin as input */
-   mxc_gpio_direction(QONG_FPGA_IRQ_PIN, MXC_GPIO_DIRECTION_IN);
+   gpio_direction_input(QONG_FPGA_IRQ_PIN);
 
/* FPGA JTAG Interface */
mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SFS6, MUX_CTL_GPIO));
mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SCK6, MUX_CTL_GPIO));
mx31_gpio_mux(IOMUX_MODE(MUX_CTL_CAPTURE, MUX_CTL_GPIO));
mx31_gpio_mux(IOMUX_MODE(MUX_CTL_COMPARE, MUX_CTL_GPIO));
-   mxc_gpio_direction(QONG_FPGA_TCK_PIN, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(QONG_FPGA_TMS_PIN, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(QONG_FPGA_TDI_PIN, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(QONG_FPGA_TDO_PIN, MXC_GPIO_DIRECTION_IN);
+   gpio_direction_output(QONG_FPGA_TCK_PIN, 0);
+   gpio_direction_output(QONG_FPGA_TMS_PIN, 0);
+   gpio_direction_output(QONG_FPGA_TDI_PIN, 0);
+   gpio_direction_input(QONG_FPGA_TDO_PIN);
 #endif
 
/* setup pins for UART1 */
@@ -263,27 +262,26 @@ static void board_nand_setup(void)
qong_fpga_reset();
 
/* Enable NAND flash */
-   mxc_gpio_set(15, 1);
-   mxc_gpio_set(14, 1);
-   mxc_gpio_direction(15, MXC_GPIO_DIRECTION_OUT);
-   mxc_gpio_direction(16, MXC_GPIO_DIRECTION_IN);
-   mxc_gpio_direction(14, MXC_GPIO_DIRECTION_IN);
-   mxc_gpio_set(15, 0);
+   gpio_set_value(15, 1);
+   gpio_set_value(14, 1);
+   gpio_direction_output(15, 0);
+   gpio_direction_input(16);
+   gpio_direction_input(14);
 
 }
 
 int qong_nand_rdy(void *chip)
 {
udelay(1);
-   return mxc_gpio_get(16);
+   return gpio_get_value(16);
 }
 
 void qong_nand_select_chip(struct mtd_info *mtd, int chip)
 {
if (chip >= 0)
-   mxc_gpio_set(15, 0);
+   gpio_set_value(15, 0);
else
-   mxc_gpio_set(15, 1);
+   gpio_set_value(15, 1);
 
 }
 
-- 
1.7.1

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


[U-Boot] [PATCH 05/14] MX35: make use of GPIO framework for MX35 processor

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-mx35/gpio.h |   40 +
 1 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx35/gpio.h

diff --git a/arch/arm/include/asm/arch-mx35/gpio.h 
b/arch/arm/include/asm/arch-mx35/gpio.h
new file mode 100644
index 000..7bcc3e8
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx35/gpio.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011
+ * Stefano Babic, DENX Software Engineering, 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __ASM_ARCH_MX35_GPIO_H
+#define __ASM_ARCH_MX35_GPIO_H
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dr;/* data */
+   u32 gpio_dir;   /* direction */
+   u32 psr;/* pad satus */
+   u32 icr1;   /* interrupt config 1 */
+   u32 icr2;   /* interrupt config 2 */
+   u32 imr;/* interrupt mask */
+   u32 isr;/* interrupt status */
+   u32 edge_sel;   /* edge select */
+};
+
+#endif
-- 
1.7.1

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


[U-Boot] [PATCH 01/14] IMX: uniform GPIO interface using GPIO framework

2011-08-21 Thread Stefano Babic
IMX processors has a slightly different interface
to access GPIOs and do not make use of the provided GPIO
framework. The patch substitutes mxc_ specific
functions and make use of the API in asm/gpio.h

Signed-off-by: Stefano Babic 
---
 drivers/gpio/mxc_gpio.c |   51 ++---
 drivers/spi/mxc_spi.c   |8 +++---
 include/mxc_gpio.h  |   57 ---
 3 files changed, 51 insertions(+), 65 deletions(-)
 delete mode 100644 include/mxc_gpio.h

diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 6efbb02..a7f36b2 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -2,6 +2,9 @@
  * Copyright (C) 2009
  * Guennadi Liakhovetski, DENX Software Engineering, 
  *
+ * Copyright (C) 2011
+ * Stefano Babic, DENX Software Engineering, 
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -22,10 +25,16 @@
  */
 #include 
 #include 
+#include 
 #include 
-#include 
 #include 
 
+enum mxc_gpio_direction {
+   MXC_GPIO_DIRECTION_IN,
+   MXC_GPIO_DIRECTION_OUT,
+};
+
+
 /* GPIO port description */
 static unsigned long gpio_ports[] = {
[0] = GPIO1_BASE_ADDR,
@@ -41,7 +50,8 @@ static unsigned long gpio_ports[] = {
 #endif
 };
 
-int mxc_gpio_direction(unsigned int gpio, enum mxc_gpio_direction direction)
+static int mxc_gpio_direction(unsigned int gpio,
+   enum mxc_gpio_direction direction)
 {
unsigned int port = gpio >> 5;
struct gpio_regs *regs;
@@ -68,7 +78,7 @@ int mxc_gpio_direction(unsigned int gpio, enum 
mxc_gpio_direction direction)
return 0;
 }
 
-void mxc_gpio_set(unsigned int gpio, unsigned int value)
+void gpio_set_value(int gpio, int value)
 {
unsigned int port = gpio >> 5;
struct gpio_regs *regs;
@@ -89,7 +99,7 @@ void mxc_gpio_set(unsigned int gpio, unsigned int value)
writel(l, ®s->gpio_dr);
 }
 
-int mxc_gpio_get(unsigned int gpio)
+int gpio_get_value(int gpio)
 {
unsigned int port = gpio >> 5;
struct gpio_regs *regs;
@@ -106,3 +116,36 @@ int mxc_gpio_get(unsigned int gpio)
 
return l;
 }
+
+int gpio_request(int gp, const char *label)
+{
+   unsigned int port = gp >> 5;
+   if (port >= ARRAY_SIZE(gpio_ports))
+   return -EINVAL;
+   return 0;
+}
+
+void gpio_free(int gp)
+{
+}
+
+void gpio_toggle_value(int gp)
+{
+   gpio_set_value(gp, !gpio_get_value(gp));
+}
+
+int gpio_direction_input(int gp)
+{
+   return mxc_gpio_direction(gp, MXC_GPIO_DIRECTION_IN);
+}
+
+int gpio_direction_output(int gp, int value)
+{
+   int ret = mxc_gpio_direction(gp, MXC_GPIO_DIRECTION_OUT);
+
+   if (ret < 0)
+   return ret;
+
+   gpio_set_value(gp, value);
+   return 0;
+}
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 81381d9..2fa7486 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -145,14 +145,14 @@ void spi_cs_activate(struct spi_slave *slave)
 {
struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave);
if (mxcs->gpio > 0)
-   mxc_gpio_set(mxcs->gpio, mxcs->ss_pol);
+   gpio_set_value(mxcs->gpio, mxcs->ss_pol);
 }
 
 void spi_cs_deactivate(struct spi_slave *slave)
 {
struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave);
if (mxcs->gpio > 0)
-   mxc_gpio_set(mxcs->gpio,
+   gpio_set_value(mxcs->gpio,
  !(mxcs->ss_pol));
 }
 
@@ -468,7 +468,7 @@ static int decode_cs(struct mxc_spi_slave *mxcs, unsigned 
int cs)
if (cs > 3) {
mxcs->gpio = cs >> 8;
cs &= 3;
-   ret = mxc_gpio_direction(mxcs->gpio, OUT);
+   ret = gpio_direction_output(mxcs->gpio, 0);
if (ret) {
printf("mxc_spi: cannot setup gpio %d\n", mxcs->gpio);
return -EINVAL;
diff --git a/include/mxc_gpio.h b/include/mxc_gpio.h
deleted file mode 100644
index f673dce..000
--- a/include/mxc_gpio.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * (c) 2007 Pengutronix, Sascha Hauer 
- *
- * 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 Temp

[U-Boot] [PATCH 04/14] MX5: make use of GPIO framework for MX5 processor

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-mx5/gpio.h |   35 ++
 arch/arm/include/asm/arch-mx5/imx-regs.h |7 --
 2 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx5/gpio.h

diff --git a/arch/arm/include/asm/arch-mx5/gpio.h 
b/arch/arm/include/asm/arch-mx5/gpio.h
new file mode 100644
index 000..1dc34e9
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx5/gpio.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011
+ * Stefano Babic, DENX Software Engineering, 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __ASM_ARCH_MX5_GPIO_H
+#define __ASM_ARCH_MX5_GPIO_H
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dr;
+   u32 gpio_dir;
+   u32 gpio_psr;
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h 
b/arch/arm/include/asm/arch-mx5/imx-regs.h
index fb2c66f..a4e680b 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -409,13 +409,6 @@ struct iomuxc {
 };
 #endif
 
-/* GPIO Registers */
-struct gpio_regs {
-   u32 gpio_dr;
-   u32 gpio_dir;
-   u32 gpio_psr;
-};
-
 /* System Reset Controller (SRC) */
 struct src {
u32 scr;
-- 
1.7.1

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


[U-Boot] [PATCH 02/14] MX25: make use of GPIO framework for MX25 processor

2011-08-21 Thread Stefano Babic
Signed-off-by: Stefano Babic 
---
 arch/arm/include/asm/arch-mx25/gpio.h |   45 +
 arch/arm/include/asm/arch-mx25/imx-regs.h |   12 
 2 files changed, 45 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx25/gpio.h

diff --git a/arch/arm/include/asm/arch-mx25/gpio.h 
b/arch/arm/include/asm/arch-mx25/gpio.h
new file mode 100644
index 000..dc6edc7
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx25/gpio.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011
+ * Stefano Babic, DENX Software Engineering, 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
+#ifndef __ASM_ARCH_MX25_GPIO_H
+#define __ASM_ARCH_MX25_GPIO_H
+
+/* Converts a GPIO port number and the internal bit position
+ * to the GPIO number
+ */
+#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f))
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dr;/* data */
+   u32 gpio_dir;   /* direction */
+   u32 psr;/* pad satus */
+   u32 icr1;   /* interrupt config 1 */
+   u32 icr2;   /* interrupt config 2 */
+   u32 imr;/* interrupt mask */
+   u32 isr;/* interrupt status */
+   u32 edge_sel;   /* edge select */
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h 
b/arch/arm/include/asm/arch-mx25/imx-regs.h
index 2ccb445..9e30f7c 100644
--- a/arch/arm/include/asm/arch-mx25/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx25/imx-regs.h
@@ -84,18 +84,6 @@ struct esdramc_regs {
u32 cdlyl;  /* delay line cycle length debug */
 };
 
-/* GPIO registers */
-struct gpio_regs {
-   u32 gpio_dr;/* data */
-   u32 gpio_dir;   /* direction */
-   u32 psr;/* pad satus */
-   u32 icr1;   /* interrupt config 1 */
-   u32 icr2;   /* interrupt config 2 */
-   u32 imr;/* interrupt mask */
-   u32 isr;/* interrupt status */
-   u32 edge_sel;   /* edge select */
-};
-
 /* General Purpose Timer (GPT) registers */
 struct gpt_regs {
u32 ctrl;   /* control */
-- 
1.7.1

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


Re: [U-Boot] [PATCH v4] cmd_sf: add "update" subcommand to do smart SPI flash update

2011-08-21 Thread Simon Glass
On Sat, Aug 20, 2011 at 4:35 PM, Mike Frysinger  wrote:
> From: Simon Glass 
>
> This adds a new SPI flash command which only rewrites blocks if the contents
> need to change. This can speed up SPI flash programming when much of the
> data is unchanged from what is already there.
>
> Signed-off-by: Simon Glass 
> Signed-off-by: Mike Frysinger 
> ---
> v4
>        - tweak summary
>        - fix printf warnings with %d vs %zu
>        - fix help string and missing/extra newlines
>
> TODO: it'd be nice if we supported +len like we do with erase ...
...
> +static int spi_flash_update(struct spi_flash *flash, u32 offset,
> +               size_t len, const char *buf)
> +{
> +       const char *err_oper = NULL;
> +       char *cmp_buf;
> +       const char *end = buf + len;
> +       size_t todo;            /* number of bytes to do in this pass */
> +       size_t skipped;         /* statistics */
> +
> +       cmp_buf = malloc(flash->sector_size);
> +       if (cmp_buf) {
> +               for (skipped = 0; buf < end; buf += todo, offset += todo) {

Oops I got this wrong:

for (skipped = 0; buf < end && !err_oper; buf += todo, offset += todo) {

(or if (err_oper) break in the loop)

> +                       todo = min(end - buf, flash->sector_size);
> +                       err_oper = spi_flash_update_block(flash, offset, todo,
> +                                       buf, cmp_buf, &skipped);
> +               }
> +       } else {
> +               err_oper = "malloc";
> +       }
> +       free(cmp_buf);
> +       if (err_oper) {
> +               printf("SPI flash failed in %s step\n", err_oper);
> +               return 1;
> +       }
> +       printf("%zu bytes written, %zu bytes skipped\n", len - skipped, 
> skipped);
> +       return 0;
> +}
> +
>  static int do_spi_flash_read_write(int argc, char * const argv[])
>  {
>        unsigned long addr;
> @@ -137,7 +210,9 @@ static int do_spi_flash_read_write(int argc, char * const 
> argv[])
>                return 1;
>        }
>
> -       if (strcmp(argv[0], "read") == 0)
> +       if (strcmp(argv[0], "update") == 0)
> +               ret = spi_flash_update(flash, offset, len, buf);
> +       else if (strcmp(argv[0], "read") == 0)
>                ret = spi_flash_read(flash, offset, len, buf);
>        else
>                ret = spi_flash_write(flash, offset, len, buf);
> @@ -203,7 +278,8 @@ static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[
>                return 1;
>        }
>
> -       if (strcmp(cmd, "read") == 0 || strcmp(cmd, "write") == 0)
> +       if (strcmp(cmd, "read") == 0 || strcmp(cmd, "write") == 0 ||
> +           strcmp(cmd, "update") == 0)
>                ret = do_spi_flash_read_write(argc, argv);
>        else if (strcmp(cmd, "erase") == 0)
>                ret = do_spi_flash_erase(argc, argv);
> @@ -228,5 +304,7 @@ U_BOOT_CMD(
>        "sf write addr offset len       - write `len' bytes from memory\n"
>        "                                 at `addr' to flash at `offset'\n"
>        "sf erase offset [+]len         - erase `len' bytes from `offset'\n"
> -       "                                 `+len' round up `len' to block size"
> +       "                                 `+len' round up `len' to block 
> size\n"
> +       "sf update addr offset len      - erase and write `len' bytes from 
> memory\n"
> +       "                                 at `addr' to flash at `offset'"
>  );
> --
> 1.7.6
>
>
___
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 -- watch out

2011-08-21 Thread Albert ARIBAUD
Hi again Prafulla,

Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> Hi Albert
>
> Please kindly pull
> The following changes since commit 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
>Prafulla Wadaskar (1):
>  Merge branch 'master' of 
> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
>
> are available in the git repository at:
>
>u-boot-marvell.git master branch.
>
> Ajay Bhargav (2):
>gpio: Add GPIO driver framework for Marvell SoCs
>gpio: Add GPIO driver for Marvell SoC Armada100
>
>   arch/arm/include/asm/arch-armada100/gpio.h |   48 
>   drivers/gpio/Makefile  |1 +
>   drivers/gpio/mvgpio.c  |  115 
> 
>   drivers/gpio/mvgpio.h  |   74 ++
>   4 files changed, 238 insertions(+), 0 deletions(-)
>   create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
>   create mode 100644 drivers/gpio/mvgpio.c
>   create mode 100644 drivers/gpio/mvgpio.h
>
> Regards..
> Prafulla . .

In order to cherry-pick those two commits to my 'next' branch as agreed, 
I did fetch your u-boot-marvell/master, and then realized that not only 
does it a merge, but it even does it to a bad u-bot-arm branch that 
Wolfgang pointed out to me, so I'd rolled back and forced an update 
which did not reach you.

Namely, your master contains 28b7cbdd ("Don't compile in large memory 
test function by default") and 61cb36df ("Added documentation for 
CONFIG_SYS_TEXT_BASE").

Please roll back your master branch to just before merge commit 043a7639!

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


[U-Boot] [PATCH] MX35: MX35PDK: support additional RAM on CSD1

2011-08-21 Thread Stefano Babic
Modules on mx35pdk have additional 128MB
memory connected to CSD1.

Signed-off-by: Stefano Babic 
---
 board/freescale/mx35pdk/lowlevel_init.S |9 +
 board/freescale/mx35pdk/mx35pdk.c   |   17 +++--
 include/configs/mx35pdk.h   |6 +++---
 3 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/board/freescale/mx35pdk/lowlevel_init.S 
b/board/freescale/mx35pdk/lowlevel_init.S
index 9b0f1b5..9fd04cb 100644
--- a/board/freescale/mx35pdk/lowlevel_init.S
+++ b/board/freescale/mx35pdk/lowlevel_init.S
@@ -193,10 +193,11 @@
mov r2, #0x00
mov r1, #CSD0_BASE_ADDR
bl setup_sdram_bank
-   cmp r3, #0x0
-   orreq r5, r5, #1
-   eorne r2, r2, #0x1
-   blne setup_sdram_bank
+
+   mov r5, #0x00
+   mov r2, #0x00
+   mov r1, #CSD1_BASE_ADDR
+   bl setup_sdram_bank
 
mov lr, fp
 
diff --git a/board/freescale/mx35pdk/mx35pdk.c 
b/board/freescale/mx35pdk/mx35pdk.c
index da926e5..a6b5a51 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -52,12 +52,25 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-   gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1,
-   PHYS_SDRAM_1_SIZE);
+   u32 size1, size2;
+
+   size1 = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
+   size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+
+   gd->ram_size = size1 + size2;
 
return 0;
 }
 
+void dram_init_banksize(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+   gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+}
+
 static void setup_iomux_i2c(void)
 {
int pad;
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 086355b..0d4b733 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -173,11 +173,11 @@
 /*
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS   1
+#define CONFIG_NR_DRAM_BANKS   2
 #define PHYS_SDRAM_1   CSD0_BASE_ADDR
 #define PHYS_SDRAM_1_SIZE  (128 * 1024 * 1024)
-#define iomem_valid_addr(addr, size) \
-   (addr >= PHYS_SDRAM_1 && addr <= (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
+#define PHYS_SDRAM_2   CSD1_BASE_ADDR
+#define PHYS_SDRAM_2_SIZE  (128 * 1024 * 1024)
 
 #define CONFIG_SYS_SDRAM_BASE  CSD0_BASE_ADDR
 #define CONFIG_SYS_INIT_RAM_ADDR   (IRAM_BASE_ADDR + 0x1)
-- 
1.7.1

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread Dirk Behme
On 19.08.2011 00:09, Albert ARIBAUD wrote:
> Hi all,
>
> This week-end I intend to go through the board removal patch set and
> apply those patches in it that still fail to compile with the current
> u-boot-arm/master tree. So:
>
> 1) if there are any pull requests to u-voot-arm/master in the works,
> please try to submit them soon or at lease let me know, and
>
> 2) if there are any board fix patches posted after merge window closure
> and still pending, please also let me know (those before the merge
> window closure should all be in u-boot-arm by now).

For me, recent u-boot-arm.git [1] compiles ./MAKEALL ARMV7 fine now:

 > ./MAKEALL ARMV7
...
- SUMMARY 
Boards compiled: 31
--

:)

Many thanks

Dirk

[1]

commit 5557e86bb0793012057d5462976c2a902bc629ac
omap4: increase SRAM budget to fix build error
___
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

2011-08-21 Thread Albert ARIBAUD
Hi Prafulla,

Le 21/08/2011 10:15, Prafulla Wadaskar a écrit :
>
>
>> -Original Message-
>> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
>> Sent: Sunday, August 21, 2011 1:36 PM
>> To: Prafulla Wadaskar
>> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
>> Subject: Re: Pull request u-boot-marvell.git
>>
>> Hi Prafulla,
>>
>> Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
>>> Hi Albert
>>>
>>> Please kindly pull
>>> The following changes since commit
>> 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
>>> Prafulla Wadaskar (1):
>>>   Merge branch 'master' of
>> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
>>>
>>> are available in the git repository at:
>>>
>>> u-boot-marvell.git master branch.
>>>
>>> Ajay Bhargav (2):
>>> gpio: Add GPIO driver framework for Marvell SoCs
>>> gpio: Add GPIO driver for Marvell SoC Armada100
>>>
>>>arch/arm/include/asm/arch-armada100/gpio.h |   48 
>>>drivers/gpio/Makefile  |1 +
>>>drivers/gpio/mvgpio.c  |  115
>> 
>>>drivers/gpio/mvgpio.h  |   74 ++
>>>4 files changed, 238 insertions(+), 0 deletions(-)
>>>create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
>>>create mode 100644 drivers/gpio/mvgpio.c
>>>create mode 100644 drivers/gpio/mvgpio.h
>>>
>>> Regards..
>>> Prafulla . .
>>
>> One question, to you, and one note, to all ARM custodians:
>>
>> The question, about the patches:
>>
>> These were submitted on 2011/07/21, after the merge window close of
>> 2011/07/16, and are not a bugfix, right? If so they should only go to
>> master after the september release -- I can pull them into
>> u-boot-arm/next if you want then out of your plate, though.
>
> Hi Albert,
> You are right, you may pull them to your next branch.
> I am sorry, it's my mistake I should have pulled and requested on next branch.

Ok. To avoid any issue, I'll cherry-pick these two onto utboo-arm/next.

Maybe you'll want to roll back your own master and move them to your own 
next, too.

> Regards..
> Prafulla . .

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread Albert ARIBAUD
Hi Aneesh,

Le 21/08/2011 10:56, V, Aneesh a écrit :

>> This indeed fixes it. Strange that the warning is not emitted by your
>> toolchain.
>
> Yes, that's indeed strange. Even with your tool-chain it should've emitted
> more warnings. Many of those unsigned variables were assigned -1 in
> elsewhere. That was also never reported.

Actually I only gave one of those warnings. For a single build of 
omap4_panda, there was the following:

clocks.c:274: warning: comparison is always true due to limited range of 
data type
clocks.c:276: warning: comparison is always true due to limited range of 
data type
clocks.c:278: warning: comparison is always true due to limited range of 
data type
clocks.c:280: warning: comparison is always true due to limited range of 
data type
clocks.c:282: warning: comparison is always true due to limited range of 
data type
clocks.c:284: warning: comparison is always true due to limited range of 
data type

But note that these are comparisons, not assignments. The semantics of 
ether operation might explain why one causes a warning and not the other.

> br,
> Aneesh

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread V, Aneesh
Hi Albert,

On Sun, Aug 21, 2011 at 1:44 PM, Albert ARIBAUD
 wrote:
> Hi Aneesh,
>
> Le 21/08/2011 09:51, V, Aneesh a écrit :
>>
>> Hi Albert,
>>
>> On Sat, Aug 20, 2011 at 9:02 PM, Albert ARIBAUD
>>   wrote:
>>>
>>> Hi all,
>>>
>>> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
>>>
>> 1. http://patchwork.ozlabs.org/patch/107678/
>>>
>>> This one lowers bad board builds from 69 to 62, and has been applied.
>>>
>> 2. http://patchwork.ozlabs.org/patch/108865/
>>>
>>> This one kind of half-fixes the two boards it touches: they now build
>>> but with warnings, all the same, of which here is one:
>>>
>>> clocks.c:274: warning: comparison is always true due to limited range of
>>> data type
>>
>> My tool-chain (Sourcery G++ Lite 2010q1 - GCC 4.4.1) never reported this
>> issue.
>> But looks like there is indeed a problem. Hopefully the following patch
>> should
>> solve it:
>>
>> http://patchwork.ozlabs.org/patch/110811/
>
> This indeed fixes it. Strange that the warning is not emitted by your
> toolchain.

Yes, that's indeed strange. Even with your tool-chain it should've emitted
more warnings. Many of those unsigned variables were assigned -1 in
elsewhere. That was also never reported.

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


Re: [U-Boot] [PATCH] omap4: fix build warning due to signed unsigned comparison

2011-08-21 Thread Albert ARIBAUD
Hi Aneesh,

Le 21/08/2011 09:40, Aneesh V a écrit :
> Signed-off-by: Aneesh V
> ---
>   arch/arm/include/asm/arch-omap4/clocks.h |   12 ++--
>   1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-omap4/clocks.h 
> b/arch/arm/include/asm/arch-omap4/clocks.h
> index 374e064..45c947d 100644
> --- a/arch/arm/include/asm/arch-omap4/clocks.h
> +++ b/arch/arm/include/asm/arch-omap4/clocks.h
> @@ -679,12 +679,12 @@ struct dpll_regs {
>   struct dpll_params {
>   u32 m;
>   u32 n;
> - u8 m2;
> - u8 m3;
> - u8 m4;
> - u8 m5;
> - u8 m6;
> - u8 m7;
> + s8 m2;
> + s8 m3;
> + s8 m4;
> + s8 m5;
> + s8 m6;
> + s8 m7;
>   };
>
>   #endif /* _CLOCKS_OMAP4_H_ */

Considering that is trivial, that it fixes the warnings on two ARM 
boards, that Sandeep allowed me to pull in some OMAP patches directly in 
u-boot-arm, and that will make 
 build omap4 boards cleanly,

Applied to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.
___
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

2011-08-21 Thread Prafulla Wadaskar


> -Original Message-
> From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
> Sent: Sunday, August 21, 2011 1:36 PM
> To: Prafulla Wadaskar
> Cc: 'u-boot@lists.denx.de'; Ashish Karkare; Prabhanjan Sarnaik
> Subject: Re: Pull request u-boot-marvell.git
> 
> Hi Prafulla,
> 
> Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> > Hi Albert
> >
> > Please kindly pull
> > The following changes since commit
> 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
> >Prafulla Wadaskar (1):
> >  Merge branch 'master' of
> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
> >
> > are available in the git repository at:
> >
> >u-boot-marvell.git master branch.
> >
> > Ajay Bhargav (2):
> >gpio: Add GPIO driver framework for Marvell SoCs
> >gpio: Add GPIO driver for Marvell SoC Armada100
> >
> >   arch/arm/include/asm/arch-armada100/gpio.h |   48 
> >   drivers/gpio/Makefile  |1 +
> >   drivers/gpio/mvgpio.c  |  115
> 
> >   drivers/gpio/mvgpio.h  |   74 ++
> >   4 files changed, 238 insertions(+), 0 deletions(-)
> >   create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
> >   create mode 100644 drivers/gpio/mvgpio.c
> >   create mode 100644 drivers/gpio/mvgpio.h
> >
> > Regards..
> > Prafulla . .
> 
> One question, to you, and one note, to all ARM custodians:
> 
> The question, about the patches:
> 
> These were submitted on 2011/07/21, after the merge window close of
> 2011/07/16, and are not a bugfix, right? If so they should only go to
> master after the september release -- I can pull them into
> u-boot-arm/next if you want then out of your plate, though.

Hi Albert,
You are right, you may pull them to your next branch.
I am sorry, it's my mistake I should have pulled and requested on next branch.

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread Albert ARIBAUD
Hi Aneesh,

Le 21/08/2011 09:51, V, Aneesh a écrit :
> Hi Albert,
>
> On Sat, Aug 20, 2011 at 9:02 PM, Albert ARIBAUD
>   wrote:
>> Hi all,
>>
>> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
>>
> 1. http://patchwork.ozlabs.org/patch/107678/
>>
>> This one lowers bad board builds from 69 to 62, and has been applied.
>>
> 2. http://patchwork.ozlabs.org/patch/108865/
>>
>> This one kind of half-fixes the two boards it touches: they now build
>> but with warnings, all the same, of which here is one:
>>
>> clocks.c:274: warning: comparison is always true due to limited range of
>> data type
>
> My tool-chain (Sourcery G++ Lite 2010q1 - GCC 4.4.1) never reported this 
> issue.
> But looks like there is indeed a problem. Hopefully the following patch should
> solve it:
>
> http://patchwork.ozlabs.org/patch/110811/

This indeed fixes it. Strange that the warning is not emitted by your 
toolchain.

> best regards,
> Aneesh

Amicalement,
-- 
Albert.
___
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

2011-08-21 Thread Albert ARIBAUD
Hi Prafulla,

Le 21/08/2011 09:34, Prafulla Wadaskar a écrit :
> Hi Albert
>
> Please kindly pull
> The following changes since commit 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
>Prafulla Wadaskar (1):
>  Merge branch 'master' of 
> git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster
>
> are available in the git repository at:
>
>u-boot-marvell.git master branch.
>
> Ajay Bhargav (2):
>gpio: Add GPIO driver framework for Marvell SoCs
>gpio: Add GPIO driver for Marvell SoC Armada100
>
>   arch/arm/include/asm/arch-armada100/gpio.h |   48 
>   drivers/gpio/Makefile  |1 +
>   drivers/gpio/mvgpio.c  |  115 
> 
>   drivers/gpio/mvgpio.h  |   74 ++
>   4 files changed, 238 insertions(+), 0 deletions(-)
>   create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
>   create mode 100644 drivers/gpio/mvgpio.c
>   create mode 100644 drivers/gpio/mvgpio.h
>
> Regards..
> Prafulla . .

One question, to you, and one note, to all ARM custodians:

The question, about the patches:

These were submitted on 2011/07/21, after the merge window close of 
2011/07/16, and are not a bugfix, right? If so they should only go to 
master after the september release -- I can pull them into 
u-boot-arm/next if you want then out of your plate, though.

The note, about pull request to the ARM repo:

I see (here, as in some pull reqs to ARM from others as well) that you 
have merged the u-boot-arm/master tip in your tree. This causes two 
problems, one minor, and one major.

The minor one is that the commit on which your pull request is emitted 
is *not* a commit of u-boot-arm/master, whereas it should be.

The (more) major problem is that this merging is contrary to 
,
 
which mandates that repos be rebased onto their upstream repo, not that 
they merge it.

This is not simply a question of style vs. substance: one of the reasons 
to prefer rebases to merges is that merges prevent effective use of git 
bisect, thus prevent tracking regressions.

(note: I think the Wiki can mislead readers into doing git pulls, which 
actually cause merges, and it would be better if the Wiki suggested git 
fetches instead -- and did not suggest use of intermediate branches such 
as 'uboot' which are only syntactic sugaring for 'u-boot/master'.)

So custodians, instead of merging the upstream repo onto which you will 
send a pull request, please do rebase your repo onto the upstream master 
branch!

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread V, Aneesh
Hi Dirk,

On Sun, Aug 21, 2011 at 1:16 PM, Dirk Behme  wrote:
> On 20.08.2011 17:32, Albert ARIBAUD wrote:
>> Hi all,
>>
>> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
> ...
> 2. http://patchwork.ozlabs.org/patch/108865/
>>
>> This one kind of half-fixes the two boards it touches: they now build
>> but with warnings, all the same, of which here is one:
>>
>> clocks.c:274: warning: comparison is always true due to limited range of
>> data type
>>
>> I'll put this one on hold unless somebody can tell me what's going on.
>
> First, the patch 108865 above fixes a linking issue with the SPL for
> these boards. So I think that this is independent of the clocks.c
> warning you report above. That would mean it would be worth to apply
> 108865 to fix at least the linking issue.
>
> Second, applying 108865 to the recent u-boot-arm.git doesn't show any
> clocks.c warning for me [1]. Could this be tool chain dependent? I
> tried it with [2] and [3], without any warning.
>
> Btw, about which clocks.c (directory) do we talk?

I too didn't get this warning. But I see a problem with omap4/clocks.c.

I have submitted a patch just now.
http://patchwork.ozlabs.org/patch/110811/

BTW, thanks for looking into this.

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread V, Aneesh
Hi Albert,

On Sat, Aug 20, 2011 at 9:02 PM, Albert ARIBAUD
 wrote:
> Hi all,
>
> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
>
 1. http://patchwork.ozlabs.org/patch/107678/
>
> This one lowers bad board builds from 69 to 62, and has been applied.
>
 2. http://patchwork.ozlabs.org/patch/108865/
>
> This one kind of half-fixes the two boards it touches: they now build
> but with warnings, all the same, of which here is one:
>
> clocks.c:274: warning: comparison is always true due to limited range of
> data type

My tool-chain (Sourcery G++ Lite 2010q1 - GCC 4.4.1) never reported this issue.
But looks like there is indeed a problem. Hopefully the following patch should
solve it:

http://patchwork.ozlabs.org/patch/110811/

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


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread Dirk Behme
On 20.08.2011 17:32, Albert ARIBAUD wrote:
> Hi all,
>
> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
...
 2. http://patchwork.ozlabs.org/patch/108865/
>
> This one kind of half-fixes the two boards it touches: they now build
> but with warnings, all the same, of which here is one:
>
> clocks.c:274: warning: comparison is always true due to limited range of
> data type
>
> I'll put this one on hold unless somebody can tell me what's going on.

First, the patch 108865 above fixes a linking issue with the SPL for 
these boards. So I think that this is independent of the clocks.c 
warning you report above. That would mean it would be worth to apply 
108865 to fix at least the linking issue.

Second, applying 108865 to the recent u-boot-arm.git doesn't show any 
clocks.c warning for me [1]. Could this be tool chain dependent? I 
tried it with [2] and [3], without any warning.

Btw, about which clocks.c (directory) do we talk?

Best regards

Dirk

[1]

 > cat include/configs/omap4_sdp4430.h | grep CONFIG_SPL_MAX_SIZE
#define CONFIG_SPL_MAX_SIZE (38 * 1024)

 > ./MAKEALL omap4_sdp4430
Configuring for omap4_sdp4430 board...
textdata bss dec hex filename
  1910434468  202816  398327   613f7 ./u-boot

- SUMMARY 
Boards compiled: 1
--

 > cat include/configs/omap4_panda.h | grep CONFIG_SPL_MAX_SIZE
#define CONFIG_SPL_MAX_SIZE (38 * 1024)

 > ./MAKEALL omap4_panda
Configuring for omap4_panda board...
textdata bss dec hex filename
  1894784380  202820  396678   60d86 ./u-boot

- SUMMARY 
Boards compiled: 1
--


[2] gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)

[3] gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50)



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


[U-Boot] [PATCH] omap4: fix build warning due to signed unsigned comparison

2011-08-21 Thread Aneesh V
Signed-off-by: Aneesh V 
---
 arch/arm/include/asm/arch-omap4/clocks.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap4/clocks.h 
b/arch/arm/include/asm/arch-omap4/clocks.h
index 374e064..45c947d 100644
--- a/arch/arm/include/asm/arch-omap4/clocks.h
+++ b/arch/arm/include/asm/arch-omap4/clocks.h
@@ -679,12 +679,12 @@ struct dpll_regs {
 struct dpll_params {
u32 m;
u32 n;
-   u8 m2;
-   u8 m3;
-   u8 m4;
-   u8 m5;
-   u8 m6;
-   u8 m7;
+   s8 m2;
+   s8 m3;
+   s8 m4;
+   s8 m5;
+   s8 m6;
+   s8 m7;
 };
 
 #endif /* _CLOCKS_OMAP4_H_ */
-- 
1.7.0.4

___
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

2011-08-21 Thread Prafulla Wadaskar
Hi Albert

Please kindly pull
The following changes since commit 043a76397696ca0a77ebee0ffc60bf31bdf37f02:
  Prafulla Wadaskar (1):
Merge branch 'master' of 
git://git.marvell.com/mirror/denx.de/u-boot-arm into armmaster

are available in the git repository at:

  u-boot-marvell.git master branch.

Ajay Bhargav (2):
  gpio: Add GPIO driver framework for Marvell SoCs
  gpio: Add GPIO driver for Marvell SoC Armada100

 arch/arm/include/asm/arch-armada100/gpio.h |   48 
 drivers/gpio/Makefile  |1 +
 drivers/gpio/mvgpio.c  |  115 
 drivers/gpio/mvgpio.h  |   74 ++
 4 files changed, 238 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-armada100/gpio.h
 create mode 100644 drivers/gpio/mvgpio.c
 create mode 100644 drivers/gpio/mvgpio.h

Regards..
Prafulla . .

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


Re: [U-Boot] [PATCH v7 1/2] gpio: Add GPIO driver framework for Marvell SoCs

2011-08-21 Thread Prafulla Wadaskar


> -Original Message-
> From: Ajay Bhargav [mailto:ajay.bhar...@einfochips.com]
> Sent: Thursday, August 18, 2011 11:08 AM
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Ajay Bhargav
> Subject: [PATCH v7 1/2] gpio: Add GPIO driver framework for Marvell SoCs
> 
> This patch adds generic GPIO driver framework support for Marvell SoCs.
> 
> To enable GPIO driver define CONFIG_MARVELL_GPIO and for GPIO commands
> define CONFIG_CMD_GPIO in your board configuration file.
> 
> Signed-off-by: Ajay Bhargav 
> ---
> Changes for v2:
>   - mvgpio.h removed
>   - function get_gpio_base moved to gpio.h
>   - error messages added
> Changes for v3:
>   - Added mvgpio.h for common define based on CPU core subversion.
> Changes for v4:
>   - not changed
> Changes for v5:
>   - Added change history
> Changes for v6:
>   - Renamed GPIO level defines (fixes compilation issues thanks to
> Lei Wen)
> Changes for v7:
>   - mvgpio.h moved to driver/gpio
> 
>  drivers/gpio/Makefile |1 +
>  drivers/gpio/mvgpio.c |  115
> +
>  drivers/gpio/mvgpio.h |   74 +++
>  3 files changed, 190 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/gpio/mvgpio.c
>  create mode 100644 drivers/gpio/mvgpio.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 v7 2/2] gpio: Add GPIO driver for Marvell SoC Armada100

2011-08-21 Thread Prafulla Wadaskar


> -Original Message-
> From: Ajay Bhargav [mailto:ajay.bhar...@einfochips.com]
> Sent: Thursday, August 18, 2011 11:08 AM
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Ajay Bhargav
> Subject: [PATCH v7 2/2] gpio: Add GPIO driver for Marvell SoC Armada100
> 
> This patch adds support for generic GPIO driver framework for Marvell
> SoC Armada100.
> 
> Signed-off-by: Ajay Bhargav 
> ---
> Changes for v2:
>   - Added function get_gpio_base
>   - GPIO base address added to armada100.h
> Changes for v3:
>   - gpio register map moved to mvgpio.h
> Changes for v4:
>   - updated gpio.h
>   - removed unwanted defines from armada100.h
> Changes for v5:
>   - Coding Style cleanup
>   - added change history
> Changes for v6:
>   - No change
> Changes for v7:
>   - Added GPIO level defines
> 
>  arch/arm/include/asm/arch-armada100/gpio.h |   48
> 
>  1 files changed, 48 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-armada100/gpio.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] [STATUS] ARM

2011-08-21 Thread Albert ARIBAUD
Hi Dirk,

Le 21/08/2011 09:11, Dirk Behme a écrit :

> But, hmm,
>
> http://git.denx.de/?p=u-boot/u-boot-arm.git;a=summary
>
> doesn't show the applied patches yet? Did I miss something?

You did not; I did -- forgot to push master. Fixed now, thanks for 
pointing this out.

> Best regards
>
> Dirk

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


Re: [U-Boot] [PATCH v4] ARM: Add Calxeda Highbank platform

2011-08-21 Thread Albert ARIBAUD
Hi Rob,

Le 04/08/2011 22:22, Rob Herring a écrit :
> From: Rob Herring
>
> Add basic support for Calxeda Highbank platform. Only minimal support with
> serial and SATA are included.
>
> Signed-off-by: Jason Hobbs
> Signed-off-by: Rob Herring
> Cc: Albert ARIBAUD
> ---
>
> changes in v4:
>   - Rebase to current mainline (d50a8f45c9a640b3bcbd0ede91f83c8646cca018)
>   - Add back SATA support to inital patch as dependencies are all in mainline
>
> changes in v3:
>   - Add hignbank to MAINTAINERS
>
> changes in v2:
>   - Set DRAM size to correct value
>   - split SATA and SD enabling to separate patches

Sorry, this does not seem to apply cleanly on top of current 
u-boot-arm/master. Can you rebase and submit a V5 patch (with history 
updated, stating that V5 is a rebase only)?

Thanks in advance and apologies for the delay.

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


Re: [U-Boot] DreamPlug - progress?

2011-08-21 Thread Adam Baxter
Hi Prafulla,
Is there anything currently available? I didn't see any references to
DreamPlug in the Marvell u-boot Git tree.

Thanks,
Adam Baxter

On Sun, Aug 21, 2011 at 4:57 PM, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
>> On Behalf Of Adam Baxter
>> Sent: Saturday, August 20, 2011 7:42 AM
>> To: u-boot@lists.denx.de
>> Subject: [U-Boot] DreamPlug - progress?
>>
>> Hi all,
>> I have a Globalscale Dreamplug
>> I wish to accomplish the following:
>> * Backup original uboot
>> * Verify original uboot
>> * Flash patched uboot to SPI
>>
>> Any roadblocks? I couldn't confirm, either via this list or looking at
>> commits whether Dreamplug support ever made it back into mainline
>> uboot...
>
> Hi Adam
> It's in progress.
> Copying Jason, who can give more info on this.
>
> Regards..
> Prafulla . .
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] ARM

2011-08-21 Thread Dirk Behme
On 20.08.2011 17:32, Albert ARIBAUD wrote:
> Hi all,
>
> Le 20/08/2011 13:12, Albert ARIBAUD a écrit :
>
 1. http://patchwork.ozlabs.org/patch/107678/
>
> This one lowers bad board builds from 69 to 62, and has been applied.
>
 2. http://patchwork.ozlabs.org/patch/108865/
>
> This one kind of half-fixes the two boards it touches: they now build
> but with warnings, all the same, of which here is one:
>
> clocks.c:274: warning: comparison is always true due to limited range of
> data type
>
> I'll put this one on hold unless somebody can tell me what's going on.

Hmm, I haven't seen this yet. But would like to have a look to it.

But, hmm,

http://git.denx.de/?p=u-boot/u-boot-arm.git;a=summary

doesn't show the applied patches yet? Did I miss something?

Best regards

Dirk



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


Re: [U-Boot] Urgent : Regd. Cortex A9 quad core versatile express ca9x4_ct_vxp support in U-Boot..

2011-08-21 Thread Albert ARIBAUD
(sorry Sandeep for the double mail; I guess that's what I get by 
answering e-mail before the morning coffee starts having an effect.)

Le 21/08/2011 08:37, Sandeep Kumar a écrit :
> Hi all,
>
> I am trying to use U-Boot for cortex A9 quad core versatile express board. I 
> saw that the support is already added
> for that board but i am not able to find out the DDR initialization code
> anywhere before using the stack. In fact i didn't find the DDR
> initialization code anywhere for this board. This board also comes along
> with a CLCD (color LCD) controller which is also not initialized
> anywhere for this board. Is the support for this board is tested as
> without initializing the DDR how the code relocation and execution from
> DDR is possible.
>
> Any kind of pointers will be very helpful.

There was no need to repeat your message at such a short interval of two 
days.

As for your board, did you try U-Boot with it or did you just look for 
code? This is not clear from what you write.

Also, did you think of asking the official board maintainer as 
identified from the MAINTAINERS file at the root of the U-Boot code base?

I personally do not know the board or the vexpress, but it might well be 
that DDR configuration is done through a configuration block added by 
mkimage -- at least, I can see that mkimage is built by a ./MAKEALL 
ca9x4_ct_vxp.

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