Ejemplo n.º 1
0
static void __init assabet_map_io(void)
{
	extern void neponset_map_io(void);

	sa1100_map_io();
	iotable_init(assabet_io_desc);

#ifdef CONFIG_ASSABET_NEPONSET
	/*
	 * We map Neponset registers even if it isn't present since
	 * many drivers will try to probe their stuff (and fail).
	 * This is still more friendly than a kernel paging request
	 * crash.
	 */
	neponset_map_io();
#endif

	if (machine_has_neponset()) {
		/*
		 * When Neponset is attached, the first UART should be
		 * UART3.  That's what Angel is doing and many documents
		 * are stating this.
		 * We do the Neponset mapping even if Neponset support
		 * isn't compiled in so the user will still get something on
		 * the expected physical serial port.
		 */
		sa1100_register_uart(0, 3);
		sa1100_register_uart(2, 1);
		/*
		 * Set SUS bit in SDCR0 so serial port 1 functions.
		 * Its called GPCLKR0 in my SA1110 manual.
		 */
		Ser1SDCR0 |= SDCR0_SUS;
	} else {
		sa1100_register_uart_fns(&assabet_port_fns);
		sa1100_register_uart(0, 1);	/* com port */
		sa1100_register_uart(2, 3);	/* radio module */
	}

	/*
	 * Ensure that these pins are set as outputs and are driving
	 * logic 0.  This ensures that we won't inadvertently toggle
	 * the WS latch in the CPLD, and we don't float causing
	 * excessive power drain.  --rmk
	 */
	GPDR |= GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
	GPCR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;

	/*
	 * Set up registers for sleep mode.
	 */
	PWER = PWER_GPIO0;
	PGSR = 0;
	PCFR = 0;
	PSDR = 0;
}
Ejemplo n.º 2
0
static void __init assabet_map_io(void)
{
	sa1100_map_io();
	iotable_init(assabet_io_desc, ARRAY_SIZE(assabet_io_desc));

	/*
	 * Set SUS bit in SDCR0 so serial port 1 functions.
	 * Its called GPCLKR0 in my SA1110 manual.
	 */
	Ser1SDCR0 |= SDCR0_SUS;

	if (machine_has_neponset()) {
#ifdef CONFIG_ASSABET_NEPONSET
		extern void neponset_map_io(void);

		/*
		 * We map Neponset registers even if it isn't present since
		 * many drivers will try to probe their stuff (and fail).
		 * This is still more friendly than a kernel paging request
		 * crash.
		 */
		neponset_map_io();
#endif
	} else {
		sa1100_register_uart_fns(&assabet_port_fns);
	}

	/*
	 * When Neponset is attached, the first UART should be
	 * UART3.  That's what Angel is doing and many documents
	 * are stating this.
	 *
	 * We do the Neponset mapping even if Neponset support
	 * isn't compiled in so the user will still get something on
	 * the expected physical serial port.
	 *
	 * We no longer do this; not all boot loaders support it,
	 * and UART3 appears to be somewhat unreliable with blob.
	 */
	sa1100_register_uart(0, 1);
	sa1100_register_uart(2, 3);
}