~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
 
88
88
 
89
89
/*
90
 
 * For performance reasons, we handle storage endpoint transfers upto 4 KB
 
90
 * For performance reasons, we handle storage endpoint transfers up to 4 KB
91
91
 * within the HAL itself.
92
92
 */
93
93
 #define CYASSTORAGE_WRITE_EP_NUM       (4)
108
108
                                ((ep) == 6) || ((ep) == 8))
109
109
 
110
110
/*
111
 
 * persistant, stores current GPMC interface cfg mode
 
111
 * persistent, stores current GPMC interface cfg mode
112
112
 */
113
113
static uint8_t pnand_16bit;
114
114
 
115
115
/*
116
 
 * keep processing new WB DRQ in ISR untill all handled (performance feature)
 
116
 * keep processing new WB DRQ in ISR until all handled (performance feature)
117
117
 */
118
118
#define PROCESS_MULTIPLE_DRQ_IN_ISR (1)
119
119
 
157
157
         * dma_xfer_sz - size of the next dma xfer on P port
158
158
         * seg_xfer_cnt -  counts xfered bytes for in current sg_list
159
159
         *              memory segment
160
 
         * req_xfer_cnt - total number of bytes transfered so far in
 
160
         * req_xfer_cnt - total number of bytes transferred so far in
161
161
         *              current request
162
162
         * req_length - total request length
163
163
         */
347
347
        u32 tmp32;
348
348
        int err;
349
349
        struct gpmc_timings     timings;
350
 
        /*
351
 
         * get GPMC i/o registers base(already been i/o mapped
352
 
         * in kernel, no need for separate i/o remap)
353
 
         */
354
 
        gpmc_base = phys_to_virt(OMAP34XX_GPMC_BASE);
 
350
 
 
351
        gpmc_base = (u32)ioremap_nocache(OMAP34XX_GPMC_BASE, BLKSZ_4K);
355
352
        DBGPRN(KERN_INFO "kernel has gpmc_base=%x , val@ the base=%x",
356
353
                gpmc_base, __raw_readl(gpmc_base)
357
354
        );
600
597
        int result;
601
598
        int irq_pin  = AST_INT;
602
599
 
603
 
        set_irq_type(OMAP_GPIO_IRQ(irq_pin), IRQ_TYPE_LEVEL_LOW);
 
600
        irq_set_irq_type(OMAP_GPIO_IRQ(irq_pin), IRQ_TYPE_LEVEL_LOW);
604
601
 
605
602
        /*
606
603
         * for shared IRQS must provide non NULL device ptr
771
768
                cy_as_hal_print_message(KERN_INFO "%s virt_addr=%x\n",
772
769
                                        gpio_vma_tab[i].name,
773
770
                                        (u32)gpio_vma_tab[i].virt_addr);
774
 
        };
 
771
        }
775
772
 
776
773
        /*
777
774
         * force OMAP_GPIO_126  to rleased state,
2163
2160
/*
2164
2161
 * This function is expected to create a sleep channel.
2165
2162
 * The data structure that represents the sleep channel object
2166
 
 * sleep channel (which is Linux "wait_queue_head_t wq" for this paticular HAL)
 
2163
 * sleep channel (which is Linux "wait_queue_head_t wq" for this particular HAL)
2167
2164
 * passed as a pointer, and allpocated by the caller
2168
2165
 * (typically as a local var on the stack) "Create" word should read as
2169
2166
 * "SleepOn", this func doesn't actually create anything
2367
2364
         */
2368
2365
        cy_as_hal_gpmc_enable_16bit_bus(cy_true);
2369
2366
#else
2370
 
   /* Astoria and GPMC are already in 8 bit mode, jsut initialize PNAND_CFG */
 
2367
   /* Astoria and GPMC are already in 8 bit mode, just initialize PNAND_CFG */
2371
2368
        ast_p_nand_casdi_write(CY_AS_MEM_PNAND_CFG, 0x0000);
2372
2369
#endif
2373
2370