mirror of
				https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
				synced 2025-10-31 08:08:51 +01:00 
			
		
		
		
	Fixed MTP to work with TWRP
This commit is contained in:
		
						commit
						f6dfaef42e
					
				
					 50820 changed files with 20846062 additions and 0 deletions
				
			
		
							
								
								
									
										61
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,61 @@ | |||
| /*
 | ||||
|  * Copyright (C) 2007 Aurelien Jarno <aurelien@aurel32.net> | ||||
|  * | ||||
|  * This program is free software; you can redistribute it and/or | ||||
|  * modify it under the terms of the GNU General Public License | ||||
|  * as published by the Free Software Foundation; either version 2 | ||||
|  * of the License, or (at your option) any later version. | ||||
|  * | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program; if not, write to the Free Software | ||||
|  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. | ||||
|  */ | ||||
| 
 | ||||
| #ifndef __ASM_BCM47XX_H | ||||
| #define __ASM_BCM47XX_H | ||||
| 
 | ||||
| #include <linux/ssb/ssb.h> | ||||
| #include <linux/bcma/bcma.h> | ||||
| #include <linux/bcma/bcma_soc.h> | ||||
| 
 | ||||
| enum bcm47xx_bus_type { | ||||
| #ifdef CONFIG_BCM47XX_SSB | ||||
| 	BCM47XX_BUS_TYPE_SSB, | ||||
| #endif | ||||
| #ifdef CONFIG_BCM47XX_BCMA | ||||
| 	BCM47XX_BUS_TYPE_BCMA, | ||||
| #endif | ||||
| }; | ||||
| 
 | ||||
| union bcm47xx_bus { | ||||
| #ifdef CONFIG_BCM47XX_SSB | ||||
| 	struct ssb_bus ssb; | ||||
| #endif | ||||
| #ifdef CONFIG_BCM47XX_BCMA | ||||
| 	struct bcma_soc bcma; | ||||
| #endif | ||||
| }; | ||||
| 
 | ||||
| extern union bcm47xx_bus bcm47xx_bus; | ||||
| extern enum bcm47xx_bus_type bcm47xx_bus_type; | ||||
| 
 | ||||
| void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, | ||||
| 			bool fallback); | ||||
| 
 | ||||
| #ifdef CONFIG_BCM47XX_SSB | ||||
| void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo, | ||||
| 				const char *prefix); | ||||
| #endif | ||||
| #ifdef CONFIG_BCM47XX_BCMA | ||||
| void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo, | ||||
| 				 const char *prefix); | ||||
| #endif | ||||
| 
 | ||||
| void bcm47xx_set_system_type(u16 chip_id); | ||||
| 
 | ||||
| #endif /* __ASM_BCM47XX_H */ | ||||
							
								
								
									
										122
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,122 @@ | |||
| #ifndef __BCM47XX_BOARD_H | ||||
| #define __BCM47XX_BOARD_H | ||||
| 
 | ||||
| enum bcm47xx_board { | ||||
| 	BCM47XX_BOARD_ASUS_RTAC66U, | ||||
| 	BCM47XX_BOARD_ASUS_RTN10, | ||||
| 	BCM47XX_BOARD_ASUS_RTN10D, | ||||
| 	BCM47XX_BOARD_ASUS_RTN10U, | ||||
| 	BCM47XX_BOARD_ASUS_RTN12, | ||||
| 	BCM47XX_BOARD_ASUS_RTN12B1, | ||||
| 	BCM47XX_BOARD_ASUS_RTN12C1, | ||||
| 	BCM47XX_BOARD_ASUS_RTN12D1, | ||||
| 	BCM47XX_BOARD_ASUS_RTN12HP, | ||||
| 	BCM47XX_BOARD_ASUS_RTN15U, | ||||
| 	BCM47XX_BOARD_ASUS_RTN16, | ||||
| 	BCM47XX_BOARD_ASUS_RTN53, | ||||
| 	BCM47XX_BOARD_ASUS_RTN66U, | ||||
| 	BCM47XX_BOARD_ASUS_WL300G, | ||||
| 	BCM47XX_BOARD_ASUS_WL320GE, | ||||
| 	BCM47XX_BOARD_ASUS_WL330GE, | ||||
| 	BCM47XX_BOARD_ASUS_WL500G, | ||||
| 	BCM47XX_BOARD_ASUS_WL500GD, | ||||
| 	BCM47XX_BOARD_ASUS_WL500GPV1, | ||||
| 	BCM47XX_BOARD_ASUS_WL500GPV2, | ||||
| 	BCM47XX_BOARD_ASUS_WL500W, | ||||
| 	BCM47XX_BOARD_ASUS_WL520GC, | ||||
| 	BCM47XX_BOARD_ASUS_WL520GU, | ||||
| 	BCM47XX_BOARD_ASUS_WL700GE, | ||||
| 	BCM47XX_BOARD_ASUS_WLHDD, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_BELKIN_F7D3301, | ||||
| 	BCM47XX_BOARD_BELKIN_F7D3302, | ||||
| 	BCM47XX_BOARD_BELKIN_F7D4301, | ||||
| 	BCM47XX_BOARD_BELKIN_F7D4302, | ||||
| 	BCM47XX_BOARD_BELKIN_F7D4401, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_BUFFALO_WBR2_G54, | ||||
| 	BCM47XX_BOARD_BUFFALO_WHR2_A54G54, | ||||
| 	BCM47XX_BOARD_BUFFALO_WHR_G125, | ||||
| 	BCM47XX_BOARD_BUFFALO_WHR_G54S, | ||||
| 	BCM47XX_BOARD_BUFFALO_WHR_HP_G54, | ||||
| 	BCM47XX_BOARD_BUFFALO_WLA2_G54L, | ||||
| 	BCM47XX_BOARD_BUFFALO_WZR_G300N, | ||||
| 	BCM47XX_BOARD_BUFFALO_WZR_RS_G54, | ||||
| 	BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_CISCO_M10V1, | ||||
| 	BCM47XX_BOARD_CISCO_M20V1, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_DELL_TM2300, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_DLINK_DIR130, | ||||
| 	BCM47XX_BOARD_DLINK_DIR330, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_HUAWEI_E970, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_LINKSYS_E900V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_E1000V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_E1000V2, | ||||
| 	BCM47XX_BOARD_LINKSYS_E1000V21, | ||||
| 	BCM47XX_BOARD_LINKSYS_E1200V2, | ||||
| 	BCM47XX_BOARD_LINKSYS_E2000V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_E3000V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_E3200V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_E4200V1, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT150NV1, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT150NV11, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT160NV1, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT160NV3, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT300NV11, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT310NV1, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT310NV2, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT54G3GV2, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT610NV1, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRT610NV2, | ||||
| 	BCM47XX_BOARD_LINKSYS_WRTSL54GS, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_MICROSOFT_MN700, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_MOTOROLA_WE800G, | ||||
| 	BCM47XX_BOARD_MOTOROLA_WR850GP, | ||||
| 	BCM47XX_BOARD_MOTOROLA_WR850GV2V3, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_NETGEAR_WGR614V8, | ||||
| 	BCM47XX_BOARD_NETGEAR_WGR614V9, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR3300, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR3400V1, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR3400V2, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR3700V3, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR4000, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR4500V1, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNDR4500V2, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR2000, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR3500L, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR3500U, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR3500V2, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR3500V2VC, | ||||
| 	BCM47XX_BOARD_NETGEAR_WNR834BV2, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_PHICOMM_M1, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_SIEMENS_SE505V2, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_ZTE_H218N, | ||||
| 
 | ||||
| 	BCM47XX_BOARD_UNKNOWN, | ||||
| 	BCM47XX_BOARD_NO, | ||||
| }; | ||||
| 
 | ||||
| #define BCM47XX_BOARD_MAX_NAME 30 | ||||
| 
 | ||||
| void bcm47xx_board_detect(void); | ||||
| enum bcm47xx_board bcm47xx_board_get(void); | ||||
| const char *bcm47xx_board_get_name(void); | ||||
| 
 | ||||
| #endif /* __BCM47XX_BOARD_H */ | ||||
							
								
								
									
										53
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,53 @@ | |||
| /*
 | ||||
|  *  Copyright (C) 2005, Broadcom Corporation | ||||
|  *  Copyright (C) 2006, Felix Fietkau <nbd@openwrt.org> | ||||
|  * | ||||
|  *  This program is free software; you can redistribute  it and/or modify it | ||||
|  *  under  the terms of  the GNU General  Public License as published by the | ||||
|  *  Free Software Foundation;  either version 2 of the  License, or (at your | ||||
|  *  option) any later version. | ||||
|  */ | ||||
| 
 | ||||
| #ifndef __BCM47XX_NVRAM_H | ||||
| #define __BCM47XX_NVRAM_H | ||||
| 
 | ||||
| #include <linux/types.h> | ||||
| #include <linux/kernel.h> | ||||
| 
 | ||||
| struct nvram_header { | ||||
| 	u32 magic; | ||||
| 	u32 len; | ||||
| 	u32 crc_ver_init;	/* 0:7 crc, 8:15 ver, 16:31 sdram_init */ | ||||
| 	u32 config_refresh;	/* 0:15 sdram_config, 16:31 sdram_refresh */ | ||||
| 	u32 config_ncdl;	/* ncdl values for memc */ | ||||
| }; | ||||
| 
 | ||||
| #define NVRAM_HEADER		0x48534C46	/* 'FLSH' */ | ||||
| #define NVRAM_VERSION		1 | ||||
| #define NVRAM_HEADER_SIZE	20 | ||||
| #define NVRAM_SPACE		0x8000 | ||||
| 
 | ||||
| #define FLASH_MIN		0x00020000	/* Minimum flash size */ | ||||
| 
 | ||||
| #define NVRAM_MAX_VALUE_LEN 255 | ||||
| #define NVRAM_MAX_PARAM_LEN 64 | ||||
| 
 | ||||
| extern int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len); | ||||
| 
 | ||||
| static inline void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6]) | ||||
| { | ||||
| 	if (strchr(buf, ':')) | ||||
| 		sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0], | ||||
| 			&macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4], | ||||
| 			&macaddr[5]); | ||||
| 	else if (strchr(buf, '-')) | ||||
| 		sscanf(buf, "%hhx-%hhx-%hhx-%hhx-%hhx-%hhx", &macaddr[0], | ||||
| 			&macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4], | ||||
| 			&macaddr[5]); | ||||
| 	else | ||||
| 		printk(KERN_WARNING "Can not parse mac address: %s\n", buf); | ||||
| } | ||||
| 
 | ||||
| int bcm47xx_nvram_gpio_pin(const char *name); | ||||
| 
 | ||||
| #endif /* __BCM47XX_NVRAM_H */ | ||||
							
								
								
									
										82
									
								
								arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,82 @@ | |||
| #ifndef __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H | ||||
| #define __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H | ||||
| 
 | ||||
| #define cpu_has_tlb			1 | ||||
| #define cpu_has_4kex			1 | ||||
| #define cpu_has_3k_cache		0 | ||||
| #define cpu_has_4k_cache		1 | ||||
| #define cpu_has_tx39_cache		0 | ||||
| #define cpu_has_fpu			0 | ||||
| #define cpu_has_32fpr			0 | ||||
| #define cpu_has_counter			1 | ||||
| #if defined(CONFIG_BCM47XX_BCMA) && !defined(CONFIG_BCM47XX_SSB) | ||||
| #define cpu_has_watch			1 | ||||
| #elif defined(CONFIG_BCM47XX_SSB) && !defined(CONFIG_BCM47XX_BCMA) | ||||
| #define cpu_has_watch			0 | ||||
| #endif | ||||
| #define cpu_has_divec			1 | ||||
| #define cpu_has_vce			0 | ||||
| #define cpu_has_cache_cdex_p		0 | ||||
| #define cpu_has_cache_cdex_s		0 | ||||
| #define cpu_has_prefetch		1 | ||||
| #define cpu_has_mcheck			1 | ||||
| #define cpu_has_ejtag			1 | ||||
| #define cpu_has_llsc			1 | ||||
| 
 | ||||
| /* cpu_has_mips16 */ | ||||
| #define cpu_has_mdmx			0 | ||||
| #define cpu_has_mips3d			0 | ||||
| #define cpu_has_rixi			0 | ||||
| #define cpu_has_mmips			0 | ||||
| #define cpu_has_smartmips		0 | ||||
| #define cpu_has_vtag_icache		0 | ||||
| /* cpu_has_dc_aliases */ | ||||
| #define cpu_has_ic_fills_f_dc		0 | ||||
| #define cpu_has_pindexed_dcache		0 | ||||
| #define cpu_icache_snoops_remote_store	0 | ||||
| 
 | ||||
| #define cpu_has_mips_2			1 | ||||
| #define cpu_has_mips_3			0 | ||||
| #define cpu_has_mips32r1		1 | ||||
| #if defined(CONFIG_BCM47XX_BCMA) && !defined(CONFIG_BCM47XX_SSB) | ||||
| #define cpu_has_mips32r2		1 | ||||
| #elif defined(CONFIG_BCM47XX_SSB) && !defined(CONFIG_BCM47XX_BCMA) | ||||
| #define cpu_has_mips32r2		0 | ||||
| #endif | ||||
| #define cpu_has_mips64r1		0 | ||||
| #define cpu_has_mips64r2		0 | ||||
| 
 | ||||
| #if defined(CONFIG_BCM47XX_BCMA) && !defined(CONFIG_BCM47XX_SSB) | ||||
| #define cpu_has_dsp			1 | ||||
| #define cpu_has_dsp2			1 | ||||
| #elif defined(CONFIG_BCM47XX_SSB) && !defined(CONFIG_BCM47XX_BCMA) | ||||
| #define cpu_has_dsp			0 | ||||
| #define cpu_has_dsp2			0 | ||||
| #endif | ||||
| #define cpu_has_mipsmt			0 | ||||
| /* cpu_has_userlocal */ | ||||
| 
 | ||||
| #define cpu_has_nofpuex			0 | ||||
| #define cpu_has_64bits			0 | ||||
| #define cpu_has_64bit_zero_reg		0 | ||||
| #if defined(CONFIG_BCM47XX_BCMA) && !defined(CONFIG_BCM47XX_SSB) | ||||
| #define cpu_has_vint			1 | ||||
| #elif defined(CONFIG_BCM47XX_SSB) && !defined(CONFIG_BCM47XX_BCMA) | ||||
| #define cpu_has_vint			0 | ||||
| #endif | ||||
| #define cpu_has_veic			0 | ||||
| #define cpu_has_inclusive_pcaches	0 | ||||
| 
 | ||||
| #if defined(CONFIG_BCM47XX_BCMA) && !defined(CONFIG_BCM47XX_SSB) | ||||
| #define cpu_dcache_line_size()		32 | ||||
| #define cpu_icache_line_size()		32 | ||||
| #define cpu_has_perf_cntr_intr_bit	1 | ||||
| #elif defined(CONFIG_BCM47XX_SSB) && !defined(CONFIG_BCM47XX_BCMA) | ||||
| #define cpu_dcache_line_size()		16 | ||||
| #define cpu_icache_line_size()		16 | ||||
| #define cpu_has_perf_cntr_intr_bit	0 | ||||
| #endif | ||||
| #define cpu_scache_line_size()		0 | ||||
| #define cpu_has_vz			0 | ||||
| 
 | ||||
| #endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */ | ||||
							
								
								
									
										17
									
								
								arch/mips/include/asm/mach-bcm47xx/gpio.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								arch/mips/include/asm/mach-bcm47xx/gpio.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| #ifndef __ASM_MIPS_MACH_BCM47XX_GPIO_H | ||||
| #define __ASM_MIPS_MACH_BCM47XX_GPIO_H | ||||
| 
 | ||||
| #include <asm-generic/gpio.h> | ||||
| 
 | ||||
| #define gpio_get_value __gpio_get_value | ||||
| #define gpio_set_value __gpio_set_value | ||||
| 
 | ||||
| #define gpio_cansleep __gpio_cansleep | ||||
| #define gpio_to_irq __gpio_to_irq | ||||
| 
 | ||||
| static inline int irq_to_gpio(unsigned int irq) | ||||
| { | ||||
| 	return -EINVAL; | ||||
| } | ||||
| 
 | ||||
| #endif | ||||
							
								
								
									
										24
									
								
								arch/mips/include/asm/mach-bcm47xx/war.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								arch/mips/include/asm/mach-bcm47xx/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_BCM47XX_WAR_H | ||||
| #define __ASM_MIPS_MACH_BCM47XX_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_BCM47XX_WAR_H */ | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 awab228
						awab228