public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fix typo inside atmel_mci driver
Date: Fri, 13 Aug 2010 20:07:42 +0200	[thread overview]
Message-ID: <4C6589EE.4070306@emk-elektronik.de> (raw)
In-Reply-To: <AANLkTi=VwBOOK8kkFqqc9Uvfhp2tyDqOm3yk35Pe9qtx@mail.gmail.com>

Claudio Mignanti wrote:
> 2010/8/7 Reinhard Meyer <reinhard.meyer@emk-elektronik.de>:
>> Wolfgang Denk wrote:
>>> Dear Claudio Mignanti,
>>>
>>> In message <AANLkTikkNw19U8yiQokqyE-WxjuO4b8RwqO-IBPa18W3@mail.gmail.com>
>>> you wrote:
>>>
>>>> The function get_mci_clk_rate is used inside atmel_mci driver
>>>>  but never defined. Fix this typo.
>>>>
>> Thats NOT a typo. The current atmel_mci.c is for AVR32 ONLY.
> 
>  With the proposed patch I successfully use this driver on at91sam9g20!
> Probabily they share the same mci controller I don't know, I want only
> report this experience.

NAK. That will break the driver for AVR32.

The correct way is to add get_mci_clk_rate() to clk.h:

diff --git a/arch/arm/include/asm/arch-at91/clk.h b/arch/arm/include/asm/arch-at91/clk.h
index f642dd9..457e6c9 100644
--- a/arch/arm/include/asm/arch-at91/clk.h
+++ b/arch/arm/include/asm/arch-at91/clk.h
@@ -59,5 +59,10 @@ static inline unsigned long get_twi_clk_rate(unsigned int dev_id)
  	return get_mck_clk_rate();
  }

+static inline unsigned long get_mci_clk_rate(void)
+{
+	return get_mck_clk_rate();
+}
+
  int at91_clock_init(unsigned long main_clock);
  #endif /* __ASM_ARM_ARCH_CLK_H__ */

On AVR32 there is no MCK and each peripherals' clock can be prescaled individually.
Its just that the current AT91 have all clocks the same.

Best Regards,
Reinhard

PS: that driver will soon become obsolete, because a new, mmc framework based driver
is in the mold already.

      reply	other threads:[~2010-08-13 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 19:15 [U-Boot] [PATCH] Fix typo inside atmel_mci driver Claudio Mignanti
2010-06-30  8:23 ` Claudio Mignanti
2010-08-06 23:17 ` Wolfgang Denk
2010-08-06 23:40   ` Reinhard Meyer
2010-08-13 11:30     ` Claudio Mignanti
2010-08-13 18:07       ` Reinhard Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6589EE.4070306@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox