Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: R7785RP board updates.

Some fixups for the R7785RP board. Gets iVDR working.

Signed-off-by: Ryusuke Sakato <sakato.ryusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Ryusuke Sakato and committed by
Paul Mundt
39374aad 9c37dc63

+23 -21
+2 -2
arch/sh/boards/renesas/r7780rp/setup.c
··· 97 97 */ 98 98 static void ivdr_clk_enable(struct clk *clk) 99 99 { 100 - ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << 8), PA_IVDRCTL); 100 + ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL); 101 101 } 102 102 103 103 static void ivdr_clk_disable(struct clk *clk) 104 104 { 105 - ctrl_outw(ctrl_inw(PA_IVDRCTL) & ~(1 << 8), PA_IVDRCTL); 105 + ctrl_outw(ctrl_inw(PA_IVDRCTL) & ~(1 << IVDR_CK_ON), PA_IVDRCTL); 106 106 } 107 107 108 108 static struct clk_ops ivdr_clk_ops = {
+1 -11
arch/sh/drivers/pci/ops-r7780rp.c
··· 25 25 65, 66, 67, 68, 26 26 }; 27 27 28 - static char r7785rp_irq_tab[][4] __initdata = { 29 - { 65, 66, 67, 68 }, /* INT ABCD */ 30 - { 66, 67, 68, 65 }, /* INT BCDA */ 31 - { 67, 68, 65, 66 }, /* INT CDAB */ 32 - { 68, 65, 66, 67 }, /* INT DABC */ 33 - { 64, 64, 64, 64 }, /* PCI Host */ 34 - }; 35 - 36 28 int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) 37 29 { 38 30 if (mach_is_r7780rp()) 39 31 return r7780rp_irq_tab[slot]; 40 - if (mach_is_r7780mp()) 32 + if (mach_is_r7780mp() || mach_is_r7785rp()) 41 33 return r7780mp_irq_tab[slot]; 42 - if (mach_is_r7785rp()) 43 - return r7785rp_irq_tab[slot][pin]; 44 34 45 35 printk(KERN_ERR "PCI: Bad IRQ mapping " 46 36 "request for slot %d, func %d\n", slot, pin-1);
+13 -8
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
··· 75 75 static struct intc2_data intc2_irq_table[] = { 76 76 { 28, 0, 24, 0, 0, 2 }, /* TMU0 */ 77 77 78 - { 40, 8, 24, 0, 3, 3 }, /* SCIF0 ERI */ 79 - { 41, 8, 24, 0, 3, 3 }, /* SCIF0 RXI */ 80 - { 42, 8, 24, 0, 3, 3 }, /* SCIF0 BRI */ 81 - { 43, 8, 24, 0, 3, 3 }, /* SCIF0 TXI */ 78 + { 40, 8, 24, 0, 2, 3 }, /* SCIF0 ERI */ 79 + { 41, 8, 24, 0, 2, 3 }, /* SCIF0 RXI */ 80 + { 42, 8, 24, 0, 2, 3 }, /* SCIF0 BRI */ 81 + { 43, 8, 24, 0, 2, 3 }, /* SCIF0 TXI */ 82 82 83 - { 76, 8, 16, 0, 4, 3 }, /* SCIF1 ERI */ 84 - { 77, 8, 16, 0, 4, 3 }, /* SCIF1 RXI */ 85 - { 78, 8, 16, 0, 4, 3 }, /* SCIF1 BRI */ 86 - { 79, 8, 16, 0, 4, 3 }, /* SCIF1 TXI */ 83 + { 44, 8, 16, 0, 3, 3 }, /* SCIF1 ERI */ 84 + { 45, 8, 16, 0, 3, 3 }, /* SCIF1 RXI */ 85 + { 46, 8, 16, 0, 3, 3 }, /* SCIF1 BRI */ 86 + { 47, 8, 16, 0, 3, 3 }, /* SCIF1 TXI */ 87 87 88 88 { 64, 0x14, 8, 0, 14, 2 }, /* PCIC0 */ 89 89 { 65, 0x14, 0, 0, 15, 2 }, /* PCIC1 */ 90 90 { 66, 0x18, 24, 0, 16, 2 }, /* PCIC2 */ 91 91 { 67, 0x18, 16, 0, 17, 2 }, /* PCIC3 */ 92 92 { 68, 0x18, 8, 0, 18, 2 }, /* PCIC4 */ 93 + 94 + { 60, 8, 8, 0, 4, 3 }, /* SCIF2 ERI, RXI, BRI, TXI */ 95 + { 60, 8, 0, 0, 5, 3 }, /* SCIF3 ERI, RXI, BRI, TXI */ 96 + { 60, 12, 24, 0, 6, 3 }, /* SCIF4 ERI, RXI, BRI, TXI */ 97 + { 60, 12, 16, 0, 7, 3 }, /* SCIF5 ERI, RXI, BRI, TXI */ 93 98 }; 94 99 95 100 void __init init_IRQ_intc2(void)
+7
include/asm-sh/r7780rp.h
··· 83 83 #define IRQ_ONETH 13 /* On board Ethernet IRQ */ 84 84 #define IRQ_PSW 14 /* Push Switch IRQ */ 85 85 86 + #define IVDR_CK_ON 8 /* iVDR Clock ON */ 87 + 86 88 #elif defined(CONFIG_SH_R7780RP) 87 89 #define PA_POFF (-1) 88 90 ··· 154 152 #define IRQ_PSW 13 /* Push Switch IRQ */ 155 153 #define IRQ_ZIGBEE 14 /* Ziggbee IO IRQ */ 156 154 155 + #define IVDR_CK_ON 8 /* iVDR Clock ON */ 156 + 157 157 #elif defined(CONFIG_SH_R7785RP) 158 158 #define PA_BCR 0xa4000000 /* FPGA */ 159 159 #define PA_SDPOW (-1) ··· 201 197 #define PA_CU3MDR (PA_BCR+0x0300) 202 198 #define PA_CU5MDR (PA_BCR+0x0302) 203 199 #define PA_MMSR (PA_BCR+0x0400) 200 + 201 + #define IVDR_CK_ON 4 /* iVDR Clock ON */ 202 + 204 203 #endif 205 204 206 205 void make_r7780rp_irq(unsigned int irq);