Re: [crisos] Patches for AFM MMC/SD module

[ Thread Index | Date Index | More lists.tuxfamily.org/crisos Archives ]


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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/