diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-22 13:18:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-22 13:18:06 -0400 |
commit | 21b7ef0c6c62a14bc8e1c8c0af4e1f0ba3a56d66 (patch) | |
tree | 71e53bd0464abd14d6b37c5b4487eaa438d46b65 | |
parent | 5c5d281a93e9816966b6131ccec19519dab0e103 (diff) | |
parent | b179fb8ca57590eeb0a5d6c8dc99f91773f09c73 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
-rw-r--r-- | arch/sparc64/kernel/time.c | 37 | ||||
-rw-r--r-- | drivers/sbus/char/rtc.c | 103 | ||||
-rw-r--r-- | drivers/serial/sunsab.c | 16 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 11 | ||||
-rw-r--r-- | include/asm-sparc64/mostek.h | 6 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 5 |
6 files changed, 148 insertions, 30 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 6a717d4d2bc5..c60785c046be 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | DEFINE_SPINLOCK(mostek_lock); | 49 | DEFINE_SPINLOCK(mostek_lock); |
50 | DEFINE_SPINLOCK(rtc_lock); | 50 | DEFINE_SPINLOCK(rtc_lock); |
51 | unsigned long mstk48t02_regs = 0UL; | 51 | void * __iomem mstk48t02_regs = 0UL; |
52 | #ifdef CONFIG_PCI | 52 | #ifdef CONFIG_PCI |
53 | unsigned long ds1287_regs = 0UL; | 53 | unsigned long ds1287_regs = 0UL; |
54 | #endif | 54 | #endif |
@@ -59,8 +59,8 @@ u64 jiffies_64 = INITIAL_JIFFIES; | |||
59 | 59 | ||
60 | EXPORT_SYMBOL(jiffies_64); | 60 | EXPORT_SYMBOL(jiffies_64); |
61 | 61 | ||
62 | static unsigned long mstk48t08_regs = 0UL; | 62 | static void * __iomem mstk48t08_regs; |
63 | static unsigned long mstk48t59_regs = 0UL; | 63 | static void * __iomem mstk48t59_regs; |
64 | 64 | ||
65 | static int set_rtc_mmss(unsigned long); | 65 | static int set_rtc_mmss(unsigned long); |
66 | 66 | ||
@@ -520,7 +520,7 @@ void timer_tick_interrupt(struct pt_regs *regs) | |||
520 | /* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */ | 520 | /* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */ |
521 | static void __init kick_start_clock(void) | 521 | static void __init kick_start_clock(void) |
522 | { | 522 | { |
523 | unsigned long regs = mstk48t02_regs; | 523 | void * __iomem regs = mstk48t02_regs; |
524 | u8 sec, tmp; | 524 | u8 sec, tmp; |
525 | int i, count; | 525 | int i, count; |
526 | 526 | ||
@@ -604,7 +604,7 @@ static void __init kick_start_clock(void) | |||
604 | /* Return nonzero if the clock chip battery is low. */ | 604 | /* Return nonzero if the clock chip battery is low. */ |
605 | static int __init has_low_battery(void) | 605 | static int __init has_low_battery(void) |
606 | { | 606 | { |
607 | unsigned long regs = mstk48t02_regs; | 607 | void * __iomem regs = mstk48t02_regs; |
608 | u8 data1, data2; | 608 | u8 data1, data2; |
609 | 609 | ||
610 | spin_lock_irq(&mostek_lock); | 610 | spin_lock_irq(&mostek_lock); |
@@ -623,7 +623,7 @@ static int __init has_low_battery(void) | |||
623 | static void __init set_system_time(void) | 623 | static void __init set_system_time(void) |
624 | { | 624 | { |
625 | unsigned int year, mon, day, hour, min, sec; | 625 | unsigned int year, mon, day, hour, min, sec; |
626 | unsigned long mregs = mstk48t02_regs; | 626 | void * __iomem mregs = mstk48t02_regs; |
627 | #ifdef CONFIG_PCI | 627 | #ifdef CONFIG_PCI |
628 | unsigned long dregs = ds1287_regs; | 628 | unsigned long dregs = ds1287_regs; |
629 | #else | 629 | #else |
@@ -843,7 +843,8 @@ void __init clock_probe(void) | |||
843 | !strcmp(model, "m5823")) { | 843 | !strcmp(model, "m5823")) { |
844 | ds1287_regs = edev->resource[0].start; | 844 | ds1287_regs = edev->resource[0].start; |
845 | } else { | 845 | } else { |
846 | mstk48t59_regs = edev->resource[0].start; | 846 | mstk48t59_regs = (void * __iomem) |
847 | edev->resource[0].start; | ||
847 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 848 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
848 | } | 849 | } |
849 | break; | 850 | break; |
@@ -865,7 +866,8 @@ try_isa_clock: | |||
865 | !strcmp(model, "m5823")) { | 866 | !strcmp(model, "m5823")) { |
866 | ds1287_regs = isadev->resource.start; | 867 | ds1287_regs = isadev->resource.start; |
867 | } else { | 868 | } else { |
868 | mstk48t59_regs = isadev->resource.start; | 869 | mstk48t59_regs = (void * __iomem) |
870 | isadev->resource.start; | ||
869 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 871 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
870 | } | 872 | } |
871 | break; | 873 | break; |
@@ -893,21 +895,24 @@ try_isa_clock: | |||
893 | } | 895 | } |
894 | 896 | ||
895 | if(model[5] == '0' && model[6] == '2') { | 897 | if(model[5] == '0' && model[6] == '2') { |
896 | mstk48t02_regs = (((u64)clk_reg[0].phys_addr) | | 898 | mstk48t02_regs = (void * __iomem) |
897 | (((u64)clk_reg[0].which_io)<<32UL)); | 899 | (((u64)clk_reg[0].phys_addr) | |
900 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
898 | } else if(model[5] == '0' && model[6] == '8') { | 901 | } else if(model[5] == '0' && model[6] == '8') { |
899 | mstk48t08_regs = (((u64)clk_reg[0].phys_addr) | | 902 | mstk48t08_regs = (void * __iomem) |
900 | (((u64)clk_reg[0].which_io)<<32UL)); | 903 | (((u64)clk_reg[0].phys_addr) | |
904 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
901 | mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; | 905 | mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; |
902 | } else { | 906 | } else { |
903 | mstk48t59_regs = (((u64)clk_reg[0].phys_addr) | | 907 | mstk48t59_regs = (void * __iomem) |
904 | (((u64)clk_reg[0].which_io)<<32UL)); | 908 | (((u64)clk_reg[0].phys_addr) | |
909 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
905 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 910 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
906 | } | 911 | } |
907 | break; | 912 | break; |
908 | } | 913 | } |
909 | 914 | ||
910 | if (mstk48t02_regs != 0UL) { | 915 | if (mstk48t02_regs != NULL) { |
911 | /* Report a low battery voltage condition. */ | 916 | /* Report a low battery voltage condition. */ |
912 | if (has_low_battery()) | 917 | if (has_low_battery()) |
913 | prom_printf("NVRAM: Low battery voltage!\n"); | 918 | prom_printf("NVRAM: Low battery voltage!\n"); |
@@ -1087,7 +1092,7 @@ unsigned long long sched_clock(void) | |||
1087 | static int set_rtc_mmss(unsigned long nowtime) | 1092 | static int set_rtc_mmss(unsigned long nowtime) |
1088 | { | 1093 | { |
1089 | int real_seconds, real_minutes, chip_minutes; | 1094 | int real_seconds, real_minutes, chip_minutes; |
1090 | unsigned long mregs = mstk48t02_regs; | 1095 | void * __iomem mregs = mstk48t02_regs; |
1091 | #ifdef CONFIG_PCI | 1096 | #ifdef CONFIG_PCI |
1092 | unsigned long dregs = ds1287_regs; | 1097 | unsigned long dregs = ds1287_regs; |
1093 | #else | 1098 | #else |
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c index bf3273eb1c8b..49d1cd99d5ac 100644 --- a/drivers/sbus/char/rtc.c +++ b/drivers/sbus/char/rtc.c | |||
@@ -28,6 +28,42 @@ | |||
28 | 28 | ||
29 | static int rtc_busy = 0; | 29 | static int rtc_busy = 0; |
30 | 30 | ||
31 | /* This is the structure layout used by drivers/char/rtc.c, we | ||
32 | * support that driver's ioctls so that things are less messy in | ||
33 | * userspace. | ||
34 | */ | ||
35 | struct rtc_time_generic { | ||
36 | int tm_sec; | ||
37 | int tm_min; | ||
38 | int tm_hour; | ||
39 | int tm_mday; | ||
40 | int tm_mon; | ||
41 | int tm_year; | ||
42 | int tm_wday; | ||
43 | int tm_yday; | ||
44 | int tm_isdst; | ||
45 | }; | ||
46 | #define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */ | ||
47 | #define RTC_AIE_OFF _IO('p', 0x02) /* ... off */ | ||
48 | #define RTC_UIE_ON _IO('p', 0x03) /* Update int. enable on */ | ||
49 | #define RTC_UIE_OFF _IO('p', 0x04) /* ... off */ | ||
50 | #define RTC_PIE_ON _IO('p', 0x05) /* Periodic int. enable on */ | ||
51 | #define RTC_PIE_OFF _IO('p', 0x06) /* ... off */ | ||
52 | #define RTC_WIE_ON _IO('p', 0x0f) /* Watchdog int. enable on */ | ||
53 | #define RTC_WIE_OFF _IO('p', 0x10) /* ... off */ | ||
54 | #define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time_generic) /* Read RTC time */ | ||
55 | #define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time_generic) /* Set RTC time */ | ||
56 | #define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time) /* Set alarm time */ | ||
57 | #define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time) /* Read alarm time */ | ||
58 | #define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long) /* Read IRQ rate */ | ||
59 | #define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long) /* Set IRQ rate */ | ||
60 | #define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long) /* Read epoch */ | ||
61 | #define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long) /* Set epoch */ | ||
62 | #define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/ | ||
63 | #define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/ | ||
64 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ | ||
65 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | ||
66 | |||
31 | /* Retrieve the current date and time from the real time clock. */ | 67 | /* Retrieve the current date and time from the real time clock. */ |
32 | static void get_rtc_time(struct rtc_time *t) | 68 | static void get_rtc_time(struct rtc_time *t) |
33 | { | 69 | { |
@@ -82,29 +118,87 @@ void set_rtc_time(struct rtc_time *t) | |||
82 | spin_unlock_irq(&mostek_lock); | 118 | spin_unlock_irq(&mostek_lock); |
83 | } | 119 | } |
84 | 120 | ||
121 | static int put_rtc_time_generic(void __user *argp, struct rtc_time *tm) | ||
122 | { | ||
123 | struct rtc_time_generic __user *utm = argp; | ||
124 | |||
125 | if (__put_user(tm->sec, &utm->tm_sec) || | ||
126 | __put_user(tm->min, &utm->tm_min) || | ||
127 | __put_user(tm->hour, &utm->tm_hour) || | ||
128 | __put_user(tm->dom, &utm->tm_mday) || | ||
129 | __put_user(tm->month, &utm->tm_mon) || | ||
130 | __put_user(tm->year, &utm->tm_year) || | ||
131 | __put_user(tm->dow, &utm->tm_wday) || | ||
132 | __put_user(0, &utm->tm_yday) || | ||
133 | __put_user(0, &utm->tm_isdst)) | ||
134 | return -EFAULT; | ||
135 | |||
136 | return 0; | ||
137 | } | ||
138 | |||
139 | static int get_rtc_time_generic(struct rtc_time *tm, void __user *argp) | ||
140 | { | ||
141 | struct rtc_time_generic __user *utm = argp; | ||
142 | |||
143 | if (__get_user(tm->sec, &utm->tm_sec) || | ||
144 | __get_user(tm->min, &utm->tm_min) || | ||
145 | __get_user(tm->hour, &utm->tm_hour) || | ||
146 | __get_user(tm->dom, &utm->tm_mday) || | ||
147 | __get_user(tm->month, &utm->tm_mon) || | ||
148 | __get_user(tm->year, &utm->tm_year) || | ||
149 | __get_user(tm->dow, &utm->tm_wday)) | ||
150 | return -EFAULT; | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | |||
85 | static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 155 | static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
86 | unsigned long arg) | 156 | unsigned long arg) |
87 | { | 157 | { |
88 | struct rtc_time rtc_tm; | 158 | struct rtc_time rtc_tm; |
89 | void __user *argp = (void __user *)arg; | 159 | void __user *argp = (void __user *)arg; |
90 | 160 | ||
91 | switch (cmd) | 161 | switch (cmd) { |
92 | { | 162 | /* No interrupt support, return an error |
163 | * compatible with drivers/char/rtc.c | ||
164 | */ | ||
165 | case RTC_AIE_OFF: | ||
166 | case RTC_AIE_ON: | ||
167 | case RTC_PIE_OFF: | ||
168 | case RTC_PIE_ON: | ||
169 | case RTC_UIE_OFF: | ||
170 | case RTC_UIE_ON: | ||
171 | case RTC_IRQP_READ: | ||
172 | case RTC_IRQP_SET: | ||
173 | case RTC_EPOCH_SET: | ||
174 | case RTC_EPOCH_READ: | ||
175 | return -EINVAL; | ||
176 | |||
93 | case RTCGET: | 177 | case RTCGET: |
178 | case RTC_RD_TIME: | ||
94 | memset(&rtc_tm, 0, sizeof(struct rtc_time)); | 179 | memset(&rtc_tm, 0, sizeof(struct rtc_time)); |
95 | get_rtc_time(&rtc_tm); | 180 | get_rtc_time(&rtc_tm); |
96 | 181 | ||
97 | if (copy_to_user(argp, &rtc_tm, sizeof(struct rtc_time))) | 182 | if (cmd == RTCGET) { |
183 | if (copy_to_user(argp, &rtc_tm, | ||
184 | sizeof(struct rtc_time))) | ||
185 | return -EFAULT; | ||
186 | } else if (put_rtc_time_generic(argp, &rtc_tm)) | ||
98 | return -EFAULT; | 187 | return -EFAULT; |
99 | 188 | ||
100 | return 0; | 189 | return 0; |
101 | 190 | ||
102 | 191 | ||
103 | case RTCSET: | 192 | case RTCSET: |
193 | case RTC_SET_TIME: | ||
104 | if (!capable(CAP_SYS_TIME)) | 194 | if (!capable(CAP_SYS_TIME)) |
105 | return -EPERM; | 195 | return -EPERM; |
106 | 196 | ||
107 | if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) | 197 | if (cmd == RTCSET) { |
198 | if (copy_from_user(&rtc_tm, argp, | ||
199 | sizeof(struct rtc_time))) | ||
200 | return -EFAULT; | ||
201 | } else if (get_rtc_time_generic(&rtc_tm, argp)) | ||
108 | return -EFAULT; | 202 | return -EFAULT; |
109 | 203 | ||
110 | set_rtc_time(&rtc_tm); | 204 | set_rtc_time(&rtc_tm); |
@@ -164,6 +258,7 @@ static int __init rtc_sun_init(void) | |||
164 | printk(KERN_ERR "rtc: unable to get misc minor for Mostek\n"); | 258 | printk(KERN_ERR "rtc: unable to get misc minor for Mostek\n"); |
165 | return error; | 259 | return error; |
166 | } | 260 | } |
261 | printk("rtc_sun_init: Registered Mostek RTC driver.\n"); | ||
167 | 262 | ||
168 | return 0; | 263 | return 0; |
169 | } | 264 | } |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 8caaf2e5e47c..39b788d95e39 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -682,7 +682,8 @@ static void calc_ebrg(int baud, int *n_ret, int *m_ret) | |||
682 | 682 | ||
683 | /* Internal routine, port->lock is held and local interrupts are disabled. */ | 683 | /* Internal routine, port->lock is held and local interrupts are disabled. */ |
684 | static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cflag, | 684 | static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cflag, |
685 | unsigned int iflag, int baud) | 685 | unsigned int iflag, unsigned int baud, |
686 | unsigned int quot) | ||
686 | { | 687 | { |
687 | unsigned int ebrg; | 688 | unsigned int ebrg; |
688 | unsigned char dafo; | 689 | unsigned char dafo; |
@@ -766,6 +767,9 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla | |||
766 | up->port.ignore_status_mask |= (SAB82532_ISR0_RPF | | 767 | up->port.ignore_status_mask |= (SAB82532_ISR0_RPF | |
767 | SAB82532_ISR0_TCD); | 768 | SAB82532_ISR0_TCD); |
768 | 769 | ||
770 | uart_update_timeout(&up->port, cflag, | ||
771 | (up->port.uartclk / (16 * quot))); | ||
772 | |||
769 | /* Now bang the new settings into the chip. */ | 773 | /* Now bang the new settings into the chip. */ |
770 | sunsab_cec_wait(up); | 774 | sunsab_cec_wait(up); |
771 | sunsab_tec_wait(up); | 775 | sunsab_tec_wait(up); |
@@ -784,10 +788,11 @@ static void sunsab_set_termios(struct uart_port *port, struct termios *termios, | |||
784 | { | 788 | { |
785 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; | 789 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; |
786 | unsigned long flags; | 790 | unsigned long flags; |
787 | int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); | 791 | unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); |
792 | unsigned int quot = uart_get_divisor(port, baud); | ||
788 | 793 | ||
789 | spin_lock_irqsave(&up->port.lock, flags); | 794 | spin_lock_irqsave(&up->port.lock, flags); |
790 | sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud); | 795 | sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud, quot); |
791 | spin_unlock_irqrestore(&up->port.lock, flags); | 796 | spin_unlock_irqrestore(&up->port.lock, flags); |
792 | } | 797 | } |
793 | 798 | ||
@@ -880,7 +885,7 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
880 | { | 885 | { |
881 | struct uart_sunsab_port *up = &sunsab_ports[con->index]; | 886 | struct uart_sunsab_port *up = &sunsab_ports[con->index]; |
882 | unsigned long flags; | 887 | unsigned long flags; |
883 | int baud; | 888 | unsigned int baud, quot; |
884 | 889 | ||
885 | printk("Console: ttyS%d (SAB82532)\n", | 890 | printk("Console: ttyS%d (SAB82532)\n", |
886 | (sunsab_reg.minor - 64) + con->index); | 891 | (sunsab_reg.minor - 64) + con->index); |
@@ -926,7 +931,8 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
926 | SAB82532_IMR1_XPR; | 931 | SAB82532_IMR1_XPR; |
927 | writeb(up->interrupt_mask1, &up->regs->w.imr1); | 932 | writeb(up->interrupt_mask1, &up->regs->w.imr1); |
928 | 933 | ||
929 | sunsab_convert_to_sab(up, con->cflag, 0, baud); | 934 | quot = uart_get_divisor(&up->port, baud); |
935 | sunsab_convert_to_sab(up, con->cflag, 0, baud, quot); | ||
930 | sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS); | 936 | sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS); |
931 | 937 | ||
932 | spin_unlock_irqrestore(&up->port.lock, flags); | 938 | spin_unlock_irqrestore(&up->port.lock, flags); |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 23d19d394320..ddc97c905e14 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1285,6 +1285,7 @@ static struct uart_driver sunsu_reg = { | |||
1285 | 1285 | ||
1286 | static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | 1286 | static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) |
1287 | { | 1287 | { |
1288 | int quot, baud; | ||
1288 | #ifdef CONFIG_SERIO | 1289 | #ifdef CONFIG_SERIO |
1289 | struct serio *serio; | 1290 | struct serio *serio; |
1290 | #endif | 1291 | #endif |
@@ -1293,10 +1294,14 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | |||
1293 | up->port.type = PORT_UNKNOWN; | 1294 | up->port.type = PORT_UNKNOWN; |
1294 | up->port.uartclk = (SU_BASE_BAUD * 16); | 1295 | up->port.uartclk = (SU_BASE_BAUD * 16); |
1295 | 1296 | ||
1296 | if (up->su_type == SU_PORT_KBD) | 1297 | if (up->su_type == SU_PORT_KBD) { |
1297 | up->cflag = B1200 | CS8 | CLOCAL | CREAD; | 1298 | up->cflag = B1200 | CS8 | CLOCAL | CREAD; |
1298 | else | 1299 | baud = 1200; |
1300 | } else { | ||
1299 | up->cflag = B4800 | CS8 | CLOCAL | CREAD; | 1301 | up->cflag = B4800 | CS8 | CLOCAL | CREAD; |
1302 | baud = 4800; | ||
1303 | } | ||
1304 | quot = up->port.uartclk / (16 * baud); | ||
1300 | 1305 | ||
1301 | sunsu_autoconfig(up); | 1306 | sunsu_autoconfig(up); |
1302 | if (up->port.type == PORT_UNKNOWN) | 1307 | if (up->port.type == PORT_UNKNOWN) |
@@ -1337,6 +1342,8 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | |||
1337 | } | 1342 | } |
1338 | #endif | 1343 | #endif |
1339 | 1344 | ||
1345 | sunsu_change_speed(&up->port, up->cflag, 0, quot); | ||
1346 | |||
1340 | sunsu_startup(&up->port); | 1347 | sunsu_startup(&up->port); |
1341 | return 0; | 1348 | return 0; |
1342 | } | 1349 | } |
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h index ccf2f5f82d7f..1f9b1356a48e 100644 --- a/include/asm-sparc64/mostek.h +++ b/include/asm-sparc64/mostek.h | |||
@@ -38,7 +38,7 @@ | |||
38 | * | 38 | * |
39 | * We now deal with physical addresses for I/O to the chip. -DaveM | 39 | * We now deal with physical addresses for I/O to the chip. -DaveM |
40 | */ | 40 | */ |
41 | static __inline__ u8 mostek_read(unsigned long addr) | 41 | static __inline__ u8 mostek_read(void * __iomem addr) |
42 | { | 42 | { |
43 | u8 ret; | 43 | u8 ret; |
44 | 44 | ||
@@ -48,7 +48,7 @@ static __inline__ u8 mostek_read(unsigned long addr) | |||
48 | return ret; | 48 | return ret; |
49 | } | 49 | } |
50 | 50 | ||
51 | static __inline__ void mostek_write(unsigned long addr, u8 val) | 51 | static __inline__ void mostek_write(void * __iomem addr, u8 val) |
52 | { | 52 | { |
53 | __asm__ __volatile__("stba %0, [%1] %2" | 53 | __asm__ __volatile__("stba %0, [%1] %2" |
54 | : /* no outputs */ | 54 | : /* no outputs */ |
@@ -67,7 +67,7 @@ static __inline__ void mostek_write(unsigned long addr, u8 val) | |||
67 | #define MOSTEK_YEAR 0x07ffUL | 67 | #define MOSTEK_YEAR 0x07ffUL |
68 | 68 | ||
69 | extern spinlock_t mostek_lock; | 69 | extern spinlock_t mostek_lock; |
70 | extern unsigned long mstk48t02_regs; | 70 | extern void *__iomem mstk48t02_regs; |
71 | 71 | ||
72 | /* Control register values. */ | 72 | /* Control register values. */ |
73 | #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ | 73 | #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index af9bf175a223..ae2cd5b09a7c 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -416,6 +416,11 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
416 | unsigned long pfn, | 416 | unsigned long pfn, |
417 | unsigned long size, pgprot_t prot); | 417 | unsigned long size, pgprot_t prot); |
418 | 418 | ||
419 | /* Clear virtual and physical cachability, set side-effect bit. */ | ||
420 | #define pgprot_noncached(prot) \ | ||
421 | (__pgprot((pgprot_val(prot) & ~(_PAGE_CP | _PAGE_CV)) | \ | ||
422 | _PAGE_E)) | ||
423 | |||
419 | /* | 424 | /* |
420 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in | 425 | * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in |
421 | * its high 4 bits. These macros/functions put it there or get it from there. | 426 | * its high 4 bits. These macros/functions put it there or get it from there. |