mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-10 01:12:45 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
101
arch/arm/include/asm/mach/arch.h
Normal file
101
arch/arm/include/asm/mach/arch.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/arch.h
|
||||
*
|
||||
* Copyright (C) 2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/reboot.h>
|
||||
|
||||
struct tag;
|
||||
struct pt_regs;
|
||||
struct smp_operations;
|
||||
#ifdef CONFIG_SMP
|
||||
#define smp_ops(ops) (&(ops))
|
||||
#define smp_init_ops(ops) (&(ops))
|
||||
#else
|
||||
#define smp_ops(ops) (struct smp_operations *)NULL
|
||||
#define smp_init_ops(ops) (bool (*)(void))NULL
|
||||
#endif
|
||||
|
||||
struct machine_desc {
|
||||
unsigned int nr; /* architecture number */
|
||||
const char *name; /* architecture name */
|
||||
unsigned long atag_offset; /* tagged list (relative) */
|
||||
const char *const *dt_compat; /* array of device tree
|
||||
* 'compatible' strings */
|
||||
|
||||
unsigned int nr_irqs; /* number of IRQs */
|
||||
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
phys_addr_t dma_zone_size; /* size of DMA-able area */
|
||||
#endif
|
||||
|
||||
unsigned int video_start; /* start of video RAM */
|
||||
unsigned int video_end; /* end of video RAM */
|
||||
|
||||
unsigned char reserve_lp0 :1; /* never has lp0 */
|
||||
unsigned char reserve_lp1 :1; /* never has lp1 */
|
||||
unsigned char reserve_lp2 :1; /* never has lp2 */
|
||||
enum reboot_mode reboot_mode; /* default restart mode */
|
||||
unsigned l2c_aux_val; /* L2 cache aux value */
|
||||
unsigned l2c_aux_mask; /* L2 cache aux mask */
|
||||
void (*l2c_write_sec)(unsigned long, unsigned);
|
||||
struct smp_operations *smp; /* SMP operations */
|
||||
bool (*smp_init)(void);
|
||||
void (*fixup)(struct tag *, char **);
|
||||
void (*dt_fixup)(void);
|
||||
void (*init_meminfo)(void);
|
||||
void (*reserve)(void);/* reserve mem blocks */
|
||||
void (*map_io)(void);/* IO mapping function */
|
||||
void (*init_early)(void);
|
||||
void (*init_irq)(void);
|
||||
void (*init_time)(void);
|
||||
void (*init_machine)(void);
|
||||
void (*init_late)(void);
|
||||
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
||||
void (*handle_irq)(struct pt_regs *);
|
||||
#endif
|
||||
void (*restart)(enum reboot_mode, const char *);
|
||||
};
|
||||
|
||||
/*
|
||||
* Current machine - only accessible during boot.
|
||||
*/
|
||||
extern const struct machine_desc *machine_desc;
|
||||
|
||||
/*
|
||||
* Machine type table - also only accessible during boot
|
||||
*/
|
||||
extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
|
||||
#define for_each_machine_desc(p) \
|
||||
for (p = __arch_info_begin; p < __arch_info_end; p++)
|
||||
|
||||
/*
|
||||
* Set of macros to define architecture features. This is built into
|
||||
* a table by the linker.
|
||||
*/
|
||||
#define MACHINE_START(_type,_name) \
|
||||
static const struct machine_desc __mach_desc_##_type \
|
||||
__used \
|
||||
__attribute__((__section__(".arch.info.init"))) = { \
|
||||
.nr = MACH_TYPE_##_type, \
|
||||
.name = _name,
|
||||
|
||||
#define MACHINE_END \
|
||||
};
|
||||
|
||||
#define DT_MACHINE_START(_name, _namestr) \
|
||||
static const struct machine_desc __mach_desc_##_name \
|
||||
__used \
|
||||
__attribute__((__section__(".arch.info.init"))) = { \
|
||||
.nr = ~0, \
|
||||
.name = _namestr,
|
||||
|
||||
#endif
|
54
arch/arm/include/asm/mach/dma.h
Normal file
54
arch/arm/include/asm/mach/dma.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/dma.h
|
||||
*
|
||||
* Copyright (C) 1998-2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This header file describes the interface between the generic DMA handler
|
||||
* (dma.c) and the architecture-specific DMA backends (dma-*.c)
|
||||
*/
|
||||
|
||||
struct dma_struct;
|
||||
typedef struct dma_struct dma_t;
|
||||
|
||||
struct dma_ops {
|
||||
int (*request)(unsigned int, dma_t *); /* optional */
|
||||
void (*free)(unsigned int, dma_t *); /* optional */
|
||||
void (*enable)(unsigned int, dma_t *); /* mandatory */
|
||||
void (*disable)(unsigned int, dma_t *); /* mandatory */
|
||||
int (*residue)(unsigned int, dma_t *); /* optional */
|
||||
int (*setspeed)(unsigned int, dma_t *, int); /* optional */
|
||||
const char *type;
|
||||
};
|
||||
|
||||
struct dma_struct {
|
||||
void *addr; /* single DMA address */
|
||||
unsigned long count; /* single DMA size */
|
||||
struct scatterlist buf; /* single DMA */
|
||||
int sgcount; /* number of DMA SG */
|
||||
struct scatterlist *sg; /* DMA Scatter-Gather List */
|
||||
|
||||
unsigned int active:1; /* Transfer active */
|
||||
unsigned int invalid:1; /* Address/Count changed */
|
||||
|
||||
unsigned int dma_mode; /* DMA mode */
|
||||
int speed; /* DMA speed */
|
||||
|
||||
unsigned int lock; /* Device is allocated */
|
||||
const char *device_id; /* Device name */
|
||||
|
||||
const struct dma_ops *d_ops;
|
||||
};
|
||||
|
||||
/*
|
||||
* isa_dma_add - add an ISA-style DMA channel
|
||||
*/
|
||||
extern int isa_dma_add(unsigned int, dma_t *dma);
|
||||
|
||||
/*
|
||||
* Add the ISA DMA controller. Always takes channels 0-7.
|
||||
*/
|
||||
extern void isa_init_dma(void);
|
39
arch/arm/include/asm/mach/flash.h
Normal file
39
arch/arm/include/asm/mach/flash.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/flash.h
|
||||
*
|
||||
* Copyright (C) 2003 Russell King, All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef ASMARM_MACH_FLASH_H
|
||||
#define ASMARM_MACH_FLASH_H
|
||||
|
||||
struct mtd_partition;
|
||||
struct mtd_info;
|
||||
|
||||
/*
|
||||
* map_name: the map probe function name
|
||||
* name: flash device name (eg, as used with mtdparts=)
|
||||
* width: width of mapped device
|
||||
* init: method called at driver/device initialisation
|
||||
* exit: method called at driver/device removal
|
||||
* set_vpp: method called to enable or disable VPP
|
||||
* mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND
|
||||
* parts: optional array of mtd_partitions for static partitioning
|
||||
* nr_parts: number of mtd_partitions for static partitoning
|
||||
*/
|
||||
struct flash_platform_data {
|
||||
const char *map_name;
|
||||
const char *name;
|
||||
unsigned int width;
|
||||
int (*init)(void);
|
||||
void (*exit)(void);
|
||||
void (*set_vpp)(int on);
|
||||
void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
|
||||
struct mtd_partition *parts;
|
||||
unsigned int nr_parts;
|
||||
};
|
||||
|
||||
#endif
|
20
arch/arm/include/asm/mach/irda.h
Normal file
20
arch/arm/include/asm/mach/irda.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/irda.h
|
||||
*
|
||||
* Copyright (C) 2004 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __ASM_ARM_MACH_IRDA_H
|
||||
#define __ASM_ARM_MACH_IRDA_H
|
||||
|
||||
struct irda_platform_data {
|
||||
int (*startup)(struct device *);
|
||||
void (*shutdown)(struct device *);
|
||||
int (*set_power)(struct device *, unsigned int state);
|
||||
void (*set_speed)(struct device *, unsigned int speed);
|
||||
};
|
||||
|
||||
#endif
|
33
arch/arm/include/asm/mach/irq.h
Normal file
33
arch/arm/include/asm/mach/irq.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/irq.h
|
||||
*
|
||||
* Copyright (C) 1995-2000 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __ASM_ARM_MACH_IRQ_H
|
||||
#define __ASM_ARM_MACH_IRQ_H
|
||||
|
||||
#include <linux/irq.h>
|
||||
|
||||
struct seq_file;
|
||||
|
||||
/*
|
||||
* This is internal. Do not use it.
|
||||
*/
|
||||
extern void init_FIQ(int);
|
||||
extern int show_fiq_list(struct seq_file *, int);
|
||||
|
||||
/*
|
||||
* This is for easy migration, but should be changed in the source
|
||||
*/
|
||||
#define do_bad_IRQ(irq,desc) \
|
||||
do { \
|
||||
raw_spin_lock(&desc->lock); \
|
||||
handle_bad_irq(irq, desc); \
|
||||
raw_spin_unlock(&desc->lock); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
65
arch/arm/include/asm/mach/map.h
Normal file
65
arch/arm/include/asm/mach/map.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* arch/arm/include/asm/map.h
|
||||
*
|
||||
* Copyright (C) 1999-2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Page table mapping constructs and function prototypes
|
||||
*/
|
||||
#ifndef __ASM_MACH_MAP_H
|
||||
#define __ASM_MACH_MAP_H
|
||||
|
||||
#include <asm/io.h>
|
||||
|
||||
struct map_desc {
|
||||
unsigned long virtual;
|
||||
unsigned long pfn;
|
||||
unsigned long length;
|
||||
unsigned int type;
|
||||
};
|
||||
|
||||
/* types 0-3 are defined in asm/io.h */
|
||||
enum {
|
||||
MT_UNCACHED = 4,
|
||||
MT_CACHECLEAN,
|
||||
MT_MINICLEAN,
|
||||
MT_LOW_VECTORS,
|
||||
MT_HIGH_VECTORS,
|
||||
MT_MEMORY_RWX,
|
||||
MT_MEMORY_RW,
|
||||
MT_ROM,
|
||||
MT_MEMORY_RWX_NONCACHED,
|
||||
MT_MEMORY_RW_DTCM,
|
||||
MT_MEMORY_RWX_ITCM,
|
||||
MT_MEMORY_RW_SO,
|
||||
MT_MEMORY_DMA_READY,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
extern void iotable_init(struct map_desc *, int);
|
||||
extern void vm_reserve_area_early(unsigned long addr, unsigned long size,
|
||||
void *caller);
|
||||
|
||||
#ifdef CONFIG_DEBUG_LL
|
||||
extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr);
|
||||
extern void debug_ll_io_init(void);
|
||||
#else
|
||||
static inline void debug_ll_io_init(void) {}
|
||||
#endif
|
||||
|
||||
struct mem_type;
|
||||
extern const struct mem_type *get_mem_type(unsigned int type);
|
||||
/*
|
||||
* external interface to remap single page with appropriate type
|
||||
*/
|
||||
extern int ioremap_page(unsigned long virt, unsigned long phys,
|
||||
const struct mem_type *mtype);
|
||||
#else
|
||||
#define iotable_init(map,num) do { } while (0)
|
||||
#define vm_reserve_area_early(a,s,c) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
28
arch/arm/include/asm/mach/mmc.h
Normal file
28
arch/arm/include/asm/mach/mmc.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/mmc.h
|
||||
*/
|
||||
#ifndef ASMARM_MACH_MMC_H
|
||||
#define ASMARM_MACH_MMC_H
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/card.h>
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
|
||||
struct embedded_sdio_data {
|
||||
struct sdio_cis cis;
|
||||
struct sdio_cccr cccr;
|
||||
struct sdio_embedded_func *funcs;
|
||||
int num_funcs;
|
||||
};
|
||||
|
||||
struct mmc_platform_data {
|
||||
unsigned int ocr_mask; /* available voltages */
|
||||
int built_in; /* built-in device flag */
|
||||
int card_present; /* card detect state */
|
||||
u32 (*translate_vdd)(struct device *, unsigned int);
|
||||
unsigned int (*status)(struct device *);
|
||||
struct embedded_sdio_data *embedded_sdio;
|
||||
int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
|
||||
};
|
||||
|
||||
#endif
|
103
arch/arm/include/asm/mach/pci.h
Normal file
103
arch/arm/include/asm/mach/pci.h
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/pci.h
|
||||
*
|
||||
* Copyright (C) 2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_PCI_H
|
||||
#define __ASM_MACH_PCI_H
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
struct pci_sys_data;
|
||||
struct pci_ops;
|
||||
struct pci_bus;
|
||||
struct device;
|
||||
|
||||
struct hw_pci {
|
||||
struct pci_ops *ops;
|
||||
int nr_controllers;
|
||||
void **private_data;
|
||||
int (*setup)(int nr, struct pci_sys_data *);
|
||||
struct pci_bus *(*scan)(int nr, struct pci_sys_data *);
|
||||
void (*preinit)(void);
|
||||
void (*postinit)(void);
|
||||
u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
|
||||
int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
|
||||
resource_size_t (*align_resource)(struct pci_dev *dev,
|
||||
const struct resource *res,
|
||||
resource_size_t start,
|
||||
resource_size_t size,
|
||||
resource_size_t align);
|
||||
void (*add_bus)(struct pci_bus *bus);
|
||||
void (*remove_bus)(struct pci_bus *bus);
|
||||
};
|
||||
|
||||
/*
|
||||
* Per-controller structure
|
||||
*/
|
||||
struct pci_sys_data {
|
||||
struct list_head node;
|
||||
int busnr; /* primary bus number */
|
||||
u64 mem_offset; /* bus->cpu memory mapping offset */
|
||||
unsigned long io_offset; /* bus->cpu IO mapping offset */
|
||||
struct pci_bus *bus; /* PCI bus */
|
||||
struct list_head resources; /* root bus resources (apertures) */
|
||||
struct resource io_res;
|
||||
char io_res_name[12];
|
||||
/* Bridge swizzling */
|
||||
u8 (*swizzle)(struct pci_dev *, u8 *);
|
||||
/* IRQ mapping */
|
||||
int (*map_irq)(const struct pci_dev *, u8, u8);
|
||||
/* Resource alignement requirements */
|
||||
resource_size_t (*align_resource)(struct pci_dev *dev,
|
||||
const struct resource *res,
|
||||
resource_size_t start,
|
||||
resource_size_t size,
|
||||
resource_size_t align);
|
||||
void (*add_bus)(struct pci_bus *bus);
|
||||
void (*remove_bus)(struct pci_bus *bus);
|
||||
void *private_data; /* platform controller private data */
|
||||
};
|
||||
|
||||
/*
|
||||
* Call this with your hw_pci struct to initialise the PCI system.
|
||||
*/
|
||||
void pci_common_init_dev(struct device *, struct hw_pci *);
|
||||
|
||||
/*
|
||||
* Compatibility wrapper for older platforms that do not care about
|
||||
* passing the parent device.
|
||||
*/
|
||||
static inline void pci_common_init(struct hw_pci *hw)
|
||||
{
|
||||
pci_common_init_dev(NULL, hw);
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup early fixed I/O mapping.
|
||||
*/
|
||||
#if defined(CONFIG_PCI)
|
||||
extern void pci_map_io_early(unsigned long pfn);
|
||||
#else
|
||||
static inline void pci_map_io_early(unsigned long pfn) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PCI controllers
|
||||
*/
|
||||
extern struct pci_ops iop3xx_ops;
|
||||
extern int iop3xx_pci_setup(int nr, struct pci_sys_data *);
|
||||
extern void iop3xx_pci_preinit(void);
|
||||
extern void iop3xx_pci_preinit_cond(void);
|
||||
|
||||
extern struct pci_ops dc21285_ops;
|
||||
extern int dc21285_setup(int nr, struct pci_sys_data *);
|
||||
extern void dc21285_preinit(void);
|
||||
extern void dc21285_postinit(void);
|
||||
|
||||
#endif /* __ASM_MACH_PCI_H */
|
37
arch/arm/include/asm/mach/sharpsl_param.h
Normal file
37
arch/arm/include/asm/mach/sharpsl_param.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Hardware parameter area specific to Sharp SL series devices
|
||||
*
|
||||
* Copyright (c) 2005 Richard Purdie
|
||||
*
|
||||
* Based on Sharp's 2.4 kernel patches
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
struct sharpsl_param_info {
|
||||
unsigned int comadj_keyword;
|
||||
unsigned int comadj;
|
||||
|
||||
unsigned int uuid_keyword;
|
||||
unsigned char uuid[16];
|
||||
|
||||
unsigned int touch_keyword;
|
||||
unsigned int touch_xp;
|
||||
unsigned int touch_yp;
|
||||
unsigned int touch_xd;
|
||||
unsigned int touch_yd;
|
||||
|
||||
unsigned int adadj_keyword;
|
||||
unsigned int adadj;
|
||||
|
||||
unsigned int phad_keyword;
|
||||
unsigned int phadadj;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
extern struct sharpsl_param_info sharpsl_param;
|
||||
extern void sharpsl_save_param(void);
|
||||
|
20
arch/arm/include/asm/mach/time.h
Normal file
20
arch/arm/include/asm/mach/time.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* arch/arm/include/asm/mach/time.h
|
||||
*
|
||||
* Copyright (C) 2004 MontaVista Software, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __ASM_ARM_MACH_TIME_H
|
||||
#define __ASM_ARM_MACH_TIME_H
|
||||
|
||||
extern void timer_tick(void);
|
||||
|
||||
struct timespec;
|
||||
typedef void (*clock_access_fn)(struct timespec *);
|
||||
extern int register_persistent_clock(clock_access_fn read_boot,
|
||||
clock_access_fn read_persistent);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue