1 --- a/arch/mips/lantiq/irq.c
2 +++ b/arch/mips/lantiq/irq.c
4 #define ltq_eiu_w32(x, y) ltq_w32((x), ltq_eiu_membase + (y))
5 #define ltq_eiu_r32(x) ltq_r32(ltq_eiu_membase + (x))
7 +#ifdef CONFIG_SOC_XWAY
8 static unsigned short ltq_eiu_irq[MAX_EIU] = {
17 static struct resource ltq_icu_resource = {
20 .flags = IORESOURCE_MEM,
23 +#ifdef CONFIG_SOC_XWAY
24 static struct resource ltq_eiu_resource = {
26 .start = LTQ_EIU_BASE_ADDR,
27 .end = LTQ_EIU_BASE_ADDR + LTQ_ICU_SIZE - 1,
28 .flags = IORESOURCE_MEM,
32 static void __iomem *ltq_icu_membase;
33 +#ifdef CONFIG_SOC_XWAY
34 static void __iomem *ltq_eiu_membase;
37 void ltq_disable_irq(struct irq_data *d)
40 ltq_icu_w32(ltq_icu_r32(ier) | (1 << irq_nr), ier);
43 +#ifdef CONFIG_SOC_XWAY
44 static unsigned int ltq_startup_eiu_irq(struct irq_data *d)
53 static struct irq_chip ltq_irq_type = {
56 .irq_mask_ack = ltq_mask_and_ack_irq,
59 +#ifdef CONFIG_SOC_XWAY
60 static struct irq_chip ltq_eiu_type = {
62 .irq_startup = ltq_startup_eiu_irq,
64 .irq_mask = ltq_disable_irq,
65 .irq_mask_ack = ltq_mask_and_ack_irq,
69 static void ltq_hw_irqdispatch(int module)
73 do_IRQ((int)irq + INT_NUM_IM0_IRL0 + (INT_NUM_IM_OFFSET * module));
75 +#ifdef CONFIG_SOC_XWAY
76 /* if this is a EBU irq, we need to ack it or get a deadlock */
77 if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0))
78 ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_ISTAT) | 0x10,
83 #define DEFINE_HWx_IRQDISPATCH(x) \
86 panic("Failed to remap icu memory\n");
88 +#ifdef CONFIG_SOC_XWAY
89 if (insert_resource(&iomem_resource, <q_eiu_resource) < 0)
90 panic("Failed to insert eiu memory\n");
93 resource_size(<q_eiu_resource));
95 panic("Failed to remap eiu memory\n");
98 /* make sure all irqs are turned off by default */
99 for (i = 0; i < 5; i++)
102 for (i = INT_NUM_IRQ0;
103 i <= (INT_NUM_IRQ0 + (5 * INT_NUM_IM_OFFSET)); i++)
104 +#ifdef CONFIG_SOC_XWAY
105 if ((i == LTQ_EIU_IR0) || (i == LTQ_EIU_IR1) ||
107 irq_set_chip_and_handler(i, <q_eiu_type,
109 irq_set_chip_and_handler(i, <q_eiu_type,
113 irq_set_chip_and_handler(i, <q_irq_type,
116 --- a/arch/mips/lantiq/clk.c
117 +++ b/arch/mips/lantiq/clk.c
122 +#ifdef CONFIG_SOC_XWAY
123 static struct resource ltq_cgu_resource = {
125 .start = LTQ_CGU_BASE_ADDR,
128 /* remapped clock register range */
129 void __iomem *ltq_cgu_membase;
138 +#ifdef CONFIG_SOC_XWAY
139 if (insert_resource(&iomem_resource, <q_cgu_resource) < 0)
140 panic("Failed to insert cgu memory\n");
143 pr_err("Failed to remap cgu memory\n");
147 clk = clk_get(0, "cpu");
148 mips_hpt_frequency = clk_get_rate(clk) / ltq_get_counter_resolution();
149 write_c0_compare(read_c0_count());
150 --- a/arch/mips/lantiq/early_printk.c
151 +++ b/arch/mips/lantiq/early_printk.c
153 #include <lantiq_soc.h>
155 /* no ioremap possible at this early stage, lets use KSEG1 instead */
156 +#ifdef CONFIG_SOC_FALCON
157 +#define LTQ_ASC_BASE KSEG1ADDR(LTQ_ASC0_BASE_ADDR)
159 #define LTQ_ASC_BASE KSEG1ADDR(LTQ_ASC1_BASE_ADDR)
162 #define LTQ_ASC_FSTAT ((u32 *)(LTQ_ASC_BASE + 0x0048))
163 #define LTQ_ASC_TBUF ((u32 *)(LTQ_ASC_BASE + 0x0020))