diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:05:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:05:21 -0500 |
commit | 4964e0664c80680fa6b28ef91381c076a5b25c2c (patch) | |
tree | 62099c5aaeee7274bcc66bcfba35d479affa97cf /drivers/video/console | |
parent | 0a80939b3e6af4b0dc93bf88ec02fd7e90a16f1b (diff) | |
parent | 7bf6612e8a9d6a0b3b82e8e2611942be1258b307 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
MIPS: Delete unused function add_temporary_entry.
MIPS: Set default pci cache line size.
MIPS: Flush huge TLB
MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
MIPS: Octeon: Add support for OCTEON II PCIe
MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
MIPS: Alchemy: Update cpu-feature-overrides
MIPS: Alchemy: db1200: Improve PB1200 detection.
MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
MIPS: Alchemy: irq: register pm at irq init time
MIPS: Alchemy: Touchscreen support on DB1100
MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
net/irda: convert au1k_ir to platform driver.
MIPS: Alchemy: remove unused board headers
MTD: nand: make au1550nd.c a platform_driver
MIPS: Netlogic: Mark Netlogic chips as SMT capable
MIPS: Netlogic: Add support for XLP 3XX cores
MIPS: Netlogic: Merge some of XLR/XLP wakup code
MIPS: Netlogic: Add default XLP config.
...
Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/newport_con.c | 63 |
1 files changed, 44 insertions, 19 deletions
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 93317b5b8740..a122d9287d16 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c | |||
@@ -25,14 +25,13 @@ | |||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/page.h> | 26 | #include <asm/page.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/gio_device.h> | ||
29 | |||
28 | #include <video/newport.h> | 30 | #include <video/newport.h> |
29 | 31 | ||
30 | #include <linux/linux_logo.h> | 32 | #include <linux/linux_logo.h> |
31 | #include <linux/font.h> | 33 | #include <linux/font.h> |
32 | 34 | ||
33 | |||
34 | extern unsigned long sgi_gfxaddr; | ||
35 | |||
36 | #define FONT_DATA ((unsigned char *)font_vga_8x16.data) | 35 | #define FONT_DATA ((unsigned char *)font_vga_8x16.data) |
37 | 36 | ||
38 | /* borrowed from fbcon.c */ | 37 | /* borrowed from fbcon.c */ |
@@ -304,12 +303,6 @@ static const char *newport_startup(void) | |||
304 | { | 303 | { |
305 | int i; | 304 | int i; |
306 | 305 | ||
307 | if (!sgi_gfxaddr) | ||
308 | return NULL; | ||
309 | |||
310 | if (!npregs) | ||
311 | npregs = (struct newport_regs *)/* ioremap cannot fail */ | ||
312 | ioremap(sgi_gfxaddr, sizeof(struct newport_regs)); | ||
313 | npregs->cset.config = NPORT_CFG_GD0; | 306 | npregs->cset.config = NPORT_CFG_GD0; |
314 | 307 | ||
315 | if (newport_wait(npregs)) | 308 | if (newport_wait(npregs)) |
@@ -743,26 +736,58 @@ const struct consw newport_con = { | |||
743 | .con_save_screen = DUMMY | 736 | .con_save_screen = DUMMY |
744 | }; | 737 | }; |
745 | 738 | ||
746 | #ifdef MODULE | 739 | static int newport_probe(struct gio_device *dev, |
747 | static int __init newport_console_init(void) | 740 | const struct gio_device_id *id) |
748 | { | 741 | { |
749 | if (!sgi_gfxaddr) | 742 | unsigned long newport_addr; |
750 | return 0; | ||
751 | 743 | ||
752 | if (!npregs) | 744 | if (!dev->resource.start) |
753 | npregs = (struct newport_regs *)/* ioremap cannot fail */ | 745 | return -EINVAL; |
754 | ioremap(sgi_gfxaddr, sizeof(struct newport_regs)); | 746 | |
747 | if (npregs) | ||
748 | return -EBUSY; /* we only support one Newport as console */ | ||
749 | |||
750 | newport_addr = dev->resource.start + 0xF0000; | ||
751 | if (!request_mem_region(newport_addr, 0x10000, "Newport")) | ||
752 | return -ENODEV; | ||
753 | |||
754 | npregs = (struct newport_regs *)/* ioremap cannot fail */ | ||
755 | ioremap(newport_addr, sizeof(struct newport_regs)); | ||
755 | 756 | ||
756 | return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1); | 757 | return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1); |
757 | } | 758 | } |
758 | module_init(newport_console_init); | ||
759 | 759 | ||
760 | static void __exit newport_console_exit(void) | 760 | static void newport_remove(struct gio_device *dev) |
761 | { | 761 | { |
762 | give_up_console(&newport_con); | 762 | give_up_console(&newport_con); |
763 | iounmap((void *)npregs); | 763 | iounmap((void *)npregs); |
764 | } | 764 | } |
765 | |||
766 | static struct gio_device_id newport_ids[] = { | ||
767 | { .id = 0x7e }, | ||
768 | { .id = 0xff } | ||
769 | }; | ||
770 | |||
771 | MODULE_ALIAS("gio:7e"); | ||
772 | |||
773 | static struct gio_driver newport_driver = { | ||
774 | .name = "newport", | ||
775 | .id_table = newport_ids, | ||
776 | .probe = newport_probe, | ||
777 | .remove = newport_remove, | ||
778 | }; | ||
779 | |||
780 | int __init newport_console_init(void) | ||
781 | { | ||
782 | return gio_register_driver(&newport_driver); | ||
783 | } | ||
784 | |||
785 | void __exit newport_console_exit(void) | ||
786 | { | ||
787 | gio_unregister_driver(&newport_driver); | ||
788 | } | ||
789 | |||
790 | module_init(newport_console_init); | ||
765 | module_exit(newport_console_exit); | 791 | module_exit(newport_console_exit); |
766 | #endif | ||
767 | 792 | ||
768 | MODULE_LICENSE("GPL"); | 793 | MODULE_LICENSE("GPL"); |