mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-08 09:08:05 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
56
arch/mips/include/asm/mach-jazz/dma-coherence.h
Normal file
56
arch/mips/include/asm/mach-jazz/dma-coherence.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org>
|
||||
*/
|
||||
#ifndef __ASM_MACH_JAZZ_DMA_COHERENCE_H
|
||||
#define __ASM_MACH_JAZZ_DMA_COHERENCE_H
|
||||
|
||||
#include <asm/jazzdma.h>
|
||||
|
||||
struct device;
|
||||
|
||||
static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
|
||||
{
|
||||
return vdma_alloc(virt_to_phys(addr), size);
|
||||
}
|
||||
|
||||
static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
|
||||
struct page *page)
|
||||
{
|
||||
return vdma_alloc(page_to_phys(page), PAGE_SIZE);
|
||||
}
|
||||
|
||||
static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
|
||||
dma_addr_t dma_addr)
|
||||
{
|
||||
return vdma_log2phys(dma_addr);
|
||||
}
|
||||
|
||||
static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
|
||||
size_t size, enum dma_data_direction direction)
|
||||
{
|
||||
vdma_free(dma_addr);
|
||||
}
|
||||
|
||||
static inline int plat_dma_supported(struct device *dev, u64 mask)
|
||||
{
|
||||
/*
|
||||
* we fall back to GFP_DMA when the mask isn't all 1s,
|
||||
* so we can't guarantee allocations that must be
|
||||
* within a tighter range than GFP_DMA..
|
||||
*/
|
||||
if (mask < DMA_BIT_MASK(24))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int plat_device_is_coherent(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __ASM_MACH_JAZZ_DMA_COHERENCE_H */
|
134
arch/mips/include/asm/mach-jazz/floppy.h
Normal file
134
arch/mips/include/asm/mach-jazz/floppy.h
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1998, 2003 by Ralf Baechle
|
||||
*/
|
||||
#ifndef __ASM_MACH_JAZZ_FLOPPY_H
|
||||
#define __ASM_MACH_JAZZ_FLOPPY_H
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/jazz.h>
|
||||
#include <asm/jazzdma.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
static inline unsigned char fd_inb(unsigned int port)
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
c = *(volatile unsigned char *) port;
|
||||
udelay(1);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline void fd_outb(unsigned char value, unsigned int port)
|
||||
{
|
||||
*(volatile unsigned char *) port = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* How to access the floppy DMA functions.
|
||||
*/
|
||||
static inline void fd_enable_dma(void)
|
||||
{
|
||||
vdma_enable(JAZZ_FLOPPY_DMA);
|
||||
}
|
||||
|
||||
static inline void fd_disable_dma(void)
|
||||
{
|
||||
vdma_disable(JAZZ_FLOPPY_DMA);
|
||||
}
|
||||
|
||||
static inline int fd_request_dma(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void fd_free_dma(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void fd_clear_dma_ff(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void fd_set_dma_mode(char mode)
|
||||
{
|
||||
vdma_set_mode(JAZZ_FLOPPY_DMA, mode);
|
||||
}
|
||||
|
||||
static inline void fd_set_dma_addr(char *a)
|
||||
{
|
||||
vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(CPHYSADDR((unsigned long)a)));
|
||||
}
|
||||
|
||||
static inline void fd_set_dma_count(unsigned int count)
|
||||
{
|
||||
vdma_set_count(JAZZ_FLOPPY_DMA, count);
|
||||
}
|
||||
|
||||
static inline int fd_get_dma_residue(void)
|
||||
{
|
||||
return vdma_get_residue(JAZZ_FLOPPY_DMA);
|
||||
}
|
||||
|
||||
static inline void fd_enable_irq(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void fd_disable_irq(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int fd_request_irq(void)
|
||||
{
|
||||
return request_irq(FLOPPY_IRQ, floppy_interrupt,
|
||||
0, "floppy", NULL);
|
||||
}
|
||||
|
||||
static inline void fd_free_irq(void)
|
||||
{
|
||||
free_irq(FLOPPY_IRQ, NULL);
|
||||
}
|
||||
|
||||
static inline unsigned long fd_getfdaddr1(void)
|
||||
{
|
||||
return JAZZ_FDC_BASE;
|
||||
}
|
||||
|
||||
static inline unsigned long fd_dma_mem_alloc(unsigned long size)
|
||||
{
|
||||
unsigned long mem;
|
||||
|
||||
mem = __get_dma_pages(GFP_KERNEL, get_order(size));
|
||||
if(!mem)
|
||||
return 0;
|
||||
vdma_alloc(CPHYSADDR(mem), size); /* XXX error checking */
|
||||
|
||||
return mem;
|
||||
}
|
||||
|
||||
static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
|
||||
{
|
||||
vdma_free(vdma_phys2log(CPHYSADDR(addr)));
|
||||
free_pages(addr, get_order(size));
|
||||
}
|
||||
|
||||
static inline unsigned long fd_drive_type(unsigned long n)
|
||||
{
|
||||
/* XXX This is wrong for machines with ED 2.88mb disk drives like the
|
||||
Olivetti M700. Anyway, we should suck this from the ARC
|
||||
firmware. */
|
||||
if (n == 0)
|
||||
return 4; /* 3,5", 1.44mb */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __ASM_MACH_JAZZ_FLOPPY_H */
|
38
arch/mips/include/asm/mach-jazz/mc146818rtc.h
Normal file
38
arch/mips/include/asm/mach-jazz/mc146818rtc.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1998, 2001, 03 by Ralf Baechle
|
||||
* Copyright (C) 2007 Thomas Bogendoerfer
|
||||
*
|
||||
* RTC routines for Jazz style attached Dallas chip.
|
||||
*/
|
||||
#ifndef __ASM_MACH_JAZZ_MC146818RTC_H
|
||||
#define __ASM_MACH_JAZZ_MC146818RTC_H
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/jazz.h>
|
||||
|
||||
#define RTC_PORT(x) (0x70 + (x))
|
||||
#define RTC_IRQ 8
|
||||
|
||||
static inline unsigned char CMOS_READ(unsigned long addr)
|
||||
{
|
||||
outb_p(addr, RTC_PORT(0));
|
||||
return *(volatile char *)JAZZ_RTC_BASE;
|
||||
}
|
||||
|
||||
static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
|
||||
{
|
||||
outb_p(addr, RTC_PORT(0));
|
||||
*(volatile char *)JAZZ_RTC_BASE = data;
|
||||
}
|
||||
|
||||
#define RTC_ALWAYS_BCD 0
|
||||
|
||||
#define mc146818_decode_year(year) ((year) + 1980)
|
||||
|
||||
#endif /* __ASM_MACH_JAZZ_MC146818RTC_H */
|
24
arch/mips/include/asm/mach-jazz/war.h
Normal file
24
arch/mips/include/asm/mach-jazz/war.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
|
||||
*/
|
||||
#ifndef __ASM_MIPS_MACH_JAZZ_WAR_H
|
||||
#define __ASM_MIPS_MACH_JAZZ_WAR_H
|
||||
|
||||
#define R4600_V1_INDEX_ICACHEOP_WAR 0
|
||||
#define R4600_V1_HIT_CACHEOP_WAR 0
|
||||
#define R4600_V2_HIT_CACHEOP_WAR 0
|
||||
#define R5432_CP0_INTERRUPT_WAR 0
|
||||
#define BCM1250_M3_WAR 0
|
||||
#define SIBYTE_1956_WAR 0
|
||||
#define MIPS4K_ICACHE_REFILL_WAR 0
|
||||
#define MIPS_CACHE_SYNC_WAR 0
|
||||
#define TX49XX_ICACHE_INDEX_INV_WAR 0
|
||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
||||
#define R10000_LLSC_WAR 0
|
||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||
|
||||
#endif /* __ASM_MIPS_MACH_JAZZ_WAR_H */
|
Loading…
Add table
Add a link
Reference in a new issue