18 #include <linux/serial.h>
26 #include <cpu/dma-register.h>
27 #include <asm/mmzone.h>
30 .mapbase = 0xffea0000,
46 .platform_data = &scif0_platform_data,
54 .mapbase = 0xffeb0000,
67 .platform_data = &scif1_platform_data,
72 .mapbase = 0xffec0000,
85 .platform_data = &scif2_platform_data,
90 .mapbase = 0xffed0000,
103 .platform_data = &scif3_platform_data,
108 .mapbase = 0xffee0000,
121 .platform_data = &scif4_platform_data,
126 .mapbase = 0xffef0000,
139 .platform_data = &scif5_platform_data,
144 .channel_offset = 0x04,
146 .clockevent_rating = 200,
149 static struct resource tmu0_resources[] = {
165 .platform_data = &tmu0_platform_data,
167 .resource = tmu0_resources,
172 .channel_offset = 0x10,
174 .clocksource_rating = 200,
177 static struct resource tmu1_resources[] = {
193 .platform_data = &tmu1_platform_data,
195 .resource = tmu1_resources,
200 .channel_offset = 0x1c,
204 static struct resource tmu2_resources[] = {
220 .platform_data = &tmu2_platform_data,
222 .resource = tmu2_resources,
227 .channel_offset = 0x04,
231 static struct resource tmu3_resources[] = {
247 .platform_data = &tmu3_platform_data,
249 .resource = tmu3_resources,
254 .channel_offset = 0x10,
258 static struct resource tmu4_resources[] = {
274 .platform_data = &tmu4_platform_data,
276 .resource = tmu4_resources,
281 .channel_offset = 0x1c,
285 static struct resource tmu5_resources[] = {
301 .platform_data = &tmu5_platform_data,
303 .resource = tmu5_resources,
308 .channel_offset = 0x04,
312 static struct resource tmu6_resources[] = {
328 .platform_data = &tmu6_platform_data,
330 .resource = tmu6_resources,
335 .channel_offset = 0x10,
339 static struct resource tmu7_resources[] = {
355 .platform_data = &tmu7_platform_data,
357 .resource = tmu7_resources,
362 .channel_offset = 0x1c,
366 static struct resource tmu8_resources[] = {
382 .platform_data = &tmu8_platform_data,
384 .resource = tmu8_resources,
389 .channel_offset = 0x04,
393 static struct resource tmu9_resources[] = {
409 .platform_data = &tmu9_platform_data,
411 .resource = tmu9_resources,
416 .channel_offset = 0x10,
420 static struct resource tmu10_resources[] = {
436 .platform_data = &tmu10_platform_data,
438 .resource = tmu10_resources,
443 .channel_offset = 0x1c,
447 static struct resource tmu11_resources[] = {
463 .platform_data = &tmu11_platform_data,
465 .resource = tmu11_resources,
497 static const unsigned int ts_shift[] =
TS_SHIFT;
500 .channel = dmac0_channels,
512 static struct resource dmac0_resources[] = {
537 .name =
"sh-dma-engine",
539 .resource = dmac0_resources,
542 .platform_data = &dma0_platform_data,
546 #define USB_EHCI_START 0xffe70000
547 #define USB_OHCI_START 0xffe70400
549 static struct resource usb_ehci_resources[] = {
566 .dma_mask = &usb_ehci_device.
dev.coherent_dma_mask,
569 .num_resources =
ARRAY_SIZE(usb_ehci_resources),
570 .resource = usb_ehci_resources,
573 static struct resource usb_ohci_resources[] = {
590 .dma_mask = &usb_ohci_device.
dev.coherent_dma_mask,
593 .num_resources =
ARRAY_SIZE(usb_ohci_resources),
594 .resource = usb_ohci_resources,
628 #define USBCTL0 0xffe70858
629 #define CLOCK_MODE_MASK 0xffffff7f
630 #define EXT_CLOCK_MODE 0x00000080
638 #define USBINITREG1 0xffe70094
639 #define USBINITREG2 0xffe7009c
640 #define USBINITVAL1 0x00ff0040
641 #define USBINITVAL2 0x00000001
643 #define USBPCTL1 0xffe70804
644 #define USBST 0xffe70808
645 #define PHY_ENB 0x00000001
646 #define PLL_ENB 0x00000002
647 #define PHY_RST 0x00000004
648 #define ACT_PLL_STATUS 0xc0000000
650 static void __init sh7786_usb_setup(
void)
726 static struct intc_vect sh7786_vectors[] __initdata = {
770 #define CnINTMSK0 0xfe410030
771 #define CnINTMSK1 0xfe410040
772 #define CnINTMSKCLR0 0xfe410050
773 #define CnINTMSKCLR1 0xfe410060
774 #define CnINT2MSKR0 0xfe410a20
775 #define CnINT2MSKR1 0xfe410a24
776 #define CnINT2MSKR2 0xfe410a28
777 #define CnINT2MSKR3 0xfe410a2c
778 #define CnINT2MSKCR0 0xfe410a30
779 #define CnINT2MSKCR1 0xfe410a34
780 #define CnINT2MSKCR2 0xfe410a38
781 #define CnINT2MSKCR3 0xfe410a3c
782 #define INTMSK2 0xfe410068
783 #define INTMSKCLR2 0xfe41006c
785 #define INTDISTCR0 0xfe4100b0
786 #define INTDISTCR1 0xfe4100b4
787 #define INT2DISTCR0 0xfe410900
788 #define INT2DISTCR1 0xfe410904
789 #define INT2DISTCR2 0xfe410908
790 #define INT2DISTCR3 0xfe41090c
792 static struct intc_mask_reg sh7786_mask_registers[] __initdata = {
806 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
WDT },
821 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
836 static struct intc_prio_reg sh7786_prio_registers[] __initdata = {
839 { 0xfe410800, 0, 32, 8, { 0, 0, 0,
WDT } },
855 { 0xfe410824, 0, 32, 8, { 0, 0,
SCIF2,
SCIF3 } },
858 { 0xfe41082c, 0, 32, 8, { 0, 0, 0, 0 } },
859 { 0xfe410830, 0, 32, 8, { 0, 0, 0, 0 } },
860 { 0xfe410834, 0, 32, 8, { 0, 0, 0, 0 } },
861 { 0xfe410838, 0, 32, 8, { 0, 0, 0,
PCIeC0_0 } },
865 { 0xfe410844, 0, 32, 8, { 0, 0, 0, 0 } },
866 { 0xfe410848, 0, 32, 8, { 0, 0,
I2C0,
I2C1 } },
873 { 0xfe41085c, 0, 32, 8, { 0, 0, 0, 0 } },
874 { 0xfe410860, 0, 32, 8, { 0, 0, 0, 0 } },
875 { 0xfe410090, 0xfe4100a0, 32, 4,
880 static struct intc_subgroup sh7786_subgroups[] __initdata = {
881 { 0xfe410c20, 32,
SCIF1,
882 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
TXI1,
BRI1,
RXI1,
ERI1 } },
886 static struct intc_desc sh7786_intc_desc __initdata = {
889 .vectors = sh7786_vectors,
891 .mask_regs = sh7786_mask_registers,
892 .nr_mask_regs =
ARRAY_SIZE(sh7786_mask_registers),
893 .subgroups = sh7786_subgroups,
895 .prio_regs = sh7786_prio_registers,
896 .nr_prio_regs =
ARRAY_SIZE(sh7786_prio_registers),
901 static struct intc_vect vectors_irq0123[] __initdata = {
906 static struct intc_vect vectors_irq4567[] __initdata = {
911 static struct intc_sense_reg sh7786_sense_registers[] __initdata = {
916 static struct intc_mask_reg sh7786_ack_registers[] __initdata = {
922 vectors_irq0123,
NULL, sh7786_mask_registers,
923 sh7786_prio_registers, sh7786_sense_registers,
924 sh7786_ack_registers);
927 vectors_irq4567,
NULL, sh7786_mask_registers,
928 sh7786_prio_registers, sh7786_sense_registers,
929 sh7786_ack_registers);
933 static struct intc_vect vectors_irl0123[] __initdata = {
944 static struct intc_vect vectors_irl4567[] __initdata = {
961 #define INTC_ICR0 0xfe410000
962 #define INTC_INTMSK0 CnINTMSK0
963 #define INTC_INTMSK1 CnINTMSK1
964 #define INTC_INTMSK2 INTMSK2
965 #define INTC_INTMSKCLR1 CnINTMSKCLR1
966 #define INTC_INTMSKCLR2 INTMSKCLR2
1025 static int __init sh7786_devices_setup(
void)