diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/nvram.c | 110 | ||||
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/cs89x0.c | 14 | ||||
-rw-r--r-- | drivers/net/cs89x0.h | 2 | ||||
-rw-r--r-- | drivers/serial/clps711x.c | 9 |
5 files changed, 4 insertions, 133 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 9e24bbd4090c..1af733d07321 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -32,11 +32,9 @@ | |||
32 | * added changelog | 32 | * added changelog |
33 | * 1.2 Erik Gilling: Cobalt Networks support | 33 | * 1.2 Erik Gilling: Cobalt Networks support |
34 | * Tim Hockin: general cleanup, Cobalt support | 34 | * Tim Hockin: general cleanup, Cobalt support |
35 | * 1.3 Jon Ringle: Comdial MP1000 support | ||
36 | * | ||
37 | */ | 35 | */ |
38 | 36 | ||
39 | #define NVRAM_VERSION "1.3" | 37 | #define NVRAM_VERSION "1.2" |
40 | 38 | ||
41 | #include <linux/module.h> | 39 | #include <linux/module.h> |
42 | #include <linux/config.h> | 40 | #include <linux/config.h> |
@@ -47,7 +45,6 @@ | |||
47 | #define PC 1 | 45 | #define PC 1 |
48 | #define ATARI 2 | 46 | #define ATARI 2 |
49 | #define COBALT 3 | 47 | #define COBALT 3 |
50 | #define MP1000 4 | ||
51 | 48 | ||
52 | /* select machine configuration */ | 49 | /* select machine configuration */ |
53 | #if defined(CONFIG_ATARI) | 50 | #if defined(CONFIG_ATARI) |
@@ -57,9 +54,6 @@ | |||
57 | # if defined(CONFIG_COBALT) | 54 | # if defined(CONFIG_COBALT) |
58 | # include <linux/cobalt-nvram.h> | 55 | # include <linux/cobalt-nvram.h> |
59 | # define MACH COBALT | 56 | # define MACH COBALT |
60 | # elif defined(CONFIG_MACH_MP1000) | ||
61 | # undef MACH | ||
62 | # define MACH MP1000 | ||
63 | # else | 57 | # else |
64 | # define MACH PC | 58 | # define MACH PC |
65 | # endif | 59 | # endif |
@@ -118,23 +112,6 @@ | |||
118 | 112 | ||
119 | #endif | 113 | #endif |
120 | 114 | ||
121 | #if MACH == MP1000 | ||
122 | |||
123 | /* RTC in a MP1000 */ | ||
124 | #define CHECK_DRIVER_INIT() 1 | ||
125 | |||
126 | #define MP1000_CKS_RANGE_START 0 | ||
127 | #define MP1000_CKS_RANGE_END 111 | ||
128 | #define MP1000_CKS_LOC 112 | ||
129 | |||
130 | #define NVRAM_BYTES (128-NVRAM_FIRST_BYTE) | ||
131 | |||
132 | #define mach_check_checksum mp1000_check_checksum | ||
133 | #define mach_set_checksum mp1000_set_checksum | ||
134 | #define mach_proc_infos mp1000_proc_infos | ||
135 | |||
136 | #endif | ||
137 | |||
138 | /* Note that *all* calls to CMOS_READ and CMOS_WRITE must be done with | 115 | /* Note that *all* calls to CMOS_READ and CMOS_WRITE must be done with |
139 | * rtc_lock held. Due to the index-port/data-port design of the RTC, we | 116 | * rtc_lock held. Due to the index-port/data-port design of the RTC, we |
140 | * don't want two different things trying to get to it at once. (e.g. the | 117 | * don't want two different things trying to get to it at once. (e.g. the |
@@ -938,91 +915,6 @@ atari_proc_infos(unsigned char *nvram, char *buffer, int *len, | |||
938 | 915 | ||
939 | #endif /* MACH == ATARI */ | 916 | #endif /* MACH == ATARI */ |
940 | 917 | ||
941 | #if MACH == MP1000 | ||
942 | |||
943 | static int | ||
944 | mp1000_check_checksum(void) | ||
945 | { | ||
946 | int i; | ||
947 | unsigned short sum = 0; | ||
948 | unsigned short expect; | ||
949 | |||
950 | for (i = MP1000_CKS_RANGE_START; i <= MP1000_CKS_RANGE_END; ++i) | ||
951 | sum += __nvram_read_byte(i); | ||
952 | |||
953 | expect = __nvram_read_byte(MP1000_CKS_LOC+1)<<8 | | ||
954 | __nvram_read_byte(MP1000_CKS_LOC); | ||
955 | return ((sum & 0xffff) == expect); | ||
956 | } | ||
957 | |||
958 | static void | ||
959 | mp1000_set_checksum(void) | ||
960 | { | ||
961 | int i; | ||
962 | unsigned short sum = 0; | ||
963 | |||
964 | for (i = MP1000_CKS_RANGE_START; i <= MP1000_CKS_RANGE_END; ++i) | ||
965 | sum += __nvram_read_byte(i); | ||
966 | __nvram_write_byte(sum >> 8, MP1000_CKS_LOC + 1); | ||
967 | __nvram_write_byte(sum & 0xff, MP1000_CKS_LOC); | ||
968 | } | ||
969 | |||
970 | #ifdef CONFIG_PROC_FS | ||
971 | |||
972 | #define SERVER_N_LEN 32 | ||
973 | #define PATH_N_LEN 32 | ||
974 | #define FILE_N_LEN 32 | ||
975 | #define NVRAM_MAGIC_SIG 0xdead | ||
976 | |||
977 | typedef struct NvRamImage | ||
978 | { | ||
979 | unsigned short int magic; | ||
980 | unsigned short int mode; | ||
981 | char fname[FILE_N_LEN]; | ||
982 | char path[PATH_N_LEN]; | ||
983 | char server[SERVER_N_LEN]; | ||
984 | char pad[12]; | ||
985 | } NvRam; | ||
986 | |||
987 | static int | ||
988 | mp1000_proc_infos(unsigned char *nvram, char *buffer, int *len, | ||
989 | off_t *begin, off_t offset, int size) | ||
990 | { | ||
991 | int checksum; | ||
992 | NvRam* nv = (NvRam*)nvram; | ||
993 | |||
994 | spin_lock_irq(&rtc_lock); | ||
995 | checksum = __nvram_check_checksum(); | ||
996 | spin_unlock_irq(&rtc_lock); | ||
997 | |||
998 | PRINT_PROC("Checksum status: %svalid\n", checksum ? "" : "not "); | ||
999 | |||
1000 | switch( nv->mode ) | ||
1001 | { | ||
1002 | case 0 : | ||
1003 | PRINT_PROC( "\tMode 0, tftp prompt\n" ); | ||
1004 | break; | ||
1005 | case 1 : | ||
1006 | PRINT_PROC( "\tMode 1, booting from disk\n" ); | ||
1007 | break; | ||
1008 | case 2 : | ||
1009 | PRINT_PROC( "\tMode 2, Alternate boot from disk /boot/%s\n", nv->fname ); | ||
1010 | break; | ||
1011 | case 3 : | ||
1012 | PRINT_PROC( "\tMode 3, Booting from net:\n" ); | ||
1013 | PRINT_PROC( "\t\t%s:%s%s\n",nv->server, nv->path, nv->fname ); | ||
1014 | break; | ||
1015 | default: | ||
1016 | PRINT_PROC( "\tInconsistant nvram?\n" ); | ||
1017 | break; | ||
1018 | } | ||
1019 | |||
1020 | return 1; | ||
1021 | } | ||
1022 | #endif | ||
1023 | |||
1024 | #endif /* MACH == MP1000 */ | ||
1025 | |||
1026 | MODULE_LICENSE("GPL"); | 918 | MODULE_LICENSE("GPL"); |
1027 | 919 | ||
1028 | EXPORT_SYMBOL(__nvram_read_byte); | 920 | EXPORT_SYMBOL(__nvram_read_byte); |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 6d4f9ceb0a32..57edae4790e8 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1374,7 +1374,7 @@ config FORCEDETH | |||
1374 | 1374 | ||
1375 | config CS89x0 | 1375 | config CS89x0 |
1376 | tristate "CS89x0 support" | 1376 | tristate "CS89x0 support" |
1377 | depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105 || MACH_MP1000 | 1377 | depends on (NET_PCI && (ISA || ARCH_IXDP2X01)) || ARCH_PNX0105 |
1378 | ---help--- | 1378 | ---help--- |
1379 | Support for CS89x0 chipset based Ethernet cards. If you have a | 1379 | Support for CS89x0 chipset based Ethernet cards. If you have a |
1380 | network (Ethernet) card of this type, say Y and read the | 1380 | network (Ethernet) card of this type, say Y and read the |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index bfdae10036ed..a6078ad9b654 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -182,10 +182,6 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; | |||
182 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ | 182 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ |
183 | static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; | 183 | static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; |
184 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; | 184 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; |
185 | #elif defined(CONFIG_MACH_MP1000) | ||
186 | #include <asm/arch/mp1000-seprom.h> | ||
187 | static unsigned int netcard_portlist[] __initdata = {MP1000_EIO_BASE+0x300, 0}; | ||
188 | static unsigned int cs8900_irq_map[] = {IRQ_EINT3,0,0,0}; | ||
189 | #else | 185 | #else |
190 | static unsigned int netcard_portlist[] __initdata = | 186 | static unsigned int netcard_portlist[] __initdata = |
191 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; | 187 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; |
@@ -594,10 +590,6 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
594 | cnt -= j; | 590 | cnt -= j; |
595 | } | 591 | } |
596 | } else | 592 | } else |
597 | #elif defined(CONFIG_MACH_MP1000) | ||
598 | if (1) { | ||
599 | memcpy(dev->dev_addr, get_eeprom_mac_address(), ETH_ALEN); | ||
600 | } else | ||
601 | #endif | 593 | #endif |
602 | 594 | ||
603 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) == | 595 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) == |
@@ -657,10 +649,6 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
657 | if (1) { | 649 | if (1) { |
658 | printk(KERN_NOTICE "cs89x0: No EEPROM on HiCO.SH4\n"); | 650 | printk(KERN_NOTICE "cs89x0: No EEPROM on HiCO.SH4\n"); |
659 | } else | 651 | } else |
660 | #elif defined(CONFIG_MACH_MP1000) | ||
661 | if (1) { | ||
662 | lp->force |= FORCE_RJ45; | ||
663 | } else | ||
664 | #endif | 652 | #endif |
665 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) | 653 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) |
666 | printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n"); | 654 | printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n"); |
@@ -1243,7 +1231,7 @@ net_open(struct net_device *dev) | |||
1243 | else | 1231 | else |
1244 | #endif | 1232 | #endif |
1245 | { | 1233 | { |
1246 | #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105) && !defined(CONFIG_MACH_MP1000) | 1234 | #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105) |
1247 | if (((1 << dev->irq) & lp->irq_map) == 0) { | 1235 | if (((1 << dev->irq) & lp->irq_map) == 0) { |
1248 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", | 1236 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", |
1249 | dev->name, dev->irq, lp->irq_map); | 1237 | dev->name, dev->irq, lp->irq_map); |
diff --git a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h index f19d1ebe0183..decea264f121 100644 --- a/drivers/net/cs89x0.h +++ b/drivers/net/cs89x0.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/config.h> | 17 | #include <linux/config.h> |
18 | 18 | ||
19 | #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105) || defined (CONFIG_MACH_MP1000) | 19 | #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105) |
20 | /* IXDP2401/IXDP2801 uses dword-aligned register addressing */ | 20 | /* IXDP2401/IXDP2801 uses dword-aligned register addressing */ |
21 | #define CS89x0_PORT(reg) ((reg) * 2) | 21 | #define CS89x0_PORT(reg) ((reg) * 2) |
22 | #else | 22 | #else |
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index 6a67e8f585b3..87ef368384fb 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c | |||
@@ -408,11 +408,7 @@ static struct uart_port clps711x_ports[UART_NR] = { | |||
408 | { | 408 | { |
409 | .iobase = SYSCON1, | 409 | .iobase = SYSCON1, |
410 | .irq = IRQ_UTXINT1, /* IRQ_URXINT1, IRQ_UMSINT */ | 410 | .irq = IRQ_UTXINT1, /* IRQ_URXINT1, IRQ_UMSINT */ |
411 | #ifdef CONFIG_MP1000_90MHZ | ||
412 | .uartclk = 4515840, | ||
413 | #else | ||
414 | .uartclk = 3686400, | 411 | .uartclk = 3686400, |
415 | #endif | ||
416 | .fifosize = 16, | 412 | .fifosize = 16, |
417 | .ops = &clps711x_pops, | 413 | .ops = &clps711x_pops, |
418 | .line = 0, | 414 | .line = 0, |
@@ -421,11 +417,7 @@ static struct uart_port clps711x_ports[UART_NR] = { | |||
421 | { | 417 | { |
422 | .iobase = SYSCON2, | 418 | .iobase = SYSCON2, |
423 | .irq = IRQ_UTXINT2, /* IRQ_URXINT2 */ | 419 | .irq = IRQ_UTXINT2, /* IRQ_URXINT2 */ |
424 | #ifdef CONFIG_MP1000_90MHZ | ||
425 | .uartclk = 4515840, | ||
426 | #else | ||
427 | .uartclk = 3686400, | 420 | .uartclk = 3686400, |
428 | #endif | ||
429 | .fifosize = 16, | 421 | .fifosize = 16, |
430 | .ops = &clps711x_pops, | 422 | .ops = &clps711x_pops, |
431 | .line = 1, | 423 | .line = 1, |
@@ -559,7 +551,6 @@ console_initcall(clps711xuart_console_init); | |||
559 | static struct uart_driver clps711x_reg = { | 551 | static struct uart_driver clps711x_reg = { |
560 | .driver_name = "ttyCL", | 552 | .driver_name = "ttyCL", |
561 | .dev_name = "ttyCL", | 553 | .dev_name = "ttyCL", |
562 | .devfs_name = "ttyCL", | ||
563 | .major = SERIAL_CLPS711X_MAJOR, | 554 | .major = SERIAL_CLPS711X_MAJOR, |
564 | .minor = SERIAL_CLPS711X_MINOR, | 555 | .minor = SERIAL_CLPS711X_MINOR, |
565 | .nr = UART_NR, | 556 | .nr = UART_NR, |