static int __init sh7786_devices_setup(void)
{
	int ret, irq;

	sh7786_usb_setup();

	irq = intc_irq_lookup(sh7786_intc_desc.name, TXI1);
	if (irq > 0) {
		scif1_platform_data.irqs[SCIx_TXI_IRQ] = irq;
		scif1_platform_data.irqs[SCIx_ERI_IRQ] =
			intc_irq_lookup(sh7786_intc_desc.name, ERI1);
		scif1_platform_data.irqs[SCIx_BRI_IRQ] =
			intc_irq_lookup(sh7786_intc_desc.name, BRI1);
		scif1_platform_data.irqs[SCIx_RXI_IRQ] =
			intc_irq_lookup(sh7786_intc_desc.name, RXI1);
	}

	ret = platform_add_devices(sh7786_early_devices,
				   ARRAY_SIZE(sh7786_early_devices));
	if (unlikely(ret != 0))
		return ret;

	return platform_add_devices(sh7786_devices,
				    ARRAY_SIZE(sh7786_devices));
}
Example #2
0
static int __init sh7786_devices_setup(void)
{
	int ret, irq;

	sh7786_usb_setup();

	/*
	 * De-mux SCIF1 IRQs if possible
	 */
	irq = intc_irq_lookup(sh7786_intc_desc.name, TXI1);
	if (irq > 0) {
		scif1_demux_resources[1].start =
			intc_irq_lookup(sh7786_intc_desc.name, ERI1);
		scif1_demux_resources[2].start =
			intc_irq_lookup(sh7786_intc_desc.name, RXI1);
		scif1_demux_resources[3].start = irq;
		scif1_demux_resources[4].start =
			intc_irq_lookup(sh7786_intc_desc.name, BRI1);

		scif1_device.resource = scif1_demux_resources;
		scif1_device.num_resources = ARRAY_SIZE(scif1_demux_resources);
	}

	ret = platform_add_devices(sh7786_early_devices,
				   ARRAY_SIZE(sh7786_early_devices));
	if (unlikely(ret != 0))
		return ret;

	return platform_add_devices(sh7786_devices,
				    ARRAY_SIZE(sh7786_devices));
}