Skip to content

Commit a5ef3f7

Browse files
committed
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS update from Ralf Baechle: "Cleanups and fixes for breakage that occured earlier during this merge phase. Also a few patches that didn't make the first pull request. Of those is the Alchemy work that merges code for many of the SOCs and evaluation boards thus among other code shrinkage, reduces the number of MIPS defconfigs by 5." * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (22 commits) MIPS: SNI: Switch RM400 serial to SCCNXP driver MIPS: Remove unused empty_bad_pmd_table[] declaration. MIPS: MT: Remove kspd. MIPS: Malta: Fix section mismatch. MIPS: asm-offset.c: Delete unused irq_cpustat_t struct offsets. MIPS: Alchemy: Merge PB1100/1500 support into DB1000 code. MIPS: Alchemy: merge PB1550 support into DB1550 code MIPS: Alchemy: Single kernel for DB1200/1300/1550 MIPS: Optimize TLB refill for RI/XI configurations. MIPS: proc: Cleanup printing of ASEs. MIPS: Hardwire detection of DSP ASE Rev 2 for systems, as required. MIPS: Add detection of DSP ASE Revision 2. MIPS: Optimize pgd_init and pmd_init MIPS: perf: Add perf functionality for BMIPS5000 MIPS: perf: Split the Kconfig option CONFIG_MIPS_MT_SMP MIPS: perf: Remove unnecessary #ifdef MIPS: perf: Add cpu feature bit for PCI (performance counter interrupt) MIPS: perf: Change the "mips_perf_event" table unsupported indicator. MIPS: Align swapper_pg_dir to 64K for better TLB Refill code. vmlinux.lds.h: Allow architectures to add sections to the front of .bss ...
2 parents d25282d + 35bafbe commit a5ef3f7

File tree

107 files changed

+2895
-4493
lines changed

Some content is hidden

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

107 files changed

+2895
-4493
lines changed

arch/mips/Kconfig

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,7 @@ config MIPS_MT_SMP
19311931
select SYS_SUPPORTS_SCHED_SMT if SMP
19321932
select SYS_SUPPORTS_SMP
19331933
select SMP_UP
1934+
select MIPS_PERF_SHARED_TC_COUNTERS
19341935
help
19351936
This is a kernel model which is known a VSMP but lately has been
19361937
marketesed into SMVP.
@@ -2041,16 +2042,6 @@ config MIPS_VPE_APSP_API
20412042
depends on MIPS_VPE_LOADER
20422043
help
20432044

2044-
config MIPS_APSP_KSPD
2045-
bool "Enable KSPD"
2046-
depends on MIPS_VPE_APSP_API
2047-
default y
2048-
help
2049-
KSPD is a kernel daemon that accepts syscall requests from the SP
2050-
side, actions them and returns the results. It also handles the
2051-
"exit" syscall notifying other kernel modules the SP program is
2052-
exiting. You probably want to say yes here.
2053-
20542045
config MIPS_CMP
20552046
bool "MIPS CMP framework support"
20562047
depends on SYS_SUPPORTS_MIPS_CMP
@@ -2280,6 +2271,9 @@ config NR_CPUS
22802271
performance should round up your number of processors to the next
22812272
power of two.
22822273

2274+
config MIPS_PERF_SHARED_TC_COUNTERS
2275+
bool
2276+
22832277
#
22842278
# Timer Interrupt Frequency Configuration
22852279
#

arch/mips/alchemy/Kconfig

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ config MIPS_MTX1
2727
select SYS_HAS_EARLY_PRINTK
2828

2929
config MIPS_DB1000
30-
bool "Alchemy DB1000/DB1500/DB1100 boards"
30+
bool "Alchemy DB1000/DB1500/DB1100 PB1500/1100 boards"
3131
select ALCHEMY_GPIOINT_AU1000
3232
select DMA_NONCOHERENT
3333
select HW_HAS_PCI
@@ -36,57 +36,15 @@ config MIPS_DB1000
3636
select SYS_SUPPORTS_LITTLE_ENDIAN
3737
select SYS_HAS_EARLY_PRINTK
3838

39-
config MIPS_DB1200
40-
bool "Alchemy DB1200/PB1200 board"
41-
select ALCHEMY_GPIOINT_AU1000
42-
select DMA_COHERENT
43-
select MIPS_DISABLE_OBSOLETE_IDE
44-
select SYS_SUPPORTS_LITTLE_ENDIAN
45-
select SYS_HAS_EARLY_PRINTK
46-
47-
config MIPS_DB1300
48-
bool "NetLogic DB1300 board"
49-
select ALCHEMY_GPIOINT_AU1300
50-
select DMA_COHERENT
51-
select MIPS_DISABLE_OBSOLETE_IDE
52-
select SYS_SUPPORTS_LITTLE_ENDIAN
53-
select SYS_HAS_EARLY_PRINTK
54-
55-
config MIPS_DB1550
56-
bool "Alchemy DB1550 board"
57-
select ALCHEMY_GPIOINT_AU1000
39+
config MIPS_DB1235
40+
bool "Alchemy DB1200/PB1200/DB1300/DB1550/PB1550 boards"
41+
select ARCH_REQUIRE_GPIOLIB
5842
select HW_HAS_PCI
5943
select DMA_COHERENT
6044
select MIPS_DISABLE_OBSOLETE_IDE
6145
select SYS_SUPPORTS_LITTLE_ENDIAN
6246
select SYS_HAS_EARLY_PRINTK
6347

64-
config MIPS_PB1100
65-
bool "Alchemy PB1100 board"
66-
select ALCHEMY_GPIOINT_AU1000
67-
select DMA_NONCOHERENT
68-
select HW_HAS_PCI
69-
select SWAP_IO_SPACE
70-
select SYS_SUPPORTS_LITTLE_ENDIAN
71-
select SYS_HAS_EARLY_PRINTK
72-
73-
config MIPS_PB1500
74-
bool "Alchemy PB1500 board"
75-
select ALCHEMY_GPIOINT_AU1000
76-
select DMA_NONCOHERENT
77-
select HW_HAS_PCI
78-
select SYS_SUPPORTS_LITTLE_ENDIAN
79-
select SYS_HAS_EARLY_PRINTK
80-
81-
config MIPS_PB1550
82-
bool "Alchemy PB1550 board"
83-
select ALCHEMY_GPIOINT_AU1000
84-
select DMA_NONCOHERENT
85-
select HW_HAS_PCI
86-
select MIPS_DISABLE_OBSOLETE_IDE
87-
select SYS_SUPPORTS_LITTLE_ENDIAN
88-
select SYS_HAS_EARLY_PRINTK
89-
9048
config MIPS_XXS1500
9149
bool "MyCable XXS1500 board"
9250
select DMA_NONCOHERENT

arch/mips/alchemy/Platform

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,11 @@ cflags-$(CONFIG_MIPS_DB1000) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
3030
load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
3131

3232
#
33-
# AMD Alchemy Db1550 eval board
33+
# AMD Alchemy Db1200/Pb1200/Db1550/Db1300 eval boards
3434
#
35-
platform-$(CONFIG_MIPS_DB1550) += alchemy/devboards/
36-
cflags-$(CONFIG_MIPS_DB1550) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
37-
load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
38-
39-
#
40-
# AMD Alchemy Db1200/Pb1200 eval boards
41-
#
42-
platform-$(CONFIG_MIPS_DB1200) += alchemy/devboards/
43-
cflags-$(CONFIG_MIPS_DB1200) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
44-
load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
45-
46-
#
47-
# NetLogic DBAu1300 development platform
48-
#
49-
platform-$(CONFIG_MIPS_DB1300) += alchemy/devboards/
50-
cflags-$(CONFIG_MIPS_DB1300) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
51-
load-$(CONFIG_MIPS_DB1300) += 0xffffffff80100000
35+
platform-$(CONFIG_MIPS_DB1235) += alchemy/devboards/
36+
cflags-$(CONFIG_MIPS_DB1235) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
37+
load-$(CONFIG_MIPS_DB1235) += 0xffffffff80100000
5238

5339
#
5440
# 4G-Systems MTX-1 "MeshCube" wireless router

arch/mips/alchemy/devboards/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@
44

55
obj-y += bcsr.o platform.o
66
obj-$(CONFIG_PM) += pm.o
7-
obj-$(CONFIG_MIPS_PB1100) += pb1100.o
8-
obj-$(CONFIG_MIPS_PB1500) += pb1500.o
9-
obj-$(CONFIG_MIPS_PB1550) += pb1550.o
107
obj-$(CONFIG_MIPS_DB1000) += db1000.o
11-
obj-$(CONFIG_MIPS_DB1200) += db1200.o
12-
obj-$(CONFIG_MIPS_DB1300) += db1300.o
13-
obj-$(CONFIG_MIPS_DB1550) += db1550.o
8+
obj-$(CONFIG_MIPS_DB1235) += db1235.o db1200.o db1300.o db1550.o

arch/mips/alchemy/devboards/db1000.c

Lines changed: 92 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* DBAu1000/1500/1100 board support
2+
* DBAu1000/1500/1100 PBAu1100/1500 board support
33
*
44
* Copyright 2000, 2008 MontaVista Software Inc.
55
* Author: MontaVista Software, Inc. <[email protected]>
@@ -52,6 +52,11 @@ static const char *board_type_str(void)
5252
return "DB1500";
5353
case BCSR_WHOAMI_DB1100:
5454
return "DB1100";
55+
case BCSR_WHOAMI_PB1500:
56+
case BCSR_WHOAMI_PB1500R2:
57+
return "PB1500";
58+
case BCSR_WHOAMI_PB1100:
59+
return "PB1100";
5560
default:
5661
return "(unknown)";
5762
}
@@ -111,7 +116,9 @@ static struct platform_device db1500_pci_host_dev = {
111116

112117
static int __init db1500_pci_init(void)
113118
{
114-
if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1500)
119+
int id = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
120+
if ((id == BCSR_WHOAMI_DB1500) || (id == BCSR_WHOAMI_PB1500) ||
121+
(id == BCSR_WHOAMI_PB1500R2))
115122
return platform_device_register(&db1500_pci_host_dev);
116123
return 0;
117124
}
@@ -199,27 +206,37 @@ static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
199206

200207
static int db1100_mmc_cd_setup(void *mmc_host, int en)
201208
{
202-
int ret = 0;
209+
int ret = 0, irq;
210+
211+
if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
212+
irq = AU1100_GPIO19_INT;
213+
else
214+
irq = AU1100_GPIO14_INT; /* PB1100 SD0 CD# */
203215

204216
if (en) {
205-
irq_set_irq_type(AU1100_GPIO19_INT, IRQ_TYPE_EDGE_BOTH);
206-
ret = request_irq(AU1100_GPIO19_INT, db1100_mmc_cd, 0,
217+
irq_set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
218+
ret = request_irq(irq, db1100_mmc_cd, 0,
207219
"sd0_cd", mmc_host);
208220
} else
209-
free_irq(AU1100_GPIO19_INT, mmc_host);
221+
free_irq(irq, mmc_host);
210222
return ret;
211223
}
212224

213225
static int db1100_mmc1_cd_setup(void *mmc_host, int en)
214226
{
215-
int ret = 0;
227+
int ret = 0, irq;
228+
229+
if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
230+
irq = AU1100_GPIO20_INT;
231+
else
232+
irq = AU1100_GPIO15_INT; /* PB1100 SD1 CD# */
216233

217234
if (en) {
218-
irq_set_irq_type(AU1100_GPIO20_INT, IRQ_TYPE_EDGE_BOTH);
219-
ret = request_irq(AU1100_GPIO20_INT, db1100_mmc_cd, 0,
235+
irq_set_irq_type(irq, IRQ_TYPE_EDGE_BOTH);
236+
ret = request_irq(irq, db1100_mmc_cd, 0,
220237
"sd1_cd", mmc_host);
221238
} else
222-
free_irq(AU1100_GPIO20_INT, mmc_host);
239+
free_irq(irq, mmc_host);
223240
return ret;
224241
}
225242

@@ -236,11 +253,18 @@ static int db1100_mmc_card_inserted(void *mmc_host)
236253

237254
static void db1100_mmc_set_power(void *mmc_host, int state)
238255
{
256+
int bit;
257+
258+
if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
259+
bit = BCSR_BOARD_SD0PWR;
260+
else
261+
bit = BCSR_BOARD_PB1100_SD0PWR;
262+
239263
if (state) {
240-
bcsr_mod(BCSR_BOARD, 0, BCSR_BOARD_SD0PWR);
264+
bcsr_mod(BCSR_BOARD, 0, bit);
241265
msleep(400); /* stabilization time */
242266
} else
243-
bcsr_mod(BCSR_BOARD, BCSR_BOARD_SD0PWR, 0);
267+
bcsr_mod(BCSR_BOARD, bit, 0);
244268
}
245269

246270
static void db1100_mmcled_set(struct led_classdev *led, enum led_brightness b)
@@ -267,11 +291,18 @@ static int db1100_mmc1_card_inserted(void *mmc_host)
267291

268292
static void db1100_mmc1_set_power(void *mmc_host, int state)
269293
{
294+
int bit;
295+
296+
if (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI)) == BCSR_WHOAMI_DB1100)
297+
bit = BCSR_BOARD_SD1PWR;
298+
else
299+
bit = BCSR_BOARD_PB1100_SD1PWR;
300+
270301
if (state) {
271-
bcsr_mod(BCSR_BOARD, 0, BCSR_BOARD_SD1PWR);
302+
bcsr_mod(BCSR_BOARD, 0, bit);
272303
msleep(400); /* stabilization time */
273304
} else
274-
bcsr_mod(BCSR_BOARD, BCSR_BOARD_SD1PWR, 0);
305+
bcsr_mod(BCSR_BOARD, bit, 0);
275306
}
276307

277308
static void db1100_mmc1led_set(struct led_classdev *led, enum led_brightness b)
@@ -480,13 +511,12 @@ static struct platform_device *db1100_devs[] = {
480511
&db1100_mmc0_dev,
481512
&db1100_mmc1_dev,
482513
&db1000_irda_dev,
483-
&db1100_spi_dev,
484514
};
485515

486516
static int __init db1000_dev_init(void)
487517
{
488518
int board = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
489-
int c0, c1, d0, d1, s0, s1;
519+
int c0, c1, d0, d1, s0, s1, flashsize = 32, twosocks = 1;
490520
unsigned long pfc;
491521

492522
if (board == BCSR_WHOAMI_DB1500) {
@@ -522,6 +552,7 @@ static int __init db1000_dev_init(void)
522552
ARRAY_SIZE(db1100_spi_info));
523553

524554
platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs));
555+
platform_device_register(&db1100_spi_dev);
525556
} else if (board == BCSR_WHOAMI_DB1000) {
526557
c0 = AU1000_GPIO2_INT;
527558
c1 = AU1000_GPIO5_INT;
@@ -530,15 +561,42 @@ static int __init db1000_dev_init(void)
530561
s0 = AU1000_GPIO1_INT;
531562
s1 = AU1000_GPIO4_INT;
532563
platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs));
564+
} else if ((board == BCSR_WHOAMI_PB1500) ||
565+
(board == BCSR_WHOAMI_PB1500R2)) {
566+
c0 = AU1500_GPIO203_INT;
567+
d0 = AU1500_GPIO201_INT;
568+
s0 = AU1500_GPIO202_INT;
569+
twosocks = 0;
570+
flashsize = 64;
571+
/* RTC and daughtercard irqs */
572+
irq_set_irq_type(AU1500_GPIO204_INT, IRQ_TYPE_LEVEL_LOW);
573+
irq_set_irq_type(AU1500_GPIO205_INT, IRQ_TYPE_LEVEL_LOW);
574+
/* EPSON S1D13806 0x1b000000
575+
* SRAM 1MB/2MB 0x1a000000
576+
* DS1693 RTC 0x0c000000
577+
*/
578+
} else if (board == BCSR_WHOAMI_PB1100) {
579+
c0 = AU1100_GPIO11_INT;
580+
d0 = AU1100_GPIO9_INT;
581+
s0 = AU1100_GPIO10_INT;
582+
twosocks = 0;
583+
flashsize = 64;
584+
/* pendown, rtc, daughtercard irqs */
585+
irq_set_irq_type(AU1100_GPIO8_INT, IRQ_TYPE_LEVEL_LOW);
586+
irq_set_irq_type(AU1100_GPIO12_INT, IRQ_TYPE_LEVEL_LOW);
587+
irq_set_irq_type(AU1100_GPIO13_INT, IRQ_TYPE_LEVEL_LOW);
588+
/* EPSON S1D13806 0x1b000000
589+
* SRAM 1MB/2MB 0x1a000000
590+
* DiskOnChip 0x0d000000
591+
* DS1693 RTC 0x0c000000
592+
*/
593+
platform_add_devices(db1100_devs, ARRAY_SIZE(db1100_devs));
533594
} else
534595
return 0; /* unknown board, no further dev setup to do */
535596

536597
irq_set_irq_type(d0, IRQ_TYPE_EDGE_BOTH);
537-
irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH);
538598
irq_set_irq_type(c0, IRQ_TYPE_LEVEL_LOW);
539-
irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW);
540599
irq_set_irq_type(s0, IRQ_TYPE_LEVEL_LOW);
541-
irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
542600

543601
db1x_register_pcmcia_socket(
544602
AU1000_PCMCIA_ATTR_PHYS_ADDR,
@@ -549,17 +607,23 @@ static int __init db1000_dev_init(void)
549607
AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
550608
c0, d0, /*s0*/0, 0, 0);
551609

552-
db1x_register_pcmcia_socket(
553-
AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
554-
AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
555-
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000,
556-
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
557-
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
558-
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
559-
c1, d1, /*s1*/0, 0, 1);
610+
if (twosocks) {
611+
irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH);
612+
irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW);
613+
irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
614+
615+
db1x_register_pcmcia_socket(
616+
AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
617+
AU1000_PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
618+
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004000000,
619+
AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
620+
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000,
621+
AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
622+
c1, d1, /*s1*/0, 0, 1);
623+
}
560624

561625
platform_add_devices(db1x00_devs, ARRAY_SIZE(db1x00_devs));
562-
db1x_register_norflash(32 << 20, 4 /* 32bit */, F_SWAPPED);
626+
db1x_register_norflash(flashsize << 20, 4 /* 32bit */, F_SWAPPED);
563627
return 0;
564628
}
565629
device_initcall(db1000_dev_init);

0 commit comments

Comments
 (0)