static int __init jornada720_init(void) { GPDR |= GPIO_GPIO20; TUCR = JORTUCR_VAL; /* set the oscillator out to the SA-1101 */ GPSR = GPIO_GPIO20; udelay(1); GPCR = GPIO_GPIO20; udelay(1); GPSR = GPIO_GPIO20; udelay(20); SKCR = JORSKCR_INIT; /* Turn on the PLL, enable Ready and enable nOE assertion from DC */ mdelay(100); SBI_SKCR = JORSKCR_RCLK;/* turn on the RCLOCK */ SBI_SMCR = 0x35; /* initialize the SMC (debug SA-1111 reset */ PCCR = 0; /* initialize the S2MC (debug SA-1111 reset) */ /* LDD4 is speaker, LDD3 is microphone */ PPSR &= ~(PPC_LDD3 | PPC_LDD4); PPDR |= PPC_LDD3 | PPC_LDD4; /* initialize extra IRQs */ set_GPIO_IRQ_edge(GPIO_GPIO1, GPIO_RISING_EDGE); sa1111_init_irq(IRQ_GPIO1); /* chained on GPIO 1 */ return 0; }
static void __init system3_init_irq(void) { int irq; DPRINTK( "%s\n", "START" ); /* SA1111 IRQ not routed to a GPIO. */ sa1111_init_irq(-1); /* setup extra IRQs */ irq = IRQ_SYSTEM3_SMC9196; irq_desc[irq].valid = 1; irq_desc[irq].probe_ok = 1; #if 0 /* Highspeed Serial Bus not yet used */ irq = PT_USAR_IRQ; irq_desc[irq].valid = 1; irq_desc[irq].probe_ok = 1; #endif /* IRQ by CPLD */ set_GPIO_IRQ_edge( GPIO_GPIO(25), GPIO_RISING_EDGE ); setup_arm_irq( IRQ_GPIO25, &system3_irq ); }
static int __init graphicsmaster_init(void) { int ret; if (!machine_is_graphicsmaster()) return -ENODEV; /* * Ensure that the memory bus request/grant signals are setup, * and the grant is held in its inactive state */ sa1110_mb_disable(); /* * Probe for SA1111. */ ret = sa1111_probe(ADS_SA1111_BASE); if (ret < 0) return ret; /* * We found it. Wake the chip up. */ sa1111_wake(); /* * The SDRAM configuration of the SA1110 and the SA1111 must * match. This is very important to ensure that SA1111 accesses * don't corrupt the SDRAM. Note that this ungates the SA1111's * MBGNT signal, so we must have called sa1110_mb_disable() * beforehand. */ sa1111_configure_smc(1, FExtr(MDCNFG, MDCNFG_SA1110_DRAC0), FExtr(MDCNFG, MDCNFG_SA1110_TDL0)); /* * Enable PWM control for LCD */ SKPCR |= SKPCR_PWMCLKEN; SKPWM0 = 0x7F; // VEE SKPEN0 = 1; SKPWM1 = 0x01; // Backlight SKPEN1 = 1; /* * We only need to turn on DCLK whenever we want to use the * DMA. It can otherwise be held firmly in the off position. */ SKPCR |= SKPCR_DCLKEN; /* * Enable the SA1110 memory bus request and grant signals. */ sa1110_mb_enable(); sa1111_init_irq(IRQ_BOARD_START); return 0; }
static void __init neponset_init_irq(void) { sa1111_init_irq(-1); /* SA1111 IRQ not routed to a GPIO */ /* setup extra Neponset IRQs */ irq_desc[IRQ_NEPONSET_SMC9196].valid = 1; irq_desc[IRQ_NEPONSET_SMC9196].probe_ok = 1; irq_desc[IRQ_NEPONSET_USAR].valid = 1; irq_desc[IRQ_NEPONSET_USAR].probe_ok = 1; set_GPIO_IRQ_edge(GPIO_GPIO25, GPIO_RISING_EDGE); setup_arm_irq(IRQ_GPIO25, &neponset_irq); }
static void __init neponset_init_irq(void) { int irq; sa1111_init_irq(-1); /* SA1111 IRQ not routed to a GPIO */ /* setup extra Neponset IRQs */ irq = NEPONSET_ETHERNET_IRQ; irq_desc[irq].valid = 1; irq_desc[irq].probe_ok = 1; irq = NEPONSET_USAR_IRQ; irq_desc[irq].valid = 1; irq_desc[irq].probe_ok = 1; set_GPIO_IRQ_edge(ASSABET_GPIO_NEP_IRQ, GPIO_RISING_EDGE); setup_arm_irq(ASSABET_IRQ_GPIO_NEP_IRQ, &neponset_irq); }
static int __init adsbitsy_init(void) { int ret; if (!machine_is_adsbitsy()) return -ENODEV; /* * Ensure that the memory bus request/grant signals are setup, * and the grant is held in its inactive state */ sa1110_mb_disable(); /* Bitsy uses GPIO pins for SPI interface to AVR * Bitsy Plus uses the standard pins instead. * it also needs to reset the AVR when booting */ PPAR |= PPAR_SSPGPIO; /* * Reset SA1111 */ GPCR |= GPIO_GPIO26; udelay(1000); GPSR |= GPIO_GPIO26; #ifndef CONFIG_LEDS_TIMER // Set Serial port 1 RTS and DTR Low during sleep PGSR |= GPIO_GPIO15 | GPIO_GPIO20; #else // only RTS (because DTR is also the LED // which should be off during sleep); PGSR |= GPIO_GPIO15; #endif // Set Serial port 3RTS Low during sleep PGSR |= GPIO_GPIO19; /* * Probe for SA1111. */ ret = sa1111_probe(ADSBITSY_SA1111_BASE); if (ret < 0) return ret; /* * We found it. Wake the chip up. */ sa1111_wake(); /* * The SDRAM configuration of the SA1110 and the SA1111 must * match. This is very important to ensure that SA1111 accesses * don't corrupt the SDRAM. Note that this ungates the SA1111's * MBGNT signal, so we must have called sa1110_mb_disable() * beforehand. */ sa1111_configure_smc(1, FExtr(MDCNFG, MDCNFG_SA1110_DRAC0), FExtr(MDCNFG, MDCNFG_SA1110_TDL0)); /* * We only need to turn on DCLK whenever we want to use the * DMA. It can otherwise be held firmly in the off position. */ SKPCR |= SKPCR_DCLKEN; /* * Enable the SA1110 memory bus request and grant signals. */ sa1110_mb_enable(); set_GPIO_IRQ_edge(GPIO_GPIO0, GPIO_RISING_EDGE); sa1111_init_irq(IRQ_GPIO0); return 0; }
static int __init graphicsmaster_init(void) { int ret; if (!machine_is_graphicsmaster()) return -ENODEV; /* * Ensure that the memory bus request/grant signals are setup, * and the grant is held in its inactive state */ sa1110_mb_disable(); /* GraphicsMaster uses GPIO pins for SPI interface to AVR */ /* use the alternate SSP pins */ PPAR |= PPAR_SSPGPIO; // Set RTS low during sleep PGSR |= GPIO_GPIO15 | GPIO_GPIO17 | GPIO_GPIO19; /* * Probe for SA1111. */ ret = sa1111_probe(ADS_SA1111_BASE); if (ret < 0) return ret; /* * We found it. Wake the chip up. */ sa1111_wake(); /* * The SDRAM configuration of the SA1110 and the SA1111 must * match. This is very important to ensure that SA1111 accesses * don't corrupt the SDRAM. Note that this ungates the SA1111's * MBGNT signal, so we must have called sa1110_mb_disable() * beforehand. */ sa1111_configure_smc(1, FExtr(MDCNFG, MDCNFG_SA1110_DRAC0), FExtr(MDCNFG, MDCNFG_SA1110_TDL0)); /* * Enable PWM control for LCD */ SKPCR |= SKPCR_PWMCLKEN; SACR1 &= ~SACR1_L3EN; ADS_DCR |= DCR_BACKLITE_ON; SKPWM0 = 0x01; // Backlight SKPEN0 = 1; SKPWM1 = 0x7F; // VEE SKPEN1 = 1; /* * We only need to turn on DCLK whenever we want to use the * DMA. It can otherwise be held firmly in the off position. */ SKPCR |= SKPCR_DCLKEN; /* * Enable the SA1110 memory bus request and grant signals. */ sa1110_mb_enable(); sa1111_init_irq(IRQ_GRAPHICSMASTER_SA1111); return 0; }