diff mbox

[U-Boot,v3,3/3] ARMV7: Vexpress: Add MMC support

Message ID 1299129759-30678-3-git-send-email-matt.waddel@linaro.org
State Accepted, archived
Commit f0c64526b7e51ba997a0f1baf9e74e6d497b957e
Delegated to: Andy Fleming
Headers show

Commit Message

matt.waddel@linaro.org March 3, 2011, 5:22 a.m. UTC
From: Matt Waddel <matt.waddel@linaro.org>

Added the board specific definitions to use the MMCI device.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
---
 board/armltd/vexpress/ca9x4_ct_vxp.c |    9 +++++++++
 include/configs/ca9x4_ct_vxp.h       |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)

Comments

Andy Fleming April 13, 2011, 11:09 a.m. UTC | #1
On Wed, Mar 2, 2011 at 11:22 PM,  <matt.waddel@linaro.org> wrote:
> From: Matt Waddel <matt.waddel@linaro.org>
>
> Added the board specific definitions to use the MMCI device.
>
> Signed-off-by: Matt Waddel <matt.waddel@linaro.org>

Looks fine to me.  I can apply this to my tree if that's fine with the
maintainer.  If not, I'm also OK if the maintainer wants to pull in
the driver patch (with the previously-mentioned small change).

Either way:
Acked-by: Andy Fleming <afleming@freescale.com>

Andy
Matt Waddel April 16, 2011, 9:53 p.m. UTC | #2
On 04/13/2011 05:09 AM, Andy Fleming wrote:
> On Wed, Mar 2, 2011 at 11:22 PM,  <matt.waddel@linaro.org> wrote:
>> From: Matt Waddel <matt.waddel@linaro.org>
>>
>> Added the board specific definitions to use the MMCI device.
>>
>> Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
> 
> Looks fine to me.  I can apply this to my tree if that's fine with the
> maintainer.  If not, I'm also OK if the maintainer wants to pull in
> the driver patch (with the previously-mentioned small change).

Hi Andy,

I made the ffs() change you suggested and have posted a 4th
version of the 3 patches (even though the 2nd one was the only
one that changed, I wanted to make sure they were all still in
sync with the repository).

If you could apply these to your tree that would be great.

> 
> Either way:
> Acked-by: Andy Fleming <afleming@freescale.com>

Thanks,
Matt

> 
> Andy
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
matt.waddel@linaro.org April 16, 2011, 9:54 p.m. UTC | #3
From: Matt Waddel <matt.waddel@linaro.org>

These patches add support for the ARM PrimeCell PL180 MultiMedia Interface.
The Versatile Express was the test platform for these changes.

---
Change log:

v2 - Rename patch items to a more descriptive name (ie. mmci -> arm_mmci)
     Fixed conflicting fuction call and added prototype to arm_mmci.h

v3 - Rename patch items (arm_mmci -> arm_pl180_mmci)
     (Note: Patch 1/3 still did not change with these corrections)

v4 - Removed convert_from_bytes_to_power_of_two() routine and used generic ffs
     call instead. (Feedback from Andy Fleming.)

Matt Waddel (3):
  MMC: Max blocks value adjustable
  MMC: Add support for PL180 ARM mmc device
  ARMV7: Vexpress: Add MMC support

 board/armltd/vexpress/ca9x4_ct_vxp.c |    9 +
 drivers/mmc/Makefile                 |    1 +
 drivers/mmc/arm_pl180_mmci.c         |  441 ++++++++++++++++++++++++++++++++++
 drivers/mmc/arm_pl180_mmci.h         |  183 ++++++++++++++
 drivers/mmc/mmc.c                    |   19 +-
 include/configs/ca9x4_ct_vxp.h       |    4 +
 6 files changed, 647 insertions(+), 10 deletions(-)
 create mode 100644 drivers/mmc/arm_pl180_mmci.c
 create mode 100644 drivers/mmc/arm_pl180_mmci.h
John Rigby April 28, 2011, 6:46 p.m. UTC | #4
On Sat, Apr 16, 2011 at 3:53 PM, Matt Waddel <matt.waddel@canonical.com> wrote:
> On 04/13/2011 05:09 AM, Andy Fleming wrote:
>> On Wed, Mar 2, 2011 at 11:22 PM,  <matt.waddel@linaro.org> wrote:
>>> From: Matt Waddel <matt.waddel@linaro.org>
>>>
>>> Added the board specific definitions to use the MMCI device.
>>>
>>> Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
>>
>> Looks fine to me.  I can apply this to my tree if that's fine with the
>> maintainer.  If not, I'm also OK if the maintainer wants to pull in
>> the driver patch (with the previously-mentioned small change).
>
> Hi Andy,
>
> I made the ffs() change you suggested and have posted a 4th
> version of the 3 patches (even though the 2nd one was the only
> one that changed, I wanted to make sure they were all still in
> sync with the repository).
>
> If you could apply these to your tree that would be great.
>
>>
>> Either way:
>> Acked-by: Andy Fleming <afleming@freescale.com>
>
> Thanks,
> Matt
>
>>
>> Andy
>> _______________________________________________
>> 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
>

Andy, Matt:

What is the plan for getting the pl180 mmc driver commited?  I need it
in before my U8500 board patches can be commited.

Thanks,
John
Andy Fleming April 28, 2011, 6:57 p.m. UTC | #5
It's on my todo list for today

On Apr 28, 2011, at 1:46 PM, John Rigby wrote:

> On Sat, Apr 16, 2011 at 3:53 PM, Matt Waddel <matt.waddel@canonical.com> wrote:
>> On 04/13/2011 05:09 AM, Andy Fleming wrote:
>>> On Wed, Mar 2, 2011 at 11:22 PM,  <matt.waddel@linaro.org> wrote:
>>>> From: Matt Waddel <matt.waddel@linaro.org>
>>>> 
>>>> Added the board specific definitions to use the MMCI device.
>>>> 
>>>> Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
>>> 
>>> Looks fine to me.  I can apply this to my tree if that's fine with the
>>> maintainer.  If not, I'm also OK if the maintainer wants to pull in
>>> the driver patch (with the previously-mentioned small change).
>> 
>> Hi Andy,
>> 
>> I made the ffs() change you suggested and have posted a 4th
>> version of the 3 patches (even though the 2nd one was the only
>> one that changed, I wanted to make sure they were all still in
>> sync with the repository).
>> 
>> If you could apply these to your tree that would be great.
>> 
>>> 
>>> Either way:
>>> Acked-by: Andy Fleming <afleming@freescale.com>
>> 
>> Thanks,
>> Matt
>> 
>>> 
>>> Andy
>>> _______________________________________________
>>> 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
>> 
> 
> Andy, Matt:
> 
> What is the plan for getting the pl180 mmc driver commited?  I need it
> in before my U8500 board patches can be commited.
> 
> Thanks,
> John
>
John Rigby April 28, 2011, 7:49 p.m. UTC | #6
On Thu, Apr 28, 2011 at 12:57 PM, Andy Fleming <afleming@freescale.com> wrote:
> It's on my todo list for today
Thanks!
diff mbox

Patch

diff --git a/board/armltd/vexpress/ca9x4_ct_vxp.c b/board/armltd/vexpress/ca9x4_ct_vxp.c
index ce1be1e..3566b95 100644
--- a/board/armltd/vexpress/ca9x4_ct_vxp.c
+++ b/board/armltd/vexpress/ca9x4_ct_vxp.c
@@ -86,6 +86,15 @@  int board_eth_init(bd_t *bis)
 	return rc;
 }
 
+int cpu_mmc_init(bd_t *bis)
+{
+	int rc = 0;
+#ifdef CONFIG_ARM_PL180_MMCI
+	rc = arm_pl180_mmci_init();
+#endif
+	return rc;
+}
+
 static void flash__init(void)
 {
 	/* Setup the sytem control register to allow writing to flash */
diff --git a/include/configs/ca9x4_ct_vxp.h b/include/configs/ca9x4_ct_vxp.h
index 63f003d..4ab58c0 100644
--- a/include/configs/ca9x4_ct_vxp.h
+++ b/include/configs/ca9x4_ct_vxp.h
@@ -86,6 +86,10 @@ 
 #define CONFIG_MMC			1
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_ARM_PL180_MMCI
+#define CONFIG_ARM_PL180_MMCI_BASE	0x10005000
+#define CONFIG_SYS_MMC_MAX_BLK_COUNT	127
+#define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 
 /* BOOTP options */
 #define CONFIG_BOOTP_BOOTFILESIZE