--- zzzz-none-000/linux-2.6.39.4/drivers/mmc/card/queue.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/mmc/card/queue.c 2021-11-10 13:23:10.000000000 +0000 @@ -9,6 +9,16 @@ * published by the Free Software Foundation. * */ + + +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 07/2011. + Changed/modified portions - Copyright(c) 2011, Intel Corporation. + +******************************************************************/ + + #include #include #include @@ -18,6 +28,11 @@ #include #include + +#if defined(CONFIG_ARCH_GEN3) || defined(CONFIG_ARCH_GEN3_MMC) +#include +#endif + #include "queue.h" #define MMC_QUEUE_BOUNCESZ 65536 @@ -207,6 +222,24 @@ sg_init_table(mq->sg, host->max_segs); } +#if defined(CONFIG_ARCH_GEN3) || defined(CONFIG_ARCH_GEN3_MMC) +#if defined(CONFIG_ARCH_GEN3) + mq->bp_buf = kmalloc(MAX_NUM_OF_SECTORS_TRANSFERD * MMC_SECTOR_SIZE, GFP_KERNEL); + if (!mq->bp_buf) { + printk("unable to alloc boot partition memory buffer\n"); + ret = -ENOMEM; + goto cleanup_queue; + } +#endif + + mq->bp_sg = kmalloc(sizeof(struct scatterlist), GFP_KERNEL); + if (!mq->bp_sg) { + ret = -ENOMEM; + goto cleanup_queue; + } + sg_init_table(mq->bp_sg, 1); +#endif + sema_init(&mq->thread_sem, 1); mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d",