diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-20 13:14:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-20 13:14:29 -0500 |
commit | d7f786e06538081dd10c97931a89418699fe609d (patch) | |
tree | 750c6b313711c9df5d6a12197587e0372764df13 | |
parent | e5717c48ed52feebd59756578debd34eaeb9d262 (diff) | |
parent | f00a3ec4d47b51c5995fe10f8252a90aca331e62 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012]
[MIPS] Drop __init from init_8259A()
[MIPS] Fix Kconfig typo bug
[MIPS] Fix double signal on trap and break instruction
[MIPS] sigset_32 has been made redundand by compat_sigset_t.
[MIPS] emma2rh: Remove needless <asm/i8259.h> inclusion.
[MIPS] Add MTD device support for Cobalt
-rw-r--r-- | arch/mips/cobalt/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/cobalt/mtd.c | 61 | ||||
-rw-r--r-- | arch/mips/configs/cobalt_defconfig | 86 | ||||
-rw-r--r-- | arch/mips/emma2rh/common/irq.c | 1 | ||||
-rw-r--r-- | arch/mips/emma2rh/markeins/irq.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/i8259.c | 13 | ||||
-rw-r--r-- | arch/mips/kernel/signal32.c | 9 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/mips/momentum/jaguar_atx/platform.c | 21 | ||||
-rw-r--r-- | arch/mips/momentum/ocelot_3/platform.c | 21 | ||||
-rw-r--r-- | arch/mips/momentum/ocelot_c/platform.c | 14 | ||||
-rw-r--r-- | arch/mips/oprofile/Kconfig | 2 | ||||
-rw-r--r-- | arch/ppc/Kconfig | 15 | ||||
-rw-r--r-- | drivers/char/lcd.c | 168 | ||||
-rw-r--r-- | drivers/char/lcd.h | 32 | ||||
-rw-r--r-- | drivers/net/Kconfig | 21 |
16 files changed, 173 insertions, 295 deletions
diff --git a/arch/mips/cobalt/Makefile b/arch/mips/cobalt/Makefile index 225ac8f34ccd..12589a1ff048 100644 --- a/arch/mips/cobalt/Makefile +++ b/arch/mips/cobalt/Makefile | |||
@@ -5,5 +5,6 @@ | |||
5 | obj-y := irq.o reset.o setup.o | 5 | obj-y := irq.o reset.o setup.o |
6 | 6 | ||
7 | obj-$(CONFIG_EARLY_PRINTK) += console.o | 7 | obj-$(CONFIG_EARLY_PRINTK) += console.o |
8 | obj-$(CONFIG_MTD_PHYSMAP) += mtd.o | ||
8 | 9 | ||
9 | EXTRA_AFLAGS := $(CFLAGS) | 10 | EXTRA_AFLAGS := $(CFLAGS) |
diff --git a/arch/mips/cobalt/mtd.c b/arch/mips/cobalt/mtd.c new file mode 100644 index 000000000000..01d8ec77fe9c --- /dev/null +++ b/arch/mips/cobalt/mtd.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Registration of Cobalt MTD device. | ||
3 | * | ||
4 | * Copyright (C) 2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/mtd/partitions.h> | ||
23 | #include <linux/mtd/physmap.h> | ||
24 | |||
25 | static struct mtd_partition cobalt_mtd_partitions[] = { | ||
26 | { | ||
27 | .name = "Colo", | ||
28 | .offset = 0x0, | ||
29 | .size = 0x80000, | ||
30 | }, | ||
31 | }; | ||
32 | |||
33 | static struct physmap_flash_data cobalt_flash_data = { | ||
34 | .width = 1, | ||
35 | .nr_parts = 1, | ||
36 | .parts = cobalt_mtd_partitions, | ||
37 | }; | ||
38 | |||
39 | static struct resource cobalt_mtd_resource = { | ||
40 | .start = 0x1fc00000, | ||
41 | .end = 0x1fc7ffff, | ||
42 | .flags = IORESOURCE_MEM, | ||
43 | }; | ||
44 | |||
45 | static struct platform_device cobalt_mtd = { | ||
46 | .name = "physmap-flash", | ||
47 | .dev = { | ||
48 | .platform_data = &cobalt_flash_data, | ||
49 | }, | ||
50 | .num_resources = 1, | ||
51 | .resource = &cobalt_mtd_resource, | ||
52 | }; | ||
53 | |||
54 | static int __init cobalt_mtd_init(void) | ||
55 | { | ||
56 | platform_device_register(&cobalt_mtd); | ||
57 | |||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | module_init(cobalt_mtd_init); | ||
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index 1a3d776ad1e4..f88c40fc9948 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.20 | 3 | # Linux kernel version: 2.6.20 |
4 | # Sun Feb 18 21:27:37 2007 | 4 | # Mon Feb 19 14:51:58 2007 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
@@ -373,7 +373,88 @@ CONFIG_PROC_EVENTS=y | |||
373 | # | 373 | # |
374 | # Memory Technology Devices (MTD) | 374 | # Memory Technology Devices (MTD) |
375 | # | 375 | # |
376 | # CONFIG_MTD is not set | 376 | CONFIG_MTD=y |
377 | # CONFIG_MTD_DEBUG is not set | ||
378 | # CONFIG_MTD_CONCAT is not set | ||
379 | CONFIG_MTD_PARTITIONS=y | ||
380 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
381 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
382 | |||
383 | # | ||
384 | # User Modules And Translation Layers | ||
385 | # | ||
386 | CONFIG_MTD_CHAR=y | ||
387 | CONFIG_MTD_BLKDEVS=y | ||
388 | # CONFIG_MTD_BLOCK is not set | ||
389 | # CONFIG_MTD_BLOCK_RO is not set | ||
390 | # CONFIG_FTL is not set | ||
391 | # CONFIG_NFTL is not set | ||
392 | # CONFIG_INFTL is not set | ||
393 | # CONFIG_RFD_FTL is not set | ||
394 | # CONFIG_SSFDC is not set | ||
395 | |||
396 | # | ||
397 | # RAM/ROM/Flash chip drivers | ||
398 | # | ||
399 | # CONFIG_MTD_CFI is not set | ||
400 | CONFIG_MTD_JEDECPROBE=y | ||
401 | CONFIG_MTD_GEN_PROBE=y | ||
402 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
403 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
404 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
405 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
406 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
407 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
408 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
409 | CONFIG_MTD_CFI_I1=y | ||
410 | CONFIG_MTD_CFI_I2=y | ||
411 | # CONFIG_MTD_CFI_I4 is not set | ||
412 | # CONFIG_MTD_CFI_I8 is not set | ||
413 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
414 | CONFIG_MTD_CFI_AMDSTD=y | ||
415 | # CONFIG_MTD_CFI_STAA is not set | ||
416 | CONFIG_MTD_CFI_UTIL=y | ||
417 | # CONFIG_MTD_RAM is not set | ||
418 | # CONFIG_MTD_ROM is not set | ||
419 | # CONFIG_MTD_ABSENT is not set | ||
420 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
421 | |||
422 | # | ||
423 | # Mapping drivers for chip access | ||
424 | # | ||
425 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
426 | CONFIG_MTD_PHYSMAP=y | ||
427 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
428 | CONFIG_MTD_PHYSMAP_LEN=0 | ||
429 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 | ||
430 | # CONFIG_MTD_PLATRAM is not set | ||
431 | |||
432 | # | ||
433 | # Self-contained MTD device drivers | ||
434 | # | ||
435 | # CONFIG_MTD_PMC551 is not set | ||
436 | # CONFIG_MTD_SLRAM is not set | ||
437 | # CONFIG_MTD_PHRAM is not set | ||
438 | # CONFIG_MTD_MTDRAM is not set | ||
439 | # CONFIG_MTD_BLOCK2MTD is not set | ||
440 | |||
441 | # | ||
442 | # Disk-On-Chip Device Drivers | ||
443 | # | ||
444 | # CONFIG_MTD_DOC2000 is not set | ||
445 | # CONFIG_MTD_DOC2001 is not set | ||
446 | # CONFIG_MTD_DOC2001PLUS is not set | ||
447 | |||
448 | # | ||
449 | # NAND Flash Device Drivers | ||
450 | # | ||
451 | # CONFIG_MTD_NAND is not set | ||
452 | # CONFIG_MTD_NAND_CAFE is not set | ||
453 | |||
454 | # | ||
455 | # OneNAND Flash Device Drivers | ||
456 | # | ||
457 | # CONFIG_MTD_ONENAND is not set | ||
377 | 458 | ||
378 | # | 459 | # |
379 | # Parallel port support | 460 | # Parallel port support |
@@ -901,6 +982,7 @@ CONFIG_CONFIGFS_FS=y | |||
901 | # CONFIG_BEFS_FS is not set | 982 | # CONFIG_BEFS_FS is not set |
902 | # CONFIG_BFS_FS is not set | 983 | # CONFIG_BFS_FS is not set |
903 | # CONFIG_EFS_FS is not set | 984 | # CONFIG_EFS_FS is not set |
985 | # CONFIG_JFFS2_FS is not set | ||
904 | # CONFIG_CRAMFS is not set | 986 | # CONFIG_CRAMFS is not set |
905 | # CONFIG_VXFS_FS is not set | 987 | # CONFIG_VXFS_FS is not set |
906 | # CONFIG_HPFS_FS is not set | 988 | # CONFIG_HPFS_FS is not set |
diff --git a/arch/mips/emma2rh/common/irq.c b/arch/mips/emma2rh/common/irq.c index c191b3e9d9d9..d95604773667 100644 --- a/arch/mips/emma2rh/common/irq.c +++ b/arch/mips/emma2rh/common/irq.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | 29 | ||
30 | #include <asm/i8259.h> | ||
31 | #include <asm/system.h> | 30 | #include <asm/system.h> |
32 | #include <asm/mipsregs.h> | 31 | #include <asm/mipsregs.h> |
33 | #include <asm/debug.h> | 32 | #include <asm/debug.h> |
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c index 3299b6dfe764..e26630026375 100644 --- a/arch/mips/emma2rh/markeins/irq.c +++ b/arch/mips/emma2rh/markeins/irq.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/ptrace.h> | 29 | #include <linux/ptrace.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | 31 | ||
32 | #include <asm/i8259.h> | ||
33 | #include <asm/irq_cpu.h> | 32 | #include <asm/irq_cpu.h> |
34 | #include <asm/system.h> | 33 | #include <asm/system.h> |
35 | #include <asm/mipsregs.h> | 34 | #include <asm/mipsregs.h> |
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index b33ba6cd7f5b..9c79703979b2 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * moves to arch independent land | 28 | * moves to arch independent land |
29 | */ | 29 | */ |
30 | 30 | ||
31 | static int i8259A_auto_eoi; | 31 | static int i8259A_auto_eoi = -1; |
32 | DEFINE_SPINLOCK(i8259A_lock); | 32 | DEFINE_SPINLOCK(i8259A_lock); |
33 | /* some platforms call this... */ | 33 | /* some platforms call this... */ |
34 | void mask_and_ack_8259A(unsigned int); | 34 | void mask_and_ack_8259A(unsigned int); |
@@ -216,7 +216,8 @@ spurious_8259A_irq: | |||
216 | 216 | ||
217 | static int i8259A_resume(struct sys_device *dev) | 217 | static int i8259A_resume(struct sys_device *dev) |
218 | { | 218 | { |
219 | init_8259A(i8259A_auto_eoi); | 219 | if (i8259A_auto_eoi >= 0) |
220 | init_8259A(i8259A_auto_eoi); | ||
220 | return 0; | 221 | return 0; |
221 | } | 222 | } |
222 | 223 | ||
@@ -226,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev) | |||
226 | * the kernel initialization code can get it | 227 | * the kernel initialization code can get it |
227 | * out of. | 228 | * out of. |
228 | */ | 229 | */ |
229 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ | 230 | if (i8259A_auto_eoi >= 0) { |
230 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ | 231 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ |
232 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ | ||
233 | } | ||
231 | return 0; | 234 | return 0; |
232 | } | 235 | } |
233 | 236 | ||
@@ -252,7 +255,7 @@ static int __init i8259A_init_sysfs(void) | |||
252 | 255 | ||
253 | device_initcall(i8259A_init_sysfs); | 256 | device_initcall(i8259A_init_sysfs); |
254 | 257 | ||
255 | void __init init_8259A(int auto_eoi) | 258 | void init_8259A(int auto_eoi) |
256 | { | 259 | { |
257 | unsigned long flags; | 260 | unsigned long flags; |
258 | 261 | ||
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 02062fc59f77..19bbef001959 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -108,13 +108,6 @@ typedef struct compat_siginfo { | |||
108 | 108 | ||
109 | /* 32-bit compatibility types */ | 109 | /* 32-bit compatibility types */ |
110 | 110 | ||
111 | #define _NSIG_BPW32 32 | ||
112 | #define _NSIG_WORDS32 (_NSIG / _NSIG_BPW32) | ||
113 | |||
114 | typedef struct { | ||
115 | unsigned int sig[_NSIG_WORDS32]; | ||
116 | } sigset_t32; | ||
117 | |||
118 | typedef unsigned int __sighandler32_t; | 111 | typedef unsigned int __sighandler32_t; |
119 | typedef void (*vfptr_t)(void); | 112 | typedef void (*vfptr_t)(void); |
120 | 113 | ||
@@ -136,7 +129,7 @@ struct ucontext32 { | |||
136 | s32 uc_link; | 129 | s32 uc_link; |
137 | stack32_t uc_stack; | 130 | stack32_t uc_stack; |
138 | struct sigcontext32 uc_mcontext; | 131 | struct sigcontext32 uc_mcontext; |
139 | sigset_t32 uc_sigmask; /* mask last for extensibility */ | 132 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
140 | }; | 133 | }; |
141 | 134 | ||
142 | /* | 135 | /* |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index f663c63d5dd3..2aa208b99da8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -704,6 +704,7 @@ asmlinkage void do_bp(struct pt_regs *regs) | |||
704 | die_if_kernel("Break instruction in kernel code", regs); | 704 | die_if_kernel("Break instruction in kernel code", regs); |
705 | force_sig(SIGTRAP, current); | 705 | force_sig(SIGTRAP, current); |
706 | } | 706 | } |
707 | return; | ||
707 | 708 | ||
708 | out_sigsegv: | 709 | out_sigsegv: |
709 | force_sig(SIGSEGV, current); | 710 | force_sig(SIGSEGV, current); |
@@ -747,6 +748,7 @@ asmlinkage void do_tr(struct pt_regs *regs) | |||
747 | die_if_kernel("Trap instruction in kernel code", regs); | 748 | die_if_kernel("Trap instruction in kernel code", regs); |
748 | force_sig(SIGTRAP, current); | 749 | force_sig(SIGTRAP, current); |
749 | } | 750 | } |
751 | return; | ||
750 | 752 | ||
751 | out_sigsegv: | 753 | out_sigsegv: |
752 | force_sig(SIGSEGV, current); | 754 | force_sig(SIGSEGV, current); |
diff --git a/arch/mips/momentum/jaguar_atx/platform.c b/arch/mips/momentum/jaguar_atx/platform.c index 81037709ba0d..c78ba3025af4 100644 --- a/arch/mips/momentum/jaguar_atx/platform.c +++ b/arch/mips/momentum/jaguar_atx/platform.c | |||
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = { | |||
38 | #define MV64x60_IRQ_ETH_1 49 | 38 | #define MV64x60_IRQ_ETH_1 49 |
39 | #define MV64x60_IRQ_ETH_2 50 | 39 | #define MV64x60_IRQ_ETH_2 50 |
40 | 40 | ||
41 | #ifdef CONFIG_MV643XX_ETH_0 | ||
42 | |||
43 | static struct resource mv64x60_eth0_resources[] = { | 41 | static struct resource mv64x60_eth0_resources[] = { |
44 | [0] = { | 42 | [0] = { |
45 | .name = "eth0 irq", | 43 | .name = "eth0 irq", |
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = { | |||
72 | .platform_data = ð0_pd, | 70 | .platform_data = ð0_pd, |
73 | }, | 71 | }, |
74 | }; | 72 | }; |
75 | #endif /* CONFIG_MV643XX_ETH_0 */ | ||
76 | |||
77 | #ifdef CONFIG_MV643XX_ETH_1 | ||
78 | 73 | ||
79 | static struct resource mv64x60_eth1_resources[] = { | 74 | static struct resource mv64x60_eth1_resources[] = { |
80 | [0] = { | 75 | [0] = { |
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = { | |||
108 | .platform_data = ð1_pd, | 103 | .platform_data = ð1_pd, |
109 | }, | 104 | }, |
110 | }; | 105 | }; |
111 | #endif /* CONFIG_MV643XX_ETH_1 */ | ||
112 | |||
113 | #ifdef CONFIG_MV643XX_ETH_2 | ||
114 | 106 | ||
115 | static struct resource mv64x60_eth2_resources[] = { | 107 | static struct resource mv64x60_eth2_resources[] = { |
116 | [0] = { | 108 | [0] = { |
@@ -136,19 +128,12 @@ static struct platform_device eth2_device = { | |||
136 | .platform_data = ð2_pd, | 128 | .platform_data = ð2_pd, |
137 | }, | 129 | }, |
138 | }; | 130 | }; |
139 | #endif /* CONFIG_MV643XX_ETH_2 */ | ||
140 | 131 | ||
141 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { | 132 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { |
142 | &mv643xx_eth_shared_device, | 133 | &mv643xx_eth_shared_device, |
143 | #ifdef CONFIG_MV643XX_ETH_0 | ||
144 | ð0_device, | 134 | ð0_device, |
145 | #endif | ||
146 | #ifdef CONFIG_MV643XX_ETH_1 | ||
147 | ð1_device, | 135 | ð1_device, |
148 | #endif | ||
149 | #ifdef CONFIG_MV643XX_ETH_2 | ||
150 | ð2_device, | 136 | ð2_device, |
151 | #endif | ||
152 | }; | 137 | }; |
153 | 138 | ||
154 | static u8 __init exchange_bit(u8 val, u8 cs) | 139 | static u8 __init exchange_bit(u8 val, u8 cs) |
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void) | |||
215 | int ret; | 200 | int ret; |
216 | 201 | ||
217 | get_mac(mac); | 202 | get_mac(mac); |
218 | #ifdef CONFIG_MV643XX_ETH_0 | ||
219 | eth_mac_add(eth1_mac_addr, mac, 0); | 203 | eth_mac_add(eth1_mac_addr, mac, 0); |
220 | #endif | ||
221 | #ifdef CONFIG_MV643XX_ETH_1 | ||
222 | eth_mac_add(eth1_mac_addr, mac, 1); | 204 | eth_mac_add(eth1_mac_addr, mac, 1); |
223 | #endif | ||
224 | #ifdef CONFIG_MV643XX_ETH_2 | ||
225 | eth_mac_add(eth2_mac_addr, mac, 2); | 205 | eth_mac_add(eth2_mac_addr, mac, 2); |
226 | #endif | ||
227 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 206 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
228 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 207 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
229 | 208 | ||
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c index 57cfe5c6e4a8..0ab8d231cf7d 100644 --- a/arch/mips/momentum/ocelot_3/platform.c +++ b/arch/mips/momentum/ocelot_3/platform.c | |||
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = { | |||
38 | #define MV64x60_IRQ_ETH_1 49 | 38 | #define MV64x60_IRQ_ETH_1 49 |
39 | #define MV64x60_IRQ_ETH_2 50 | 39 | #define MV64x60_IRQ_ETH_2 50 |
40 | 40 | ||
41 | #ifdef CONFIG_MV643XX_ETH_0 | ||
42 | |||
43 | static struct resource mv64x60_eth0_resources[] = { | 41 | static struct resource mv64x60_eth0_resources[] = { |
44 | [0] = { | 42 | [0] = { |
45 | .name = "eth0 irq", | 43 | .name = "eth0 irq", |
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = { | |||
72 | .platform_data = ð0_pd, | 70 | .platform_data = ð0_pd, |
73 | }, | 71 | }, |
74 | }; | 72 | }; |
75 | #endif /* CONFIG_MV643XX_ETH_0 */ | ||
76 | |||
77 | #ifdef CONFIG_MV643XX_ETH_1 | ||
78 | 73 | ||
79 | static struct resource mv64x60_eth1_resources[] = { | 74 | static struct resource mv64x60_eth1_resources[] = { |
80 | [0] = { | 75 | [0] = { |
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = { | |||
108 | .platform_data = ð1_pd, | 103 | .platform_data = ð1_pd, |
109 | }, | 104 | }, |
110 | }; | 105 | }; |
111 | #endif /* CONFIG_MV643XX_ETH_1 */ | ||
112 | |||
113 | #ifdef CONFIG_MV643XX_ETH_2 | ||
114 | 106 | ||
115 | static struct resource mv64x60_eth2_resources[] = { | 107 | static struct resource mv64x60_eth2_resources[] = { |
116 | [0] = { | 108 | [0] = { |
@@ -136,19 +128,12 @@ static struct platform_device eth2_device = { | |||
136 | .platform_data = ð2_pd, | 128 | .platform_data = ð2_pd, |
137 | }, | 129 | }, |
138 | }; | 130 | }; |
139 | #endif /* CONFIG_MV643XX_ETH_2 */ | ||
140 | 131 | ||
141 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { | 132 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { |
142 | &mv643xx_eth_shared_device, | 133 | &mv643xx_eth_shared_device, |
143 | #ifdef CONFIG_MV643XX_ETH_0 | ||
144 | ð0_device, | 134 | ð0_device, |
145 | #endif | ||
146 | #ifdef CONFIG_MV643XX_ETH_1 | ||
147 | ð1_device, | 135 | ð1_device, |
148 | #endif | ||
149 | #ifdef CONFIG_MV643XX_ETH_2 | ||
150 | ð2_device, | 136 | ð2_device, |
151 | #endif | ||
152 | }; | 137 | }; |
153 | 138 | ||
154 | static u8 __init exchange_bit(u8 val, u8 cs) | 139 | static u8 __init exchange_bit(u8 val, u8 cs) |
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void) | |||
215 | int ret; | 200 | int ret; |
216 | 201 | ||
217 | get_mac(mac); | 202 | get_mac(mac); |
218 | #ifdef CONFIG_MV643XX_ETH_0 | ||
219 | eth_mac_add(eth1_mac_addr, mac, 0); | 203 | eth_mac_add(eth1_mac_addr, mac, 0); |
220 | #endif | ||
221 | #ifdef CONFIG_MV643XX_ETH_1 | ||
222 | eth_mac_add(eth1_mac_addr, mac, 1); | 204 | eth_mac_add(eth1_mac_addr, mac, 1); |
223 | #endif | ||
224 | #ifdef CONFIG_MV643XX_ETH_2 | ||
225 | eth_mac_add(eth2_mac_addr, mac, 2); | 205 | eth_mac_add(eth2_mac_addr, mac, 2); |
226 | #endif | ||
227 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 206 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
228 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 207 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
229 | 208 | ||
diff --git a/arch/mips/momentum/ocelot_c/platform.c b/arch/mips/momentum/ocelot_c/platform.c index 6c495b2f1560..8e381d447573 100644 --- a/arch/mips/momentum/ocelot_c/platform.c +++ b/arch/mips/momentum/ocelot_c/platform.c | |||
@@ -37,8 +37,6 @@ static struct platform_device mv643xx_eth_shared_device = { | |||
37 | #define MV64x60_IRQ_ETH_0 48 | 37 | #define MV64x60_IRQ_ETH_0 48 |
38 | #define MV64x60_IRQ_ETH_1 49 | 38 | #define MV64x60_IRQ_ETH_1 49 |
39 | 39 | ||
40 | #ifdef CONFIG_MV643XX_ETH_0 | ||
41 | |||
42 | static struct resource mv64x60_eth0_resources[] = { | 40 | static struct resource mv64x60_eth0_resources[] = { |
43 | [0] = { | 41 | [0] = { |
44 | .name = "eth0 irq", | 42 | .name = "eth0 irq", |
@@ -71,9 +69,6 @@ static struct platform_device eth0_device = { | |||
71 | .platform_data = ð0_pd, | 69 | .platform_data = ð0_pd, |
72 | }, | 70 | }, |
73 | }; | 71 | }; |
74 | #endif /* CONFIG_MV643XX_ETH_0 */ | ||
75 | |||
76 | #ifdef CONFIG_MV643XX_ETH_1 | ||
77 | 72 | ||
78 | static struct resource mv64x60_eth1_resources[] = { | 73 | static struct resource mv64x60_eth1_resources[] = { |
79 | [0] = { | 74 | [0] = { |
@@ -107,16 +102,11 @@ static struct platform_device eth1_device = { | |||
107 | .platform_data = ð1_pd, | 102 | .platform_data = ð1_pd, |
108 | }, | 103 | }, |
109 | }; | 104 | }; |
110 | #endif /* CONFIG_MV643XX_ETH_1 */ | ||
111 | 105 | ||
112 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { | 106 | static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { |
113 | &mv643xx_eth_shared_device, | 107 | &mv643xx_eth_shared_device, |
114 | #ifdef CONFIG_MV643XX_ETH_0 | ||
115 | ð0_device, | 108 | ð0_device, |
116 | #endif | ||
117 | #ifdef CONFIG_MV643XX_ETH_1 | ||
118 | ð1_device, | 109 | ð1_device, |
119 | #endif | ||
120 | /* The third port is not wired up on the Ocelot C */ | 110 | /* The third port is not wired up on the Ocelot C */ |
121 | }; | 111 | }; |
122 | 112 | ||
@@ -184,12 +174,8 @@ static int __init mv643xx_eth_add_pds(void) | |||
184 | int ret; | 174 | int ret; |
185 | 175 | ||
186 | get_mac(mac); | 176 | get_mac(mac); |
187 | #ifdef CONFIG_MV643XX_ETH_0 | ||
188 | eth_mac_add(eth1_mac_addr, mac, 0); | 177 | eth_mac_add(eth1_mac_addr, mac, 0); |
189 | #endif | ||
190 | #ifdef CONFIG_MV643XX_ETH_1 | ||
191 | eth_mac_add(eth1_mac_addr, mac, 1); | 178 | eth_mac_add(eth1_mac_addr, mac, 1); |
192 | #endif | ||
193 | ret = platform_add_devices(mv643xx_eth_pd_devs, | 179 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
194 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | 180 | ARRAY_SIZE(mv643xx_eth_pd_devs)); |
195 | 181 | ||
diff --git a/arch/mips/oprofile/Kconfig b/arch/mips/oprofile/Kconfig index ca395ef06d4e..fb6f235348b0 100644 --- a/arch/mips/oprofile/Kconfig +++ b/arch/mips/oprofile/Kconfig | |||
@@ -11,7 +11,7 @@ config PROFILING | |||
11 | 11 | ||
12 | config OPROFILE | 12 | config OPROFILE |
13 | tristate "OProfile system profiling (EXPERIMENTAL)" | 13 | tristate "OProfile system profiling (EXPERIMENTAL)" |
14 | depends on PROFILING && !!MIPS_MT_SMTC && EXPERIMENTAL | 14 | depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL |
15 | help | 15 | help |
16 | OProfile is a profiling system capable of profiling the | 16 | OProfile is a profiling system capable of profiling the |
17 | whole system, include the kernel, kernel modules, libraries, | 17 | whole system, include the kernel, kernel modules, libraries, |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 0df9c33629fd..ccce2a4a1522 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -845,6 +845,21 @@ config MV64X60 | |||
845 | select PPC_INDIRECT_PCI | 845 | select PPC_INDIRECT_PCI |
846 | default y | 846 | default y |
847 | 847 | ||
848 | config MV643XX_ETH_0 | ||
849 | bool | ||
850 | depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360 || HDPU) | ||
851 | default y | ||
852 | |||
853 | config MV643XX_ETH_1 | ||
854 | bool | ||
855 | depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360) | ||
856 | default y | ||
857 | |||
858 | config MV643XX_ETH_2 | ||
859 | bool | ||
860 | depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360) | ||
861 | default y | ||
862 | |||
848 | menu "Set bridge options" | 863 | menu "Set bridge options" |
849 | depends on MV64X60 | 864 | depends on MV64X60 |
850 | 865 | ||
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index d649abbf0857..5f4fdcf7c96e 100644 --- a/drivers/char/lcd.c +++ b/drivers/char/lcd.c | |||
@@ -409,138 +409,6 @@ static int lcd_ioctl(struct inode *inode, struct file *file, | |||
409 | break; | 409 | break; |
410 | } | 410 | } |
411 | 411 | ||
412 | // Erase the flash | ||
413 | |||
414 | case FLASH_Erase:{ | ||
415 | |||
416 | int ctr = 0; | ||
417 | |||
418 | if ( !capable(CAP_SYS_ADMIN) ) return -EPERM; | ||
419 | |||
420 | pr_info(LCD "Erasing Flash\n"); | ||
421 | |||
422 | // Chip Erase Sequence | ||
423 | WRITE_FLASH(kFlash_Addr1, kFlash_Data1); | ||
424 | WRITE_FLASH(kFlash_Addr2, kFlash_Data2); | ||
425 | WRITE_FLASH(kFlash_Addr1, kFlash_Erase3); | ||
426 | WRITE_FLASH(kFlash_Addr1, kFlash_Data1); | ||
427 | WRITE_FLASH(kFlash_Addr2, kFlash_Data2); | ||
428 | WRITE_FLASH(kFlash_Addr1, kFlash_Erase6); | ||
429 | |||
430 | while ((!dqpoll(0x00000000, 0xFF)) | ||
431 | && (!timeout(0x00000000))) { | ||
432 | ctr++; | ||
433 | } | ||
434 | |||
435 | if (READ_FLASH(0x07FFF0) == 0xFF) { | ||
436 | pr_info(LCD "Erase Successful\n"); | ||
437 | } else if (timeout) { | ||
438 | pr_info(LCD "Erase Timed Out\n"); | ||
439 | } | ||
440 | |||
441 | break; | ||
442 | } | ||
443 | |||
444 | // burn the flash | ||
445 | |||
446 | case FLASH_Burn:{ | ||
447 | |||
448 | volatile unsigned long burn_addr; | ||
449 | unsigned long flags; | ||
450 | unsigned int i, index; | ||
451 | unsigned char *rom; | ||
452 | |||
453 | |||
454 | struct lcd_display display; | ||
455 | |||
456 | if ( !capable(CAP_SYS_ADMIN) ) return -EPERM; | ||
457 | |||
458 | if (copy_from_user | ||
459 | (&display, (struct lcd_display *) arg, | ||
460 | sizeof(struct lcd_display))) | ||
461 | return -EFAULT; | ||
462 | rom = kmalloc((128), GFP_ATOMIC); | ||
463 | if (rom == NULL) { | ||
464 | printk(KERN_ERR LCD "kmalloc() failed in %s\n", | ||
465 | __FUNCTION__); | ||
466 | return -ENOMEM; | ||
467 | } | ||
468 | |||
469 | pr_info(LCD "Starting Flash burn\n"); | ||
470 | for (i = 0; i < FLASH_SIZE; i = i + 128) { | ||
471 | |||
472 | if (copy_from_user | ||
473 | (rom, display.RomImage + i, 128)) { | ||
474 | kfree(rom); | ||
475 | return -EFAULT; | ||
476 | } | ||
477 | burn_addr = kFlashBase + i; | ||
478 | spin_lock_irqsave(&lcd_lock, flags); | ||
479 | for (index = 0; index < (128); index++) { | ||
480 | |||
481 | WRITE_FLASH(kFlash_Addr1, | ||
482 | kFlash_Data1); | ||
483 | WRITE_FLASH(kFlash_Addr2, | ||
484 | kFlash_Data2); | ||
485 | WRITE_FLASH(kFlash_Addr1, | ||
486 | kFlash_Prog); | ||
487 | *((volatile unsigned char *)burn_addr) = | ||
488 | (volatile unsigned char) rom[index]; | ||
489 | |||
490 | while ((!dqpoll (burn_addr, | ||
491 | (volatile unsigned char) | ||
492 | rom[index])) && | ||
493 | (!timeout(burn_addr))) { } | ||
494 | burn_addr++; | ||
495 | } | ||
496 | spin_unlock_irqrestore(&lcd_lock, flags); | ||
497 | if (* ((volatile unsigned char *) | ||
498 | (burn_addr - 1)) == | ||
499 | (volatile unsigned char) | ||
500 | rom[index - 1]) { | ||
501 | } else if (timeout) { | ||
502 | pr_info(LCD "Flash burn timed out\n"); | ||
503 | } | ||
504 | |||
505 | |||
506 | } | ||
507 | kfree(rom); | ||
508 | |||
509 | pr_info(LCD "Flash successfully burned\n"); | ||
510 | |||
511 | break; | ||
512 | } | ||
513 | |||
514 | // read the flash all at once | ||
515 | |||
516 | case FLASH_Read:{ | ||
517 | |||
518 | unsigned char *user_bytes; | ||
519 | volatile unsigned long read_addr; | ||
520 | unsigned int i; | ||
521 | |||
522 | user_bytes = | ||
523 | &(((struct lcd_display *) arg)->RomImage[0]); | ||
524 | |||
525 | if (!access_ok | ||
526 | (VERIFY_WRITE, user_bytes, FLASH_SIZE)) | ||
527 | return -EFAULT; | ||
528 | |||
529 | pr_info(LCD "Reading Flash"); | ||
530 | for (i = 0; i < FLASH_SIZE; i++) { | ||
531 | unsigned char tmp_byte; | ||
532 | read_addr = kFlashBase + i; | ||
533 | tmp_byte = | ||
534 | *((volatile unsigned char *) | ||
535 | read_addr); | ||
536 | if (__put_user(tmp_byte, &user_bytes[i])) | ||
537 | return -EFAULT; | ||
538 | } | ||
539 | |||
540 | |||
541 | break; | ||
542 | } | ||
543 | |||
544 | default: | 412 | default: |
545 | return -EINVAL; | 413 | return -EINVAL; |
546 | 414 | ||
@@ -644,42 +512,6 @@ static void __exit lcd_exit(void) | |||
644 | misc_deregister(&lcd_dev); | 512 | misc_deregister(&lcd_dev); |
645 | } | 513 | } |
646 | 514 | ||
647 | // | ||
648 | // Function: dqpoll | ||
649 | // | ||
650 | // Description: Polls the data lines to see if the flash is busy | ||
651 | // | ||
652 | // In: address, byte data | ||
653 | // | ||
654 | // Out: 0 = busy, 1 = write or erase complete | ||
655 | // | ||
656 | // | ||
657 | |||
658 | static int dqpoll(volatile unsigned long address, volatile unsigned char data) | ||
659 | { | ||
660 | volatile unsigned char dq7; | ||
661 | |||
662 | dq7 = data & 0x80; | ||
663 | |||
664 | return ((READ_FLASH(address) & 0x80) == dq7); | ||
665 | } | ||
666 | |||
667 | // | ||
668 | // Function: timeout | ||
669 | // | ||
670 | // Description: Checks to see if erase or write has timed out | ||
671 | // By polling dq5 | ||
672 | // | ||
673 | // In: address | ||
674 | // | ||
675 | // | ||
676 | // Out: 0 = not timed out, 1 = timed out | ||
677 | |||
678 | static int timeout(volatile unsigned long address) | ||
679 | { | ||
680 | return (READ_FLASH(address) & 0x20) == 0x20; | ||
681 | } | ||
682 | |||
683 | module_init(lcd_init); | 515 | module_init(lcd_init); |
684 | module_exit(lcd_exit); | 516 | module_exit(lcd_exit); |
685 | 517 | ||
diff --git a/drivers/char/lcd.h b/drivers/char/lcd.h index a8d4ae737158..290b3ff23b03 100644 --- a/drivers/char/lcd.h +++ b/drivers/char/lcd.h | |||
@@ -14,11 +14,7 @@ | |||
14 | 14 | ||
15 | // function headers | 15 | // function headers |
16 | 16 | ||
17 | static int dqpoll(volatile unsigned long, volatile unsigned char ); | ||
18 | static int timeout(volatile unsigned long); | ||
19 | |||
20 | #define LCD_CHARS_PER_LINE 40 | 17 | #define LCD_CHARS_PER_LINE 40 |
21 | #define FLASH_SIZE 524288 | ||
22 | #define MAX_IDLE_TIME 120 | 18 | #define MAX_IDLE_TIME 120 |
23 | 19 | ||
24 | struct lcd_display { | 20 | struct lcd_display { |
@@ -54,26 +50,6 @@ struct lcd_display { | |||
54 | #define LCDTimeoutValue 0xfff | 50 | #define LCDTimeoutValue 0xfff |
55 | 51 | ||
56 | 52 | ||
57 | // Flash definitions AMD 29F040 | ||
58 | #define kFlashBase 0x0FC00000 | ||
59 | |||
60 | #define kFlash_Addr1 0x5555 | ||
61 | #define kFlash_Addr2 0x2AAA | ||
62 | #define kFlash_Data1 0xAA | ||
63 | #define kFlash_Data2 0x55 | ||
64 | #define kFlash_Prog 0xA0 | ||
65 | #define kFlash_Erase3 0x80 | ||
66 | #define kFlash_Erase6 0x10 | ||
67 | #define kFlash_Read 0xF0 | ||
68 | |||
69 | #define kFlash_ID 0x90 | ||
70 | #define kFlash_VenAddr 0x00 | ||
71 | #define kFlash_DevAddr 0x01 | ||
72 | #define kFlash_VenID 0x01 | ||
73 | #define kFlash_DevID 0xA4 // 29F040 | ||
74 | //#define kFlash_DevID 0xAD // 29F016 | ||
75 | |||
76 | |||
77 | // Macros | 53 | // Macros |
78 | 54 | ||
79 | #define LCDWriteData(x) outl((x << 24), kLCD_DR) | 55 | #define LCDWriteData(x) outl((x << 24), kLCD_DR) |
@@ -89,9 +65,6 @@ struct lcd_display { | |||
89 | #define WRITE_GAL(x,y) outl(y, 0x04000000 | (x)) | 65 | #define WRITE_GAL(x,y) outl(y, 0x04000000 | (x)) |
90 | #define BusyCheck() while ((LCDReadInst & 0x80) == 0x80) | 66 | #define BusyCheck() while ((LCDReadInst & 0x80) == 0x80) |
91 | 67 | ||
92 | #define WRITE_FLASH(x,y) outb((char)y, kFlashBase | (x)) | ||
93 | #define READ_FLASH(x) (inb(kFlashBase | (x))) | ||
94 | |||
95 | 68 | ||
96 | 69 | ||
97 | /* | 70 | /* |
@@ -124,11 +97,6 @@ struct lcd_display { | |||
124 | // Button defs | 97 | // Button defs |
125 | #define BUTTON_Read 50 | 98 | #define BUTTON_Read 50 |
126 | 99 | ||
127 | // Flash command codes | ||
128 | #define FLASH_Erase 60 | ||
129 | #define FLASH_Burn 61 | ||
130 | #define FLASH_Read 62 | ||
131 | |||
132 | 100 | ||
133 | // Ethernet LINK check hackaroo | 101 | // Ethernet LINK check hackaroo |
134 | #define LINK_Check 90 | 102 | #define LINK_Check 90 |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index d9400ef87195..9d5c083f3339 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2307,27 +2307,6 @@ config MV643XX_ETH | |||
2307 | chipset which is used in the Momenco Ocelot C and Jaguar ATX and | 2307 | chipset which is used in the Momenco Ocelot C and Jaguar ATX and |
2308 | Pegasos II, amongst other PPC and MIPS boards. | 2308 | Pegasos II, amongst other PPC and MIPS boards. |
2309 | 2309 | ||
2310 | config MV643XX_ETH_0 | ||
2311 | bool "MV-643XX Port 0" | ||
2312 | depends on MV643XX_ETH | ||
2313 | help | ||
2314 | This enables support for Port 0 of the Marvell MV643XX Gigabit | ||
2315 | Ethernet. | ||
2316 | |||
2317 | config MV643XX_ETH_1 | ||
2318 | bool "MV-643XX Port 1" | ||
2319 | depends on MV643XX_ETH | ||
2320 | help | ||
2321 | This enables support for Port 1 of the Marvell MV643XX Gigabit | ||
2322 | Ethernet. | ||
2323 | |||
2324 | config MV643XX_ETH_2 | ||
2325 | bool "MV-643XX Port 2" | ||
2326 | depends on MV643XX_ETH | ||
2327 | help | ||
2328 | This enables support for Port 2 of the Marvell MV643XX Gigabit | ||
2329 | Ethernet. | ||
2330 | |||
2331 | config QLA3XXX | 2310 | config QLA3XXX |
2332 | tristate "QLogic QLA3XXX Network Driver Support" | 2311 | tristate "QLogic QLA3XXX Network Driver Support" |
2333 | depends on PCI | 2312 | depends on PCI |