/////////////////////Local Bus /Flash Function  ///////////////
static inline u16 __flash_read16(void *addr)
{
	
 return	*(volatile unsigned short *)PCI_FIX_ADDR(addr);
	
	//return __raw_readw(addr);
}
Ejemplo n.º 2
0
struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
{
    struct iowa_bus *bus;
    int token;

    token = PCI_GET_ADDR_TOKEN(addr);

    if (token && token <= iowa_bus_count)
        bus = &iowa_busses[token - 1];
    else {
        unsigned long vaddr, paddr;
        pte_t *ptep;

        vaddr = (unsigned long)PCI_FIX_ADDR(addr);
        if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END)
            return NULL;

        ptep = find_linux_pte(init_mm.pgd, vaddr);
        if (ptep == NULL)
            paddr = 0;
        else
            paddr = pte_pfn(*ptep) << PAGE_SHIFT;
        bus = iowa_pci_find(vaddr, paddr);

        if (bus == NULL)
            return NULL;
    }

    return bus;
}
void write_toPLIS_success7()
{
	
	//Channell7 =42*2=84 =0x54
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000054)) = 0x0003;
	
}
void write_toPLIS_success8()
{
	
	//Channell8 =44*2=88 =0x58
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000058)) = 0x0003;
	
}
void write_toPLIS_success5()
{
	
	//Channell5 =38*2=76 =0x4C
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff00004C)) = 0x0003;
	
}
void write_toPLIS_success6()
{
	
	//Channell6 =40*2=80 =0x50
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000050)) = 0x0003;
	
}
void write_toPLIS_success4()
{
	
	//Channell4 =36*2=72 =0x48	
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000048)) = 0x0003;
	
}
void write_toPLIS_success3()
{
	
	//Channell3 =34*2=68 =0x44
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000044)) = 0x0003;
	
}
/////////////////////////////////WRITE_TO_PLIS_SUCESSS//////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
void write_toPLIS_success2()
{
	
    //Channell2 =32*2=64 =0x40
	*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff000040)) = 0x0003;	
	
	
}
void set_packet_size(volatile u16 p_aize)
{


ludelay(10000);
*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff0000dc)) = p_aize;	

}
Ejemplo n.º 11
0
void write_toPLIS_success()
{
u16 l_adress_write_success=30;
u16 data_write_success=0x0003;	


     *(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xef00003c)) = 0x0003; 
   //*(volatile unsigned short *)PCI_FIX_ADDR((void *)(0xff00003c)) = 0x0003;
   //printf("Write_sucess Num=%d Waddress=0x%x -> Wdata= 0x%x|\n\r",l_adress_write_success,flash_map(l_adress_write_success),/*data_to_write*/ /*test_mas[m]*/data_write_success);	

}
Ejemplo n.º 12
0
/*  
 * Unmap an IO region and remove it from imalloc'd list.
 * Access to IO memory should be serialized by driver.
 */
void __iounmap(volatile void __iomem *token)
{
	void *addr;

	if (!slab_is_available())
		return;
	
	addr = (void *) ((unsigned long __force)
			 PCI_FIX_ADDR(token) & PAGE_MASK);
	if ((unsigned long)addr < ioremap_bot) {
		printk(KERN_WARNING "Attempt to iounmap early bolted mapping"
		       " at 0x%p\n", addr);
		return;
	}
	vunmap(addr);
}