Re: [crisos] Patches for AFM MMC/SD module |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/crisos Archives
]
- To: crisos@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [crisos] Patches for AFM MMC/SD module
- From: Claudio <claudyus84@xxxxxxxxx>
- Date: Thu, 9 Apr 2009 18:57:43 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=d1NoAbVIaZ8xQyC7H/pwIP/Bi/jrGhxJjKdqI0TqN+I=; b=J/3xhSEu9CJtfnBAKSdV2r+ArT/pMIvnFnDPJ9MyAlfb5RMrYPMKf/gLFMFfk2G4P/ M4PVNkjkLbS3CzwtJDQwIF+aQ/jPk1CTYScKeB71n/GU4DIyiiyEF8bXRlXcSZGJe9tH MrzubkyLINsIpyaZtk/swMca9pU1HKTVbIits=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=i/J1rJYEhqRiiIPTLyod7SdXeFsJ41yBiYD61W9Jdkr5W6s91lw3PRijCSk3LOJ80F BQbqiS32ogE8h3xq+bSi1zvMzN9iioYWrI5mGNZgUy/coQahQJrhM+G57r20Mzv1Ewc5 154EiOoIO7WlENXPDALO1Ab2cRMwi3H+MAe2o=
2009/3/26 Jan Kardell <jan.kardell@xxxxxxxxx>:
> Hi
>
> I found a couple of problems with the driver.
>
> 1. Written data resides in the cards RAM buffer for 5 seconds. This is
> obviously dangerous in an embedded system that is not properly shut
> down. Besides, the optimization is of little use since the I/O-scheduler
> collects writes to adjacent blocks into one operation. The patch
> 010-disable_write_delay.patch makes it possible to set the delay to 0,
> and also sets the default delay to 0.
>
> 2. The write timeout was calculated by a simple loop. This resulted in a
> timeout of 167 ms, the correct value is 250 ms. This caused troubles
> with some brands of SD cards. Maybe the timeout was correct with the old
> 3.3 gcc, but now with gcc 4.x it is to short. The patch
> 020-correct_write_timeout.patch uses linux timers to calculate the
> correct timeout of 250 ms.
Commited in r123
>
> 3. I made a mistake in the Makefile, in the prepare rule the source must
> be copied before the default rules are called, otherwise there is no
> source code to apply the patches to...
>
> NOTE: I have not renamed my driver as is done in current svn, so the
> path in the patches and some names i the Makefile need some editing
> before applying.
>
> //Jan
>
> #
> # Copyright (C) 2008 CrisOs.org
> #
> # This is free software, licensed under the GNU General Public License v2..
> # See /LICENSE for more information.
> #
> # $Id$
>
> include $(TOPDIR)/rules.mk
> include $(INCLUDE_DIR)/kernel.mk
>
> PKG_NAME:=afm-fox-mmc
> PKG_RELEASE:=r3
>
> PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
>
> include $(INCLUDE_DIR)/package.mk
>
> define KernelPackage/afm-fox-mmc
> SUBMENU:=Other modules
> DEPENDS:=@TARGET_etrax
> DEFAULT:=y
> TITLE:=Foxboard mmc and sdhc driver from AFM-Design
> FILES:=$(PKG_BUILD_DIR)/afm-mmc.$(LINUX_KMOD_SUFFIX)
> AUTOLOAD:=$(call AutoLoad,20,afm-mmc)
> endef
>
> define KernelPackage/afm-fox-mmc/description
> This package the AFM bit-banging kernel driver for mmc and sdhc for FoxBoard.
> endef
>
> define Build/Prepare
> $(CP) -r afm/mmc/* $(PKG_BUILD_DIR)/
> $(CP) -r files $(PKG_BUILD_DIR)/
> $(call Build/Prepare/Default)
> endef
>
> define Build/Compile
> $(MAKE) -C "$(LINUX_DIR)" \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> ARCH="$(LINUX_KARCH)" V="$(V)" \
> SUBDIRS="$(PKG_BUILD_DIR)" \
> KERNELVERSION="$(KERNEL)" \
> KERNEL_SOURCES="$(LINUX_DIR)" \
> KDIR="$(LINUX_DIR)"
> endef
>
> define KernelPackage/afm-fox-mmc/install
> $(INSTALL_DIR) $(1)/etc/init.d
> $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/afm-fox-mmc.init $(1)/etc/init.d/afm-fox-mmc
> endef
>
> $(eval $(call KernelPackage,afm-fox-mmc))
>
>
---
CrisOs mailing list
Official multi-language http://www.crisos.org/ mailing list
For unsubscribe send empty mail to: crisos-request@xxxxxxxxxxxxxxxxxxx with subject unsubscribe.