diff options
| author | Koen Kooi <koen@openembedded.org> | 2007-07-07 08:19:09 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2007-07-07 08:19:09 +0000 |
| commit | 1d662a16914582e72b023f683d9f7da414e4205a (patch) | |
| tree | 8569db2e447cdc77032b32b961069706c81c7808 | |
| parent | bf3678393e367d3f66164263fc7979948247496c (diff) | |
| parent | ba0f15a5e9b4ffba4d5ed367bb3b2c2960bbc022 (diff) | |
merge of '9958e850eb5662928f6727c3a8ae9d71ac7f03f5'
and 'f60008d7bc62036b2f56fac511571e1bd12c4215'
23 files changed, 8505 insertions, 368 deletions
diff --git a/packages/efl1/etk_0.1.0.003.bb b/packages/efl1/etk_0.1.0.004.bb index 569b5c9242..c693f17ce5 100644 --- a/packages/efl1/etk_0.1.0.003.bb +++ b/packages/efl1/etk_0.1.0.004.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Etk is an advanced widget toolkit based on the Enlightenment Foundation Libraries." DEPENDS = "evas ecore edje" LICENSE = "MIT" -PR = "r1" +PR = "r2" inherit efl1 @@ -10,4 +10,5 @@ FILES_${PN} = "${libdir}/libetk.so*" FILES_${PN}-examples += "${bindir}" FILES_${PN}-engines = "${libdir}/etk/engines/*.so ${datadir}" FILES_${PN}-dev += "${libdir}/etk/engines/*.a ${libdir}/etk/engines/*.la" -FILES_${PN}-dbg += "${libdir}/etk/engines/*/.debug/" +FILES_${PN}-dbg += "${libdir}/etk/engines/.debug/" + diff --git a/packages/gpe-scap/gpe-scap_1.3.bb b/packages/gpe-scap/gpe-scap_1.3.bb new file mode 100644 index 0000000000..aec5819e6e --- /dev/null +++ b/packages/gpe-scap/gpe-scap_1.3.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "GPE screenshot application" +LICENSE = "GPL" +PRIORITY = "optional" +SECTION = "gpe" +PR = "r0" + +RREPLACES = "gpe-screenshot" + +DEPENDS = "glib-2.0 gtk+ libgpewidget libglade libsoup" + +GPE_TARBALL_SUFFIX = "bz2" + +inherit gpe autotools diff --git a/packages/linux/linux/simpad/defconfig b/packages/linux/linux/simpad/defconfig index 36d5e942b4..33f08a0593 100644 --- a/packages/linux/linux/simpad/defconfig +++ b/packages/linux/linux/simpad/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21 -# Sun May 6 14:01:42 2007 +# Sat Jul 7 00:02:55 2007 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -38,15 +38,16 @@ CONFIG_LOCALVERSION="oe1" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set +CONFIG_IPC_NS=y CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y # CONFIG_TASKSTATS is not set # CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -CONFIG_SYSFS_DEPRECATED=y +# CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -76,8 +77,9 @@ CONFIG_BASE_SMALL=0 # Loadable module support # CONFIG_MODULES=y -# CONFIG_MODULE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y @@ -186,7 +188,7 @@ CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y +# CONFIG_PCMCIA_IOCTL is not set # # PC-card bridges @@ -225,7 +227,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2" +CONFIG_CMDLINE="" # CONFIG_XIP_KERNEL is not set # CONFIG_KEXEC is not set @@ -257,10 +259,10 @@ CONFIG_BINFMT_MISC=m # Power management options # CONFIG_PM=y -# CONFIG_PM_LEGACY is not set +CONFIG_PM_LEGACY=y # CONFIG_PM_DEBUG is not set # CONFIG_PM_SYSFS_DEPRECATED is not set -# CONFIG_APM_EMULATION is not set +CONFIG_APM_EMULATION=y # # Networking @@ -551,7 +553,30 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # # ATA/ATAPI/MFM/RLL support # -# CONFIG_IDE is not set +CONFIG_IDE=m +CONFIG_IDE_MAX_HWIFS=4 +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +CONFIG_IDEDISK_MULTI_MODE=y +CONFIG_BLK_DEV_IDECS=m +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_IDE_GENERIC is not set +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_BLK_DEV_HD is not set # # SCSI device support @@ -587,10 +612,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # Network device support # CONFIG_NETDEVICES=y -CONFIG_DUMMY=y +CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set +CONFIG_TUN=m # # ARCnet devices @@ -674,12 +699,12 @@ CONFIG_NET_WIRELESS=y CONFIG_NET_PCMCIA=y CONFIG_PCMCIA_3C589=m CONFIG_PCMCIA_3C574=m -# CONFIG_PCMCIA_FMVJ18X is not set +CONFIG_PCMCIA_FMVJ18X=m CONFIG_PCMCIA_PCNET=m -# CONFIG_PCMCIA_NMCLAN is not set +CONFIG_PCMCIA_NMCLAN=m CONFIG_PCMCIA_SMC91C92=m CONFIG_PCMCIA_XIRC2PS=m -# CONFIG_PCMCIA_AXNET is not set +CONFIG_PCMCIA_AXNET=m # # Wan interfaces @@ -692,7 +717,7 @@ CONFIG_PPP_ASYNC=m CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set +CONFIG_PPP_MPPE=m CONFIG_PPPOE=m # CONFIG_SLIP is not set CONFIG_SLHC=m @@ -734,13 +759,14 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_NEWTON=m +CONFIG_KEYBOARD_STOWAWAY=m CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=m # # Hardware I/O ports @@ -937,7 +963,7 @@ CONFIG_SOUND=y # # HID Devices # -CONFIG_HID=y +CONFIG_HID=m # CONFIG_HID_DEBUG is not set # @@ -960,6 +986,7 @@ CONFIG_USB_ARCH_HAS_HCD=y # # MMC/SD Card support # +# CONFIG_MMC_SPI_BLOCK is not set # CONFIG_MMC is not set # @@ -987,24 +1014,27 @@ CONFIG_REISERFS_FS=m CONFIG_REISERFS_PROC_INFO=y # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set +CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set +CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set +CONFIG_AUTOFS4_FS=m # CONFIG_FUSE_FS is not set +CONFIG_GENERIC_ACL=y # # CD-ROM/DVD Filesystems # -# CONFIG_ISO9660_FS is not set +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y # CONFIG_UDF_FS is not set # @@ -1023,7 +1053,8 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y -# CONFIG_TMPFS is not set +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set @@ -1059,20 +1090,28 @@ CONFIG_CRAMFS=m # CONFIG_NFS_FS=y CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_ROOT_NFS is not set +CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set -# CONFIG_CIFS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1184,7 +1223,46 @@ CONFIG_DEBUG_LL=y # # Cryptographic options # -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_PCBC=m +# CONFIG_CRYPTO_LRW is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# # # Library routines diff --git a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-GPIO-MMC-mod.patch b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-GPIO-MMC-mod.patch new file mode 100644 index 0000000000..22f220de8a --- /dev/null +++ b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-GPIO-MMC-mod.patch @@ -0,0 +1,1650 @@ +diff -uNr linux-2.6.21.vanilla/drivers/mmc/Kconfig linux-2.6.21/drivers/mmc/Kconfig +--- linux-2.6.21.vanilla/drivers/mmc/Kconfig 2007-05-30 18:00:30.000000000 +0200 ++++ linux-2.6.21/drivers/mmc/Kconfig 2007-05-30 18:26:18.000000000 +0200 +@@ -4,6 +4,12 @@ + + menu "MMC/SD Card support" + ++config MMC_SPI_BLOCK ++ tristate "MMC support for SIMpad over GPIO" ++ help ++ Say Y here to enable MMC block device over GPIO ++ if you have done the MMC-Mod. For Module say M. ++ + config MMC + tristate "MMC support" + help +diff -uNr linux-2.6.21.vanilla/drivers/mmc/Makefile linux-2.6.21/drivers/mmc/Makefile +--- linux-2.6.21.vanilla/drivers/mmc/Makefile 2007-05-30 18:00:30.000000000 +0200 ++++ linux-2.6.21/drivers/mmc/Makefile 2007-05-30 18:26:18.000000000 +0200 +@@ -2,6 +2,8 @@ + # Makefile for the kernel mmc device drivers. + # + ++obj-$(CONFIG_MMC_SPI_BLOCK) += mmc_spi_block.o ++ + # + # Core + # +diff -uNr linux-2.6.21.vanilla/drivers/mmc/mmc_spi_block.c linux-2.6.21/drivers/mmc/mmc_spi_block.c +--- linux-2.6.21.vanilla/drivers/mmc/mmc_spi_block.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.21/drivers/mmc/mmc_spi_block.c 2007-05-30 18:30:58.000000000 +0200 +@@ -0,0 +1,1618 @@ ++/* ++ * Copyright (c) Cl�ent Ballabriga, 2005 - GPL ++ * Copyright (c) Guylhem Aznar, 2005 - GPL ++ * ++ * Please check http://externe.net/zaurus/simpad-bluetooth reference design first. ++ * ++ * Based on Madsuk/Rohde work on a MMC driver for the WRT54G. ++ * ++ * This is an ugly hack of a driver. I am surprised if it ever works! ++ * So please use a real driver or contribute one to the 2.4/2.6 mmc framework ++ * ++ * mrdata: ported to 2.6 ++ */ ++ ++#include <linux/module.h> ++#include <linux/init.h> ++ ++#include <linux/sched.h> ++#include <linux/kernel.h> ++#include <linux/fs.h> ++#include <linux/errno.h> ++#include <linux/hdreg.h> ++#include <linux/kdev_t.h> ++#include <linux/blkdev.h> ++#include <linux/spinlock.h> ++#include <linux/time.h> ++#include <linux/delay.h> ++#include <linux/timer.h> ++ ++#include <linux/platform_device.h> ++ ++#include <asm/hardware.h> ++#include <asm/arch/simpad.h> ++#include <asm/arch/gpio.h> ++ ++static int major = 121; ++ ++#define DEVICE_NAME "mmc_spi" ++ ++static int hd_sizes[1<<6]; ++static int hd_blocksizes[1<<6]; ++static int hd_hardsectsizes[1<<6]; ++static int hd_maxsect[1<<6]; ++static struct hd_struct hd[1<<6]; ++ ++static struct gendisk *mmc_disk; ++ ++static struct platform_device *mmc_dev; /* the one and only instance */ ++ ++static spinlock_t mmc_spi_lock; ++ ++/* ++ * ******************************************************************* ++ * ++ * This is the only configurable part. ++ * ++ * ******************************************************************* ++ * ++ */ ++ ++// #define DEBUG 1 ++// #define DEBUG_HD 1 ++// #define CHECK_MEDIA_CHANGE // for developement ONLY, not working yet ++ ++/* Let that include where it is or compilation fails on INIT_REQUEST/CURRENT */ ++ ++ ++/* ++ * If you are using different GPIOs in your hardware hack, you must ++ * first make sure they are unused for other functions and then ++ * configure them here. ++ * ++ * On the simpad I use spare pins from the UART1 (internal serial port -> DECT 20-polig): ++ * ++ * Funktion PIN ## Original direction GPIO ## SPI function New direction SD/MMC ++ * - DCD PIN 08 (in) GPIO 23 DO - new name: DI -> MISO (in) PIN 7 Data Out ++ * - DTR PIN 11 (out) GPIO 07 CS (out) PIN 1 Chip Select ++ * - RI PIN 14 (in) GPIO 19 CLK (out) PIN 5 Clock ++ * - DSR PIN 16 (in) GPIO 06 DI - new name: DO -> MOSI (out) PIN 2 Data In ++ * ++ * ++ * SPI: MISO = Master In / Slave OUT MOSI = Master Out / Slave In ++ * ++ * Don't worry about in/out original function - the GPIOs will be ++ * reprogrammed. ++ */ ++ ++#define GPIO_SD_DI 23 ++#define GPIO_SD_CS 7 ++#define GPIO_SD_CLK 19 ++#define GPIO_SD_DO 6 ++ ++// #define FAST_GPIO_SD_DI GPIO_GPIO23 ++// #define FAST_GPIO_SD_CS GPIO_GPIO7 ++// #define FAST_GPIO_SD_CLK GPIO_GPIO19 ++// #define FAST_GPIO_SD_DO GPIO_GPIO6 ++ ++#define FAST_GPIO_SD_DI GPIO_UART1_DCD ++#define FAST_GPIO_SD_CS GPIO_UART1_DTR ++#define FAST_GPIO_SD_CLK GPIO_UART1_RI ++#define FAST_GPIO_SD_DO GPIO_UART1_DSR ++ ++/* ++ * ******************************************************************* ++ * ++ * Do not change anything below ! ++ * ++ * ******************************************************************* ++ * ++ */ ++ ++/* GPIO states */ ++#define LOW 0 ++#define HIGH 1 ++ ++#define INPUT 0 ++#define OUTPUT 1 ++ ++#define PRESENT 1 ++#define ABSENT 0 ++ ++typedef unsigned int uint32; ++typedef unsigned long u32_t; ++typedef unsigned short u16_t; ++typedef unsigned char u8_t; ++ ++static struct timer_list mmc_timer; ++ ++// static struct timeval s_zeit, e_zeit; ++ ++/* start with no card */ ++static int mmc_media_detect = 0; ++static int mmc_media_changed = 1; ++ ++ ++///////////////////// ++// prototypes ++static int mmc_open(struct inode *inode, struct file *filp); ++static int mmc_release(struct inode *inode, struct file *filp); ++static int mmc_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); ++static void mmc_request(request_queue_t *q); ++ ++ ++/* ++ * ******************************************************************* ++ * ++ * Begin GPIO hardware access functions. ++ * ++ * ******************************************************************* ++ * ++ */ ++ ++#define gpio_read(a) ((GPLR & a) ? 1 : 0) ++#define gpio_write_high(a) GPSR = a ++#define gpio_write_low(a) GPCR = a ++ ++/* set MMC_Chip_Select to HIGH (MMC/SD-Card inaktiv) */ ++#define MMC_Disable() gpio_write_high( FAST_GPIO_SD_CS) ++ ++/* set MMC_Chip_Select to LOW (MMC/SD-Card aktiv) */ ++#define MMC_Enable() gpio_write_low( FAST_GPIO_SD_CS) ++ ++/* ++ * ******************************************************************* ++ * ++ * Begin SPI hardware access functions. ++ * ++ * ******************************************************************* ++ * ++ */ ++static int mmc_spi_media_detect(void) ++{ ++// FIXME: add card detection/test by SPI ++ ++ return 1; ++} ++ ++static int mmc_spi_hardware_init(void) ++{ ++ printk("\nmmc: GPIO init\n"); ++ ++ /* cut existing functions */ ++ gpio_set_alternative_function(GPIO_SD_CLK, 0); ++ gpio_set_alternative_function(GPIO_SD_DI, 0); ++ gpio_set_alternative_function(GPIO_SD_DO, 0); ++ gpio_set_alternative_function(GPIO_SD_CS, 0); ++ ++ /* remap directions and set state of spi pins */ ++ gpio_direction_output(GPIO_SD_CLK, 0); ++ gpio_direction_input(GPIO_SD_DI); ++ gpio_direction_output(GPIO_SD_DO, 0); ++ gpio_direction_output(GPIO_SD_CS, 0); ++ ++ printk("mmc: initialising MMC\n"); ++ ++ /* Start */ ++ MMC_Disable(); ++ gpio_write_low( FAST_GPIO_SD_CLK); ++ gpio_write_high( FAST_GPIO_SD_DO); ++ return 0; ++} ++ ++/* return what has been read, write the parameter */ ++/* Clockrate round about 1,2 MHz */ ++ ++static unsigned char mmc_spi_readwrite(unsigned char data_out) ++{ ++ unsigned char i; ++ unsigned char result = 0; ++ ++ for(i = 0x80 ; i != 0 ; i >>= 1) ++ { ++ if (data_out & i) ++ { ++ gpio_write_high( FAST_GPIO_SD_DO); ++ } ++ else ++ { ++ gpio_write_low( FAST_GPIO_SD_DO); ++ } ++ ++ gpio_write_high( FAST_GPIO_SD_CLK); ++ ++ if (gpio_read( FAST_GPIO_SD_DI) == 1) ++ { ++ result |= i; ++ } ++ ++ gpio_write_low( FAST_GPIO_SD_CLK); ++ ++ } ++ ++ gpio_write_high( FAST_GPIO_SD_DO); ++ ++ return (result); ++} ++ ++/* return what has been read, write the parameter */ ++/* Clockrate round 200 kHz */ ++ ++static unsigned char mmc_spi_readwrite_slow(unsigned char data_out) ++{ ++ unsigned char i; ++ unsigned char result = 0; ++ ++ for(i = 0x80 ; i != 0 ; i >>= 1) ++ { ++ if (data_out & i) ++ { ++ gpio_write_high( FAST_GPIO_SD_DO); ++ } ++ else ++ { ++ gpio_write_low( FAST_GPIO_SD_DO); ++ } ++ ++ udelay(10); ++ ++ gpio_write_high( FAST_GPIO_SD_CLK); ++ ++ udelay(10); ++ ++ if (gpio_read( FAST_GPIO_SD_DI) == 1) ++ { ++ result |= i; ++ } ++ ++ udelay(10); ++ ++ gpio_write_low( FAST_GPIO_SD_CLK); ++ ++ udelay(10); ++ ++ } ++ ++ gpio_write_high( FAST_GPIO_SD_DO); ++ ++ udelay(10); ++ ++ // printk("Send Byte = 0x%2X Receive Byte = 0x%2X \n", data_out, result); ++ ++ return (result); ++} ++ ++/* return what has been read */ ++ ++static unsigned char mmc_spi_read_only(void) ++{ ++ unsigned char i; ++ unsigned char result = 0; ++ ++ for(i = 0x80 ; i != 0 ; i >>= 1) ++ { ++ ++ gpio_write_high( FAST_GPIO_SD_CLK); ++ ++ if (gpio_read( FAST_GPIO_SD_DI) == 1) ++ { ++ result |= i; ++ } ++ ++ gpio_write_low( FAST_GPIO_SD_CLK); ++ ++ } ++ ++ return (result); ++} ++ ++/* write the parameter */ ++/* Clockrate round about 3,6 MHz */ ++ ++static unsigned char mmc_spi_write_only(unsigned char data_out) ++{ ++ unsigned char i; ++ unsigned char result = 0; ++ ++ for(i = 0x80 ; i != 0 ; i >>= 1) ++ { ++ ++ if (data_out & i) ++ { ++ gpio_write_high( FAST_GPIO_SD_DO); ++ } ++ else ++ { ++ gpio_write_low( FAST_GPIO_SD_DO); ++ } ++ ++ gpio_write_high( FAST_GPIO_SD_CLK); ++ ++ gpio_write_low( FAST_GPIO_SD_CLK); ++ ++ } ++ ++ gpio_write_high( FAST_GPIO_SD_DO); ++ ++ return (result); ++} ++ ++ ++/** ++ * this function was contributed by: rcichielo from openwrt forums ++ * ++ * Comments added by Marc DENTY on 2007-03-20 ++ * ++ * Sequence to read a card's "CID" bytes (name, serial number etc) ++ * ++ * Send: 4ah,00h,00h,00h,00h,00h - CMD10, no args, null CRC ++ * Read: xx - NCR Time ++ * Read: xx - Command Response (Should be 00h) ++ * Read: until FEh is received - Wait for Data token ++ * Read: yy * 16 - Get 16 bytes from CID ++ * Read: zz - Read CRC lo byte ++ * Read: zz - Read CRC hi byte ++ * ++ * Useful locations in the returned data packet: ++ * ++ * 03h-08h Manufacturers's name in ascii ++ * 0ah-0dh Card's 32 bit serial number ++ */ ++/** ++ * Comments added by Cyril CATTIAUX on 2007-03-21 ++ * ++ * CID format specification (from Sandisk SD Product Manual v1.9) ++ * ++ * cid[00 ] Manufacturer ID (unsigned byte) ++ * cid[01-02] OEM/Application ID (ASCII) ++ * cid[03-07] Product Name (ASCII) ++ * cid[08 ] Product Revistion (BCD coded number) ++ * cid[09-12] Serial Number (32-bit unsigned int) ++ * cid[13-14] Reserved(bit 12->15) - Manufacture Date(bit 0->11) ++ * cid[15 ] CRC7(bit 1->7) - Not used, allways 1 (bit 0) ++*/ ++static int mmc_read_cid(unsigned char *cid) ++{ ++ unsigned char result = 0; ++ int i; ++ ++ MMC_Enable(); ++ ++ /* wait */ ++ for (i = 0; i < 4; i++) ++ { ++ result=mmc_spi_readwrite(0xff); ++ } ++ ++ /* issue CID (card identification data) read request */ ++ mmc_spi_readwrite(0xff); ++ mmc_spi_readwrite(0x40 | 10); ++ mmc_spi_readwrite(0x00); ++ mmc_spi_readwrite(0x00); ++ mmc_spi_readwrite(0x00); ++ mmc_spi_readwrite(0x00); ++ mmc_spi_readwrite(0x95); ++ ++ for (i = 0; i < 8; i++) ++ { ++ result=mmc_spi_readwrite(0xff); ++ ++ if(result == 0x00) ++ break; ++ } ++ ++ if (result != 0x00) { ++ MMC_Disable(); ++ mmc_spi_readwrite(0xff); ++ return(1); ++ } ++ ++ for (i = 0; i < 8; i++) { ++ result = mmc_spi_readwrite(0xff); ++ if (result == 0xfe) break; ++ } ++ ++ if (result != 0xfe) { ++ MMC_Disable(); ++ mmc_spi_readwrite(0xff); ++ return(2); ++ } ++ ++ for (i = 0; i < 16; i++) { ++ result = mmc_spi_readwrite(0xff); ++ cid[i] = result; ++ } ++ ++ mmc_spi_readwrite(0xff); ++ mmc_spi_readwrite(0xff); ++ ++ MMC_Disable(); ++ mmc_spi_readwrite(0xff); ++ ++ return 0; ++} ++ ++ ++/** ++ * Comments added by Cyril CATTIAUX on 2007-03-21 ++ * ++ * CID format specification (from Sandisk SD Product Manual v1.9) ++ * ++ * cid[00 ] Manufacturer ID (unsigned byte) ++ * cid[01-02] OEM/Application ID (ASCII) ++ * cid[03-07] Product Name (ASCII) ++ * cid[08 ] Product Revision (BCD coded 2 digit number) ++ * cid[09-12] Serial Number (32-bit unsigned int) ++ * cid[13-14] Manufacture Date(bit 0->11) (BCD coded 3 digit number YYM offset from 2000) - Reserved(bit 12->15) ++ * cid[15 ] Not used, allways 1 (bit 0) - CRC7(bit 1->7) ++*/ ++static void mmc_show_cid_info(void) ++{ ++ int i, result; ++ unsigned short tmps; ++ unsigned char cid[16]; ++ ++ char manufacturer_id; ++ char oem_id[3]; ++ char product_name[6]; ++ unsigned char product_revision_h, product_revision_l; ++ unsigned int product_sn; ++ unsigned short product_date_y; ++ unsigned char product_date_m; ++ ++ result = mmc_read_cid(cid); ++ ++ if (result == 0) ++ { ++ printk("mmc_init: MMC/SD Card ID: "); ++ for (i=0; i<16; i++) { ++ printk("%02X ", cid[i]); ++ } ++ manufacturer_id=cid[0]; ++ strncpy(oem_id, &cid[1], 2); ++ oem_id[2]='\0'; ++ strncpy(product_name, &cid[3], 5); ++ product_name[5]='\0'; ++ product_revision_h=(cid[8] >> 4) & 0xf; ++ product_revision_l=cid[8] & 0xf; ++ product_sn=(cid[9]<<24) + (cid[10]<<16) + (cid[11]<<8) + cid[12]; ++ tmps=((cid[13]<<8) + cid[14]) & 0x0fff; ++ product_date_y=2000 + (((tmps >> 8) & 0xf) * 10) + ((tmps >> 4) & 0xf); ++ product_date_m=tmps & 0xf; ++ ++ printk("\nManufacturer ID : %02X\n", manufacturer_id); ++ printk("OEM/Application ID: %s\n", oem_id); ++ printk("Product name : %s\n", product_name); ++ printk("Product revision : %d.%d\n", product_revision_h, product_revision_l); ++ printk("Product SN : %08X\n", product_sn); ++ printk("Product Date : %d-%d\n", product_date_y, product_date_m); ++ ++ } else { ++ printk("mmc_init: impossible to get card indentification info for reason code: %02x", result); ++ } ++} ++ ++ ++/* ++static int mmc_spi_hw_test(void) ++{ ++ unsigned char result, k; ++ ++ unsigned int i, j, t; ++ ++ printk("mmc_spi_hw_test -> \n\n"); ++ k = 0x55; ++ for ( i = 0 ; i < 5; i++) { ++ ++ printk("\n0x%2X - ", k); ++ for ( j = 0 ; j < 8; j++ ) { ++ do_gettimeofday( &s_zeit ); ++ result = mmc_spi_readwrite_slow(k); ++ do_gettimeofday( &e_zeit ); ++ ++ if ( result != k ) { ++ printk("!>ERROR<! Transfer = 0x%2X Receive = 0x%2X Trail = %d \n", k, result, j); ++ // i = 255; j = 1000; ++ } ++ ++ t = (e_zeit.tv_sec-s_zeit.tv_sec)*1000000+(e_zeit.tv_usec-s_zeit.tv_usec); ++ printk("Durchlauf: %i Versuch: %i von 8 -> Laufzeit: 0x%X s\n", i , j, t); ++ udelay(200); ++ } ++ printk("ready "); ++ ++ // k++; ++ } ++ printk("ready "); ++ printk("\n\n"); ++ return (0); ++} ++*/ ++ ++/* ++static int mmc_spi_speed_test(void) ++{ ++ unsigned int i, j, k, l, t; ++ ++ MMC_Disable(); ++ ++ for (k = 1; k < 6; k++) ++ { ++ l = 10000 * k; ++ for (j = 0; j < 5; j++) ++ { ++ do_gettimeofday( &s_zeit ); ++ for (i = 0; i < l; i++) ++ mmc_spi_readwrite(0xff); ++ do_gettimeofday( &e_zeit ); ++ t = (e_zeit.tv_sec-s_zeit.tv_sec)*1000000+(e_zeit.tv_usec-s_zeit.tv_usec); ++ printk("mmc_spi_readwrite: Laufzeit %u x : 0x%X \n", l, t); ++ } ++ } ++ ++ for (k = 1; k < 1; k++) ++ { ++ l = 10000 * k; ++ for (j = 0; j < 1; j++) ++ { ++ do_gettimeofday( &s_zeit ); ++ for (i = 0; i < l; i++) ++ mmc_spi_readwrite_slow(0xff); ++ do_gettimeofday( &e_zeit ); ++ t = (e_zeit.tv_sec-s_zeit.tv_sec)*1000000+(e_zeit.tv_usec-s_zeit.tv_usec); ++ printk("mmc_spi_readwrite_slow: Laufzeit %u x : 0x%X \n", l, t); ++ } ++ } ++ ++ for (k = 1; k < 6; k++) ++ { ++ l = 10000 * k; ++ for (j = 0; j < 5; j++) ++ { ++ do_gettimeofday( &s_zeit ); ++ for (i = 0; i < l; i++) ++ mmc_spi_read_only(); ++ do_gettimeofday( &e_zeit ); ++ t = (e_zeit.tv_sec-s_zeit.tv_sec)*1000000+(e_zeit.tv_usec-s_zeit.tv_usec); ++ printk("mmc_spi_read_only: Laufzeit %u x : 0x%X \n", l, t); ++ } ++ } ++ ++ for (k = 1; k < 6; k++) ++ { |
