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 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; }
static int __init system3_init(void) { int ret = 0; DPRINTK( "%s\n", "START" ); if ( !machine_is_pt_system3() ) { ret = -EINVAL; goto DONE; } /* init control register */ PT_CTRL0 = PT_CTRL0_INIT; PT_CTRL1 = 0x02; PT_CTRL2 = 0x00; DPRINTK( "CTRL[0]=0x%02x\n", PT_CTRL0 ); DPRINTK( "CTRL[1]=0x%02x\n", PT_CTRL1 ); DPRINTK( "CTRL[2]=0x%02x\n", PT_CTRL2 ); /* * Ensure that the memory bus request/grant signals are setup, * and the grant is held in its inactive state. */ sa1110_mb_disable(); /* * Probe for a SA1111. */ ret = sa1111_probe(PT_SA1111_BASE); if (ret < 0) { printk( KERN_WARNING"PT Digital Board: no SA1111 found!\n" ); goto DONE; } /* * 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(); system3_init_irq(); #if defined( CONFIG_CPU_FREQ ) ret = cpufreq_register_notifier(&system3_clkchg_block); if ( ret != 0 ) { printk( KERN_WARNING"PT Digital Board: could not register clock scale callback\n" ); goto DONE; } #endif ret = 0; DONE: DPRINTK( "ret=%d\n", ret ); return ret; }
static int __init neponset_init(void) { int ret; /* * The Neponset is only present on the Assabet machine type. */ if (!machine_is_assabet()) return -ENODEV; /* * Ensure that the memory bus request/grant signals are setup, * and the grant is held in its inactive state, whether or not * we actually have a Neponset attached. */ sa1110_mb_disable(); if (!machine_has_neponset()) { printk(KERN_DEBUG "Neponset expansion board not present\n"); return -ENODEV; } if (WHOAMI != 0x11) { printk(KERN_WARNING "Neponset board detected, but " "wrong ID: %02x\n", WHOAMI); return -ENODEV; } /* * Disable GPIO 0/1 drivers so the buttons work on the module. */ NCR_0 |= NCR_GP01_OFF; /* * Neponset has SA1111 connected to CS4. We know that after * reset the chip will be configured for variable latency IO. */ /* FIXME: setup MSC2 */ /* * Probe for a SA1111. */ ret = sa1111_probe(NEPONSET_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(); neponset_init_irq(); return 0; }