realtek: replace RTL93xx GPIO patches
[openwrt/staging/ldir.git] / target / linux / realtek / patches-5.10 / 309-cevt-rtl9300-support.patch
1 --- a/arch/mips/kernel/Makefile
2 +++ b/arch/mips/kernel/Makefile
3 @@ -27,6 +27,7 @@ obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm14
4 obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o
5 obj-$(CONFIG_CEVT_DS1287) += cevt-ds1287.o
6 obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o
7 +obj-$(CONFIG_CEVT_RTL9300) += cevt-rtl9300.o
8 obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o
9 obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o
10 obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o
11 --- a/arch/mips/include/asm/time.h
12 +++ b/arch/mips/include/asm/time.h
13 @@ -15,6 +15,8 @@
14 #include <linux/clockchips.h>
15 #include <linux/clocksource.h>
16
17 +extern void rtl9300_clockevent_init(void);
18 +
19 extern spinlock_t rtc_lock;
20
21 /*
22 @@ -43,6 +45,11 @@ extern int r4k_clockevent_init(void);
23
24 static inline int mips_clockevent_init(void)
25 {
26 +#ifdef CONFIG_CEVT_RTL9300
27 + rtl9300_clockevent_init();
28 + return 0;
29 +#endif
30 +
31 #ifdef CONFIG_CEVT_R4K
32 return r4k_clockevent_init();
33 #else
34 --- a/arch/mips/kernel/smp-mt.c
35 +++ b/arch/mips/kernel/smp-mt.c
36 @@ -108,12 +108,18 @@ static void __init smvp_tc_init(unsigned
37 static void vsmp_init_secondary(void)
38 {
39 /* This is Malta specific: IPI,performance and timer interrupts */
40 +
41 + /* RTL9300 Clear internal timer interrupt */
42 + write_c0_compare(0);
43 +
44 if (mips_gic_present())
45 change_c0_status(ST0_IM, STATUSF_IP2 | STATUSF_IP3 |
46 STATUSF_IP4 | STATUSF_IP5 |
47 STATUSF_IP6 | STATUSF_IP7);
48 else
49 change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 |
50 + STATUSF_IP2 | STATUSF_IP3 |
51 + STATUSF_IP4 | STATUSF_IP5 |
52 STATUSF_IP6 | STATUSF_IP7);
53 }
54