From 7ee1baefc5abd7e4d641a190c379b82e3a8e990d Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Tue, 15 Nov 2011 16:13:51 +0100 Subject: [PATCH 2/7] linux-2.6.30: handle SAM9G20 MCI Bugs affecting SDIO stack Signed-off-by: Ulf Samuelsson --- ...s-Ensure-access-to-SCR-is-done-w-12-bytes.patch | 97 ++++++++++++ ...ivers-Rearrange-buffer-splits-before-send.patch | 154 ++++++++++++++++++++ .../linux-2.6.30/at91sam9g20ek_2mmc/defconfig | 76 ++++++++-- recipes/linux/linux-at91.inc | 4 + recipes/linux/linux_2.6.30.bb | 2 + 5 files changed, 322 insertions(+), 11 deletions(-) create mode 100644 recipes/linux/linux-2.6.30/at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch create mode 100644 recipes/linux/linux-2.6.30/at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch diff --git a/recipes/linux/linux-2.6.30/at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch b/recipes/linux/linux-2.6.30/at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch new file mode 100644 index 0000000..695d749 --- /dev/null +++ b/recipes/linux/linux-2.6.30/at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch @@ -0,0 +1,97 @@ +From d7534ce1aba364a8b4653b4620d9aea4bc9985df Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Wed, 2 Nov 2011 21:22:44 +0100 +Subject: [PATCH 1/4] mmc drivers Ensure access to SCR is done w 12 bytes + +The Atmel MCI controller does not accept transfers with less than 12 bytes +If such transfers occur, then the MCI needs to be reset. + +Workaround: If CONFIG_MMC_ATMELMCI is enabled, then the raw_scr field +of "struct mmc_card" is 12 bytes instead of the ordinary 8 bytes. +The transfer which usually was hardwired to 8 bytes is now "sizeof(raw_scr)". + +Signed-off-by: Ulf Samuelsson +--- + drivers/mmc/core/sd.c | 4 +++- + drivers/mmc/core/sd_ops.c | 6 +++--- + drivers/mmc/core/sd_ops.h | 2 +- + include/linux/mmc/card.h | 5 +++++ + 4 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c +index cd81c39..4ecad2a 100644 +--- a/drivers/mmc/core/sd.c ++++ b/drivers/mmc/core/sd.c +@@ -432,7 +432,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, + /* + * Fetch SCR from card. + */ +- err = mmc_app_send_scr(card, card->raw_scr); ++ err = mmc_app_send_scr(card, card->raw_scr, ++ sizeof(card->raw_scr)); ++ + if (err) + goto free_card; + +diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c +index 0d96080..8a8f648 100644 +--- a/drivers/mmc/core/sd_ops.c ++++ b/drivers/mmc/core/sd_ops.c +@@ -247,7 +247,7 @@ int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca) + return 0; + } + +-int mmc_app_send_scr(struct mmc_card *card, u32 *scr) ++int mmc_app_send_scr(struct mmc_card *card, u32 *scr, u32 scr_size) + { + int err; + struct mmc_request mrq; +@@ -276,13 +276,13 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr) + cmd.arg = 0; + cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; + +- data.blksz = 8; ++ data.blksz = scr_size; + data.blocks = 1; + data.flags = MMC_DATA_READ; + data.sg = &sg; + data.sg_len = 1; + +- sg_init_one(&sg, scr, 8); ++ sg_init_one(&sg, scr, scr_size); + + mmc_set_data_timeout(&data, card); + +diff --git a/drivers/mmc/core/sd_ops.h b/drivers/mmc/core/sd_ops.h +index 9742d8a..13fb9df 100644 +--- a/drivers/mmc/core/sd_ops.h ++++ b/drivers/mmc/core/sd_ops.h +@@ -16,7 +16,7 @@ int mmc_app_set_bus_width(struct mmc_card *card, int width); + int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr); + int mmc_send_if_cond(struct mmc_host *host, u32 ocr); + int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca); +-int mmc_app_send_scr(struct mmc_card *card, u32 *scr); ++int mmc_app_send_scr(struct mmc_card *card, u32 *scr, u32 scr_size); + int mmc_sd_switch(struct mmc_card *card, int mode, int group, + u8 value, u8 *resp); + +diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h +index 403aa50..ba7fe71 100644 +--- a/include/linux/mmc/card.h ++++ b/include/linux/mmc/card.h +@@ -97,7 +97,12 @@ struct mmc_card { + + u32 raw_cid[4]; /* raw card CID */ + u32 raw_csd[4]; /* raw card CSD */ ++#if defined(CONFIG_ATMEL_MCI) ++ /* Due to a bug in the Atmel MCI, we have to read at least 12 bytes */ ++ u32 raw_scr[3]; /* raw card SCR */ ++#else + u32 raw_scr[2]; /* raw card SCR */ ++#endif + struct mmc_cid cid; /* card identification */ + struct mmc_csd csd; /* card specific */ + struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */ +-- +1.7.4.1 + diff --git a/recipes/linux/linux-2.6.30/at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch b/recipes/linux/linux-2.6.30/at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch new file mode 100644 index 0000000..cc56c94 --- /dev/null +++ b/recipes/linux/linux-2.6.30/at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch @@ -0,0 +1,154 @@ +From 75ed9d7e9e9ce838982d910293d1de3e2f82f158 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Wed, 2 Nov 2011 22:03:52 +0100 +Subject: [PATCH 2/4] mmc drivers: Rearrange buffer splits before send + +The AT91 MCI cannot transfer packets of less than 12 bytes. +If the size of the remaining packet, when all full blocks +is less than 12, then the driver will send one less block +than possible, then send a half sized block which results +in the final transfer beeing slighty longer than half a block +thus not less than 12. +This fix is depending on CONFIG_MMC_ATMELMCI + +Signed-off-by: Ulf Samuelsson +--- + drivers/mmc/core/sdio_io.c | 93 +++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 88 insertions(+), 5 deletions(-) + +diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c +index f61fc2d..e0b2bed 100644 +--- a/drivers/mmc/core/sdio_io.c ++++ b/drivers/mmc/core/sdio_io.c +@@ -298,9 +298,51 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, + unsigned remainder = size; + unsigned max_blocks; + int ret; ++#if defined(CONFIG_MMC_ATMELMCI) ++ /* Check if we will end up with a transfer with less than 12 bytes */ ++ /* This cannot be handled due to a bug in the MCI block */ ++ unsigned last_size; ++ unsigned workaround; ++ if (remainder < 12) { ++ pr_debug("BUG: atmel-mci: " ++ "total transfer of less than 12 bytes\n"); ++ return -EINVAL; ++ } ++ ++ last_size = remainder % func->cur_blksize; ++ ++ if ((last_size == 0) || (last_size >= 12)) { ++ /* We are OK */ ++ workaround = 0; ++ } else { ++ workaround = 1; ++ pr_debug("warning: atmel-mci: " ++ "last transfer of less than 12 bytes - " ++ "trying to recover...\n"); ++ pr_debug("size = %d, " ++ "blocksize = %d, " ++ "last_size = %d\n", ++ size, func->cur_blksize, last_size); ++ /* ++ * Recovering strategy: ++ * We will not write all possible blocks ++ * If 'n' blocks are possible, we will write 'n'-1 blocks. ++ * This leave 'cur_blksize' + 'last_size' characters ++ * To ensure no transfers are < 12 bytes, ++ * half a block is then transferred, leaving the last ++ * transfer to be half a block + 'last_size' ++ */ ++ ++ /* ++ * Hide a block from the block transfer algorithm ++ */ + ++ remainder -= func->cur_blksize; ++ } ++#endif + /* Do the bulk of the transfer using block mode (if supported). */ +- if (func->card->cccr.multi_block && (size > sdio_max_byte_size(func))) { ++ if (func->card->cccr.multi_block && ++ (remainder > sdio_max_byte_size(func))) { + /* Blocks per command is limited by host count, host transfer + * size (we only use a single sg entry) and the maximum for + * IO_RW_EXTENDED of 511 blocks. */ +@@ -315,6 +357,7 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, + if (blocks > max_blocks) + blocks = max_blocks; + size = blocks * func->cur_blksize; ++ remainder -= size; + + ret = mmc_io_rw_extended(func->card, write, + func->num, addr, incr_addr, buf, +@@ -322,7 +365,6 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, + if (ret) + return ret; + +- remainder -= size; + buf += size; + if (incr_addr) + addr += size; +@@ -330,15 +372,56 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, + } + + /* Write the remainder using byte mode. */ +- while (remainder > 0) { +- size = min(remainder, sdio_max_byte_size(func)); ++#if defined(CONFIG_MMC_ATMELMCI) ++ if (workaround) { ++ /* ++ * We send half a block first, ++ * First return back the hidden block ++ */ ++ remainder += func->cur_blksize; + ++ size = func->cur_blksize / 2; ++ remainder -= size; ++ pr_debug("recovery transfer : size = %d, remainder = %d\n", ++ size, remainder); + ret = mmc_io_rw_extended(func->card, write, func->num, addr, + incr_addr, buf, 1, size); +- if (ret) ++ if (ret) { ++ pr_debug("atmel-mci recovery transfer failed: " ++ "error = %d\n", ret); + return ret; ++ } ++ /* ++ * Now, slightly more than half a block remains. ++ */ + ++ } ++#endif ++ while (remainder > 0) { ++ size = min(remainder, sdio_max_byte_size(func)); + remainder -= size; ++#if defined(CONFIG_MMC_ATMELMCI) ++ if (size < 12) { ++ pr_debug("BUG: atmel-mci: " ++ "last transfer of less than 12 bytes - " ++ "aborting transfer\n"); ++ return -EINVAL; ++ } ++ if (workaround) { ++ pr_debug("byte mode transfer - " ++ "size = %d, " ++ "remainder = %d\n", ++ size, remainder); ++ } ++#endif ++ ret = mmc_io_rw_extended(func->card, write, func->num, addr, ++ incr_addr, buf, 1, size); ++ if (ret) { ++ pr_debug("mmc: byte mode transfer - failed - " ++ "size = %d\n", ++ size); ++ return ret; ++ } + buf += size; + if (incr_addr) + addr += size; +-- +1.7.4.1 + diff --git a/recipes/linux/linux-2.6.30/at91sam9g20ek_2mmc/defconfig b/recipes/linux/linux-2.6.30/at91sam9g20ek_2mmc/defconfig index 55ae2d9..b6ce261 100644 --- a/recipes/linux/linux-2.6.30/at91sam9g20ek_2mmc/defconfig +++ b/recipes/linux/linux-2.6.30/at91sam9g20ek_2mmc/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.30 -# Mon Oct 12 18:24:05 2009 +# Tue Nov 1 00:23:23 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -75,6 +75,7 @@ CONFIG_ANON_INODES=y CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_STRIP_ASM_SYMS=y CONFIG_HOTPLUG=y @@ -186,6 +187,7 @@ CONFIG_ARCH_AT91=y # CONFIG_ARCH_AT91SAM9RL is not set CONFIG_ARCH_AT91SAM9G20=y # CONFIG_ARCH_AT91SAM9G45 is not set +# CONFIG_ARCH_AT91SAM9M10 is not set # CONFIG_ARCH_AT91CAP9 is not set # CONFIG_ARCH_AT572D940HF is not set # CONFIG_ARCH_AT91X40 is not set @@ -263,7 +265,7 @@ CONFIG_PAGE_OFFSET=0xC0000000 # CONFIG_PREEMPT is not set CONFIG_HZ=100 CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y +# CONFIG_OABI_COMPAT is not set # CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set @@ -291,7 +293,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" +CONFIG_CMDLINE=" debug " # CONFIG_XIP_KERNEL is not set # CONFIG_KEXEC is not set @@ -307,9 +309,6 @@ CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev # # At least one emulation must be selected # -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set # CONFIG_VFP is not set # @@ -414,7 +413,16 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel" # CONFIG_MAC80211_MESH is not set # CONFIG_MAC80211_LEDS is not set -# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_MAC80211_DEBUGFS=y +CONFIG_MAC80211_DEBUG_MENU=y +# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set +# CONFIG_MAC80211_NOINLINE is not set +# CONFIG_MAC80211_VERBOSE_DEBUG is not set +# CONFIG_MAC80211_HT_DEBUG is not set +# CONFIG_MAC80211_TKIP_DEBUG is not set +# CONFIG_MAC80211_IBSS_DEBUG is not set +# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set +# CONFIG_MAC80211_DEBUG_COUNTERS is not set # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set @@ -432,6 +440,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_CONNECTOR is not set CONFIG_MTD=y @@ -682,6 +692,7 @@ CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_RFKILL=y CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_LIB_DEBUGFS is not set # CONFIG_RT2X00_DEBUG is not set # @@ -825,6 +836,7 @@ CONFIG_I2C_GPIO=y # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set CONFIG_SPI_MASTER=y # @@ -841,6 +853,7 @@ CONFIG_SPI_SPIDEV=y # CONFIG_SPI_TLE62X0 is not set CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set # CONFIG_GPIO_SYSFS is not set # @@ -1084,7 +1097,9 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_ISIGHTFW is not set # CONFIG_USB_VST is not set CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set # CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_SELECTED=y CONFIG_USB_GADGET_AT91=y @@ -1137,8 +1152,8 @@ CONFIG_SDIO_UART=m # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_SDHCI is not set -CONFIG_MMC_AT91=y -# CONFIG_MMC_ATMELMCI is not set +# CONFIG_MMC_AT91 is not set +CONFIG_MMC_ATMELMCI=y # CONFIG_MMC_SPI is not set # CONFIG_MEMSTICK is not set # CONFIG_ACCESSIBILITY is not set @@ -1400,14 +1415,48 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 # CONFIG_MAGIC_SYSRQ is not set # CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set +CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set # CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_TRACING_SUPPORT=y @@ -1425,10 +1474,15 @@ CONFIG_TRACING_SUPPORT=y # CONFIG_KMEMTRACE is not set # CONFIG_WORKQUEUE_TRACER is not set # CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_DYNAMIC_DEBUG=y # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set CONFIG_ARM_UNWIND=y CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set # # Security options diff --git a/recipes/linux/linux-at91.inc b/recipes/linux/linux-at91.inc index c7aca1c..e5a9e0f 100644 --- a/recipes/linux/linux-at91.inc +++ b/recipes/linux/linux-at91.inc @@ -13,6 +13,7 @@ DEFAULT_PREFERENCE_at91sam9m10g45ek = "30" at91sam_patch = " \ ftp://ftp.linux4sam.org/pub/linux/2.6.30-at91/2.6.30-at91-exp.4.tar.gz \ + http://www.hd-wireless.se/images/stories/public_pdf/2.6.30-at91-sdio-irq-support.patch \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0001-at91-dm9000-initialization-update.patch;patch=1 \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0002-at91-add-gpio-button-support-for-at91sam9g20ek.patch;patch=1 \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0003-at91-add-gpio-button-and-leds-support-for-at91sam9r.patch;patch=1 \ @@ -107,6 +108,9 @@ at91sam_patch = " \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0092-input-atmel_tsadcc-introduce-changes-needed-for-at.patch;patch=1 \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0093-9m10g45-add-defconfig-file.patch;patch=1 \ file://${WORKDIR}/2.6.30-at91-exp.4/2.6.30-at91-exp.4-0094-adding-9m10g45-board.patch;patch=1 \ + file://${WORKDIR}/2.6.30-at91-sdio-irq-support.patch;patch=1 \ + file://at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch;patch=1 \ + file://at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch;patch=1 \ " SRC_URI_append_at91sam9260ek = ${at91sam_patch} diff --git a/recipes/linux/linux_2.6.30.bb b/recipes/linux/linux_2.6.30.bb index a86c4b5..34e4fdf 100644 --- a/recipes/linux/linux_2.6.30.bb +++ b/recipes/linux/linux_2.6.30.bb @@ -8,6 +8,8 @@ S = "${WORKDIR}/linux-${PV}" SRC_URI = " \ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ http://maxim.org.za/AT91RM9200/2.6/2.6.30-at91.patch.gz;patch=1 \ + file://at91/0001-mmc-drivers-Ensure-access-to-SCR-is-done-w-12-bytes.patch \ + file://at91/0002-mmc-drivers-Rearrange-buffer-splits-before-send.patch \ file://defconfig \ " -- 1.7.4.1 From 6db81284f4f76eb291f712d979df61d3e988a5bb Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Tue, 15 Nov 2011 16:24:30 +0100 Subject: [PATCH 3/7] owl-wifi: add driver for H&D Wireless HDG104 WiFi Module Signed-off-by: Ulf Samuelsson --- conf/checksums.ini | 12 ++++++ .../0001-owl-wifi-include-linux-semaphore.h.patch | 25 +++++++++++++ ...l-wifi-Add-include-file-for-kmalloc-kfree.patch | 25 +++++++++++++ .../files/0003-owl-wifi-include-sched.h.patch | 24 ++++++++++++ recipes/owl-wifi/owl-wifi_1.0.4.bb | 38 +++++++++++++++++++ recipes/owl-wifi/owl-wifi_1.0.6.bb | 39 ++++++++++++++++++++ 6 files changed, 163 insertions(+), 0 deletions(-) create mode 100644 recipes/owl-wifi/files/0001-owl-wifi-include-linux-semaphore.h.patch create mode 100644 recipes/owl-wifi/files/0002-owl-wifi-Add-include-file-for-kmalloc-kfree.patch create mode 100644 recipes/owl-wifi/files/0003-owl-wifi-include-sched.h.patch create mode 100644 recipes/owl-wifi/owl-wifi_1.0.4.bb create mode 100644 recipes/owl-wifi/owl-wifi_1.0.6.bb diff --git a/conf/checksums.ini b/conf/checksums.ini index ae82b09..cc7709d 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -19402,6 +19402,10 @@ sha256=1391df01a619c6df0049706fb7bd4c690c55439b7bee4d5e8c564525cefdede2 md5=e52d87fafbeed156354dff3c34203d3d sha256=aec28206a8345f982a3e98b7b889721340899483e579a81aaf72c2cd59bb144e +[http://linux.hd-wireless.se/pub/Linux/DownloadDrivers/owl-linux-1.0.6.tar.gz] +md5=3024c0b01c871b079b66f07e48f9a24c +sha256=8ccdfa05fdca52bf64ff9de47d46af154fbb90e09e93ca5a16f44b415296827d + [http://openzaurus.org/mirror/oz-compat_0.5.tar.gz] md5=0005d4068b2227e26f4583c1a7415e97 sha256=8db9b3948c607315f0ba0df61b32f747bec5479c38051d3e0e55b31b82c81af5 @@ -29318,3 +29322,11 @@ sha256=f57c4e33eb2cdd87a6c2f01bfa4794340fbe61ea1a1cfc7dac3b6671e1dd22af md5=5f7b88ebb2bcd7e8044328482d079661 sha256=f57c4e33eb2cdd87a6c2f01bfa4794340fbe61ea1a1cfc7dac3b6671e1dd22af +[http://www.hd-wireless.se/images/stories/public_pdf/2.6.30-at91-sdio-irq-support.patch] +md5=8ae8eafddf3d8a1c507aca4d09627a4d +sha256=eebc26aaa9f746eff90cce1d0a3537d2b8f48a69a054733c749e4b12c3ad6069 + +[http://www.hd-wireless.se/images/stories/public_pdf/owl-linux-arm-1.0.4.tar.gz] +md5=e8df44b8c766436fdd798fa5cd6d1a02 +sha256=c2b47ecb6375e7a5904fefd6ec7b715ca4a6ac347fb68324fea7ade152244e6e + diff --git a/recipes/owl-wifi/files/0001-owl-wifi-include-linux-semaphore.h.patch b/recipes/owl-wifi/files/0001-owl-wifi-include-linux-semaphore.h.patch new file mode 100644 index 0000000..411f965 --- /dev/null +++ b/recipes/owl-wifi/files/0001-owl-wifi-include-linux-semaphore.h.patch @@ -0,0 +1,25 @@ +From 2f334b4563af8a8fc508b8d7245b901f0c5deab3 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Sat, 16 Apr 2011 17:22:00 +0200 +Subject: [PATCH] owl-wifi: include linux/semaphore.h + +Signed-off-by: Ulf Samuelsson +--- + owl_net.h | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/owl_net.h b/owl_net.h +index c019ef4..6a88100 100644 +--- a/owl_net.h ++++ b/owl_net.h +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "wl_api.h" + +-- +1.6.3.3 + diff --git a/recipes/owl-wifi/files/0002-owl-wifi-Add-include-file-for-kmalloc-kfree.patch b/recipes/owl-wifi/files/0002-owl-wifi-Add-include-file-for-kmalloc-kfree.patch new file mode 100644 index 0000000..6811b7b --- /dev/null +++ b/recipes/owl-wifi/files/0002-owl-wifi-Add-include-file-for-kmalloc-kfree.patch @@ -0,0 +1,25 @@ +From 3ac35324bc7e6cb0afda82d84f7b63d673a71199 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Sat, 16 Apr 2011 17:44:19 +0200 +Subject: [PATCH] owl-wifi: Add include file for kmalloc/kfree + +Signed-off-by: Ulf Samuelsson +--- + owl_os.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/owl_os.c b/owl_os.c +index 270e541..4d7d116 100644 +--- a/owl_os.c ++++ b/owl_os.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + + /* +-- +1.6.3.3 + diff --git a/recipes/owl-wifi/files/0003-owl-wifi-include-sched.h.patch b/recipes/owl-wifi/files/0003-owl-wifi-include-sched.h.patch new file mode 100644 index 0000000..561a6f0 --- /dev/null +++ b/recipes/owl-wifi/files/0003-owl-wifi-include-sched.h.patch @@ -0,0 +1,24 @@ +From 6b4a1ffc0485c6efb0742d2965fed126b9fd3fc4 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Sat, 16 Apr 2011 18:01:34 +0200 +Subject: [PATCH] owl-wifi: include sched.h + +--- + owl_sync.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/owl_sync.c b/owl_sync.c +index 317010d..3be3efe 100644 +--- a/owl_sync.c ++++ b/owl_sync.c +@@ -16,6 +16,7 @@ + * along with this program. If not, see . + */ + ++#include + #include "owl_sync.h" + #include "owl_wext_event.h" + +-- +1.6.3.3 + diff --git a/recipes/owl-wifi/owl-wifi_1.0.4.bb b/recipes/owl-wifi/owl-wifi_1.0.4.bb new file mode 100644 index 0000000..3b0d1bb --- /dev/null +++ b/recipes/owl-wifi/owl-wifi_1.0.4.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Driver for HD Wireless Wi-Fi device" +HOMEPAGE = "http://www.hd-wireless.se" +PRIORITY = "optional" +SECTION = "kernel/modules" +LICENSE = "GPL" +PR = "r4" +RDEPENDS = "wireless-tools \ + wpa-supplicant \ + " + +SRC_URI = "http://www.hd-wireless.se/images/stories/public_pdf/owl-linux-arm-${PV}.tar.gz \ + file://0001-owl-wifi-include-linux-semaphore.h.patch;apply=yes \ + file://0002-owl-wifi-Add-include-file-for-kmalloc-kfree.patch;apply=yes \ + file://0003-owl-wifi-include-sched.h.patch;apply=yes \ + " + +S = "${WORKDIR}/owl-linux-arm-${PV}" + +inherit module + +do_compile () { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP + oe_runmake 'MODPATH=${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net' \ + 'KERNELDIR=${STAGING_KERNEL_DIR}' \ + 'KDIR=${STAGING_KERNEL_DIR}' \ + 'KERNEL_VERSION=${KERNEL_VERSION}' \ + 'CC=${KERNEL_CC}' \ + 'LD=${KERNEL_LD}' +} + +do_install() { + install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net + install -m 0644 ${S}/owl*${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net +} + +SRC_URI[md5sum] = "e8df44b8c766436fdd798fa5cd6d1a02" +SRC_URI[sha256sum] = "c2b47ecb6375e7a5904fefd6ec7b715ca4a6ac347fb68324fea7ade152244e6e" + diff --git a/recipes/owl-wifi/owl-wifi_1.0.6.bb b/recipes/owl-wifi/owl-wifi_1.0.6.bb new file mode 100644 index 0000000..da00ab0 --- /dev/null +++ b/recipes/owl-wifi/owl-wifi_1.0.6.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Driver for HD Wireless Wi-Fi device" +HOMEPAGE = "http://www.hd-wireless.se" +PRIORITY = "optional" +SECTION = "kernel/modules" +LICENSE = "GPL" + +PR = "r1" + +S = "${WORKDIR}/owl-linux-${PV}" + +RDEPENDS = "wireless-tools \ + wpa-supplicant \ + " + +SRC_URI = "http://linux.hd-wireless.se/pub/Linux/DownloadDrivers/owl-linux-${PV}.tar.gz \ + " + +SCRIPTS = "${WORKDIR}/scripts" + +inherit module + +do_compile () { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP + oe_runmake 'MODPATH=${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net' \ + 'KERNELDIR=${STAGING_KERNEL_DIR}' \ + 'KDIR=${STAGING_KERNEL_DIR}' \ + 'KERNEL_VERSION=${KERNEL_VERSION}' \ + 'CC=${KERNEL_CC}' \ + 'LD=${KERNEL_LD}' +} + +do_install() { + install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net + install -m 0644 ${S}/owl*${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/owl-1.0.6.ko +} + +SRC_URI[md5sum] = "3024c0b01c871b079b66f07e48f9a24c" +SRC_URI[sha256sum] = "8ccdfa05fdca52bf64ff9de47d46af154fbb90e09e93ca5a16f44b415296827d" + -- 1.7.4.1 From 4a171d0a6e221810aa73110c16dfbee3f9e348cf Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Tue, 15 Nov 2011 16:41:18 +0100 Subject: [PATCH 4/7] *-at91sam9*-image - Add owl-wifi Signed-off-by: Ulf Samuelsson --- recipes/images/console-at91sam9-image.bb | 1 + recipes/images/x11-at91sam9-image.bb | 1 + recipes/images/x11-at91sam9m10-image.bb | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/recipes/images/console-at91sam9-image.bb b/recipes/images/console-at91sam9-image.bb index 7aae0fb..922c23e 100644 --- a/recipes/images/console-at91sam9-image.bb +++ b/recipes/images/console-at91sam9-image.bb @@ -13,6 +13,7 @@ ANGSTROM_EXTRA_INSTALL += " \ dosfstools \ mtd-utils \ # nbench-byte \ + owl-wifi \ " DEPENDS = "task-base-extended \ diff --git a/recipes/images/x11-at91sam9-image.bb b/recipes/images/x11-at91sam9-image.bb index 6595062..86545d0 100644 --- a/recipes/images/x11-at91sam9-image.bb +++ b/recipes/images/x11-at91sam9-image.bb @@ -32,6 +32,7 @@ ANGSTROM_EXTRA_INSTALL += " \ # nbench-byte \ gpe-mini-browser \ pointercal \ + owl-wifi \ " export IMAGE_BASENAME = "x11-at91sam9-image" diff --git a/recipes/images/x11-at91sam9m10-image.bb b/recipes/images/x11-at91sam9m10-image.bb index 6e591e6..416ae63 100644 --- a/recipes/images/x11-at91sam9m10-image.bb +++ b/recipes/images/x11-at91sam9m10-image.bb @@ -56,6 +56,7 @@ ANGSTROM_EXTRA_INSTALL += " \ gst-ffmpeg \ gst-plugin-on2-8170 \ on2-8170-libs \ + owl-wifi \ " export IMAGE_BASENAME = "x11-at91sam9m10-image" -- 1.7.4.1