Skip to content

Commit 6ac5310

Browse files
committed
Merge branch '3.10-fixes' into mips-for-linux-next
This that should have been fixed but weren't, way to much, intrusive and late.
2 parents 704e646 + 3f90b82 commit 6ac5310

45 files changed

Lines changed: 507 additions & 364 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/mips/Kconfig‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ config POWERTV
420420
select CSRC_POWERTV
421421
select DMA_NONCOHERENT
422422
select HW_HAS_PCI
423-
select SYS_HAS_EARLY_PRINTK
424423
select SYS_HAS_CPU_MIPS32_R2
425424
select SYS_SUPPORTS_32BIT_KERNEL
426425
select SYS_SUPPORTS_BIG_ENDIAN

‎arch/mips/ath79/mach-ap136.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static void __init ap136_pci_init(u8 *eeprom)
132132
ath79_register_pci();
133133
}
134134
#else
135-
static inline void ap136_pci_init(void) {}
135+
static inline void ap136_pci_init(u8 *eeprom) {}
136136
#endif /* CONFIG_PCI */
137137

138138
static void __init ap136_setup(void)

‎arch/mips/bcm63xx/Kconfig‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,9 @@ config BCM63XX_CPU_6328
1212
config BCM63XX_CPU_6338
1313
bool "support 6338 CPU"
1414
select HW_HAS_PCI
15-
select USB_ARCH_HAS_OHCI
16-
select USB_OHCI_BIG_ENDIAN_DESC
17-
select USB_OHCI_BIG_ENDIAN_MMIO
1815

1916
config BCM63XX_CPU_6345
2017
bool "support 6345 CPU"
21-
select USB_OHCI_BIG_ENDIAN_DESC
22-
select USB_OHCI_BIG_ENDIAN_MMIO
2318

2419
config BCM63XX_CPU_6348
2520
bool "support 6348 CPU"

‎arch/mips/cavium-octeon/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ CFLAGS_octeon-platform.o = -I$(src)/../../../scripts/dtc/libfdt
1313
CFLAGS_setup.o = -I$(src)/../../../scripts/dtc/libfdt
1414

1515
obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o
16-
obj-y += dma-octeon.o flash_setup.o
16+
obj-y += dma-octeon.o
1717
obj-y += octeon-memcpy.o
1818
obj-y += executive/
1919

20+
obj-$(CONFIG_MTD) += flash_setup.o
2021
obj-$(CONFIG_SMP) += smp.o
2122
obj-$(CONFIG_OCTEON_ILM) += oct_ilm.o
2223

‎arch/mips/cavium-octeon/setup.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Copyright (C) 2008, 2009 Wind River Systems
88
* written by Ralf Baechle <ralf@linux-mips.org>
99
*/
10+
#include <linux/compiler.h>
1011
#include <linux/init.h>
1112
#include <linux/kernel.h>
1213
#include <linux/console.h>
@@ -694,7 +695,7 @@ void __init prom_init(void)
694695
if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) {
695696
pr_info("Skipping L2 locking due to reduced L2 cache size\n");
696697
} else {
697-
uint32_t ebase = read_c0_ebase() & 0x3ffff000;
698+
uint32_t __maybe_unused ebase = read_c0_ebase() & 0x3ffff000;
698699
#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB
699700
/* TLB refill */
700701
cvmx_l2c_lock_mem_region(ebase, 0x100);
@@ -978,7 +979,7 @@ void __init plat_mem_setup(void)
978979
cvmx_bootmem_unlock();
979980
/* Add the memory region for the kernel. */
980981
kernel_start = (unsigned long) _text;
981-
kernel_size = ALIGN(_end - _text, 0x100000);
982+
kernel_size = _end - _text;
982983

983984
/* Adjust for physical offset. */
984985
kernel_start &= ~0xffffffff80000000ULL;

‎arch/mips/fw/cfe/cfe_api.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ int cfe_setenv(char *name, char *val)
406406
return xiocb.xiocb_status;
407407
}
408408

409-
int cfe_write(int handle, unsigned char *buffer, int length)
409+
int cfe_write(int handle, const char *buffer, int length)
410410
{
411411
return cfe_writeblk(handle, 0, buffer, length);
412412
}
413413

414-
int cfe_writeblk(int handle, s64 offset, unsigned char *buffer, int length)
414+
int cfe_writeblk(int handle, s64 offset, const char *buffer, int length)
415415
{
416416
struct cfe_xiocb xiocb;
417417

‎arch/mips/include/asm/fw/cfe/cfe_api.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ int cfe_read(int handle, unsigned char *buffer, int length);
115115
int cfe_readblk(int handle, int64_t offset, unsigned char *buffer,
116116
int length);
117117
int cfe_setenv(char *name, char *val);
118-
int cfe_write(int handle, unsigned char *buffer, int length);
119-
int cfe_writeblk(int handle, int64_t offset, unsigned char *buffer,
118+
int cfe_write(int handle, const char *buffer, int length);
119+
int cfe_writeblk(int handle, int64_t offset, const char *buffer,
120120
int length);
121121

122122
#endif /* CFE_API_H */

‎arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef __ASM_MACH_CAVIUM_OCTEON_DMA_COHERENCE_H
1414
#define __ASM_MACH_CAVIUM_OCTEON_DMA_COHERENCE_H
1515

16+
#include <linux/bug.h>
17+
1618
struct device;
1719

1820
extern void octeon_pci_dma_init(void);
@@ -21,18 +23,21 @@ static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr,
2123
size_t size)
2224
{
2325
BUG();
26+
return 0;
2427
}
2528

2629
static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
2730
struct page *page)
2831
{
2932
BUG();
33+
return 0;
3034
}
3135

3236
static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
3337
dma_addr_t dma_addr)
3438
{
3539
BUG();
40+
return 0;
3641
}
3742

3843
static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
@@ -44,6 +49,7 @@ static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
4449
static inline int plat_dma_supported(struct device *dev, u64 mask)
4550
{
4651
BUG();
52+
return 0;
4753
}
4854

4955
static inline void plat_extra_sync_for_device(struct device *dev)
@@ -60,6 +66,7 @@ static inline int plat_dma_mapping_error(struct device *dev,
6066
dma_addr_t dma_addr)
6167
{
6268
BUG();
69+
return 0;
6370
}
6471

6572
dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* This file is subject to the terms and conditions of the GNU General Public
3+
* License. See the file "COPYING" in the main directory of this archive
4+
* for more details.
5+
*
6+
* Copyright (C) 2012 Cavium, Inc.
7+
*/
8+
#ifndef _ASM_MACH_CAVIUM_OCTEON_SPACES_H
9+
#define _ASM_MACH_CAVIUM_OCTEON_SPACES_H
10+
11+
#include <linux/const.h>
12+
13+
#ifdef CONFIG_64BIT
14+
/* They are all the same and some OCTEON II cores cannot handle 0xa8.. */
15+
#define CAC_BASE _AC(0x8000000000000000, UL)
16+
#define UNCAC_BASE _AC(0x8000000000000000, UL)
17+
#define IO_BASE _AC(0x8000000000000000, UL)
18+
19+
20+
#endif /* CONFIG_64BIT */
21+
22+
#include <asm/mach-generic/spaces.h>
23+
24+
#endif /* _ASM_MACH_CAVIUM_OCTEON_SPACES_H */

‎arch/mips/include/asm/mach-ip27/kernel-entry-init.h‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,53 @@
2323
dsrl \res, NSRI_NODEID_SHFT
2424
.endm
2525

26+
/*
27+
* TLB bits
28+
*/
29+
#define PAGE_GLOBAL (1 << 6)
30+
#define PAGE_VALID (1 << 7)
31+
#define PAGE_DIRTY (1 << 8)
32+
#define CACHE_CACHABLE_COW (5 << 9)
33+
34+
/*
35+
* inputs are the text nasid in t1, data nasid in t2.
36+
*/
37+
.macro MAPPED_KERNEL_SETUP_TLB
38+
#ifdef CONFIG_MAPPED_KERNEL
39+
/*
40+
* This needs to read the nasid - assume 0 for now.
41+
* Drop in 0xffffffffc0000000 in tlbhi, 0+VG in tlblo_0,
42+
* 0+DVG in tlblo_1.
43+
*/
44+
dli t0, 0xffffffffc0000000
45+
dmtc0 t0, CP0_ENTRYHI
46+
li t0, 0x1c000 # Offset of text into node memory
47+
dsll t1, NASID_SHFT # Shift text nasid into place
48+
dsll t2, NASID_SHFT # Same for data nasid
49+
or t1, t1, t0 # Physical load address of kernel text
50+
or t2, t2, t0 # Physical load address of kernel data
51+
dsrl t1, 12 # 4K pfn
52+
dsrl t2, 12 # 4K pfn
53+
dsll t1, 6 # Get pfn into place
54+
dsll t2, 6 # Get pfn into place
55+
li t0, ((PAGE_GLOBAL | PAGE_VALID | CACHE_CACHABLE_COW) >> 6)
56+
or t0, t0, t1
57+
mtc0 t0, CP0_ENTRYLO0 # physaddr, VG, cach exlwr
58+
li t0, ((PAGE_GLOBAL | PAGE_VALID | PAGE_DIRTY | CACHE_CACHABLE_COW) >> 6)
59+
or t0, t0, t2
60+
mtc0 t0, CP0_ENTRYLO1 # physaddr, DVG, cach exlwr
61+
li t0, 0x1ffe000 # MAPPED_KERN_TLBMASK, TLBPGMASK_16M
62+
mtc0 t0, CP0_PAGEMASK
63+
li t0, 0 # KMAP_INX
64+
mtc0 t0, CP0_INDEX
65+
li t0, 1
66+
mtc0 t0, CP0_WIRED
67+
tlbwi
68+
#else
69+
mtc0 zero, CP0_WIRED
70+
#endif
71+
.endm
72+
2673
/*
2774
* Intentionally empty macro, used in head.S. Override in
2875
* arch/mips/mach-xxx/kernel-entry-init.h when necessary.

0 commit comments

Comments
 (0)