Example #1
0
static void sa1111_start_hc(struct sa1111_dev *dev)
{
	unsigned int usb_rst = 0;

	printk(KERN_DEBUG __FILE__
	       ": starting SA-1111 OHCI USB Controller\n");

#ifdef CONFIG_SA1100_BADGE4
	if (machine_is_badge4()) {
		badge4_set_5V(BADGE4_5V_USB, 1);
	}
#endif

	if (machine_is_xp860() ||
	    machine_has_neponset() ||
	    machine_is_pfs168() ||
	    machine_is_badge4())
		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;

	
	sa1111_writel(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
		      dev->mapbase + SA1111_USB_RESET);

	
	sa1111_enable_device(dev);
	udelay(11);
	sa1111_writel(usb_rst, dev->mapbase + SA1111_USB_RESET);
}
Example #2
0
static void sa1111_start_hc(struct sa1111_dev *dev)
{
	unsigned int usb_rst = 0;

	printk(KERN_DEBUG __FILE__
	       ": starting SA-1111 OHCI USB Controller\n");

#ifdef CONFIG_SA1100_BADGE4
	if (machine_is_badge4()) {
		badge4_set_5V(BADGE4_5V_USB, 1);
	}
#endif

	if (machine_is_xp860() ||
	    machine_has_neponset() ||
	    machine_is_pfs168() ||
	    machine_is_badge4())
		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;

	/*
	 * Configure the power sense and control lines.  Place the USB
	 * host controller in reset.
	 */
	sa1111_writel(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
		      dev->mapbase + SA1111_USB_RESET);

	/*
	 * Now, carefully enable the USB clock, and take
	 * the USB host controller out of reset.
	 */
	sa1111_enable_device(dev);
	udelay(11);
	sa1111_writel(usb_rst, dev->mapbase + SA1111_USB_RESET);
}
static int __init neponset_init(void)
{
	platform_driver_register(&neponset_device_driver);

	/*
	 * 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;
	}

	return platform_add_devices(devices, ARRAY_SIZE(devices));
}
static int sa1111_start_hc(struct sa1111_dev *dev)
{
	unsigned int usb_rst = 0;
	int ret;

	dev_dbg(&dev->dev, "starting SA-1111 OHCI USB Controller\n");

	if (machine_is_xp860() ||
	    machine_has_neponset() ||
	    machine_is_pfs168() ||
	    machine_is_badge4())
		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;

	/*
	 * Configure the power sense and control lines.  Place the USB
	 * host controller in reset.
	 */
	sa1111_writel(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
		      dev->mapbase + USB_RESET);

	/*
	 * Now, carefully enable the USB clock, and take
	 * the USB host controller out of reset.
	 */
	ret = sa1111_enable_device(dev);
	if (ret == 0) {
		udelay(11);
		sa1111_writel(usb_rst, dev->mapbase + USB_RESET);
	}

	return ret;
}
Example #5
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;
	MSC1 = (MSC1 & ~0xffff) |
		MSC_NonBrst | MSC_32BitStMem |
		MSC_RdAcc(2) | MSC_WrAcc(2) | MSC_Rec(0);

	if (!machine_has_neponset())
		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);
}
Example #6
0
static int __init assabet_init(void)
{
	if (!machine_is_assabet())
		return -EINVAL;

	/*
	 * Set the IRQ edges
	 */
	set_GPIO_IRQ_edge(GPIO_GPIO23, GPIO_RISING_EDGE);	/* UCB1300 */

	if (machine_has_neponset()) {
		/*
		 * Angel sets this, but other bootloaders may not.
		 *
		 * This must precede any driver calls to BCR_set()
		 * or BCR_clear().
		 */
		ASSABET_BCR = BCR_value = ASSABET_BCR_DB1111;
		NCR_0 = 0;

#ifndef CONFIG_ASSABET_NEPONSET
		printk( "Warning: Neponset detected but full support "
			"hasn't been configured in the kernel\n" );
#endif
	}

	return 0;
}
Example #7
0
static void __init sa1111_ohci_configure(void)
{
	unsigned int usb_rst = 0;

	if (machine_is_xp860() ||
	    machine_has_neponset() ||
	    machine_is_accelent_sa() ||
	    machine_is_pfs168() ||
	    machine_is_badge4())
		usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;

	/*
	 * Configure the power sense and control lines.  Place the USB
	 * host controller in reset.
	 */
	USB_RESET = usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET;

	/*
	 * Now, carefully enable the USB clock, and take
	 * the USB host controller out of reset.
	 */
	SKPCR |= SKPCR_UCLKEN;
	udelay(11);
	USB_RESET = usb_rst;
}
int __devinit pcmcia_assabet_init(struct device *dev)
{
	int ret = -ENODEV;

	if (machine_is_assabet() && !machine_has_neponset())
		ret = sa11xx_drv_pcmcia_probe(dev, &assabet_pcmcia_ops, 1, 1);

	return ret;
}
Example #9
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;
}
Example #10
0
static void __init
fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi)
{
	/* This must be done before any call to machine_has_neponset() */
	map_sa1100_gpio_regs();
	get_assabet_scr();

	if (machine_has_neponset())
		printk("Neponset expansion board detected\n");
}
Example #11
0
static void __init assabet_init(void)
{
	/*
	 * Ensure that the power supply is in "high power" mode.
	 */
	GPDR |= GPIO_GPIO16;
	GPSR = GPIO_GPIO16;

	/*
	 * 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;
	PPDR |= PPC_TXD3 | PPC_TXD1;
	PPSR |= PPC_TXD3 | PPC_TXD1;

	sa1100fb_lcd_power = assabet_lcd_power;
	sa1100fb_backlight_power = assabet_backlight_power;

	if (machine_has_neponset()) {
		/*
		 * Angel sets this, but other bootloaders may not.
		 *
		 * This must precede any driver calls to BCR_set()
		 * or BCR_clear().
		 */
		ASSABET_BCR = BCR_value = ASSABET_BCR_DB1111;

#ifndef CONFIG_ASSABET_NEPONSET
		printk( "Warning: Neponset detected but full support "
			"hasn't been configured in the kernel\n" );
#endif
	}

	sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources,
			    ARRAY_SIZE(assabet_flash_resources));
	sa11x0_register_irda(&assabet_irda_data);
	sa11x0_register_mcp(&assabet_mcp_data);
}
Example #12
0
static int __init sa1111_uda1341_init(void)
{
	struct uda1341_cfg cfg;
	int ret;

	if ( !(	(machine_is_assabet() && machine_has_neponset()) ||
		machine_is_jornada720() ))
		return -ENODEV;

	ret = l3_attach_client(&uda1341, "l3-sa1111", "uda1341");
	if (ret)
		goto out;

	/* Acquire and initialize DMA */
	ret = sa1111_sac_request_dma(&output_stream.dma_ch, "SA1111 audio out",
				     SA1111_SAC_XMT_CHANNEL);
	if (ret < 0)
		goto release_l3;
	
	ret = sa1111_sac_request_dma(&input_stream.dma_ch, "SA1111 audio in",
				     SA1111_SAC_RCV_CHANNEL);
	if (ret < 0)
		goto release_dma;

	cfg.fs     = 256;
	cfg.format = FMT_I2S;
	l3_command(&uda1341, L3_UDA1341_CONFIGURE, &cfg);

	/* register devices */
	audio_dev_id = register_sound_dsp(&sa1111_audio_fops, -1);
	mixer_dev_id = register_sound_mixer(&uda1341_mixer_fops, -1);

	printk(KERN_INFO "SA1111 UDA1341 audio driver initialized\n");
	return 0;

release_dma:
	sa1100_free_dma(output_stream.dma_ch);
release_l3:
	l3_detach_client(&uda1341);
out:
	return ret;
}
Example #13
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);
}
Example #14
0
static int __init neponset_init(void)
{
	platform_driver_register(&neponset_device_driver);

	
	if (!machine_is_assabet())
		return -ENODEV;

	
	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;
	}

	return platform_add_devices(devices, ARRAY_SIZE(devices));
}
Example #15
0
/* sa1100_pcmcia_driver_init()
 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 *
 * This routine performs a basic sanity check to ensure that this
 * kernel has been built with the appropriate board-specific low-level
 * PCMCIA support, performs low-level PCMCIA initialization, registers
 * this socket driver with Card Services, and then spawns the daemon
 * thread which is the real workhorse of the socket driver.
 *
 * Please see linux/Documentation/arm/SA1100/PCMCIA for more information
 * on the low-level kernel interface.
 *
 * Returns: 0 on success, -1 on error
 */
static int __init sa1100_pcmcia_driver_init(void){
  servinfo_t info;
  struct pcmcia_init pcmcia_init;
  struct pcmcia_state state[SA1100_PCMCIA_MAX_SOCK];
  struct pcmcia_state_array state_array;
  unsigned int i, clock;
  unsigned long mecr;

  printk(KERN_INFO "SA-1100 PCMCIA (CS release %s)\n", CS_RELEASE);

  CardServices(GetCardServicesInfo, &info);

  if(info.Revision!=CS_RELEASE_CODE){
    printk(KERN_ERR "Card Services release codes do not match\n");
    return -1;
  }

  if(machine_is_assabet()){
#ifdef CONFIG_SA1100_ASSABET
    if(machine_has_neponset()){
#ifdef CONFIG_ASSABET_NEPONSET
      pcmcia_low_level=&neponset_pcmcia_ops;
#else
      printk(KERN_ERR "Card Services disabled: missing Neponset support\n");
      return -1;
#endif
    }else{
      pcmcia_low_level=&assabet_pcmcia_ops;
    }
#endif
  } else if (machine_is_freebird()) {
#ifdef CONFIG_SA1100_FREEBIRD
    pcmcia_low_level = &freebird_pcmcia_ops;
#endif
  } else if (machine_is_h3xxx()) {
#ifdef CONFIG_SA1100_H3XXX
    pcmcia_low_level = &h3600_pcmcia_ops;
#endif    
  } else if (machine_is_cerf()) {
#ifdef CONFIG_SA1100_CERF
    pcmcia_low_level = &cerf_pcmcia_ops;
#endif
  } else if (machine_is_graphicsclient()) {
#ifdef CONFIG_SA1100_GRAPHICSCLIENT
    pcmcia_low_level = &gcplus_pcmcia_ops;
#endif
  } else if (machine_is_xp860()) {
#ifdef CONFIG_SA1100_XP860
    pcmcia_low_level = &xp860_pcmcia_ops;
#endif
  } else if (machine_is_yopy()) {
#ifdef CONFIG_SA1100_YOPY
    pcmcia_low_level = &yopy_pcmcia_ops;
#endif
  } else if (machine_is_shannon()) {
#ifdef CONFIG_SA1100_SHANNON
    pcmcia_low_level = &shannon_pcmcia_ops;
#endif
  } else if (machine_is_pangolin()) {
#ifdef CONFIG_SA1100_PANGOLIN
    pcmcia_low_level = &pangolin_pcmcia_ops;
#endif
  } else if (machine_is_jornada720()) {
#ifdef CONFIG_SA1100_JORNADA720
    pcmcia_low_level = &jornada720_pcmcia_ops;
#endif
  } else if(machine_is_pfs168()){
#ifdef CONFIG_SA1100_PFS168
    pcmcia_low_level=&pfs168_pcmcia_ops;
#endif
  } else if(machine_is_flexanet()){
#ifdef CONFIG_SA1100_FLEXANET
    pcmcia_low_level=&flexanet_pcmcia_ops;
#endif
 } else if(machine_is_simpad()){
#ifdef CONFIG_SA1100_SIMPAD
    pcmcia_low_level=&simpad_pcmcia_ops;
#endif
  } else if(machine_is_graphicsmaster()) {
#ifdef CONFIG_SA1100_GRAPHICSMASTER
    pcmcia_low_level=&graphicsmaster_pcmcia_ops;
#endif
  } else if(machine_is_adsbitsy()) {
#ifdef CONFIG_SA1100_ADSBITSY
    pcmcia_low_level=&adsbitsy_pcmcia_ops;
#endif
  } else if(machine_is_stork()) {
#ifdef CONFIG_SA1100_STORK
    pcmcia_low_level=&stork_pcmcia_ops;
#endif
  }

  if (!pcmcia_low_level) {
    printk(KERN_ERR "This hardware is not supported by the SA1100 Card Service driver\n");
    return -ENODEV;
  }

  pcmcia_init.handler=sa1100_pcmcia_interrupt;

  if((sa1100_pcmcia_socket_count=pcmcia_low_level->init(&pcmcia_init))<0){
    printk(KERN_ERR "Unable to initialize kernel PCMCIA service.\n");
    return -EIO;
  }

  state_array.size=sa1100_pcmcia_socket_count;
  state_array.state=state;

  if(pcmcia_low_level->socket_state(&state_array)<0){
    printk(KERN_ERR "Unable to get PCMCIA status from kernel.\n");
    return -EIO;
  }

  /* We initialize the MECR to default values here, because we are
   * not guaranteed to see a SetIOMap operation at runtime.
   */
  mecr=0;

  clock = cpufreq_get(0);

  for(i=0; i<sa1100_pcmcia_socket_count; ++i){
    sa1100_pcmcia_socket[i].k_state=state[i];

    /* This is an interim fix. Apparently, SetSocket is no longer
     * called to initialize each socket (prior to the first detect
     * event). For now, we'll just manually set up the mask.
     */
    sa1100_pcmcia_socket[i].cs_state.csc_mask=SS_DETECT;

    sa1100_pcmcia_socket[i].virt_io=(i==0)?PCMCIA_IO_0_BASE:PCMCIA_IO_1_BASE;
    sa1100_pcmcia_socket[i].phys_attr=_PCMCIAAttr(i);
    sa1100_pcmcia_socket[i].phys_mem=_PCMCIAMem(i);

    MECR_FAST_SET(mecr, i, 0);
    MECR_BSIO_SET(mecr, i,
		  sa1100_pcmcia_mecr_bs(SA1100_PCMCIA_IO_ACCESS, clock));
    MECR_BSA_SET(mecr, i,
		 sa1100_pcmcia_mecr_bs(SA1100_PCMCIA_5V_MEM_ACCESS, clock));
    MECR_BSM_SET(mecr, i,
		 sa1100_pcmcia_mecr_bs(SA1100_PCMCIA_5V_MEM_ACCESS, clock));

    sa1100_pcmcia_socket[i].speed_io=SA1100_PCMCIA_IO_ACCESS;
    sa1100_pcmcia_socket[i].speed_attr=SA1100_PCMCIA_5V_MEM_ACCESS;
    sa1100_pcmcia_socket[i].speed_mem=SA1100_PCMCIA_5V_MEM_ACCESS;
  }

  MECR=mecr;

#ifdef CONFIG_CPU_FREQ
  if(cpufreq_register_notifier(&sa1100_pcmcia_notifier_block) < 0){
    printk(KERN_ERR "Unable to register CPU frequency change notifier\n");
    return -ENXIO;
  }
#endif

  /* Only advertise as many sockets as we can detect: */
  if(register_ss_entry(sa1100_pcmcia_socket_count, 
		       &sa1100_pcmcia_operations)<0){
    printk(KERN_ERR "Unable to register socket service routine\n");
    return -ENXIO;
  }

  /* Start the event poll timer.  It will reschedule by itself afterwards. */
  sa1100_pcmcia_poll_event(0);

  DEBUG(1, "sa1100: initialization complete\n");

  return 0;

}  /* sa1100_pcmcia_driver_init() */
static int __init sa1100_pcmcia_machine_init(void)
{
#ifdef CONFIG_SA1100_ASSABET
  if(machine_is_assabet()) {
    if(machine_has_neponset()) {
#ifdef CONFIG_ASSABET_NEPONSET
      pcmcia_low_level = &neponset_pcmcia_ops;
#else
      printk(KERN_ERR "Card Services disabled: missing Neponset support\n");
      return -1;
#endif
    } else
      pcmcia_low_level = &assabet_pcmcia_ops;
  }
#endif
#ifdef CONFIG_SA1100_BADGE4
  if (machine_is_badge4())
    pcmcia_low_level = &badge4_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_FREEBIRD
  if (machine_is_freebird())
    pcmcia_low_level = &freebird_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_H3600
  if (machine_is_h3600())
    pcmcia_low_level = &h3600_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_CERF
  if (machine_is_cerf())
    pcmcia_low_level = &cerf_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_GRAPHICSCLIENT
  if (machine_is_graphicsclient())
    pcmcia_low_level = &gcplus_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_XP860
  if (machine_is_xp860())
    pcmcia_low_level = &xp860_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_YOPY
  if (machine_is_yopy())
    pcmcia_low_level = &yopy_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_SHANNON
  if (machine_is_shannon())
    pcmcia_low_level = &shannon_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_PANGOLIN
  if (machine_is_pangolin())
    pcmcia_low_level = &pangolin_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_JORNADA720
  if (machine_is_jornada720())
    pcmcia_low_level = &jornada720_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_PFS168
  if(machine_is_pfs168())
    pcmcia_low_level = &pfs168_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_FLEXANET
  if(machine_is_flexanet())
    pcmcia_low_level = &flexanet_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_SIMPAD
  if(machine_is_simpad())
    pcmcia_low_level = &simpad_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_GRAPHICSMASTER
  if(machine_is_graphicsmaster())
    pcmcia_low_level = &graphicsmaster_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_ADSAGC
  if(machine_is_adsagc())
    pcmcia_low_level = &graphicsmaster_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_ADSBITSY
  if(machine_is_adsbitsy())
    pcmcia_low_level = &adsbitsy_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_ADSBITSYPLUS
  if(machine_is_adsbitsyplus())
    pcmcia_low_level = &adsbitsyplus_pcmcia_ops;
#endif
#ifdef CONFIG_SA1100_STORK
  if(machine_is_stork())
    pcmcia_low_level = &stork_pcmcia_ops;
#endif

  if (!pcmcia_low_level) {
    printk(KERN_ERR "This hardware is not supported by the SA1100 Card Service driver\n");
    return -ENODEV;
  }

  return 0;
}
void __init neponset_map_io(void)
{
	iotable_init(neponset_io_desc);
	if (machine_has_neponset())
		sa1100_register_uart_fns(&neponset_port_fns);
}
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;
}
Example #19
0
static void __init assabet_init(void)
{
	/*
	 * Ensure that the power supply is in "high power" mode.
	 */
	GPSR = GPIO_GPIO16;
	GPDR |= GPIO_GPIO16;

	/*
	 * 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
	 */
	GPCR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;
	GPDR |= GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM;

	/*
	 * Also set GPIO27 as an output; this is used to clock UART3
	 * via the FPGA and as otherwise has no pullups or pulldowns,
	 * so stop it floating.
	 */
	GPCR = GPIO_GPIO27;
	GPDR |= GPIO_GPIO27;

	/*
	 * Set up registers for sleep mode.
	 */
	PWER = PWER_GPIO0;
	PGSR = 0;
	PCFR = 0;
	PSDR = 0;
	PPDR |= PPC_TXD3 | PPC_TXD1;
	PPSR |= PPC_TXD3 | PPC_TXD1;

	sa11x0_ppc_configure_mcp();

	if (machine_has_neponset()) {
		/*
		 * Angel sets this, but other bootloaders may not.
		 *
		 * This must precede any driver calls to BCR_set()
		 * or BCR_clear().
		 */
		ASSABET_BCR = BCR_value = ASSABET_BCR_DB1111;

#ifndef CONFIG_ASSABET_NEPONSET
		printk( "Warning: Neponset detected but full support "
			"hasn't been configured in the kernel\n" );
#else
		platform_device_register_simple("neponset", 0,
			neponset_resources, ARRAY_SIZE(neponset_resources));
#endif
	}

#ifndef ASSABET_PAL_VIDEO
	sa11x0_register_lcd(&lq039q2ds54_info);
#else
	sa11x0_register_lcd(&pal_video);
#endif
	sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources,
			    ARRAY_SIZE(assabet_flash_resources));
	sa11x0_register_irda(&assabet_irda_data);
	sa11x0_register_mcp(&assabet_mcp_data);
}
Example #20
0
static void __init
fixup_assabet(struct machine_desc *desc, struct param_struct *params,
	      char **cmdline, struct meminfo *mi)
{
	struct tag *t = (struct tag *)params;

	/* This must be done before any call to machine_has_neponset() */
	map_sa1100_gpio_regs();
	get_assabet_scr();

	if (machine_has_neponset())
		printk("Neponset expansion board detected\n");

	/*
	 * Apparantly bootldr uses a param_struct.  Groan.
	 */
	if (t->hdr.tag != ATAG_CORE)
		convert_to_tag_list(params, 1);

	if (t->hdr.tag != ATAG_CORE) {
		t->hdr.tag = ATAG_CORE;
		t->hdr.size = tag_size(tag_core);
		t->u.core.flags = 0;
		t->u.core.pagesize = PAGE_SIZE;
		t->u.core.rootdev = RAMDISK_MAJOR << 8 | 0;
		t = tag_next(t);

		t->hdr.tag = ATAG_MEM;
		t->hdr.size = tag_size(tag_mem32);
		t->u.mem.start = 0xc0000000;
		t->u.mem.size  = 32 * 1024 * 1024;
		t = tag_next(t);


		/*
		 * Note that Neponset RAM is slower...
		 * and still untested.
		 * This would be a candidate for
		 * _real_ NUMA support.
		 */
		if (machine_has_neponset() && 0) {
			t->hdr.tag = ATAG_MEM;
			t->hdr.size = tag_size(tag_mem32);
			t->u.mem.start = 0xd0000000;
			t->u.mem.size  = 32 * 1024 * 1024;
			t = tag_next(t);
		}

		t->hdr.tag = ATAG_RAMDISK;
		t->hdr.size = tag_size(tag_ramdisk);
		t->u.ramdisk.flags = 1;
		t->u.ramdisk.size = 8192;
		t->u.ramdisk.start = 0;
		t = tag_next(t);

		t->hdr.tag = ATAG_INITRD;
		t->hdr.size = tag_size(tag_initrd);
		t->u.initrd.start = 0xc0800000;
		t->u.initrd.size = 3 * 1024 * 1024;
		t = tag_next(t);

		t->hdr.tag = ATAG_NONE;
		t->hdr.size = 0;
	}
}